back to Afro ESC (for 22V operations) + feedback frequency

The basic Afro ESC doesn’t support enough voltage for my needs (the solar panel can deliver as much as 22V). I tried the Spider ESC, but it doesn’t support reverse and I can’t flash it (furthermore, it’s a bit too hot for my taste). Luckily, there’s a “high voltage” (8s) version of the afro ESC, astutely named afro_hv. I got one of these, but it ships without reverse_pulse, that is the ability to go forward and backward, enabled. So I had to flash it, which was very easy using RapidFlash and the AfroESC USB programmer.

On a totally different matter, I tried several frequency for the power sampling loop, and after a few problems and Fourier transforms, I settled on a 1kHz frequency: I’m using an ACS 712 based breakout for current measurement and a voltage divider vor voltage measurement. I had a very unstable measurement with the motor running, that I first thought was provoked by uncontrolled noise (magnetic ?) around the ACS 712. However, when calibrating with a resistor, I had a very stable measurement, thus leading to the evidence that the “noise” is actually the commutation of power inside the ESC / motor pair. I sampled at different frequencies, and got something stable around 1kHz (initially, I was using 10Hz…), which coincidentally is the sampling frequency of the ESC.