flashing LEDs

Discussion in 'The Projects Forum' started by mghg13, Jul 17, 2013.

  1. mghg13

    Thread Starter Member

    Jul 17, 2013
    63
    0
    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!!!
    Untitled.png
     
  2. tracecom

    AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    The quick answer is to use the output of IC4 to disable IC3 and the output of IC3 to disable IC4. You would need to hold pin 4 of IC3 low while pin 3 of IC4 is high, and vice-versa; this would require an inverter transistor between pin 3 of IC4 and pin 4 of IC3, and a similar inverter between pin 3 of IC3 and pin 4 of IC4.

    At least, that's what I think I would try.

    ETA: You would also need a pull-up resistor (10k or so) on pin 4 of IC3 and IC4.
     
    Last edited: Jul 18, 2013
    mghg13 likes this.
  3. mghg13

    Thread Starter Member

    Jul 17, 2013
    63
    0
    Thank you very much tracecom!!!

    Do you think a common-emitter transistor amplifier woud be OK??
    If not can u suggest an appropriate one?

    thanks!!
     
  4. mghg13

    Thread Starter Member

    Jul 17, 2013
    63
    0
    I tried this circuit, but it does not work!!!
    2.png

    what should i do?
     
  5. tracecom

    AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    What you built is not what I had in mind. I will try to draw a schematic and post it a little later.
     
  6. tracecom

    AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    1. Insert a 10k resistor between pin 4 of IC3 and +V.

    2. Insert a 10k resistor between pin 4 of IC4 and +V.

    3. Add the parts as shown in the attached schematic to the circuit in your first post. You don't have to disconnect anything; just add. Any small signal NPN transistor will do, 2N3904 or 2N2222, for example.

    I may not be able to access the internet for several hours.


    ETA: Try elec_mech's solution (post 7) first. It should work and is much simpler than mine. Don't overlook that for elec_mech's solution, you must disconnect both pin 4s from +V.
     
    Last edited: Jul 18, 2013
    mghg13 likes this.
  7. elec_mech

    Senior Member

    Nov 12, 2008
    1,513
    193
    Since the switches are tied to ground, why not just connect pin 2 from IC3 to pin 4 of IC4 and pin 2 from IC4 to pin 4 of IC3?
     
    tracecom likes this.
  8. tracecom

    AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    That is much simpler, and I think that R3 and R4 will serve as pull-up resistors for the reset pins (4) on IC3 and IC4. Thanks.

    To mghg13: don't overlook that for elec_mech's solution, you must disconnect both pin 4s from +V.
     
  9. mghg13

    Thread Starter Member

    Jul 17, 2013
    63
    0

    @elec_mech: This was the first thing I tried!!! It was very obvious to me too!!! But actually it does not work!!!

    What you should know is that we cannot reset a 555 timer by simply making the reset pin (pin 4) undergo a sudden change from HIGH to LOW potential.
    Actually, if we want to stop the output of the monostable 555 IC, we must hold the reset pin LOW until it is deactivated.
     
  10. mghg13

    Thread Starter Member

    Jul 17, 2013
    63
    0

    This also does not work!!! But I can't figure out WHY!!!

    It seems that all 4 ICs operate in the astable mode. The output is very weird
     
  11. elec_mech

    Senior Member

    Nov 12, 2008
    1,513
    193
    Hmm, something doesn't sound right.

    Let's try a few things to narrow in on the problem.

    1. Disconnect pin 3 on IC3 and IC4 from IC1 and IC2, respectively.
    2. Connect a 500 - 1kΩ or so resistor to an LED on pin 3 on both IC3 and IC4.
    3. Press SW1. Does the LED connected to IC3 come on? Does it flash or stay on? Is it on for 5 seconds?
    4. Press SW1 again then quickly press SW2. Does the LED connected to IC3 go off? Does the LED connected to IC4 come on?
    5. Press SW2 then quickly press SW1. Does the LED connected to IC4 go off? Does the LED connected to IC3 come on?
    Try replacing R3 and R4 with 10kΩ and repeat steps 1-5. Any difference?


    Now reconnect your circuit with the following changes:
    • Make R3 and R4 10kΩ.
    • Connect R1, R2, and pin 8 from IC1 and IC2 directly to +9VDC. Only pin 4 from IC1/2 should be connected to pin 3 of IC3/4.
    Retest - does it work now?

    If not, connect a 10kΩ resistor between pin 4 on IC1 and GND. Do the same for IC2.

    Retest - does it work now?

    If not, you may have a noise problem. Add a 1uF electrolytic and a 0.1uF ceramic capacitor across pins 1 and 8 for each and every IC.

    Retest - does it work now?
     
  12. tracecom

    AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    I breadboarded elec_mech's circuit as shown in post 7 to include IC3, IC4 and associated components. Instead of adding IC1, IC2, and their associated components, I put an LED and resistor on the output (pin 3) of IC3 and and another on the output (pin 3) of IC4. The circuit works exactly as it should.

    When I press SW1, the LED on pin 3 of IC3 lights for about 5 seconds, unless I press SW2. If so, the LED on pin 3 of IC3 immediately goes out and the LED on pin 3 of IC4 lights for about 5 seconds, unless I press SW1. If so, the LED on pin 3 of IC4 immediately goes out and the LED on pin 3 of IC3 lights for about 5 seconds, etc., etc.,

    Based on that, I believe you have a wiring error or a bad component in your circuit.

    I used 1k resistors for R3 and R4, but I think 10k would be a better choice. In addition, I would put a .1uF cap across the power pins of each 555, and I would add a .01uF cap from pin 5 to ground on each 555.
     
    mghg13 and elec_mech like this.
  13. tracecom

    AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    I also breadboarded my suggestion from post 6. As I should have realized, it makes the operation of IC3 and IC4 mutually exclusive. If I press SW1, then pin 3 of IC3 goes high, which (through my transistor inverter) holds pin 4 of IC4 low, so IC4 cannot be triggered by SW2, until IC3 times out. And vice versa.

    I think my transistor inverters would work as I intended if I used the output from IC3 to control the reset pin of IC2, and the output from IC4 to control the reset pin of IC1. But I haven't tried that.

    All this goes to show that my best bet is to try out an idea before I post it. :D
     
  14. mghg13

    Thread Starter Member

    Jul 17, 2013
    63
    0
    So far I have tried all your suggestions on a simulation software called livewire. But it seems that, simulation cannot be trusted!!!!

    Anyway, i'll try to mount the circuit physically. Thanks for your help!!!
     
  15. tracecom

    AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    I have no first hand experience with simulation software, but I see lots of reports here that make me question its reliability. Had I known that you were using simulation, that would have been my first guess as to why your circuit didn't work. Good luck.
     
Loading...