# Need advice with a 556 timing circuit

#### Otaku

Joined Nov 19, 2008
128
Hi all,
I have a 556 timing circuit that runs the two timers (A and B) in sequence. The two timers actuate DPDT relays.
Timer A is triggered using a PIR sensor and controls a 12VDC, 10A DPDT relay. One side of the relay is used for switching power to an external device. The other side is used for triggering timer B. When timer A runs out, the NC/Common connection on one side of the 10A relay triggers timer B.
Timer B controls a 12VDC, 2A DPDT relay that is used to interrupt the signal from the PIR sensor that triggers timer A. This effectively "locks out" the sensor so that the circuit can't be re-triggered until both timers have run out.
Here's the problem: when switching DC power through the 10A relay, the circuit behaves normally. The timers run sequentially without any odd re-trigger events or overlapping. When switching AC power through the 10A relay, I sometimes get overlapping of the timing (timer B starts before timer A runs out, or timer A continues to run after timer B starts - I don't know which). Sometimes timer A will re-trigger itself 2-3 times, then time out normally, allowing timer B to start.
The AC current being switched is <0.5A. The DC current loads have been as high as 5A with no behavior problems. Clearly, the problem seems to be coming from the AC loads.
I have 1N4148 diodes across the relay coils, and a 1N4001 on each output pin of the 556. Should there be diodes on the 556 trigger input pins as well? Could switching AC power through the 10A relay generate a magnetic field that is interfering with operation of the 556? I know that magnetic fields can't be insulated, but is there a way to contain or re-direct the field away from the 556? Re-location of the 556 or the relay isn't an option - the boards are already printed. I can post pics of the board on Monday if needed. All advice greatly appreciated.

Gary

#### Wendy

Joined Mar 24, 2008
23,065
Schematic? Verbal does not a schematic replace. Schematics are the language of electronics.

One comment though, 555/556 generate a very tight spike in the power supply when they switch. Having a 0.1µF capacitor across the power supply leads, and 2 others on the CONTROL VOLTAGE pins can't hurt in high noise environments.

#### Otaku

Joined Nov 19, 2008
128
Thanks, Bill. I'll get a schematic up on Monday. I do have 0.1uF caps on the control voltage pins, but there isn't one across the power supply leads. I can fix that.

#### Otaku

Joined Nov 19, 2008
128
Here's a layout of the circuit. It's not a schematic per se - the reason for this is that I'm not an EE, so what I drew is a representation of the physical layout of the circuit on a perf board with callouts for the components. Thanks in advance for all advice!

#### Attachments

• 42.5 KB Views: 71

#### Bernard

Joined Aug 7, 2008
5,784
Suggest adding a 4.7k from base to ground on transistor, rearrange contacts on Ry-A, base to common, PIR to NC, ground NO. Also might lower 100ks at pin 6 to 10ks.

#### Wendy

Joined Mar 24, 2008
23,065
I'm redrawing this schematic from your print. You'd do yourself and everyone else a favor and learn the standard conventions. You print is readable enough, but impossible to interpret as drawn. There is a reason the conventions exist.

First thing that jumped out at me is the 7805 must have filter caps, both on the input and especially on the output. It is specified in the data sheet. Put a 0.1µF cap on both the input and output, and possibly a 100µF on the input pin. This is because that regulator oscillates without them.

I'm posting what little I've drawn as a reference for some other issues.

Capacitor B. Your print does not show polarity, and it matters a lot.

The other thing that jumps out is the pots off board. You won't smoke anything if they are intermittent, but it sure will screw with the operation of the circuit. There is not a quick and easy answer here, but you might think about putting a 1MΩ resistor in parallel with them on the board to keep the glitch if the pots do act up from being as severe.

The LM7805 is the issue that stands out the worst. I would say it needs fixed pronto.

I shrunk the image a little with M/S Paint to allow it to fit on the screen. It is better in the original format.

#### Attachments

• 3.6 KB Views: 139
• 29.1 KB Views: 134
Last edited:

#### Bernard

Joined Aug 7, 2008
5,784
A really rough draft, on orange scratch paper no less; see 7805`s missing.

#### Attachments

• 239.5 KB Views: 49

#### Bernard

Joined Aug 7, 2008
5,784
Forgot to rotate, or like eating a taco, just rotate head 90 deg.

#### Attachments

• 233.4 KB Views: 46

#### Wendy

Joined Mar 24, 2008
23,065
Not bad, there is a slight problem with the LEDs (single resistor for both), and it is incomplete, but definitely usable. More so than mine at this point.

There is no timing capacitor on pins 12 and 13, it is on the original print. A 100µF cap, same as the first.

I'll wait for the OP to get back with us on the regulator issue. We also need to know the relay part numbers, usually I use a transistor to drive relays to take the current load off of the 555s. I haven't even started looking closely at the logic yet.

.

#### Attachments

• 50 KB Views: 117
Last edited:

#### Otaku

Joined Nov 19, 2008
128
You guys are great - thanks very much for the advice.
Bill, I can find a way to get the filter caps in for the 7805 and across the power input leads. I am trying to find time to learn how to draw effective schematics; I know it's a problem when asking for advice. Dropping in the other components (parallel 1M resistors for the pots etc) should also be easily done. You mentioned the single resistor on the LEDs - it's actually a single bi-color LED. The color change tells me which timer is active (green = A, red = B). I can get the part numbers for those relays in the AM. I assume you're interested in the coil resistance values. The boards I'm trying to debug are on their way to me, ETA Wednesday.
Regarding the parallel resistors for the off-board 500K pots, will adding those resistors alter the timing ranges?
Again, many thanks!

Last edited:

#### Wendy

Joined Mar 24, 2008
23,065
The LED in question is actually two LEDs in one package, so when you draw it is two parts. The unit you have is easier to use with it's 3 leads, try using one with two lead and the LEDs facing back to back sometime.

Have you looked at my paint CAD package? It is nothing fancy, just a bunch of template in GIF format. I copy and paste them using MS Paint to make my drawings. You can find it in my blog. I need to update it again, I just had to draw some new parts for another project I've got going.

Bill's Index

You could use Bernard's technique, hand draw them and scan them. There is a lot to recommend it too, sometimes a quick sketch is much faster overall.

Thinking about it, have you put the 0.1 filter caps across the 556? It would qualify as the filter cap for the 7805, though they should be as close as possible to the regulator chip.

#### Otaku

Joined Nov 19, 2008
128
Thanks Bill, I'll check out that Paint CAD package. I haven't received the boards yet from my buddy in S. Cal. but they should be here in a day or two. I was also thinking of placing a 100uF e-cap across the + and ground of the 556 (pins 14 and 7). Your thoughts?

#### Wendy

Joined Mar 24, 2008
23,065
Never a bad idea. Might not be needed, but then again, I've had surprising results adding caps to power supply rails.

#### Otaku

Joined Nov 19, 2008
128
First thing that jumped out at me is the 7805 must have filter caps, both on the input and especially on the output. It is specified in the data sheet. Put a 0.1µF cap on both the input and output, and possibly a 100µF on the input pin. This is because that regulator oscillates without them.
The other thing that jumps out is the pots off board. You won't smoke anything if they are intermittent, but it sure will screw with the operation of the circuit. There is not a quick and easy answer here, but you might think about putting a 1MΩ resistor in parallel with them on the board to keep the glitch if the pots do act up from being as severe.

The LM7805 is the issue that stands out the worst. I would say it needs fixed pronto.

Bill, should the 0.1 caps on the 7805 be wired as shown on page 21, Fig. 5 in this datasheet?
And would two 0.1uF's suffice? The datasheet calls out a 0.33uF and a 0.1uF. You mentioned a 100uF cap on the input pin of the 7805 - would this be wired in series?

Regarding the relays - the 12VDC, 5A comes from Radio Shack:
The 12VDC, 2A is a Kest KS2E-M-DC12:
http://www.allelectronics.com/make-a-store/item/RLY-622/12-VDC-DPDT-DIP-RELAY//1.html

Again, thanks to all for the great advice. Much appreciated!

#### Wendy

Joined Mar 24, 2008
23,065
Do you have any other caps in your power supply rails? They count. It will be this weekend before I have time to do so serious review (I'll also finish drawing what I think you have up). It is a 3 day weekend (as you know), I'm thinking of making it a 4 day wonder.

#### Otaku

Joined Nov 19, 2008
128
Bill,
I don't have any other caps that go across the power rails (such as the 100 uF smoothing cap would do). There are 0.1 uF caps on the trigger pins and the Control Voltage pins. There are 100 uF caps on the Threshold pins, as well.
Here's a PDF of the circuit board with component call-outs. It's the version burned by Simple Circuit Boards based on my design.

#### Attachments

• 26 KB Views: 28

#### Wendy

Joined Mar 24, 2008
23,065
Nice layout.

As a general rule you always put 0.1 caps on the power supply pins of digital ICs (the 555/556 qualifies) and on the output and input pins of regulators.

Digital ICs generate a lot of noise, you want to kill it quickly if possible.

Regulator ICs have a depressing tendency to oscillate.

Just solder the parts with some wire insulation around the leads on the bottom of the board. It isn't pretty, but it is common industry practice for board corrections.

#### Otaku

Joined Nov 19, 2008
128
Thanks, Bill.
I attached 0.1 caps on the regulator (V+ to ground and output to ground) and attached a 100 uF e-cap across pins 14 and 7 (V+ and ground) of the 556. Everything works fine until I try to run the motor, then I get errors. When triggered, sometimes timer A will start, but just for an instant (<0.5 sec, best guess) then timer B starts, or timer A will run 2X then timer B starts. One or the other error may occur back-to-back. Sometimes I can get 3-4 normal runs in a row before an error occurs.

If the AC power is plugged in, but the motor is not switched on, no problems. The errors only occur when the AC is actually running the motor.