mxlemming
🚴♂️ Mega poster
- Joined
- Jul 17, 2020
- Messages
- 1,311
Edit: update March 2021:
Page 5 for 187A double pulse testing at 16sPage 4 for ~60A phase for a minute without heatsink
Design has moved to 4 layer board since jlcpcb price difference became negligible
FOC implemented, running well on limited testing with ebike. Current waveforms page 5.
Edit: Update May 2022:
For Project now hasPage 7 sensorless ,
Page 8 crude HFI (needs manual fiddling),
Page 9 field weakening, tracking when PWM disabled
Runs on F405 (VESC) hardware, F401 (e.g. Blackpill) and F303
The F303 board with IPT015N10 has been used for currents up to 100A setpoint at 20s, and doesn;t get too hot with a small heatsink. Peak currents can be run higher.
Edit: update July 2022:
Project now has:Configuration files for easy setup
Support for SPI absolute encoder TLE5012B
Revised serial interface to enable commands and setpoints
MTPA
Revised circle limitation (voltage output clipping)
Edit: Update October 2023:
Support for ABI encoderHandbrake with ABI encoder
PWM startup encoder
Hall startup mode
HFI fully functional for salient motors
Field weakening V2 that can run motors up to 2x+ base speed
Terminal access via T-Term by Jens Kerrines
The open source version is now a legitimate alternative to VESC firmware for traction applications and can be installed on most VESC targets (provided you have the original header files and are willing to do some translation).
Edit update June 2026:
A few years ago (2?) I largely stopped adding to the MESC firmware codebase except critical patches because of the AI scraping going on. There's a lot of stuff in here that's very non trivial and it felt inevitable that I was just feeding the AI.
The code in various improved and tidied forms had gone into a lot of systems at this stage, and despite going off public git, the development continued at double speed, being combined with industry expert in motion control Elwin Boots' effort to become the basis for Dynamesys' firmware. We are pushing it to extreme performance and useability, along with well implemented improvement to the safety and fault handling for mission critical applications, along with additions like the Direct Torque control, high speed position control, various motor types and improved sensorless observer methods. The biggest user facing improvement though is the easy setup procedures.
Visit www.dynamesys.com with pending products due to become available through Torque Sphere (Home - Torque Sphere)
We're not actively pushing this for general consumers and ebike stuff, it's much more industry focused with a totally unique and proprietary codebase with copyright 100% owned by us. We're pushing the edge of performance out of a love for doing this rather than in any way trying to compete with the cheap stuff on alibaba.
The hardware described below was my first ESC, but despite that, the layout was copied by many subsequently with the first TOLL versions performance matching any currently available equivalent single TOLL on FR4 ESC, the later IMS board was promptly imitated by many and made available on AliExpress... And about 2 years ago I was paid to make the designs that became the VESC Labs Maxim, Maxim+, Classic+ with various derivatives following them.
Dynamesys now designs and makes it's own hardware and customs for many large companies. It's been a fun but very difficult ride.
Hi forum, second post ever. I'm not really an online person, but Hi.
I'm making my own ESC, basically because I like tinkering with electronics and kind of want to for fun, partly because I'm learning software, but also because there wasn't anything vaguely small, cheap and powerful for my EBike... VESC is upwards of 200$ for an original from Trampa, upwards of 65 for a basic Flipsky 4.20 that's really only good for 600W continuous and probably only 10 ish series cells, despite saying 13s.
Edit: I've been running fs 4.2 on 13s, FOC, 60A phase. Not for long but maybe 20km. Credit to flipsky where due.
So my target is cheap and powerful and high(er) voltage capable, kind of the same intention as Shaman's Cheap FOCer, but not VESC, and probably substantially cheaper for similar or more power as a result. That's the target anyway.
I'm at the stage where I spun my bike wheel with the R1.0 board. Slowly.
I made the following design decisions:
Standard footprint <1$ 600V 4A gate drives and TO263 FETs, no special combined funnyness like DRV chips.
STM32f303CB micro - they're cheap at like 2USD, embed opamps, have an FPU, can definitely run FOC (ST have standard software for it that I have flashed onto an earlier, tiny, non ebike board I made with the same MCU).
I have used a TI Boost converter 5V-12V for the gate drivers, so the upper voltage limit can go to whatever the FETs are rated to, by simply disconnecting the buck converter (snip/DNF a ferrite bead) and powering the logic from 5V on the PWM in, or USB in. Below 60V operation and a TI buck converter can create the 5V rail.
I militantly 2 layer boarded and one sided assembled it, and kept the ground plane as unbroken as possible. Heatsink can be bolted to the underside. I think the BoM cost is below 25$. Think.
I'd like a few bits of feedback/commentary:
1) What are the best connectors, and what do we really want for our EBikes and boards? Currently I've got Molex Picoblades, because my motor had a picoblade put on it by my friend... but I'm sure something else is preferable, those Picoblades are a complete PITA and don't seem very robust either.
a) Hall connector
b) PWM in connector
c) UART connector
d) I have an I2C, 3v3 and GND connection, in case of plugging in an inertial sensor, or interfacing with a BMS or SSD1106 screen thingy
e) There's a USB B micro that is probably not going to change.
2) What other inputs are desireable? (none is a great answer).
3) Any clangers anyone can spot? Appears to work pretty well based on my limited testing so far, but I have yet to run it beyond 20A phase current and 23V, owing to the PSUs I have...
4) How the heck do I bench test a board that'll drive something in the region of several kW of power? How do I sink that much mechanical energy while not riding up a hill (at my desk or in my garage)? I've got a load of car batteries kicking about to generate 48V, so got that side of things covered...
Cheers,
David
Last edited: