Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

First 555 timer circuit, bunch of questions using a relay

Status
Not open for further replies.

kingtal0n

Junior Member level 3
Junior Member level 3
Joined
Jun 14, 2016
Messages
31
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Location
Florida
Activity points
552
Hello, I am new to electronics and trying some things,

This is my first attempt at using a 555 timer.

I need some help to make sure it is safe to use and will work the way intended.

first555.jpg

The circuit seems to work fine:
1. when power is applied (12v car battery) the LED lights up to show circuit is energized and waiting for switch to close
2. when switch (pin2: trigger) is pulled to ground, the 555 turns ON the relay for a few seconds (and the LED turns OFF), then flips it back off and waits for the process to repeat

I plan to use this in a car as a security measure to disable the neutral safety switch. I plan to put a switch on the input VCC so I can also hide that as well. I have a ton of questions though:
1. how much power will the circuit draw if I happen to leave it on, can I make it use less power, so that I can leave it energized ALL the time?

2. is it safe to directly ground pin 2 or do I need a resistor there, it works fine with a resistor doesn't seem to care
3. Should I put a capacitor on pin5 and pull it to VCC like so many diagrams have?
4. Are the resistors big enough? I have a 1k on the transistor and 120k on "discharge" not even sure if I used it properly
5. I noticed that without the capacitor C1 against ground for pin2, the 555 will auto-trigger when powering up. I don't know why this capacitor keeps it from auto-firing and I am not sure how large of a cap to use here, I just stumbled on this fix.
6. Is the transistor 2N4401 the right 'size' for typical 30-50 amp automotive relay coils? Its just what I happened to have
7. It seems strange there is no resistor anywhere inline for the transistor to relay circuit. yet many diagrams online do not have them. I don't know how to tell when its safe to leave the resistor out.
 

1. The circuit will probably drain your car battery in about 1 year if you don't recharge it. So don't worry about current consumption, the relay is the only part that draws anything significant and only then if it is energized.

2. Grounding pin 2 is the correct way to do it. It will work with a small value resistor if you really want one but a direct connection to ground is best.

3. pin 5 is for allowing a degree of control over the internal charging current, for your purposes it can be left disconnected. When a capacitor is added to ground it is there to reduce interference pick-up on the pin but a few mS difference in your timing is irrelevant anyway.

4. the values are OK, bear in mind that the capacitor probably has a tolerance of maybe +/- 20% in manufacture. You could increase the resistor and decrease the capacitor to get the same timing but those values are pretty good.

5. A capacitor there is good because of the likelyhood of interference falsely triggering the timer but to prevent it firing at power-up there is a better way: pin 4 has to be near supply voltage for it to work so if you hold it down for a moment it will prevent the timer firing. Add a resistor between pin 4 and supply and a capacitor from pin 4 to ground. I suggest trying 1K and 1uF but you might have to experiment a little. The idea is the capacitor takes a moment to charge through the resistor so it holds the voltage on pin 4 low for a while and prevents the device triggering.

6. the 2N4401 is rated at 0.6A continuous so it should be OK but it really depends on the relay coil current. Expect it to run warm if the relay is energized for any length of time. You can get an idea of relay current by measuring the resistance across the coil connections with a testmeter and use the formula "Amps = 12 /coil resistance".

7. I'm not sure which resistor you mean. The schematic is correct at the moment, the must be a resistor between pin 3 and the base of the transistor for it to work properly. there should not be a resistor between the transistor and the relay.

Brian.
 

Hi,

1. If the relay coil is not energised and the other side is disconnected from a load and the 555 timer output is low, the circuit shouldn't use too much power.

2. Presumably okay. Why not copy a correct/conventional 555 monostable schematic?
3. You mean Vss. Optional but advisable, 10nF to 100nF from pin 5 to ground.
4. 1k is possibly smaller than needed to drive the BJT, I have no idea, it depends on the relay coil's requirements.
e.g You would want to know the current draw of the relay coil, divide that by 10, then divide the BJT base input voltage by that result If relay coil were 100mA @ 12V:
100mA/10 = 10mA; 12V/10mA = 1200 Ohms.
I'd have put a 100k resistor from the BJT base to ground.
You can work out what values of monostable/one-shot resistor and capacitor on these pages: LM555 and LM556 Timer Circuits or 555 Timer Monostable Circuit Calculator
5. Not familiar with that fix to triggering at power-up, if it really works then just leave it as it is. You could also put an RC POR of e.g. 1k + 10nF on the Reset pin #4.
6. 2N4401 datasheet says 600mA max. collector current. The relay coil requirement is presumably far less than this, and the 30 - 50A you mention will be the other side of the relay. Post a link to a datasheet for the relay.
7. It wouldn't need a resistor unless you wanted to drop some voltage beforehand. Relay coils have must-turn-on and must-turn-off specifications in their datasheets and have a wide tolerance of input voltage for must-turn-on.

Maybe that 555 monostable version works but I'd stick to more conventional tried-and-tested circuits.

You'd need to provide some precise numbers for meaningful answers and links to relevant datasheets otherwise it's how-long-is-a-piece-of-string conjecture/guessing.
 

thanks!

I noticed that with no capacitor on the trigger pin, I can activate the timer without touching it to ground. I kind of like this method since it means I don't need to take the trigger to an actual ground source, I can just touch it with my finger or something.

Is there anyway to keep this functionality or use it properly, so I can touch on the timer without using actual ground wire?

Ill try the trick with reset pin also and see what I can eliminate.

So I guess it also sounds like I can just leave the circuit energized all the time with the LED glowing even? I let the car sit for 2-3months sometimes, so thats why I ask. I guess Ill put a switch on it for those long intervals.
 

I seriously do NOT recommend leaving the trigger pin floating. It worked when you touched it because your body held enough static charge that it could activate the trigger but there is no guarantee that would always be the case. For example, you might find that after discharging yourself by touching some other part of the car, it no longer worked. Equally, it might trigger itself in a thunderstorm!

I'm not sure exactly how this works in your car but consider what might happen if the circuit activated accidentally while you were driving.

Brian.
 

not advisable to keep trigger pin open(pin 2) .
connect a 10k resistor to supply Vcc and pin 2 . then pin2 with a push button switch to ground.

otherwise the behaviour will be random.
 

not advisable to keep trigger pin open(pin 2) .
connect a 10k resistor to supply Vcc and pin 2 . then pin2 with a push button switch to ground.

otherwise the behaviour will be random.

Interesting. So the 10k pulls pin2 "up" right? Is it a "pull up resistor" in that case? I had a 1.0M resistance for pin#2 like this but didn't see any difference in the behavior of the circuit, except that I couldn't trigger it anymore with a touch.


There must be a 'right way' to do this though. How do touch on/off lamps work? Surely there is a design which will allow the pin to be properly used for a touch on/off, but perhaps it requires more complicated circuits...

In any case. I also realized something else. Taking the pin to ground to activate the timer is the same thing as taking a relay coil to ground to activate the relay manually. theres no point in even using the 555 unless I needed the delay. Which is not really necessary by itself.
So I guess what I am asking now, is:
1. I'm looking for a more clever way to utilize these 555 chips to this purple. Perhaps I can use 2x 555 chips somehow so that they both need to be activated in order to run the relay or something. Does anybody have any similar (not difficult circuits, for beginners only) ideas using relay(s) that will allow me to touch, ground, activate, push button, etc... Some kind of "hidden" method for turning on the timer?

For example I thought about putting a plate in the car "to touch with a finger" using a "split" plate where the top goes pull up 1M to VCC and the bottom goes to ground, so it isn't "floating" but the finger still "touch" activates the switch. I saw it in a diagram somewhere.
Something like that, but a little more clever would be nice. You know, I'd like to touch this wire, touch that plate, a hidden something. Its to activate a relay so you can start the car for example.

Another example of what I am sort of looking for as a unique feature in the car,

ex
You get in the car and put the key in, and turn 1 or 2 clicks (not to start) and lights come on the dash in a random pattern (LED, a few, red green blue etc)

its really pretty and they shut off after a couple seconds. Then you have to activate them somehow (using a 555 timers and 'touch plates' or 'buttons' or similar) to get them to light up in a certain order, say green green blue red yellow or something. SO you have to touch different plates/buttons in a specific order (that is difficult to guess) in order to activate the relay.

Or something like that. It would be nice to have it randomize the buttons or the order each time so that anybody watching me do it once couldn't re-try the same combo I used. See what I am going for here? Kind of a silly fun car project with colors and a bit of security mixed in. I think I am just trying to use up some of these LED and 555's I have sitting around lol

Another thing I saw online are "games" like the 'roulette' and I thought it would be fun to have to 'win a game' in order to start the car or something.

worth mentioning
-I'll put a switch on this thing so it stays fully 'off' when not in use most likely, but if I forget to turn it off, and it self-activates, that is also fine. I just don't want it to do that while the car is off and draw the battery down running a relay coil while Im sleeping.
-if it triggers while driving that is fine, It needs the operator to physically turn the key in the ignition to fully complete the circuit
-I just need it to not "auto trigger" when it boots up which I believe we solved
 
Last edited:

Capacitive touch sensors work on a different principle and would be very difficult to implement with simple 555 timers. What you saw was the trigger input being activated by charges on your body, which by their nature will be highly variable, a capacitive sensor tries to charge and discharge whatever it touches very rapidly and notes the effect of the extra 'bulk' on the charging rate to detect contact.

You have to be very careful with automotive modifications, what sounds like a good idea on the driveway may be disastrous on the open road. The electronics in dashboards is also very different from one model to another so a 'fits all' solution wont work and you would need a full specification of the wiring and lamp ratings to design a custom interface.

The game idea brought back memories of a guy I used to know who was a genius mad man (hope he isn't reading this!). He fitted a machine on his bathroom door to release the lock. It was an adapted 1950s/60s arcade machine, the ones where you had to flick a steel ball around a spiral and make it drop into a 'win' slot. With practice he could do it every time and so could his wife until she left him but guests were often left frustrated or red faced!

He lived in a very old stone cottage (probably dating from the 1700s) which had a big fireplace downstairs and chimney on the roof. He hit on the idea that it would make an excellent bass enclosure for his HiFi system so he bricked up the fireplace except for the speaker mount, fitted a 15" loudspeaker and sat back to enjoy the rich deep bass notes. It sounded wonderful indoors but the rest of the neighborhood could hear it just as loud!

Brian.
 
thanks for all the help and tips, I definitely like the idea of the unreliable 555 activation for my application and I want to pursue that exact "game winning" type of avenue for my car project. It makes it possible to fool thieves when the circuits don't behave the same way every single time or if something is completely crazy like that. If its "safe" and nothing bad can happen by leaving it floating, is my main concern. I thought the circuit being held down all the time by accident might damage it somehow (seems wrong?) or if it touches something (I'll put a resistor on it and float it was my idea)

You are absolutely correct that one need be careful when modifying a vehicle or it may become unreliable extremely fast. I am using an older car so its mostly medium tech 96-02 electronics. I changed almost every wire in the car so its entire layout is known completely and because its so old, there is very little tech to worry about so its good for beginner/novice like myself.

I probably need to step up to arduino or something more code-able, then I bet dealing with floating pins is alot easier, I could tell it to ignore extended periods of being held down, or to compare inputs from multiple sources to determine what is going on in the car. I bet 10 floating pins scattered around would show significant patterns of activation when somebody is getting in and moving around, or lots of people get in the car at once. And transistors act as amplifiers right, so it could be very sensitive. anyways...


For now I'll probably try a couple timers with the pulled up and then grounded configuration, until I learn more/enough to be comfortable using it weirdly.
 

Bear in mind that floating inputs also present a risk of damage. In simple terms, that static charge you used to trigger the timer could be big enough to damage it. When you touch a conductive surface or IC pin, the charge between you and that object balances out, you become joined and therefore at or very near the same potential. That doesn't necessarily mean you are both at ground potential, just that there is little difference between you. The rate of flow of charge as you equalize depends on how conductive the path is at the point of contact. In a bipolar IC like the 555 the path is quite conductive and within reasonable limits, the charge can safely pass to the device but many circuits use MOS inputs which are far more fragile. They are not conductive and work on a voltage sensing principle, because they can't easily equalize the charge, there is a huge risk of the voltage differences being higher than they can tolerate. The damage to them is instantaneous and permanent. To give you some idea of the scale of risk, on a dry day with low humidity if you walk to your car in synthetic soled shoes, you could easily be charged to ten thousand volts or more, it's what gives you a tiny shock as you touch the car door. The maximum voltage most modern MOS devices can resist before damage is about 3.5V!

Brian.
 

Bear in mind that floating inputs also present a risk of damage. In simple terms, that static charge you used to trigger the timer could be big enough to damage it. When you touch a conductive surface or IC pin, the charge between you and that object balances out, you become joined and therefore at or very near the same potential. That doesn't necessarily mean you are both at ground potential, just that there is little difference between you. The rate of flow of charge as you equalize depends on how conductive the path is at the point of contact. In a bipolar IC like the 555 the path is quite conductive and within reasonable limits, the charge can safely pass to the device but many circuits use MOS inputs which are far more fragile. They are not conductive and work on a voltage sensing principle, because they can't easily equalize the charge, there is a huge risk of the voltage differences being higher than they can tolerate. The damage to them is instantaneous and permanent. To give you some idea of the scale of risk, on a dry day with low humidity if you walk to your car in synthetic soled shoes, you could easily be charged to ten thousand volts or more, it's what gives you a tiny shock as you touch the car door. The maximum voltage most modern MOS devices can resist before damage is about 3.5V!

Brian.

Very interesting. So how about i pull the trigger pins up with like 5M- some huge resistance that just barely trickles towards +

I haven't tried it yet because I need to get more resistors from school. I thought it would help keep the trigger pin biased properly while also making it easy to trigger with a weaker ground i.e. maybe I can hold the trigger in one hand, and touch a ground with the other, or something like that. Im just looking for something (anything) besides a regular old button. How boring is a button? lol
 

In a way you are right but the risk is that your connection isn't to ground first then the trigger pin second. If you touch trigger first you discharge into it and potentially cause damage before completing the ground connection. As power isn't a real problem here, maybe something along the lines of an IR LED and a photosensor instead of a push button may work. So you still have to place your finger on a target but in doing so it breaks the light beam.

As far as using a high value resistor as a pull-up, it will work and the higher than value the less resistance to ground is needed to operate the trigger but the risk of not discharging safely also increases. As the 555 is a bipolar device and therefore current operated, there will be an upper limit to the value before it ceases to work anyway and I would guess is is probably less than 1M Ohms.

Brian.
 

In a way you are right but the risk is that your connection isn't to ground first then the trigger pin second. If you touch trigger first you discharge into it and potentially cause damage before completing the ground connection. As power isn't a real problem here, maybe something along the lines of an IR LED and a photosensor instead of a push button may work. So you still have to place your finger on a target but in doing so it breaks the light beam.

As far as using a high value resistor as a pull-up, it will work and the higher than value the less resistance to ground is needed to operate the trigger but the risk of not discharging safely also increases. As the 555 is a bipolar device and therefore current operated, there will be an upper limit to the value before it ceases to work anyway and I would guess is is probably less than 1M Ohms.

Brian.

woww I feel du... new. Of course my answer all along wasn't to float the input, I just need to find the right trigger.

You gave me a million great ideas all at once. I have a spare crankshaft position sensor here and I'm going to see if I can trigger the 555 with that. It would be cool to plant the CPS somewhere in the car under a panel and have to wave an presumably metal object over a specific spot to activate the timer... along with photoactivation and other triggers... it can be very complex

have an exam on thursday so won't be experimenting much for a few days. but right after that I'm going to soldier (solder?) one or two 555's to a small spare pcb I have an make it do something at least. Then I guess find a box for it, this is the first one so I'm still not sure where pcb containers come from lol
 
Last edited:

I finally got a chance tonight to play with it again. I connected my crank sensor but I think this sensor sits LOW until its triggered, so its automatically triggering the relay no matter what I do.

Is there a way to reverse the 555 so that low is no longer a trigger, and instead high is the trigger? I think that might work.

I tried putting the pin 6 to ground instead of 9v, and moving the capacitors, etc... but it still triggers from low... I am sure that I am doing it wrong lol
 

Hi,

An option is to use the 555 reset pin (pin 4) as the control input, so long as the crank sensor signal is as long as or longer than the 555 output pulse. An alternative option is to place an inverter (e.g. SN7404 or CD4049 or CD4069) between the crank sensor and the 555 pin 2.
 

Hmmm interesting, more hardware huh?

I'm going to see what I can dig up for this. Maybe a different sensor or something. I just need an interesting trigger for the initial installation of this device.

I'm really excited to get it going! When somebody turns the key without triggering the timer, I want it to activate a different relay that does something unexpected. Loud noise or other annoying behaviors.
Its just a fun little project :D
 

Warning: some CPS use 'reluctance' sensors. They are perfectly safe but may not work as you expect. They basically consist of a coil of wire around a magnetized pin. They don't sense the presence of a nearby metal object, they sense the disturbance of the magnetic field as it passes by. As a motion sensor it works well by producing a pulse of voltage as a protrusion on the crankshaft passes the sensor. It is the rate of change in magnetic field rather than it's absolute value that produces the output though so as a manually operated switch it would be almost useless.

The most economical sensor for detecting a magnet is a reed switch, they are small and operate when a magnet is placed nearby, switch off again when the magnet is removed. They have two wires, both isolated from the outside so you can wire it either to pull the timer pin low or to pull it high by connecting the trigger/reset to ground or to supply.

Brian.
 

thanks again, Yes I have heard of and seen reed switches, thanks for reminding me. At school I remember seeing one in an electrical motor that was closing as the motor rotated.

I was just trying to do something with what I've got handy, ya know? Can't afford to buy much here. Its ok if the trigger I use is unreliable, I will surely detect and work around it somehow.

The crank sensor I have is a 3-wire variant, and its supposed to put out a 5v square pulse when detecting metal objects. It isn't one of those 2-wire types which generates its own voltage as an analog signal.
I'm not even saying it will work, just letting you know which type I have.
 

Hi,

I have no idea what voltage battery your car has, presumably it's 12VDC. More hardware? Just an easy-to-find transistor and three additional resistors.

The schematic is of a 555 (with a power up reset RC on pin 4) configured as a monostable timer, with a transistor inverter between sensor and pin 2 of the 555 to invert the signal from the sensor (high is low and vice versa). Notice that the input signal has to be shorter than the output signal. If the sensor signal will be longer than the output signal, that can be dealt with by putting a series capacitor from input signal to pin 2. There's an LED there in the schematic for the sake of putting something on the timer output.

As it's a car, I suspect you may need to think of protection such as a 12V Zener diode or automotive TVS across the input of the little delicate circuit you plan to put in there... I thought there could be impressive voltages and kickback voltages flying around car circuits at start-up, etc.?

eda car thread with 555 schematic.JPG
 

I'm really new to this. Its my first one. I believe you are correct that during cranking there is danger of high voltage spikes damaging components. Have definetely seen that happen before. I just don't know how to deal with it. I know what a zener diode is, more or less, but I Wasn't aware it could be used to protect a circuit like that. Is it the sort of thing where 1 is good, but 2 is better? and 3 is even better? Like, can I stack them up if I want more and more protection sort of thing?
And what is TVS? Never heard of that before.

And any other protective measures you can mention, please do, I will read up on them, I am very very interested in protecting and maintaining the circuits. Just in general, even for electronics already in the car doing other things- it would be nice to understand better how to deal with that sort of thing.

I wonder can I use another 2N4401 as the inverting transistor? I don't understand quite a bit about transistors still. I've read about NPN and PNP variants, looked at hundreds of pages of diagrams, I kind of get it, but still not really. I just need more hands on experience I think. But if you'd like to explain a bit more about that sort of thing (why to use this transistor, over that one, etc...) I would totally write down your words and research all night and day, it won't be wasted on me.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top