Wednesday, January 26, 2011

Project # 1: Toy Hacking

PROJECT 1
For our first project the objective was to learn various electronics skills and apply them all together in a final test of our skills.
First, I had to find a toy and take it apart to find the motor wires- this would allow us to connect our own wires and pull them out of the toy to be able to control it from our microcontroller.
This is my Toy:
Second, I soldered our wires onto the toy and put the toy back together.
Next, after having worked on several handouts that instructed me on microcontroller, transistor, capacitor and motor control, I set up a circuit on my breadboard that would allow me to fulfill the requirements for the project.
My motors ran forward and backwards, and the board I had originally built for this case would not work because the power would only run one way. Professor mason told me about a thing called an H-bridge, which was pretty much a bunch of transistors and diodes used to be able to allow current to flow forward or backwards into the motor, which in turn allowed my claw to move forwards and backwards from the same connections.

Unfortunately, this would have take a long time to complete and luckily, Mason gave me a Motor Driver Chip, which was exactly the same thing but in a smaller package.
This is my board:
Finally, i had to program my toy to be able to work with input from a sensor, in this case an LDR (Light Dependent Resistor). I programmed my toy to run the motor forwards when the input value from light was above 120 and to go backwards when the input was less than 70. This way, there was a gap in the middle and i could just leave it off if i let only the right amount of light to get in.
This is my toy working under microcontroller command:
Here is a working video of my final project:

No comments:

Post a Comment