Brushless motors are everywhere now. From RC planes to CNC machines, if you need a lot of power to spin something really fast, you’re probably going to use a brushless motor. A brushless motor requires a motor controller, and for most of us, this means cheap Electronic Speed Controllers (ESC) from a warehouse in China. [Ben] had a better idea: build his own ESC. He’s been working on this project for a while, and he’s polishing the design to implement a very cool feature – position control.
We’ve seen [Ben]’s work on his custom, homebrew ESC before. It is, by any measure, a work of art. It’s capable of driving brushless and brushed motors with a powerful STM32F4 microcontroller running ChibiOS that’s able to communicate with other microcontrollers through I2C, UART, and CAN bus. If you want to build anything with a motor – from a CNC machine to an RC helicopter to an electric long board – this is the motor controller for you.
[Ben]’s latest update considers position encoders. Knowing how fast a motor is turning is very important to knowing how fast a wheel is turning, how much torque the motor is generating, and an awesome step in building the finest motor controller ever made.
Like the last update, [Ben] demonstrates the great control program written for this ESC. This GUI programs the microcontroller on the controller, with protection from high and low voltages and currents, high RPMs, duty cycle changes, and support for regenerative braking.
Thanks [Dudelbert] for sending this one in.
For the love of god put some glue or tape or something over those capacitor terminals so you don’t short everything.
This is a post-production photo, it’s taken to show all the components. For production uses people usually put heat shrink tubing on.
Benjamin Vedder also made this CAP-breakout board: https://github.com/vedderb/CapPCB
Thanks HAD everyday you give me something!
Only phase current sensing? How the hell does it resolve position from just current??
Ah, never mind, now I see the hall sensor connector….
It also senses voltage at terminals.
It’s called sensorless BLDC driver, and it’s possible :)
The VESC is originally designed for sensorless mode using the shunts to measure the phases. You can clearly see 2 shunts between the FET’s in the picture above.
As I have said – “only phase current sensing?” I can see the shunts in the schematic, but no voltage dividers/comparators for measuring the BEMF voltage, which is why I was puzzled how it can resolve position only from current…
@AKA I might be wrong, but I’m guessing you’re thinking backwards? It doesn’t “resolve position from current”, it *uses* current to enforce position. The shunts tell you roughly where you are, then you use cunning analogue (pwm) blending (from vector maths) to cause the stator magnets to want to sit in the position you tell it.
Oh there are voltage dividers; but either they are the small resistors between FETs or on the other side of the PCB.
Those AMT encoders are awful. I have a bunch of them and they just dont perform as well as the optical encoders from agilent/usdigital. They actually have some position delay from the interpolation going on inside of them which causes issues with tuning and running of servos. I had tried one on the Y axis servo of my laser cutter and it just would not tune, replaced it with an old HP HEDS-9000 series and it tuned right away.
pff! if you need accuracy then you should be using steppers.
The problem with steppers are lost steps. So the accuracy depends on the load and you do not see if steps are lost. There for a closed loop system like this has strong advantages.
It has nothing to do with accuracy. It is stability and performance.
Plus stepper accuracy goes out the window once you go anything past half step mode.
pff yourself. If you want accuracy, you use servo motors and optical encoders. They are precision devices that allow you to position the motor to within +/-1 encoder count which could be 8000 counts per revolution.
A stepper motor’s accuracy is dependent on how accurately the laminations of the core are stamped, the extruded motor frame, positioning of the magnets, and placement of the coils.
Right, but pff again. 8000 counts is child’s play.
I work with 18 bit encoders (262144 counts) and 31 bit (2 million+) Sin/Cos encoders on industrial servos.
Also resolver systems can have extremely high equivalent resolution depending on your evaluation electronics.
This is great. I’ve looked at the AMS magnetic sensor with an idea of doing the same thing. Having a closed-loop spindle motor on my CNC mill would be great for tapping threads in metal.
Interesting.
PIC, TI and ST have a bunch of eval boards for driving BLDC, PMSM motors with hall effect or FOC Clarke / Park transforms. The ST ones are a bit more interesting since they make nucleo compatible ones.
If ST’s tool chain got a nice simple installer that loaded up everything including settingup OpenOCD, so that the developer just has to plugin an STLink2 and start debugging on a nucleo board then they’d be on to something big.
Nice work on your project! Looking on your site, I especially like your work with video overlays using OpenCV. I haven’t seen a lot of Chibios stuff before so thanks for documenting it.
Thanks for sharing such a great project!
Is there any way to purchase the boards populated and pre-assembled?
Yes, there are. Strangely enough they sell out quite fast tho where ever they pop up. Lately some electric skateboard companys have picked them up and sell them in theyr shops too, and there is a guy in germany who has a website and sells them made by a professional company: http://www.esk8.de/shop
We make and sell them here in the US: http://www.ollinboardcompany.com/product/vedder-s-speed-controller
Our builds are well know for their reliability and quality. We also offer customization and heat-sinked options.
Do you kick anything back to Ben for using his designs? I get it’s open source, but curious about that…
We do! I have been told we have given Vedder 90% of all the donations he has ever received.
Check out this extensive VESC FAQ archive. http://www.electric-skateboard.builders/search?q=vesc%20FAQ
These articles are great, don’t get me wrong. But they go over my head. LOL Nice though.
How to used vesc for cnc?? Cnc control motor by step/dir. And vesc not suport step/dir. So what should i do?