Firmware is not complete, but found code for a self stabilizing robot with the same gyroscope. Was first planning on using a microbit, but it was to laggy. Thinking of dooing the pid controlling in the vesc6, and need to convert pwm signal to ppm to make the code work.
There is no gyro in the vesc, it is possible to rewrite firmware for the vesc and alter the pcb layout to connect the gyro over i2c. It seems not worth the hazzle right now. I am working on theese smaller vesc6 that will be perfect for theese kinds of builds.
Its in the BoM, Vedder had some troubles with it from the first version and decided it wasn’t worth the time at that moment. will probably be implemented in later versions.
E.g. there is a ramp up/down for PPM/PWM signals, also for ADC and the nunchuck (I2C). So maybe it is not the ardunio which is laggy but the VESC having ramps which are too slow for balancing tasks. Also there are the PID controllers running at the VESC. So I would try minimizing the ramping or use UART commands (those don’t have a ramp up /down deadtime) and adjust the PID controllers.
Hall sensors, ty for the information about the inputs to the vesc il do more testing. I was sending data through ppm, but are unsure if i was pid tuning it in the vesc. What I ovserved was that when writing ppm to the vesc, the accelleration was jerking. Meaning that it stopped sending data when reading the gyro. To test this we added a delay between eatch time we sent the ppm signal and the wheel stopped eatch time. Meaning the ppm controll from the microbit wasent hardware controlled but rather software controlled, causing a huge problem. We might have done something wrong or miss understood something, but il do some more testing. Im kinda swamped with other projects atm, but il come back to this later
Sounds like a timer interrupt problem.
I dont know the microbit but e.g. you cant use neopixel ws2812 leds together with servo/ppm control on arduino uno since one interrupts the other.
So just to make sure you ordered the 24v version with 600watt? And you are runnig it on 12s (±50v) and it produces aprox. 1000watt? What are the benefits chooaing the 24v instead of the 48v or even 60v version?