I have a nominally working simulation of a PI controller for the quadrature current in my scratch designed #fpga motor controller. Simulated in #ghdl and #cocotb. And the #xilinx ISE build fits!
So I'm back to looking at the blown up hardware. Just pulled the scratch designed motor controller out of the Ice Cream Truck... I don't see a blown FET yet, but I saw a flash and pop the last time I worked on it, so I know it's in there somewhere.
Race is on May 20th in #chicago Come out and help me! http://powerracingseries.org/
And an extra picture of the belt drive:
Traces from a gtkwave view of a ghdl sim showing a feedback waveform starting low and back high again and a pwm_level output of an open-loop PI controller that looks like it should drive the error to zero correctly.
Side view of one motor controller PCB showing three phase legs. Lots of wires flying around. FETs are mounted under PCBs so you can't inspect them without disassembly.
Two scratch built motor controllers mounted to a heat sink mounted to a plywood box enclosure. Out of the kart and sitting on the concrete floor. Three phase wires hang out from each side. Lots of ribbon cables and colorful dupont wires in a messy configuration with velcro ties.