Go Down

Topic: Relay Circuit Advice (Read 988 times) previous topic - next topic

sam

Being a noob I've been studying simple circuits and whatnot to try and learn to build my own.  I'm attempting to build a board that will carry an array of 7 relays which in turn will control some higher voltage solenoid valves.  I came across a relay circuit that had a 10kOhm resister connected to ground before the (1kOhm in my case) resister on the digital out pin like this:

Arduino Digital Pin----|----\/\1kOhm/\/----To base of 2N2222 (relay etc)
                                 |
                        \/\10kOhm/\/
                                 |
                               -----
                                ---
                                 -

What makes the inclusion of the 10k resistor beneficial?  My noob senses believe this to be a kind of pull down resistor to keep the relay from being accidentally triggered,  please correct or clarify that assumption if you can.  I know when I mocked the circuit up on my proto shield, sometimes I wouldn't even have to press the button to trigger the relay.  Just being in close proximity to the button would trigger it.  

Eventually, my ATMEGA168 will be on the same circuit board as the relays and in fairly close proximity, about an inch away, if that matters.

I'm using an 1N4004 diode to protect the Transistor and digital pin from back voltage when the relay is de-energized. Not sure what the correct terminology is for that.  Anyway, any input is appreciated and if you need more info to give a proper answer, please don't hesitate to ask.

Thanks,
 Sam
I have never let my schooling interfere with my education.
~ Mark Twain

http://www.lewrockwell.com/

MikMo

You are right, that would be a pull down resistor to pull the Arduino pin to ground.

sam

Thanks so much for your answer MikMo... but it leads me to more questions.

What is the advantage of "pulling down" a digital out?

Would it be appropriate or beneficial to use a resistance closer to the 1kOhm like a 2kOhm or so or will the output from the digital pin be enough to overpower the 1kOhm and the 10kOhm and still fully trigger the Transistor?

Thanks in advance for any feedback.

Sam


I have never let my schooling interfere with my education.
~ Mark Twain

http://www.lewrockwell.com/

Anachrocomputer

I don't see any real advantage to such a resistor.  But, maybe there's something about the original circuit that made a pull-down beneficial.  Such as, in case the chip is removed from the socket and the system is switched on?  Maybe the risk of inadvertent operation was significant?

sam

The circuit I found it in was a generic relay board so it sounds as if they put it there for the "just in case" factor, not knowing exactly where the board would be employed.  At this point I am planning on omitting it from my circuit.  

Thanks very much for the input.

Sam
I have never let my schooling interfere with my education.
~ Mark Twain

http://www.lewrockwell.com/

Grumpy_Mike

A pull down resistor can be useful during the time the board is in reset. In reset all pins are inputs and therefore likely to float. If these are wired to outputs this can cause a clunk or small aviation of the relay. So to prevent this you use a pull down resistor so that the output is a zero until you set it to the value you want.

sam

Thanks Mike!

That is just what I experienced with my mock up circuit.  The relays would actuate momentarily upon reset.

Looks like I need to mock it up again before I build the final circuit.

Thanks so much for your input, I "relay" appreciate it.



Little by little it's starting to make sense... how exciting!

I have never let my schooling interfere with my education.
~ Mark Twain

http://www.lewrockwell.com/

Go Up