Multiwii NanoWii as IMU for Balancebot

Post Reply
wullis
Posts: 1
Joined: Wed May 29, 2013 4:17 am

Multiwii NanoWii as IMU for Balancebot

Post by wullis »

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

User avatar
Plüschi
Posts: 433
Joined: Thu Feb 21, 2013 6:09 am

Re: Multiwii NanoWii as IMU for Balancebot

Post by Plüschi »

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*.

felixrising
Posts: 244
Joined: Sat Mar 23, 2013 12:34 am
Location: Australia

Re: Multiwii NanoWii as IMU for Balancebot

Post by felixrising »

You can PM Ovaltineo for ideas, he built a working Segway on arduino+imu.

ovaltineo
Posts: 15
Joined: Sun Apr 28, 2013 11:41 pm

Re: Multiwii NanoWii as IMU for Balancebot

Post by ovaltineo »

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!

flyrobot
Posts: 73
Joined: Thu Apr 05, 2012 3:59 pm

Re: Multiwii NanoWii as IMU for Balancebot

Post by flyrobot »

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

Post Reply