tag:blogger.com,1999:blog-6238454757421809452.post3403618457628378591..comments2024-01-29T06:22:58.174-05:00Comments on The Raspberry Pi <br>Hobbyist: Revision to Relay CircuitTed B Halehttp://www.blogger.com/profile/16887056993667506084noreply@blogger.comBlogger15125tag:blogger.com,1999:blog-6238454757421809452.post-54963028353794516562023-12-11T23:07:20.490-05:002023-12-11T23:07:20.490-05:00you bet! thank you!you bet! thank you!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6238454757421809452.post-73277103863355887052023-07-31T07:40:19.996-04:002023-07-31T07:40:19.996-04:00The load is not especially relevant to the need fo...The load is not especially relevant to the need for the resistors. The 100K resistor to ground just guarantees that the relay is turned off if the GPIO is disconnected while the circuit is still powered. The 10K resistor is there to protect the transistor from overcurrent. However, a typical GPIO cannot produce sufficient current to damage most transistors. But it is still recommended.<br />(Wow. People still read my ten year old blog!)Ted B Halehttps://www.blogger.com/profile/16887056993667506084noreply@blogger.comtag:blogger.com,1999:blog-6238454757421809452.post-76127590865026192352023-07-30T12:12:26.196-04:002023-07-30T12:12:26.196-04:00Are these resistors needed regardless of the load ...Are these resistors needed regardless of the load circuit (AC or DC)?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6238454757421809452.post-38688822566205478272015-02-26T14:23:31.669-05:002015-02-26T14:23:31.669-05:00You are correct, but consider what would happen if...You are correct, but consider what would happen if the interface board still has power and the connection to the GPIO is removed. That is the only condition I can think of where the pulldown might be needed. Even then, the transistor is not likely to allow current flow since there is no current flowing to the base.Ted B Halehttps://www.blogger.com/profile/16887056993667506084noreply@blogger.comtag:blogger.com,1999:blog-6238454757421809452.post-32175799660284804052015-02-08T13:55:14.014-05:002015-02-08T13:55:14.014-05:00Sorry, me again, I meant the 100K resistor in my l...Sorry, me again, I meant the 100K resistor in my last sentenceAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-6238454757421809452.post-2860577165413036662015-02-08T13:53:40.343-05:002015-02-08T13:53:40.343-05:00I suspect the pulldown resistor isn't needed. ...I suspect the pulldown resistor isn't needed. A GPIO pin low is something like 0.4v and can sink current. That means it will hold a silicon transistor's base to a voltage too low for collector current to flow. The 10k resistor may not appreciably reduce the 0.4 volts anyway.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6238454757421809452.post-57214930345210025272014-09-02T09:53:09.301-04:002014-09-02T09:53:09.301-04:00Divide max A by HFE before multiplying by 1.3
R = ...Divide max A by HFE before multiplying by 1.3<br />R = Vs / ((max A / HFE ) * 1.3)<br /><br />Sorry that wasn't clear.Ted B Halehttps://www.blogger.com/profile/16887056993667506084noreply@blogger.comtag:blogger.com,1999:blog-6238454757421809452.post-64905559278770803092014-09-02T09:35:41.135-04:002014-09-02T09:35:41.135-04:00I'm sorry I cannot follow your math:
R = Suppl...I'm sorry I cannot follow your math:<br />R = Supply Voltage / ( max A / HFE * 1.3 ) =<br />3,3 / (0,030 / 100 * 1.3) =<br />3,3 / (0,030 / 130) =<br />3,3 / 0,00023076923 =<br />R = 14304,2913 and not 8461 . Where am I wrong?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6238454757421809452.post-33121126232202274782013-10-25T06:16:28.062-04:002013-10-25T06:16:28.062-04:00Hi Ted,
I'm trying to use my raspi to replace...Hi Ted,<br /><br />I'm trying to use my raspi to replace the manual switch of my old heater (honeywell)... its circuit has 2 relays (NAIS JS1-24V) one for the warm water and the other for the heating, activated via on old manual switch, acting as a selector with 3 possible states (OFF, warm water, warm water and heating). So my objective is to replace this manual switch with one small breadboard with 2 PN222 transistors (http://www.adafruit.com/products/756), and via 2 GPIO pins, control both transistor basis, to switch on or off the relays. I've tested the voltage flowing through the switch and on the relays and it's 12V.<br />So my question is what I'm explaining would be possible or it could be done using any other components or another type of transistors.<br />I'll really appreciate you can give me some hint with this circuit! I can send you some photos of the mainboard to see what I'm trying to do...<br /><br />Thanks in advance!<br /><br />Alex<br /><br />Alexhttps://www.blogger.com/profile/07756457846536434017noreply@blogger.comtag:blogger.com,1999:blog-6238454757421809452.post-38492002875142778772013-03-07T08:21:35.709-05:002013-03-07T08:21:35.709-05:00Check the data sheet to see. The reverse recovery...Check the data sheet to see. The reverse recovery time is the critical parameter. I used relays that had built in snubbers, so I didn't even think about it. Your (and other's) questions are actually forcing me to learn more of the fine details. Thanks.Ted B Halehttps://www.blogger.com/profile/16887056993667506084noreply@blogger.comtag:blogger.com,1999:blog-6238454757421809452.post-42441519903824613632013-03-06T21:12:26.492-05:002013-03-06T21:12:26.492-05:00So which will be an appropriate Schottky for your ...So which will be an appropriate Schottky for your example? Something like a 1N5817?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6238454757421809452.post-673324572663733462013-03-05T10:00:05.798-05:002013-03-05T10:00:05.798-05:00I will just quote something much better written th...I will just quote something much better written that I would do off the top of my head: http://en.wikipedia.org/wiki/Snubber<br />When the current flowing is DC, a simple rectifier diode is often employed as another form of snubber. The snubber diode is wired in parallel with an inductive load (such as a relay coil or electric motor). The diode is installed so that it does not conduct under normal conditions. When current to the inductive load is rapidly interrupted, a large voltage spike is produced in the reverse direction because the inductor attempts to keep current flowing in the circuit in the same direction. This spike is known as an "inductive kick". Placing the snubber diode in inverse parallel with the inductive load allows the current from the inductor to flow through the diode and minimize the voltage spike that might damage the switching element. The energy stored in the inductor is dissipated by the series resistance of the inductor and the (usually much smaller) resistance of the diode (over-voltage protection). One disadvantage of using a simple rectifier diode as a snubber is that the diode allows current to continue flowing, which may cause the relay to remain actuated for slightly longer; some circuit designs must account for this delay in the dropping-out of the relay. Since the rise rate of the current (di/dt) of most systems is very fast (usually fractions of microseconds) "fast", "ultrafast", or Schottky diodes are used. Regular power diodes, such as the commonly used "1N4007" series, are not suitable as snubbers as their reverse recovery time (turn on time) is several tens of microseconds; the diodes do not turn on fast enough to suppress the fast voltage spike.Ted B Halehttps://www.blogger.com/profile/16887056993667506084noreply@blogger.comtag:blogger.com,1999:blog-6238454757421809452.post-20009164281877810162013-02-20T12:55:31.222-05:002013-02-20T12:55:31.222-05:00Could you elaborate on how - in the context of you...Could you elaborate on how - in the context of your circuit - the diode protects the transistor? <br />I understand a diode itself prevents reverse electrical flow. This is really 2 related questions below.<br /><br />I expect the diode to be "inline" on the wire which is connecting transistor's emittor to the relay coil switch input, so that electricity simply can not flow back to the transistor. Instead I see the diode connects the switching current (from the transistor) directly to 5V. Because of this, I'm assuming that when there is "backpressure" wave of electricity from the coil disconnect, that energy will push back onto both the relay AND the transistor. <br /><br />Besides the position of the diode question, a related one: How does the coil backlash spike even travel over the diode? I get that the diode is orientated to allow such traven, but at the end of the diode is 5v VCC. Does this mean that voltages OVER 5V will still travel over the diode (going to the biggest voltage difference/potential), but that some of that coil backlash (small amounts, which are under 5V) will reach the transistor, but the amount is so small it doesn't matter?<br /><br />ScottInNHhttps://www.blogger.com/profile/04982032777257014542noreply@blogger.comtag:blogger.com,1999:blog-6238454757421809452.post-72341975361274279182013-01-30T10:23:44.217-05:002013-01-30T10:23:44.217-05:00According to the datasheet
http://www.2n2222datash...According to the datasheet<br />http://www.2n2222datasheet.com/pdf/central_semiconductor_2n2222_datasheet.pdf<br />The maximum collector-emitter voltage is 30V. However, the maximum collector current is 600mA. So, unless the relay is a solid state device, I suspect that the 2n2222 won't work for a 12V relay.Ted B Halehttps://www.blogger.com/profile/16887056993667506084noreply@blogger.comtag:blogger.com,1999:blog-6238454757421809452.post-75221744711418293302013-01-29T09:03:24.299-05:002013-01-29T09:03:24.299-05:00Hi Ted,
I want to switch 24V (impuls relais), thi...Hi Ted,<br /><br />I want to switch 24V (impuls relais), this is no problem for the 2N2222 transistor?<br /><br />Thanks<br /><br />RegardsAnonymoushttps://www.blogger.com/profile/09259893401740658305noreply@blogger.com