Arduino + Wii Nunchuk Motor Controller
Development blog for a DC motor controller interfaced with a Nintendo Nunchuk.
Saturday, April 16, 2011
Monday, April 11, 2011
[Youtube] Nunchuk + DC Motor Controller demo
The motor controller now works in one direction. See the Youtube video below for a demonstration:
Saturday, April 9, 2011
Forward direction + brake works
The controller works in the forward direction. Speed control and braking works. Pictures and videos will be uploaded soon.
So far I have been following Roco.ca's h-bridge design. However, it requires AND gates. After attempting it in the lab today, I'm now abandoning that idea. It takes too many wires to do it, and the logic can be programmed in the Arduino. With this new philosophy, all of the logic will be handled by the Arduino. The number of output lines from the Arduino to the H-bridge will increase from 3 to 4, but the overall amount of wiring will decrease, and so will the overall footprint.
So far I have been following Roco.ca's h-bridge design. However, it requires AND gates. After attempting it in the lab today, I'm now abandoning that idea. It takes too many wires to do it, and the logic can be programmed in the Arduino. With this new philosophy, all of the logic will be handled by the Arduino. The number of output lines from the Arduino to the H-bridge will increase from 3 to 4, but the overall amount of wiring will decrease, and so will the overall footprint.
H-Bridge Controller Prototype
I've built a prototype program for controlling the H-Bridge. It should be able to do forward and reverse with braking and direction switching. There is no safety feature for direction switching, so you must manually slow down before you do it. Tomorrow everything will be hooked up. Something is guaranteed to blow up, but hopefully it's not the Arduino or the Nunchuk.
Friday, April 8, 2011
Youtube video and pictures
I finally have some pictures and stuff to post.
Here's a Youtube video of the Nunchuk, Arduino, and LED display working together:
Here's a Youtube video of the Nunchuk, Arduino, and LED display working together:
Wednesday, April 6, 2011
7-Segment Serial Display from Sparkfun
The 7-Segment Serial Display from Sparkfun http://www.sparkfun.com/products/9765 came in the mail today. Arunet has a good guide for this product: http://www.arunet.co.uk/tkboyd/ec/ec1led4x7ser.htm. Here's some notes.
- After using it for about 4 minutes the brightness went down. Do this to get it back to maximum brightness:
mySerialPort.print("z");
mySerialPort.print(B00000000,BYTE);
- Changing the baud rate was a little tricky. Sending it "127" and then "4" doesn't work, nor does "1276." I did:
mySerialPort.print(B01111111,BYTE);
mySerialPort.print(B00000100,BYTE);
And finally it changed the baud rate to 19200.
- If it starts showing dots when you don't want them, do this:
mySerialPort.print("w");
mySerialPort.print(B00000000,BYTE);
and the dots should go away.
- After using it for about 4 minutes the brightness went down. Do this to get it back to maximum brightness:
mySerialPort.print("z");
mySerialPort.print(B00000000,BYTE);
- Changing the baud rate was a little tricky. Sending it "127" and then "4" doesn't work, nor does "1276." I did:
mySerialPort.print(B01111111,BYTE);
mySerialPort.print(B00000100,BYTE);
And finally it changed the baud rate to 19200.
- If it starts showing dots when you don't want them, do this:
mySerialPort.print("w");
mySerialPort.print(B00000000,BYTE);
and the dots should go away.
Monday, April 4, 2011
LED Display Ordered, Hardware assembled
Checked out a DC motor today from school, and got the H-bridge from my ex-lab partner. Also ordered the LED display from the previous post.
Subscribe to:
Posts (Atom)