Tuesday, September 18, 2012

Motors and Flashing Lights

Circuit for Multiple LEDs
Firstly, we hooked up an LED to a circuit with the power connected to a pin in the  Arduino chip with a program that was set to make the LED blink.   The code was already uploaded to the board so all we had to do was plug in the pin.


Then we gathered seven more LEDs and resistors and set up separate circuits for each.   Each LED was connected to their own pins in the Arduino board.   Then we copied the code for the circuit that would turn the lights on and off separately and in sequence.






After the LEDs we hooked up a toy motor to the breadboard.    We used a diode without lights to direct the energy and a transistor.   We used the code provided that turned the motor on and then off again, effectively making it "blink."





We then worked through the problems with buttons section adding a button to our previous motor circuit instead of building essentially the same thing over again.   Using the code we copied from the instructions,  we would push the button and the light would blink or not work at all.  To "fix" the code we added delays to the button push so that the state wouldn't change quicker than we could press the button.

For our personal project, we decided to use our motor and push button setup to create fans to dissipate the fumes when soldering. we replicated the motor circuit to get three fans then we mounted them in the foam box we had build in our foam board lab.

No comments:

Post a Comment