I programmed a simple moving average filter. This will remove the rapid changes and make the robot calmer and with less overshoots.
It also handles pushes much better than before.
I programmed a simple moving average filter. This will remove the rapid changes and make the robot calmer and with less overshoots.
It also handles pushes much better than before.
Hi, can you give a psuedocode or a block diagram on how you made a reading on the wheel encoders and used them on the cascaded PID’s… and also on how you implemented the cascaded PID’s. Thanks.
The code for the wheel encoders are at https://github.com/sebnil/Selfbalancing-robot/blob/master/WheelEncodersI2C/WheelEncodersI2C.ino.
More documentation of the PIDs are at http://sebastiannilsson.com/en/projekt/selfbalancing-robot/den-sjalvbalanserande-roboten-fungerar-ganska-bra/
Connect the encoders to the interrupt pins on the arduino and count the number of pulses per time unit.
Block diagrams would perhaphs be helpful but unfortunatly I will have difficulties finding time to do them. But the arduino code is open sourced and hopefully that will be sufficient.
configurations.txt
console_communication.ino
eeprom_store.ino
motors.ino
selfbalancingrobot.ino
serial_communication.ino
are these files to be loaded into one arduino only? thanks.
No. Compile selfbalanceingrobot.ino from Arduino IDE. Some of the other files are included from that file.
i think I’ll just add the files under sketch before compiling..
Impressive!
Nice project and impressive robot!
Christophe
Hi, great project. I’m am starting to try and build one myself.
Do you think it is possible to build one without using wheel encoders?
Yes, but I would recommend using motors with encoders.