Step 35Testing
I fixed the IMU with blu tack to start with as you always end up with it back to front or the wrong way around!
When you get it working then fix it properly. Protect it from debris from the wheels and keep it near to centre of the deck by the way - it works best there.
NOTE: (March 2011) I have now redesigned the board with the control electronics on the top (see page 40 onwards). If you hold the IMU with Blu-tack initially, make sure it is a decent sized blob - if IMU is wobbly the board will bahave erratically and oscillate wildly.
| « Previous Step | Download PDFView All Steps | Next Step » |


























































































The accelerometer I have used would become the wrong one. You would have to measure voltages coming out on each accel pin to find the correct accel in the IMU for the new orientation.
The second gyro which detects sudden turns to left or right (when viewed from above) would now be in the wrong orientation. This second gyro is not required for balancing but the algorithm it feeds into is there to help resist sudden spins left/right as you are moving along if one wheel hits a small stone for example.....keeps you going in roughly a straight line until you enter a steering command....as in model helicopters.
In the photos you will see I soldered up ribbon vable to ALL the outputs of the IMU, even though I only use some of them, as much easier then to mount the IMU and work out with a voltmeter on other free ends of the wires which outputs I needed to use for any given mounting position.
So, in summary, you could lie it flat but some experimentation will be required. In particular one gyro needs to be turning on the fore-aft vertical "tilt" plane of the machine while the second (optional) "headlock" gyro needs to be turning on the horizontal plane to detect sudden turns to left or right as you are moving along. As there is an accel in all 3 planes, you need to just find the right one for the fore-aft plane once you have laid it flat.
Its a pretty small item compared to everything else, do you really need to lie it flat?
Best wishes
John