maholli said:
Just finished reading through this thread and following your progress. Love the project! I'd like to not only build a VESC-controller, but also help out with any loose-ends on the hardware or embedded side of things (if needed).
The repo (
https://github.com/paltatech/VESC-controller) hasn't been updated in a while. Any plans to do so in the near future? Anything my self or other can do to help with documentation?
Welcome along, and stay tuned. Design is ready, I'm quoting a pcb assembly in several houses. I want to validate the fabrication files because I could rework a few boards, but I can't deal with 50 bad boards, hence the small test sample. Once released (when I'm confident it is a safe design) any help will be welcomed, there are several ways to get this project improving, especially in the firmware/testing side.
Abricosvw, nice build!
About that 5v difference, I wouldn't worry too much, if your fullscale is 600V, you have <1% error, and these isolated amplifiers have a rather poor offset spec.
One thing you can try is using AMC1311, they work better for voltage sensing, you need to change the resistor divider because they have gain=1 instead of the original gain=8.2.
I didn't quite understand what is failing for you, but here's some pointers.
Double check the polarity of the current sensor. When you drive current towards the motor, the voltage at the mcu adc pin measuring current should go higher. If it goes lower you can flip the hall sensor or flip the signal wires.
This might be a reason why the board measures 0 ohm. Get this polarity right before trying to measure resistance, I've seen a wild current spike during parameter detection when I installed a sensor backwards.
Another thing that gave me troubles is the HALL sensor reference. Its super wimpy, can't drive more than a few uAmps and its not suitable for connection to Isense(-). Let me know if thats your case.
You can make the motor spin by hand and trigger "sampled data" to check all phase voltage sensor are ok, you should see the motor generating 3 sinewaves.
If the sensing is right you can start with the FOC parameter detection. Resistance and inductance measurement worked ok in my tests, using vesc GUI. There is a trick to have much better precision: connect the board over USB, in the left sidebar head to VESC Terminal and type "help".
Tons of useful commands in there, and try "measure_res 30". That will measure resistance flowing 30Amps through the motor. Increase that number and you should see the mOhms to start converging. I run 150 Amps through my motor for resistance measurement. Its noisy! The GUI algorithm increases the current in several steps, for some reason it never reaches currents high enough in this larger board.
I was very close to write a post here about how impossible is to measure 14mOhm resistance with a 600V voltage sensor, but then I found a schematic mistake, re-tested and measured 15mOhm. I still don't entirely understand why resistance measurement is working that well, so I will follow with interest your case.
If you can measure resistance and inductance, get prepared to spend some time trying different I, D and w parameters for flux linkage detection. My motor required I>15A to be able to spin the motor, I can't remember the duty and ERPM though.
The idea is that you set those parameters so the motor spins. Once it is spinning the motor is released and flux linkage is measured. The difficult part is to make the motor to spin, firmware tries several times with multiples of the parameters you set and that works for the original vesc, but not on this board, or at least with the combination of my board and my motor.
Something that worries me about your build is the connection between the DC link capacitors and the IGBTs. From the image it seems to have a large current loop area
Every nanoHenry that you add between DClink and IGBT will greatly increase the voltage overshoot while switching, and those overshoots will instantly kill the switch ig you happen to be anywhere close to your 650v limit.
Can you make an assembly like this?
http://electronicsmaker.com/wp-content/uploads/2015/04/Infineon-Fig-5.jpg
And IF that is not enough you could place snubbers at each IGBT.
Otherwise you will need to decrease a lot the rise/fall times to avoid overshoots, and switching losses will skyrocket.