• Arduino

    Learn about Arduino and make various interesting projects using Arduino...

    Read More
  • 555 IC

    Learn about 555 IC and make various interesting projects using 555 IC...

    Read More
  • Basic Electronics

    Learn about Basic Electronics and various electronic components and their working...

    Read More
Showing posts with label LED. Show all posts
Showing posts with label LED. Show all posts

Rail Road crossing Flashing LED using 555 IC

This circuit flashes two red LEDs for a model railway crossing.The circuit uses a 555 IC to flash the LED's alternatively to give effect of a rail-roard crossing lights.

COMPONENTS USED :

1.555 IC
2.two LED's (any color but recommended Red)
3.Two 470 ohm/ 220 ohm resistances
4.one 47K resistance
5.one 10uF Electrolytic Capacitance
6.one 6-12V supply


STEPS :

1.Place 555 IC on BreadBoard.
2.connect pin 2 to pin 6.
3.connect pin 4 to pin 8.
4.connect a 47K resistance between pin 2 and pin 3.
5.connect a 10uF cap between pin 2 and ground.
6.connect pin 1 to ground.
7.connect pin 8 to VCC.
8.connect a 470/220 ohm resistance between pin 3 and shorter leg of a LED,connect the longer led of that LED to VCC.
9.connect another 470/220 ohm resistance between pin 3 and longer led of 2nd LED , connect the shorter leg of that LED to ground.
10.Switch on Power supply and Enjoy.!


(NOTE : In pics below i have placed a series of resistances to make up 47K resistance,also instead of only 2 LED's  i used 4 . Just place  LED in parallel with LED's in your circuit and you are done.You can also place them in series but it will dim their intensity)




Make piano using 555 IC

This circuit produces a tone according to the button being pressed. Only 1 button can be pressed at a time, that's why it is called a monophonic organ. You can change the 1k resistors to produce a more-accurate scale.Each button has a different tone , Moreover you can alter resistances to get soundsof your choice.

COMPONENTS USED :

1.555IC
2.Six1K resistances.
3.one 10K resistance
4.one 10uF Electrolytic capacitor
5.one 100nF Ceramic Capacitor
6.one 8ohm speaker
7.Six Push buttons(Tick-Tack buttons)
8.one 6-12V supply

The circuit below shows the arrangement neede for 555 piano:



STEPS :

1.Place 555 IC on BreadBoard
2.Connect pin 1 to ground.
3.Connect pin 8 and pin 4.
4.Connect pin 6 and pin 2.
5.Connect 100nF between pin 2 and ground.
6.Connect 10uF cap to pin 3 with Longer leg towards pin3.
7.Connect Shorter leg of the Cap above to one side of speaker, connect other side of speaker to ground.
8.Connect pin 8 to VCC.
9.Connect a 1k resistance between pin 7 and VCC.
10.Then connect a 10K variable resistor between pin 7 and one end of Push button, connect other end of push button to pin 6.
11.Then repeat connection of other buttons and 1K resistances as Shown in above Diagram.







(NOTE - In the circuit below i added  a LED between +ve and -ve terminal of battery to indicate if the piano is on or off , it is useful in case you want to make this ckt on a PCB , LED will help in indicating if piano is on and it can be switched off when not in use to save battery. A Switch can also be placed b/w the VCC and the ckt to switch piano on and off)


LED Chase Effect using Arduino

We are now going to use a string of LEDs (10 in total) to make an LED chase effect (see Table 3-1), similar to that used
on the car KITT in the KnightriderTV series or the Cylons in Battlestar Galactica.













Connect It Up

First, make sure your Arduino is powered off by unplugging it from the USB cable. Now take your breadboard, LEDs, resistors, and wires, and connect everything up as in Figure 3-1. Check your circuit thoroughly before connecting the power back up to the Arduino.



Enter the Code
Open up your Arduino IDE and type in the code .

 LED Chase Effect

byte ledPin[] = {4, 5, 6, 7, 8, 9, 10, 11, 12, 13}; // Create array for LED pins
int ledDelay = 65; // delay between changes
int direction = 1;
int currentLED = 0;
unsigned long changeTime;
void setup() {
for (int x=0; x<10; x++)
{
// set all pins to output
pinMode(ledPin[x], OUTPUT);
}
changeTime = millis();
}
void loop() {
if ((millis() - changeTime) > ledDelay)
{
// if it has been ledDelay ms since last change
changeLED();
changeTime = millis();
}
}
void changeLED()
 {
for (int x=0; x<10; x++)
{
// turn off all LED's
digitalWrite(ledPin[x], LOW);
}
digitalWrite(ledPin[currentLED], HIGH); // turn on the current LED
currentLED += direction; // increment by the direction value
// change direction if we reach the end
if (currentLED == 9) {direction = -1;}
if (currentLED == 0) {direction = 1;}
}

If you have done everything
correctly, you should now see the LEDs appear to move along the line, then bounce back to the start.

By changing the value of ledDelay, you can make the LED ping back and forth at different speeds. Try different
values to see what happens. You have to stop the program and manually change the value of ledDelay, then upload the amended code to see any changes.











555 Timer LED Flashing circuit

This circuit uses the 555 timer in an Astable operating mode which generates a continuous output via Pin 3 in the form of a square wave. This turns the LED (D1) on and off. The speed at which the LED (D1) is turned on and off is set by the values of R1 and R2.

Components Required :

1x - 555  Timer IC
1x - LED (Any color )
1x - 470K Resistor
2x - 1K Resistor
1x - 1uF Electrolytic Capacitor
1x - 9V Voltage Battery



STEPS : 

1. Place the IC on your breadBoard , remember to put it in correct way else IC will burn.


2. Now connect the pin 1 to ground.
3. Connect the pin 2 with 6 and pin 4 with 8
4. Connect 1uF cap between pin 2 and ground, place long leng of capacitor towards the pin 2 and short leg towards ground.
5. Connect a resistance of 470K from pin 2 to 7 and connect a 1K resistance from pin 7 to VCC.
6. Connect pin 8 to VCC.
7. Connect a resistance of 1K from pin 3 to the longer leg of LED , then connect the shorter leg of LED to Ground.
8. Do not connect anything to pin 5 and leave it as it is.
9. Now just connect the Battery and enjoy the show.





How big a resistor does an LED need

Suppose that we use an LED with Maximum of 3 volts, and a safe current of 20mA.

 I’m going to limit it to 2.5 volts, to be on the safe side. We have 6 volts of battery power. Subtract 2.5 from 6 and we get 3.5. So we need a resistor that will take 3.5 volts from the circuit, leaving 2.5 for the LED.

The current flow is the same at all places in a simple circuit. If we want a maximum of 20mA to flow through the LED, the same amount of current will be flowing through the resistor.


 Now we can write down what we know about the resistor in the circuit. Note that we have to convert all units to volts, amps, and ohms, so that 20mA should be written as 0.02 amps:

 V = 3.5 (the potential drop across the resistor)
 I = 0.02 (the current flowing through the resistor)

We want to know R, the resistance. So, we use the version of Ohm’s Law that puts R on the left side: R= V/I

Now plug in the values:
R = 3.5/0.02

Run this through your pocket calculator if you find decimals confusing. The answer is:
R = 175Ω

It so happens that 175Ω isn’t a standard value. You may have to settle for 180 or 220Ω, but that’s close enough.

Lightening an LED

 An old-fashioned lightbulb wastes a lot of power by converting it into heat. LEDs are much smarter: they convert al- most all their power into light, and they last almost indefinitely—as long as you treat them right!
An LED is quite fussy about the amount of power it gets, and the way it gets it. Always follow these rules:
• The longer wire protruding from the LED must receive a more positive volt- age than the shorter wire.

• The voltage difference between the long wire and the short wire must not exceed the limit stated by the manufacturer.

• The current passing through the LED must not exceed the limit stated by the manufacturer.

What happens if you break these rules? Well, we’re going to find out!
Make sure you are using fresh batteries. You can check by setting your multi- meter to measure volts DC, and touching the probes to the terminals of each battery. You should find that each of them generates a pressure of at least 1.5 volts. If they read slightly higher than this, it’s normal. A battery starts out above its rated voltage, and delivers progressively less as you use it. Batteries also lose some voltage while they are sitting on the shelf doing nothing. Load your battery holder (taking care that the batteries are the right way around, with the negative ends pressing against the springs in the carrier). Use your meter to check the voltage on the wires coming out of the battery carrier. You should have at least 6 volts. Now select a 2KΩ resistor. Remember, “2KΩ” means “2,000 ohms.” If it has colored stripes, they should be red-black-red, meaning 2-0 and two more zeros. Because 2.2K resistors are more common than 2K resistors, you can substitute one of them if necessary. It will be colored red-red-red. Wire it into the circuit , making the connec- tions with alligator clips. You should see the LED glow very dimly.


Now swap out your 2K resistor and substitute a 1K resistor, which will have brown-black-red stripes, meaning 1-0 and two more zeros. The LED should glow more brightly.

 Swap out the 1K resistor and substitute a 470Ω resistor, which will have yel- low-violet-brown stripes, meaning 4-7 and one more zero. The LED should be brighter still.

This may seem very elementary, but it makes an important point. The resistor blocks a percentage of the voltage in the circuit. Think of it as being like a kink or constriction in a flexible hose. A higher-value resistor blocks more voltage, leaving less for the LED.