Connect with us

Need help with 555 timer circuit

Discussion in 'General Electronics Discussion' started by mghg13, Jul 17, 2013.

  1. mghg13

    mghg13

    3
    0
    Jul 17, 2013
    Flashing LED Circuit with 555 Timers

    Untitled.png

    Hello, please find attached a copy of my circuit.

    It consists of four 555 timers. Two in monostable mode and two in astable mode.
    Its function is to operate the two LEDs separately.

    On pressing SW1, IC3 (monostable) is triggered and outputs a pulse that lasts about 5 sec. This pulse is fed to IC1 (astable) which produces square waves that allows the LED D1 to flash.

    Similarly on pressing SW2, the same procedure occurs with IC4 and IC2, hence causing LED D2 to flash.

    The circuit looks fine and Works fine. But what I want to do is the following:

    When SW1 is pressed, D1 should flash. But if D2 was flashing when I pressed SW1, it should automatically stop.

    Similarly, when SW2 is pressed, D2 should flash. But if D1 was flashing when I pressed SW1, it should automatically stop.

    So, can anyone suggest a way of doing this??? Thanks in advance!!!
     
    Last edited: Jul 17, 2013
  2. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,267
    Nov 28, 2011
    Here's a method that MAY work: cross-couple pin 4 of IC3/4 to pin 2 of the other IC with a 1k~10k series resistor.

    Disconnect pin 4 of IC3 and IC4 from your positive rail.
    Connect a resistor (1k~10k, doesn't matter) from IC3 pin 4 to IC4 pin 2.
    Connect a resistor (ditto) from IC4 pin 4 to IC3 pin 2.

    This MAY work. I've never used the Reset inputs on a 555 before, and the data sheets do not explain it very well. So it's worth a try but it may not work.

    I would design this circuit differently. It can be implemented using two CD4093B CMOS gate ICs. If that suggestion doesn't work, let me know if you would like me to draw up a schematic of the CMOS circuit.
     
  3. mghg13

    mghg13

    3
    0
    Jul 17, 2013
    yeah, I would like to see the CMOS design
     
  4. mghg13

    mghg13

    3
    0
    Jul 17, 2013
    You were right, the cross-coupling does not work.
    This is because the reset pin needs to be maintained at a low potential in order to reset the IC.
    The cross - coupling brings the pin 4 to low potential only momentarily (just as the trigger pin 2)
     
  5. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,267
    Nov 28, 2011
    Here's a circuit description. I've used some jargon here; if there's any terminology or concept you don't understand, look it up on Wikipedia, or Google it.

    [​IMG]

    The circuit uses two CD4093B quad NAND Schmitt trigger ICs. Each IC contains four NAND gates. Each gate has two inputs and an output. If both inputs are high (+9V), it drives its output low (0V). Otherwise, it drives its output high (+9V). This is called a NAND function: an AND function followed by a NOT function (inverter).

    All points on the diagram marked +9V are connected together; this is the positive, "high" voltage rail of the circuit. All points marked with an earth/ground symbol are connected together; this is the 0V or "low" rail of the circuit. Two 100 nF capacitors are connected across these rails; these should be connected directly between pins 14 and 7 of U1 and U2. They are decoupling capacitors and they are needed for reliable operation of these ICs.

    U1A and U1B form a triggered monostable. In the idle state, pin 1 is high, because SW1 is not pressed and RP1 pulls the input high. Pin 5 is low (pulled low by RT1), so pin 4 is high. Since pins 1 and 2 are high, pin 3 is low. Pin 6 is pulled high by RC1 and will be covered shortly.

    When SW1 is pressed, pin 1 goes low so pin 3 goes high. Because CT1 is currently discharged and has no voltage across it, it pulls pin 5 high as well, which causes pin 4 to go low. This latches the two gates into this state, because even if SW1 is released, pin 3 will remain high because pin 2 is low.

    In this state, CT1 starts to charge through RT1. The voltage across CT1 increases, and the pin 5 voltage falls, until the U1B gate regards pin 5 as low. When this occurs, pin 4 goes high. Pins 1 and 2 are now both high, so pin 3 goes low. CT1's negative plate now goes below the 0V rail, but DT conducts and ensures that CT discharges fairly quickly. The circuit is now back in its default state, ready to be triggered again.

    U1D and U1C form an identical circuit that is triggered by SW2. When SW2 is pressed, pin 10 will go low, and CC1 generates a brief low pulse on pin 6. If the SW1 monostable was currently triggered, this pulse will briefly force pin 4 high. As long as SW1 is not currently pressed, this will force pin 3 low and the SW1 monostable will reset to the idle state.

    The same thing happens if SW1 is pressed while the SW2 monostable is in the triggered state, via CC2.

    CT1 and RT1 control the active time of the SW1 monostable, and CT2 and RT2 control the active time of the SW2 monostable. The formula is roughly T=RC where T is time in seconds, R is resistance in ohms, and C is capacitance in farads. A 1M resistor and a 4.7 uF capacitor produce a time of around five seconds. The exact time is also affected by the voltage thresholds of the gate inputs, which are not accurately controlled and vary from one CD4093B to another and between manufacturers, so some adjustment of the resistor or capacitor values may be needed to get the desired timing. Timing will also vary with temperature and supply voltage.

    U2B is a gated oscillator based on a Schmitt trigger inverter. While pin 5 is high, U2B acts as an inverter with Schmitt trigger input. CB1 is charged and discharged between the upper and lower voltage thresholds, through RB1. RB1 and CB1 determine the oscillation frequency. RB1 can be replaced with a 100k preset potentiometer (aka trimpot) if desired.

    When pin 5 is low, pin 4 goes high and oscillation stops. U2A inverts the output and drives LED1. U2C and U2D are an identical circuit for LED2. When a monostable is triggered and its corresponding oscillator starts up, the first blink will be noticeably longer than subsequent blinks. This is because CB1 is initially fully charged, and takes a while to discharge to the low voltage threshold of the Schmitt trigger input. Once the oscillator has started running, the CB1 voltage slews between the low voltage threshold and the high voltage threshold, which takes a shorter time.

    CMOS gate devices like these have relatively weak output stages and you should not draw more than about 10 mA from them. If more current is needed for the LED, an NPN emitter follower stage can be used to increase the current capability.

    Pushbutton switches generate "bounce" when pressed and released. This causes multiple pulses to be seen at pins 1 and 13. Because the circuit detects and latches onto the first pulse, this contact bounce does not cause a problem.

    This circuit has an extremely low quiescent (inactive) current drain and doesn't need an ON/OFF switch. If the LEDs aren't activated, the battery should last its shelf life.
     

    Attached Files:

Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-