Author Topic: Need some help with a 555 timer circuit  (Read 7973 times)

0 Members and 1 Guest are viewing this topic.

Offline Pizzashape23Topic starter

  • Contributor
  • Posts: 37
  • Country: au
Re: Need some help with a 555 timer circuit
« Reply #25 on: August 12, 2020, 12:02:14 pm »
I haven't breadboarded Ian.M's circuit as I don't currently have access to the parts but I needed something to do, so I routed the pcb. I have done a few before but it never hurts to get someone else to check it off. The only differences are the 24v to 12v converter and the various connectors. I know the trace width is excessive for the relays but I had the space and would rather too thick than too thin.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12986
Re: Need some help with a 555 timer circuit
« Reply #26 on: August 12, 2020, 01:13:42 pm »
As your relays are driving a large solonoid with an expectation of high back-EMFs, I would keep as much as possible of the coil connection tracks out from under the relay footprints, so you can maintain the maximum possible creepage and clearance distances between the contact circuits and the coil circuits.

You could replace the Dc-Dc converter with a LM7812 regulator, which shouldn't  even require any heatsinking if its only supplying two 555 chips and two 1K pulldowns.  Ideally use 24V coil relays so the regulator doesn't have to handle their coil current.

Why's Q1 SMD?

Consider a ground plane under the whole control circuit area.  Obviously you'll have to use parts of that side where tracks need to cross, but at the expense of a few extra vias to minimize the length of slots in the ground plane containing other tracks, youl'l gain considerable extra EMI immunity.
 
The following users thanked this post: Pizzashape23

Offline Pizzashape23Topic starter

  • Contributor
  • Posts: 37
  • Country: au
Re: Need some help with a 555 timer circuit
« Reply #27 on: August 12, 2020, 01:37:26 pm »
I completely agree with needing to move the control tracks from underneath the relays, the low current one maybe not but definitely the high current relay.

The dc-dc converter is what ive got on hand, its a pretty good module that can supply 12v at 2A from between 18v and 36v. Keep in mind it will also be supplying the solenoid control circuitry which uses a pretty beefy mosfet, hence the 12v output.

From the short amount of time I spent searching mouser (usual supplier) i didnt see them in a through hole package, but i might have missed them. If you know of one let me know.

A ground plane is an interesting idea, but I've never done one before so I will probably do a bit of research tomorroe before implementing it.

I feel like I'm starting to repeat myself now, but thank you very much  AGAIN. I am really appreciative and would probably have blown up my circuit a couple times without your help. Just curious but what is your background? You are clearly very knowledgeable.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12986
Re: Need some help with a 555 timer circuit
« Reply #28 on: August 12, 2020, 02:37:00 pm »
The transistor in the sim for Q1 was just a fairly random choice out of the possible 2N and 2S part numbers, avoiding legacy parts.  Constraints were Ic_max, hfe_min and Vceo_max, and I picked what I did without knowing whether you were using on-board or off-board relays, to be able to tolerate a bit of abuse.   You've got the data on the relays so can calculate its Ic, and I estimated its base current above, so you can determine the hfe_min required to get it far enough into saturation, if there isn't enough base current to run at a forced Beta of 10.  I wouldn't go under 30V Vceo.
 
The following users thanked this post: Pizzashape23

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19694
  • Country: gb
  • 0999
Re: Need some help with a 555 timer circuit
« Reply #29 on: August 12, 2020, 09:15:00 pm »
Ok, here's the 2x 555 timer version, as safe as I can reasonably make it.
R1 provides 12mA through the switch and 12v across it when open, so unless you use a particularly crummy switch you don't need to worry about wetting current.

Fs1 and R3 provide protection against shorts to ground in the switch wiring.  If Fs1 trips, IC2 is locked out via its Reset pin.  R4, C7 provide a power-up delay to ensure U2 doesn't pulse the relay at switch-on, and in conjunction with R3 also provide ESD protection to its Reset pin.

R2, C1 provide input filtering for debouncing and in conjunction with R1 provide ESD protection to U1, which is wired as a simple inverting Schmidt trigger with 1/3 Vcc hysteresis*.  Its Out pin is the inverted debounced switch state (i.e. low when pressed).

R5, C4, D3, R6 are the negative edge trigger pulse shaping network, that only triggers U2 on a new button press, once the current  timing period is complete. 

C5, R7 is the timing network and R8 limits the current into the Discharge pin.  R9, R10, Q1 is a 'bog-standard' relay drive circuit, though its imprudent to rely on the diode inside the relay coil to protect Q1.  If you are feeling moderately paranoid, adding a 24V Zener, cathode positive, from ground to Q1 collector, + a fuse in series with the feed to the relay coil wouldn't be a bad idea.

I've minimized the number of values used for BOM reduction. If that isn't an issue, R8 and R9 could benefit by being reduced, and the CV pins don't need so large decoupling capacitors.

LTspice sim with some nasty simulated contact bounce attached.   Zoom in on the edges of  V(in) to see it!  >:D  For the details of how the SIM only Switch Control works, see LTspice: Piecewise Linear Functions for Voltage & Current Sources and my comments on simultating switches [here].

H.T.H.

Ian.
Now everybody's got a chance to bash my ideas to death  :horse: while I chill  :popcorn: and hopefully we all learn something!

* A buffer following a RC filter for debouncing *MUST* have hysteresis.
You should probably (re)read Jack Ganssle's excellent article on debouncing: http://www.ganssle.com/debouncing.htm especially part 2 where he covers RC hardware debouncers.

Why use two 555 timers?

The standard 555 timer circuit is not retriggerable. As long as monostable delay is longer, than the bounce time, there's no need to for any debouncing.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12986
Re: Need some help with a 555 timer circuit
« Reply #30 on: August 12, 2020, 09:30:19 pm »
Have you considered bounce on switch opening triggering it?  Assuming the operator holds the button down till the feed stops, its undesirable for it to immediately resume feeding when the button is released!   

I'm sure it *COULD* be worked around by careful choice of components in the negative edge pulse shaping circuit, but developing that while retaining good EMI immunity and >10mA, >10V switch wetting current & voltage was more design work than I was willing to do as a freebie.  The extra 555 gives me a clean squared up button pulse so I don't have to deal with rising edge bounce.

Sometimes for a one-off or very small hand-built production run, throwing extra parts at the problem to save time is more cost-effective.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19694
  • Country: gb
  • 0999
Re: Need some help with a 555 timer circuit
« Reply #31 on: August 12, 2020, 09:48:50 pm »
Have you considered bounce on switch opening triggering it?  Assuming the operator holds the button down till the feed stops, its undesirable for it to immediately resume feeding when the button is released!   

I'm sure it *COULD* be worked around by careful choice of components in the negative edge pulse shaping circuit, but developing that while retaining good EMI immunity and >10mA, >10V switch wetting current & voltage was more design work than I was willing to do as a freebie.  The extra 555 gives me a clean squared up button pulse so I don't have to deal with rising edge bounce.

Sometimes for a one-off or very small hand-built production run, throwing extra parts at the problem to save time is more cost-effective.
No, I've not experienced switch bounce, when the contacts open. I suppose it's a possibility. There's no need for two 555 timers, just put a capacitor (try 100nF) across the switch. It will also help to close the contacts, by providing a surge to make the contacts wet.
 
The following users thanked this post: Ian.M

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12986
Re: Need some help with a 555 timer circuit
« Reply #32 on: August 12, 2020, 10:16:36 pm »
You are probably right, and that would certainly help with EMI immunity, but I'd like to see a fully worked up design of the single 555 approach.  Also see my comments earlier about  possible contact damage from shorting a charged cap.  Without a detailed spec sheet for the switch, one doesn't know which side of the line one is operating on between an adequate surge current for wetting, and progressively damaging the contacts by ablating the contact surfaces as they micro-bounce on closure.  'Belt and Braces' would be a small series resistor for the cap to limit the peak wetting current.


N.B.  The switch bounce generator in the sim I posted earlier was half-borked due to undocumented limitations of the LTspice PWL TRIGGER modifier.  It produced a bounce pattern but did so very inefficiently.   If you want to have a hack at simplifying my design, rather than starting over from scratch, and don't have a good switch bounce generator of your own, please use the switch bounce generator I posted  in the topic I previously linked: "...  my comments on simulating switches [here]."
 

Offline ozcar

  • Frequent Contributor
  • **
  • Posts: 326
  • Country: au
Re: Need some help with a 555 timer circuit
« Reply #33 on: August 12, 2020, 10:23:29 pm »
No, I've not experienced switch bounce, when the contacts open. I suppose it's a possibility. There's no need for two 555 timers, just put a capacitor (try 100nF) across the switch. It will also help to close the contacts, by providing a surge to make the contacts wet.

With the circuit as it was originally proposed, it would not trigger on switch release until the resistor across the capacitor discharged it. But I've no idea how it evolved - one of the first suggestions was to rip that resistor out.
 
The following users thanked this post: Ian.M

Offline Pizzashape23Topic starter

  • Contributor
  • Posts: 37
  • Country: au
Re: Need some help with a 555 timer circuit
« Reply #34 on: August 12, 2020, 10:58:19 pm »
Yeah, one of the first design changes I made was to change the 4.7k to 10k, remove the 100k across the capacitor and pull up the switch to 12v through a 10k resistor. Thanks to Ian.M we are well past that design, making it simpler would be nice but his circuit contains a lot of safety and stability features that I think are worth the additional complexity. My original design probably would have worked after making the change mentioned above, but at the moment I am running with Ian.M's design.
 
The following users thanked this post: Ian.M

Offline Pizzashape23Topic starter

  • Contributor
  • Posts: 37
  • Country: au
Re: Need some help with a 555 timer circuit
« Reply #35 on: August 13, 2020, 12:23:51 am »
In terms of changing the transistor, if I was to swap it for a BC337 with a beta(min) of 60, assuming a Max current of 300ma (150ma per relay) could I get away with using the same 1k resistor, or should I use something closer to 500ohms?
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12986
Re: Need some help with a 555 timer circuit
« Reply #36 on: August 13, 2020, 01:06:23 am »
If you are using a bipolar 555 e.g the original NE555, its output high level is up to 3.25V below Vcc. Assuming 12V -5%, that means worst case it could be only 9.15V. Typically it would be somewhat better but you cant rely on typical values.  My 1K base resistor and pulldown divide that by two but drop the source impedance to 500 ohms.  Assuming Vbe of 0.7V, that gives you 7.7mA base drive,  which will get it into saturation at 300mA Ic but with only 50% margin.  I'd be happier with a bit more base drive.  Decreasing the base resistor to 470R while keeping the pulldown at 1K increases the base current to 17.3mA, which is more than adequate base drive.

If you are using a modern CMOS 555 its output will get somewhat closer to Vcc even when sourcing 10mA, so the base drive will improve a bit, but not enough to significantly affect the design.
 
The following users thanked this post: Pizzashape23

Offline eblc1388

  • Frequent Contributor
  • **
  • Posts: 400
  • Country: gb
Re: Need some help with a 555 timer circuit
« Reply #37 on: August 13, 2020, 07:12:11 am »
You are probably right, and that would certainly help with EMI immunity, but I'd like to see a fully worked up design of the single 555 approach.

I tend to go along with Zero999. Here is my feeble attempt to create what the OP wants. It survives the contact bounces at release. 555 Trig pin is pulled up via a 2K2 resistor which is fairly strong and should prevent normal EMI false triggerings. I just pull the component values from thin air and perhape you can fine tune it better.
 

Offline Pizzashape23Topic starter

  • Contributor
  • Posts: 37
  • Country: au
Re: Need some help with a 555 timer circuit
« Reply #38 on: August 13, 2020, 09:07:35 am »
This is very similar to my original shcematic posted on StackExchange, however many people pointed out that getting rid of the resistor across the cap and pulling up the switch using a 10k resistor would be better, and for the sake of simplicity the 2k2 resistor could also be 10k. At the moment I am leaning much more towards the dual 555 design, only because i am already printing the pcb so the added complexity and few extra components do not impact time or cost significantly, and because it is supposedly better protected and more stable. In my opinion it's a no brainer, although there is no doubt that it could be simplified.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12986
Re: Need some help with a 555 timer circuit
« Reply #39 on: August 13, 2020, 10:20:20 am »
Eblc1388's implementation of Zero999's circuit does quite well, and is a considerable simplification compared to mine.  With a couple of tweaks it would be entirely acceptable, provided high level EMI pickup on the button wiring is avoided (e.g in hostile EMI environments, use twisted pair and keep the wiring as short as is reasonably practical).

IMHO the 2K2 pullup should be reduced to 1K to get enough wetting current, a 1K (or lower) resistor should be inserted in series with the Discharge pin to control the current, the 100K resistor across the input cap should be made the same as the 91K timing resistor for BOM minimisation, and the 100nF caps should be increased to 220nF to increase the button up debounce period.  Also the supply decoupling should be 10uF if a bipolar 555 is used.

N.B Zero999 failed to spot the other topic was using 5V levels.  The power supply SPICE line needs to be changed to:
Code: [Select]
Vvcc Vcc 0 12V ; power supply
« Last Edit: August 13, 2020, 01:46:47 pm by Ian.M »
 

Offline Pizzashape23Topic starter

  • Contributor
  • Posts: 37
  • Country: au
Re: Need some help with a 555 timer circuit
« Reply #40 on: August 13, 2020, 10:56:12 am »
So as a "conclusion" to the question, which circuit should I use in the final build? Noting that I have no preference in regards to complexity and number of components as long as it does the job and does so safely and reliably. One point in favour of Ian.M's circuit is that it does not cause an activation on power up.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12986
Re: Need some help with a 555 timer circuit
« Reply #41 on: August 13, 2020, 11:35:07 am »
Before you make a decision, breadboard the contenders with grounded foil under the breadboard and about 30cm of switch wiring, lay that switch wiring next to a mobile phone and dial that phone from another.  Mobile phones cause a lot of EMI when they go active, and this crude suceptability test is to get some idea what could happen if someone with a mobile phone on a belt clip is right next to your device.  You can also try the effect of a Pizeo lighter (for gas - not the sort that makes its own flame), to simulate a strong  ESD discharge.  Ground its shield and extend the electrode so you can bring it close enough to the button to spark to it. 
 

Offline Pizzashape23Topic starter

  • Contributor
  • Posts: 37
  • Country: au
Re: Need some help with a 555 timer circuit
« Reply #42 on: August 13, 2020, 11:41:05 am »
While I do plan to breadboard both, as stated I don't currently have access to the components required to do so. Realistically, a better question would have been; at first glance which circuit would you implement yourself (If you couldnt do a real world test)?
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12986
Re: Need some help with a 555 timer circuit
« Reply #43 on: August 13, 2020, 12:07:11 pm »
Neither.  Analog RC timing is so '80's!

Assuming a requirement *NOT* to use a MCU, I'd probably go for an Analog Devices LTC6993-3 TimerBlox  one-shot,  supplied by a dropper resistor and a 4.7V Zener, driving a low threshold (so-called 'logic level') MOSFET gate via a 100R resistor. It also needs enough decoupling to supply the MOSFET gate charge without a significant V+ voltage drop.  The TimerBlox trigger input has hysteresis so is directly compatible with RC debouncing / ESD protection, and with one more resistor added to the debounce circuit to make a potential divider, you can also level shift from 12V or even 24V levels at the button down to the logic level input the TimerBlox chip needs.   You only need enough debouncing to cope with button release bounce as that specific TimerBlox is non-retriggerable.

An introduction to TimerBlox can be found [here].
« Last Edit: August 13, 2020, 12:09:29 pm by Ian.M »
 

Offline Pizzashape23Topic starter

  • Contributor
  • Posts: 37
  • Country: au
Re: Need some help with a 555 timer circuit
« Reply #44 on: August 13, 2020, 12:39:40 pm »
 :-DD :-DD
In one post you managed to show up both circuits and completely defeat the purpose of my question.

In all seriousness though, if you had to pick between either circuit in this topic which would it be? I think i have learned more than enough and don't really feel like opening another can of worms, as interesting as it seems.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12986
Re: Need some help with a 555 timer circuit
« Reply #45 on: August 13, 2020, 01:51:48 pm »
OTOH, some flavor of 555 chip is likely to be obtainable for the rest of this century, and you can buy them retail even in 3rd world s--tholes.

Fixed that for you:
In all seriousness though, if you had to pick between either 555 circuit in this topic which would it be? I think i have learned more than enough and don't really feel like opening another can of worms, as interesting as it seems.

Its easier to make my version general purpose as it really doesn't care if the input is from a switch or is a 'logic' signal on a wire from something else, but if you can guarantee a real switch with short wiring, eblc1388/Zero999's version is plenty good enough.   Add a RC network on its Reset pin to prevent it firing on power-up glitches and, to save parts, use its output to drive a MOSFET via a small gate resistor.  If you use a beefy enough MOSFET and a small enough gate resistor, you could probably drive the solenoid directly!
« Last Edit: August 13, 2020, 01:54:28 pm by Ian.M »
 

Offline Pizzashape23Topic starter

  • Contributor
  • Posts: 37
  • Country: au
Re: Need some help with a 555 timer circuit
« Reply #46 on: August 13, 2020, 02:08:16 pm »
In that case I will probably end up using your design.

The final build will not have short switch wiring (I can't have the circuit too close to the furnace), I am still unsure about what switch i'm going to use and I like the idea of being able to reuse the design and pcb for other projects. (Especially when buying bulk parts/pcbs is generally cheaper)

I like where you are going with integrating mosfet control into this board but unfortunately thats a no go, part of the idea behind using relays and cutting all the power was to give me the option to easily increase the amount of solenoids in the system. (There are curently 3) It would also remove the sensor from the original circuit. (It would only trigger the solenoid when a rod was correctly seated).

The final system should theoretically allow the solenoid to trigger for a set period of time on button press, as long as the sensor is detecting a rod.

P.S I ended up using a ground plane, I decided to not extend it to under the relays, would this be an issue?

P.P.S Should I post a final circuit and PCB design?
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12986
Re: Need some help with a 555 timer circuit
« Reply #47 on: August 13, 2020, 02:14:11 pm »
*DO* post your PCB layout and final schematic - peer review is almost always useful.
I wouldn't put a ground plane under relays switching power circuits.  Others may have different opinions.
 

Offline Pizzashape23Topic starter

  • Contributor
  • Posts: 37
  • Country: au
Re: Need some help with a 555 timer circuit
« Reply #48 on: August 18, 2020, 12:29:21 am »
I just wanted to thank everyone who contributed to my final design, all your help has been greatly appreciated.

Attached are my final schematic (Doesn't include connectors, Indicator Led or 24v to 12v convertor), my pcb and the ground plane to make the slots where traces need to cross easier to see.

I have ordered the necessary components to bread board the circuit before printing the pcb, so until then any and all feedback in regards to optimizastion, design, design checking, layout, etc is helpful.

If I remember I will make sure to come back and post an image of the assembled pcb.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19694
  • Country: gb
  • 0999
Re: Need some help with a 555 timer circuit
« Reply #49 on: August 18, 2020, 07:50:45 am »
I just wanted to thank everyone who contributed to my final design, all your help has been greatly appreciated.

Attached are my final schematic (Doesn't include connectors, Indicator Led or 24v to 12v convertor), my pcb and the ground plane to make the slots where traces need to cross easier to see.

I have ordered the necessary components to bread board the circuit before printing the pcb, so until then any and all feedback in regards to optimizastion, design, design checking, layout, etc is helpful.

If I remember I will make sure to come back and post an image of the assembled pcb.
That looks good to me. The decoupling capacitors are near the supply pins to the ICs, which is great.

Is there any reason why you're not using the NE556 or better still the CMOS TS556/ICM7556? The 556 means it has two 555 timers in the same package, which saves space and makes one of the 10µF capacitors unnecessary. The CMOS versions (TS/ICM7) use much less power and don't draw such big power spikes, when the output changes state, so can use much smaller 100nF decoupling capacitors.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf