Page 4 of 4

Re: Segway using a Wii Nunchuk/WM+ for balance

Posted: 18 Oct 2012, 17:32
by mattallen37
~ hergipotter You only need the WM+ gyro data; no need for acceleration data (unless you are using it in your hand, to drive the segway). Most likely your pullups have nothing to do with the working of the WM+, but I would use 82k (as is recommended). I just finished a segway that uses a WM+ to balance, and will probably blog about it before long. The loop time is about 26.1 ms, and that includes reading from a Nunchuk (so that I can drive it around).

~ mspall You are right, for most systems. Generally pullups any weaker than 10k are considered far too weak. However, TLG put 4.7k resistors inline between the controller IOs and the port, which makes it necessary to use pullups that are extremely weak; 82k is what TLG recommends and uses.

That post about me trying to get the Nunchuks to work is quite old. I have since solved the problems, and have recently come up with an adapter to help others connect their Nunchuk to an NXT. The NXTChuck and it's NXC library make it really easy to read a Nunchuk, without needing to do any HW modifications.

Re: Segway using a Wii Nunchuk/WM+ for balance

Posted: 18 Oct 2012, 17:54
by hergipotter
Thanks for your answers! Sadly i just discoverd, that my WM+ is kinda broken. I tried another one and this one works perfectly all the time...

I once tried to build a segway with only gyro data but i had great problems with drift, so this time i tried to use accelleration data and a complementary filter to combine it with the gyro data, so this is why i also want to use a nunchuk.

Re: Segway using a Wii Nunchuk/WM+ for balance

Posted: 18 Oct 2012, 17:58
by mattallen37
Drift in the integral does exist, but it doesn't need to matter. The algorithm I use doesn't care about drift, and an accelerometer is not necessary.