Please Review these 555 Circuits

Discussion in 'General Electronics Chat' started by CoachKalk, Jun 29, 2012.

  1. CoachKalk

    Thread Starter Member

    Sep 20, 2011
    139
    2
    I am in the process of working through some programming issues, but it occurred to me that it is very possible the 555 circuits I am using are not "doing" what I hope they are doing. I would appreciate some input regarding what I have and my assumptions of what should be happening.

    The first circuit is a One Shot calculated out at a Total Time of 1.02 sec. I had found an article online stating that if a diode was added around R2, the Duty Cycle could/would be below 50% - which is what I was looking for.

    [​IMG]

    For this circuit, my calulations were as follows:
    T(on) = .693 x 27000 x .00001 = .1871
    T(off) = .693 x 120000 x .00001 = .8316
    Total Time = 1.02 s
    Duty Cycle: 18.3%

    I realize the T(on) formula is different than the typical One Shot, but the formula I used was provided by the online article.

    My goal with the second circuit is to use a 0.11 sec One Shot to feed an astable which will cycle through approx. 5 "ons" in .11 seconds.

    [​IMG]

    One Shot Portion
    T = 1.1 x 10,000 x .00001 = 0.11 sec

    Astable Portion
    T(on) = .693 x 1670 x .00001 = .0116 s
    T(off) = .693 x 1200 x .00001 = .0083 s
    Total Time = 0.02
    Duty Cycle: 58%

    This may seem elementary, but I want to make sure I have not screwed up something obvious.

    My end plan will be to use a controller to alternate between both circuits feeding into a 4553 clock pin. Even though the controller will be used to turn each circuit "on" and "off", based on a previous suggestion I wanted to get in and out as quickly as possible.

    So, are my calulations on target? If so, I will continue the program troubleshooting, otherwise that would explain why I am having some issues.

    Thanks
     
  2. WBahn

    Moderator

    Mar 31, 2012
    17,788
    4,808
    What issues are you having?

    How are you alternating the clock signal between the two circuits?

    Gating and manipulating clock signals needs to be done with some care -- clock inputs are notoriously sensitive to glitches from switching and timing hazards.
     
  3. CoachKalk

    Thread Starter Member

    Sep 20, 2011
    139
    2
    My original circuits used the same concept as above with the following differences:

    The 1-sec One Shot used a typical design (Duty Cycle > 50%) and the Penalty Portion used a 1-sec One Shot (now a .11 sec One Shot). The Penalty Astable was designed to provide approx. 5 highs in the allotted One Shot Time(same as above).

    I am seeing the following in the actual trial:

    The start button starts the 1-sec clock as expected. If no laser is blocked, the timer works awesome. The stop button stops the timer as expected - easy peasy lemon squeezy.

    The issue is when a laser is blocked. If I keep the laser blocked (stand in front of it), the time warps to penalty speed - like I want. When you unblock the laser, the timer goes back to the 1-sec count.

    But, when the laser is blocked quickly, the penalty time is not added. I also have a siren set at 2 sec (yes, another 555), so I know the program is "seeing" the block. For some reason the time is not being added. Is the response time of the 555 causing the issue? But the siren 555 works fine ...???

    I didn't want to get into the programming side in the wrong section, so I figured I would find out if my 555's looked fine, then move my question/problem to the programming forum. I am new to the programming side as well so it is a 50/50 shot of where my mistake lies.

    Just one note - when the laser is blocked, I have the controller shut the 1-sec 555 off and the penalty 555 turn on (siren 555 on as well). Then I reverse the order - penalty 555 off and 1-sec 555 back on. The thinking being the clock pin would only be getting input from one or the other, but not both at the same time.
     
  4. WBahn

    Moderator

    Mar 31, 2012
    17,788
    4,808
    What do you mean by shutting off and turning on the 555's? How are you combining these outputs from the two 555 circuits into the single clock input? If you are just wiring them together, then they are in contention and are fighting each other. The 555 output is always driving a HI or driving a LO. If you are suppressing the 555 output by holding it in reset, the the output of that 555 should be LO and you can combine the two using an OR gate. But don't tie them together.
     
  5. CoachKalk

    Thread Starter Member

    Sep 20, 2011
    139
    2
    One output pin (from controller) feeds Pin 4 on the 1-sec 555. Pin 3 then feeds the clock pin.

    A second output pin feeds to the base of a transistor on Pin 2 of the Penalty 555 One Shot. Pin 3 of the Penalty Astable then feeds the same clock pin.

    In the program, only one of the output pins is high at any given time.

    Does the clock pin need some sort of resistor?
     
  6. WBahn

    Moderator

    Mar 31, 2012
    17,788
    4,808
    It would help if you used pin names instead of pin numbers.

    Pin 3 is the output. This pin is ALWAY either putting out 0V or 5V (or whatever Vcc is in your circuit). If you hook two 555 outputs together and they are trying to put out different voltages, then the results are indeterminant. You will probably get something in between that is closer to whichever device happens to have the greater drive strength (and no two ICs have exactly the same drive strength). This is called "contention" and is a bad thing. In addition to the indeterminant state of the output, the two devices will draw considerably more current and, in extreme cases, damage one or both chips. Without looking, I'm not sure if all 555's are rated for continuous short-ciruit operation or not.

    While resistors can minimize the current draw, they don't do much for the logical contention since the fundamental question remains -- Part A is trying to tell the clock input to see a LO and Part B is trying to tell the clock input to see if HI. Who should the clock input believe?

    If each part always outputs a LO when it is "shut off" ("disabled" is a better term to use) , then you want the clock to listen to whichever part is telling it the input is HI. If both parts are telling it the clock input is LO, then it doesn't matter which one you should listen to, the clock input should be LO. This is the description of an AND gate.

    You can get this functionality a number of ways. You can use an AND gate, you can use resistors and diodes to make a crude AND gate (what is known as RDL - resistor-diode logic), or you can use tri-statable buffers in order to truly "turn off" the output that you don't want.
     
  7. CoachKalk

    Thread Starter Member

    Sep 20, 2011
    139
    2
    Aren't both 555 circuits "disabled" until each respective controller output pin is set HIGH? As long as I don't have both controller output pins HIGH at the same time, I didn't think there would be the contention issue. Is the problem caused by the way I am "starting" each 555 circuit?

    I apologize if this is obvious.

    Which one of these options is more beginner friendly?
     
  8. WBahn

    Moderator

    Mar 31, 2012
    17,788
    4,808
    Listen carefully. The output of the 555 has two and only two possible values. 0V and Vcc. If the output is not Vcc, then it is 0V. If one of them is trying to make the clock pin one voltage and the other one is trying to make it a different voltage, then the two will fight each other. 0V is NOT THE SAME as disconnected!

    Imagine taking a battery and two SPDT switches such that the common pin of each switch is the "output" and the other two terminals are hooked one to the positive terminal of a 12V battery and the other to the negative terminal. Thus, when you flip the switch one way the output is 0V and when you switch it the other it is 12V. When a switch is "running", you stand there and flip it back and forth, and when it is disabled you leave it in the position that results it in outputing 0V. Now, start with both switches outputing 0V and tie the outputs together. Everything is fine. Now, enable one of them and start flipping it (while the other is disabled and hence continues putting out 0V). What happens as soon as you flip the switch on the one to make it output a HI (12V)? The battery explodes because the two switches are trying to put out different voltages and they fight and bad things happen.

    No. It is because the output of a 555 is NEVER disabled! The timing behavior is disabled, but the output is ALWAYS driving a defined voltage. When in reset, that voltage happens to be 0V. It is actively driving 0V on its output. It will try to sink whatever current it has to in order to maintain 0V on its output. If another output (from any thing, be it another 555 or whatever) tries to actively establish a higher voltage on that same node, it will try to source as much current as necessary in order to maintain the higher voltage. They will contend and the one with the weaker drive strength loses, sometimes by letting out the magic smoke.

    Which one of these options is more beginner friendly?[/QUOTE]

    Assuming that glitches don't matter, the AND gate is probably the simplest, but may require and other IC. If you happen to already have two NAND gates in a package that aren't being used, you can wire them up as an AND gate.
     
Loading...