Step 30Hand controller wiring
My "de-luxe" self balancing skateboard has a wireless Wii Nunchuck as the control system.
However here we are interested in reducing cost.
Therefore we have a cable with a hand controller on the end.
This has a dead-man switch (cuts motors if you let go i.e. fall off)
Also has steering left and steering right plus a switch to fine-tune the balance point of the platform.
Here is wiring diagram:
"D" is the 1500 Ohm resistor.
| « Previous Step | Download PDFView All Steps | Next Step » |


























































































Eveything else after that can just be classed as refinements.
Sure, you could adjust the target rate of turn in degrees with a potentiometer, you could also make it inversely proportional to the estimated speed which would be a good thing.
For example I am currently working on using 2 pressure sensitive resistors under my left heel and toe to allow it to be steered by leaning, and stopped by rolling foot sideways so not pressing either resistor. This also means you can lose the deadman switch. Lots of things you could do - after you've got it to balance!
John
(the one labelled 3.3V next to it powers the IMU)
John
Good thing about this is that the pots self-centre at about 5K resistance point. So with some experimentation you can connect them to an analog input each for steering left right and to fine tune the balance point using the forward back motion.
Two main values in code affect steering:
Steercorrect is a variable that is generated by second "headlock" gyro to make it resist slight turning forces, for instance if one motor has more friction than the other, to keep it in a straight line.
The other variable is "Steer". A value of zero is no steering i.e. keep going straight ahead, a -ve value is left and a +ve value is right. Do some experiments with hard codinjg in values for this but you need your potentiometer to vary the value of "Steer" remembering to code the data from your pot so that a Steer value of 0 is straight ahead.
Hope this helps
John
www.instructables.com/id/Wii-Nunchuck-as-general-purpose-controller-via-Ard/
I think best thing would be for me to make a separate instructable on how to steer something with a wired and a wireless nunchuck and then put a link to it here.
My wireless nunchuck board uses an arduino just to continuously read data from the wireless nunchuck. It then varies voltages on the output pins which are sent to the steering inputs of a separate (older, non-arduino) board that is controlling the balancing and power to the wheels.