So almost a year ago, I posted about how I started work on a field oriented control ESC:

Redesigning multirotor ESC's

Some people in the comments already said how they made their own or started work on different ESC's. I went through 5 iterations of the ESC after the post.

Unfortunately, I never got any hardware working reliably for pretty simple issues in the end, which is frustrating. Primarily, I could never get the buck boosters of the TI DVR830x to work reliably and there were issues with SPI voltage and behavor. This caused a failure of 8-9 out of 10 boards or sometimes an entire batch. To produce one batch here is expensive: 60% import costs, $40 shipping for 2 boxes (one boards, one components) and then there's the currency rate of R$3 to the $1. In the end, to produce one batch here feels like spending $1200 dollars if I were in the US.

Important: I'm not saying the booster of the chip doesn't work correct, but that it's probably something in the process of my production (the "pizza oven bake") or the design of the component values around it or routing of the board.

Anyway, moving on... I did huge amounts of research into field oriented control. I built a FOC simulator in python and there's some 150MB of documents related to FOC implementations, ranging from presentations of TI about the subject to application notes, research papers, etc, plus I include some remnants of the board designs. Obviously, no point including boards of failing hardware, so just the schematics...

From the image above, all blocks at the top are really easy. They're only conversions from 3-axis to 2-axis models using clarke/park transforms. The difficult part is the "angle and rpm estimator", which is where the magic really happens. Eroding all complexity... it's trying to figure out bemf magnitudes from the Ialpha and Ibeta currents (in a 2-axis view), so that over a couple of samples it can converge to an angle. Another piece of code then gets this angle estimate and figures out the rpm, which is fed back into the angle estimate, because the rpm doesn't change all that quick. All that's left is tuning and the correct L and R inputs for the motor you're using.

The repository is here, along with a README on where to find the stuff.

https://github.com/gtoonstra/foc_esc

Disclaimer: No guarantees that any of this stuff actually works...

Views: 2430

Comment by J. Kirk on July 21, 2015 at 10:36pm

Hi Gerard!

 

I see you've been involved in a DIY ESC project over the past year.

I'm just starting out to see if a DIY ESC project is feasible.

 

I want to start out with something simple like an airplane ESC. Just something with a simple throttle control. If I can get that working, then maybe a more difficult quad-copter type firmware control can be addressed.

 

I looked at some of your open source schematics concerning the TI DVR8030x. It looks way too complex for me.

 

I want to use an ATMega chip, and I don't want to deal will all the intricacies of driving all the FET signals off the ATMega. That means employing some sort of Controller Chip that is smarter than a simple driver. I need something the serves as a black box...easily driven by the Microcontroller...eliminating a lot of the complexity by handling all the commutation calculations in silicon of the controller.

 

To those ends, have you ever looked at the Allegro A4963 chip? According to the Datasheet, it was introduced in October of 2014. This newer chip is totally different from the Allegro A4960, which has been around since 2011.

 

The A4693 Press Release says:

"This new motor controller is targeted at the consumer, industrial and white goods markets with end applications to include: pumps, blowers, power and garden tools, hair dryers, portable mixers, and airborne drones."

 

It is only a 20-pin chip.

There is a Voltage pin, a Ground pin, and a Ground pad.

The CPU side contains:

- 4-pins of SPI bus,

- 1-PWM line to control the speed.

- 1 Fault output line.

- 1 Speed indicator output line.

The final 11-pins drive the FET side.

 

It looks like it can be put into various usage modes...with the "closed-loop speed control mode" being the most applicable to what I want in an ESC.

 

I wish there were some projects out there using it, and some better documentation. Allegro has absolutely nothing in the way of White Papers or AppNotes.

 

I know it will take multiple readings of the datasheet to begin to wrap my head around the concepts.

Comment by Gerard Toonstra on July 22, 2015 at 3:13am

I did use that A4960 chip, but had to dump it because it was taken off the market and also it's not suitable for projects that involve this kind of motor drive. What you could do is look for A4960 projects (they are around) and look into the source code there.

Personally, the ESC you're describing is already so much of a commodity, that I'm not sure why you'd build one yourself. The costs will surely be higher than buying one from China.

To get up to speed with how this could work, I recommend you find the BLDC controller thread on rcgroups.com, that's the best thread out there regarding BLDC control of all types with all kinds of technologies.

Comment

You need to be a member of DIY Drones to add comments!

Join DIY Drones

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service