Hi there,
This is my first post on this forum, though i have lurked here for a while. I am trying to build a one-wheeled balance robot, and have ordered the NanoWii board to use as the controller an the IMU. Can anybody give me a hint as to how i would keep the IMU code for the filtering of the Gyro/Acel, and ditching the rest so I can develop my own PID controller for the segway-like front-to-back balancing, and the reaction-wheel lateral balancing.
Thank you,
Wil
Multiwii NanoWii as IMU for Balancebot
Re: Multiwii NanoWii as IMU for Balancebot
I would keep the sensor.ino (sensor reading) and the imu.ino (attitude estimation). You may need parts of def.h and config.h too. Delete the parts for the sensors and functions you dont have / need to make it simpler. You might also need a kind of output.ino.
The main PID is in multiwii.ino in the *loop*.
The main PID is in multiwii.ino in the *loop*.
-
- Posts: 244
- Joined: Sat Mar 23, 2013 12:34 am
- Location: Australia
Re: Multiwii NanoWii as IMU for Balancebot
You can PM Ovaltineo for ideas, he built a working Segway on arduino+imu.
Re: Multiwii NanoWii as IMU for Balancebot
I ported the MIT Segway code to Arduino. It is much simpler than Multiwii. Just use sensor.ino module from Multiwii. The MIT code is here http://web.mit.edu/first/segway/segwaycode.html. The hardest bit for me was getting rid of glitches from my custom-built 300 watt motor controllers. BTW, you need 2 wheels if you'd like to be able o change direction!
Re: Multiwii NanoWii as IMU for Balancebot
This is interesting balance robot project and they have ported the code to arduino.
http://blog.tkjelectronics.dk/2012/03/t ... ing-robot/
So far i see the most stable small balance robot. I hope someone can port it to common multiwii FC such as hobbyking MWI lite.
John
http://blog.tkjelectronics.dk/2012/03/t ... ing-robot/
So far i see the most stable small balance robot. I hope someone can port it to common multiwii FC such as hobbyking MWI lite.
John