motor switch led circuit

Posted on Feb 4, 2014

The strategy is to get the circuit going in stages, testing each part as you go. Once everything is wired correctly and can be either controlled or read by the computer correctly, then you can write the main program with confidence that all the pieces are working. Follow the directions shown in the Arduino Guide ( PDF file ) under the `Flashing an

motor switch led circuit
Click here to download the full size of the above Circuit.

LED" section. Use this program to confirm that the LED works under computer control Follow the directions shown in the Arduino Guide under "Reading a Switch". Use the program shown in the Guide to confirm that the Arduino is reading the switch properly. The stream of 1`s going across the monitor window should change to 0`s when you close the switch. If it doesn`t, read the voltage at Pin 3 with your DMM. It should be 5 V with the switch open and 0 V with the switch closed. If it isn`t, remove the switch from the circuit and check for continuity with the beeper function of your DMM. The DMM should beep when the switch is closed (short circuit) and stay silent when open (open circuit). Sometimes switch contacts get dirty so if you aren`t getting a short circuit, try wiggling the switch button while it is closed. The code assumes the switch is connected to Pin 3 on the Arduino, but any pin can be used. Do not connect your motor directly to an Arduino pin and do not use the 5 V power from the Arduino board to power your motor. Instead, control the motor using your TIP120 transistor and a separate 9V or 12V battery. The motor can be either the gear motor or the small motor. For the small motor, you can use the 2N3904 transistor as the switch. "Px" is any I/O pin on your Arduino. For this exercise, use P4. Connect the minus of the battery to the emmiter of the transistor (E pin) and then also connect the emmiter of the...

Leave Comment

characters left:

Related Circuits

  • New Circuits



    Popular Circuits

    Door Chime with ATtiny12
    S1Ngle-Ic Logic Probe
    Fm Stereo Transmitter Circuit
    Brightness controller for low power lamps
    High voltage power supply
    Timing SCR control motor reversing circuit
    Intelligent thermostat temperature sensor LM75 circuit diagram consisting
    By DC variable speed motor control circuit diagram of an optical fiber