Cheap FOCer (VESC 4.12 based design)

shaman said:
Nothing I did resolved the "ghost current" and the minute amount of duty cycle percentage that was being displayed. I found out that this seems like normal behavior of an idle VESC after viewing the video from the link below and other screen shots of people's VESC real time data. Real time data at 1:18 in the video is the same as mine showing approx. 0.3A and 0.1% duty cycle.

What's the range that your current sensing can measure? For example if you can measure up to 100A, it's not a big deal if you are reading 0.3A from noise.

I would move on and try to get a motor spinning. If you have troubles with that then maybe this ghost current is worth looking into.
 
Addy said:
What's the range that your current sensing can measure? For example if you can measure up to 100A, it's not a big deal if you are reading 0.3A from noise.

I would move on and try to get a motor spinning. If you have troubles with that then maybe this ghost current is worth looking into.

The range is up to 150A I think for 4.12. I agree with you that noise is most likely the cause as I've seen this behavior on other's VESC real time data readouts as well. Thank you for the insight.

I'll move on to attempting to spin a motor after I address my voltage/current sense signals mix up.
 
shaman said:
I'll move on to attempting to spin a motor after I address my voltage/current sense signals mix up.

I would cut the traces. Its easy to change the firmware for FOC, but for flux linkage parameter detection you also need to tweak the code to fix bldc mode and that might take some time. I had pwm top/bottom swapped in my first try, shit happens!
 
marcos said:
I would cut the traces. Its easy to change the firmware for FOC, but for flux linkage parameter detection you also need to tweak the code to fix bldc mode and that might take some time. I had pwm top/bottom swapped in my first try, shit happens!

Thanks man. It's not the end of the world but I'm kinda bummed. I've looked at the thread from the link below. It has suggestions on what to change for my situation but idk if that's the extent of it. I'm clicking around in ChibiOS Preview right now but I'm too inexperienced to know how to make it spit out a bin file after editing the .c and .h files. Looks like PCB surgery it is.

https://vesc-project.com/node/363
 
I wouldn't bother trying to build in windows. Its extremely simple to build in ubuntu.

sudo apt install gcc-arm-none-eabi binutils-arm-none-eabi
cd <firmware directory>
make

If you are not used to embedded firmware development, for sure start cutting traces and leave the firmware learning for later when you have more time.
 
I'll have to install a VM with Ubuntu after all of this. I wanna get experience with it and the firmware for the VESC. I may have to tweak a thing or two when I do my high voltage version. I appreciate the advice marcos!
 
:!: Project Update

I got good news guys!

So I decided to just try some firmware alterations just to see what what would happen...and Bingo! I was able to do both FOC and BLDC calibrations and spin the motor with both methods! Looks like I won't have to do PCB surgery after all. Still trying to figure out the sampling settings in the VESC Tool though. I wanna see those sinusoidal phase currents.

So the next thing I’ll do is get scope shots of the switch nodes. I need to see if there’s any bad ringing and voltage spikes. Those spikes will kill the DRV if it’s too intense.
 
So while we wait for me to make more progress, let’s discuss preferred connectors for the battery, phase cables, throttle, and hall effect sensors. I will probably ship the test controllers with cables and connectors if enough people agree on the same thing.

For the battery connector I see XT60 or XT90 being commonly used with success. I’ll most likely go with these unless someone suggests something better.

For phase cables, I’ve personally used the MT60 connectors. They’re like a triple connector version of the XT60. You can use up to 12awg wire with them. They look kinda cool and I can ship the other end of the connector as well to be attached to your motor phases. Would the community accept these or prefer something else like bullet connectors?

For the analog throttle and hall effect sensors I was thinking just some generic 3 pin and 5 pin connectors. I don't really know what people prefer here or what is commonly used. This one I'll need help with.

Let me know what you guys think!
 
Amphenol weatherpack or a db9 lol. Connectors.
 
Since everyone has different connectors on their existing setup, and some people have minimal connectors, I was going to have bare phase and battery wires leaving, so people could put their own connectors on. For I/O connectors I was going to use a SP16 style weatherproof aviation connector, and provide a plug, so people could either wire everything into the connector, or make up a pigtail with breakout connectors.
 
Ok. Maybe I'll offer two different cable configurations to the testers. One with all the most common connectors and one with no connectors. That way people can set it up the way they want if they deviate from the norm.
 
Yeah, less work and less waste to do it that way - plus, people might put different connectors or signals on different cables and would have to redo connectors anyway
 
Ok so I've got another question for the community regarding continuous current limits. Most continuous ratings I see for professional motor controllers are the ratings they can handle for 1 hour. Unfortunately I don't have the kind of time to do 1 hour tests for every current limit data point I want to do. For reference, I intend to start at a 20A limit and increment by 10A or 5A from there until I find a value that exceeds max temps or causes significant thermal throttling by the firmware.

Is 10 minutes reasonable as long as I'm not detecting a significant temperature increase at the 10 minute mark? If not, what would you guys like to see? I'm also open to suggestions on test procedure if you know of something better.
 
I think stop test when the temperature stops rising by less than 3 degrees c/minute or the case hits 65 degrees c (that is the temp where a skin burn will occur in 1-4 seconds), any temp higher than that is unacceptable on the case.
 
Yeah I don't expect the case to get that hot. I would expect junction temperatures of the silicon in the FETs would be far past the limits by the time all of that aluminum of the case got to 65C. For clarification, I will be mainly monitoring the temperatures of the FETs, shunt resistors, and the DRV. I expect those to get the hottest during the testing. I'll still keep any eye on the surface temperature of the enclosure as well. Less than 3C/minute seems fair for calling it good. Thanks @bamitsram!
 
Nice Controller project, looks like what everybody should own :thumb: i would like to get my hands one some these, for testing and happy to leaf some cash for your effords!
 
I have a few testers lined up already but I'll add you to the list. I'll be letting all the volunteers know once the controllers are ready.
 
Question to the community concerning snubber capacitors. What are the best type of capacitors i.e. metalized film, ceramic, mylar, ect for reducing ringing on the switch nodes?
 
On a design like yours, if you have decent bulk capacitance, you might just be able to tweak the series gate resistors to slow the rise time a tad to cut out the ringing, rather than adding snubbers, otherwise a film cap of 1-2u would probably be enough
 
Thanks guys. I don't want to slow down rise time on the gates if I don't have too because it sacrifices efficiency. Whether or not it's enough efficiency to matter is a mystery to me. I'll keep this method as a back up though in case the caps don't do the trick.

I'm aware of how ceramics progressively suck as you increase voltage to them. I have some 100v 1206 ceramics that I'm going to try. I may also try some polypropylene caps too.

edit: I only had 100V. my mistake
 
Slowing rise time shouldn't hurt efficiency, the load is inductive so its current shouldn't be able to rise instantaneously. To fix up the fall time you can put a diode in parallel with the resistor to turn off fast, so there isn't a loss in efficiency with the current flow.

Voltage rating doesn't really effect capacitance on ceramics, it is the case size, the bigger (physically) the less it will suffer under DC bias.
To get 1uf of capacitance with a ceramic solution you'd be looking at either really expensive caps or 4-5 of them, just go with a cbb(polyprop) film cap
 
Thanks for the feedback!

So I tried 0.1uF 1206 100V ceramic cap. I measured all 3 switch nodes with a power supply voltage of 12V. The node closest to where power comes in on the rails peaks at 16V. The node furthest away peaks at 21V. Looks like I've got some inductance issues that increase the further you go. I may try various values of polypropylene caps to see if they improve the situation.

One of the contributing factors is the relatively low gate charge of the FETs I'm using. They're TI CSD18535KCS and they only have a typical total gate charge 63nC vs the 236nC of the FETs from the original 4.12 hardware. Increasing the series gate resistance should help as suggested. I will seek a balance between adding caps and increasing series gate resistance.

For the PCB design, I think I need to go ahead an move the big ground track to underneath the big positive track. I've been advised to to this before and now I think I truly understand why. One will have to beef up those traces in a low profile fashion (like with the copper flat wire) since the exposed power track will sit right beneath the tabs of the FETs after I make this adjustment.
 
I think if you put one of the two big caps up the other end of the PCB and ran fat traces/copper to it it would help significantly
 
It would take some significant changes to the routing/layout to do that without increasing board size. However, I'll look at doing that for the HV design for sure. For now, I'll just tack on a big cap at the other end of this current prototype and see how much it helps just out of curiosity.
 
Back
Top