Sunday, 26 January 2014

Flashing LED using pot



Here is our next DIY stuff with arduino and pot components. Control a series of led using arduino and pot with variable speeds using simple programming.

video

Step 1: Parts and Components

Make sure you get all this components before you start any circuit work. Components required for our project are

1.Arduino UNO -1
2.Breadbord -1
3.USB cable for programming -1
4. Leds of any colour you want -4
5. 330 ohm resistors -4
6.10k pot meter -1
7. and fun - infinite

Step 2:Placing LEDs in its place





 Place all four LEDS on breadboard alongside the Arduino UNO board. make sure you ground all cathodes of LED with GND of Arduino. Our arduino board has 3 GNDs present. Now connect all LEDs with resistor for safe operation.




Step 3: Connecting them with Arduino UNO



Make sure all LEDs anodes are connected to arduino via a resistor normally to limit the current, now connect all anode pins of led in following fashion,
led 1 to pin2
led 2 to pin 3
led 3 to pin 4
led 4 to pin 5

GND all the cathode ends together with ground of arduino.

Step 4: Here comes Potentiometer


Potentiometer is normally a variable resistor which an designer can use to vary current using a knob or somekind. Potentiometer generally consist of 3 pins normally pin1- GND, pin2 - O/P, pin3 - I/P.

Now place the pot as shown below,



then make sure you place POT in right way and follow the below connection,
pin 1 to ground
pin 2 to analogpin 0
pin 3 to +5 v



Step 5: The code!!!!


Now copy the following code below to the Arduino IDE and upload it and then change the pot knob to vary the speed and intensity of LEDS

potled.pde

stayed tuned for more stuffs......!!!!!!!

Post a Comment