1
\$\begingroup\$

I have a circuit which seems to work and I would just like someone to confirm that it looks ok and isn't going to damage a 3.3/5V system (Raspberry Pi). Also, if there are improvements / simplifications I could make, that would also be great.

Basically, the circuit is used to get an old doorbell electromagnet to work to make it chime. When I set pin 24 high on my Pi, which is connected to a transistor and in turn a relay, it dings and when I set pin 24 low, it dongs.

You should know that initially I was just connecting this all straight to pin 24 on the pi which I was advised here that wasn't a good idea, so thankyou for that ;).

Below is what I put together in Fritzing to show what this version looks like. Initially, I was just trying to use the transistor on it's own, which would be simpler, but for whatever reason, that doesn't give me enough voltage to get the magnet to work -- I will understand why one day...

So any thoughts / feedback / criticism greatly received.

Many thanks, D.

enter image description here

\$\endgroup\$

migrated from raspberrypi.stackexchange.com Oct 25 '15 at 12:18

This question came from our site for users and developers of hardware and software for Raspberry Pi.

1
\$\begingroup\$

You should probably put a diode also across the doorbell electromagnet to prevent sparking acrss the relay contact when the circuit opens for the "dong".

It probably didn't work with the transistor because the transistor didn't have enough base current to fully turn on and therefore the voltage developed acorss the electromagnet would have been too weak.

\$\endgroup\$
  • \$\begingroup\$ Hi, thanks for the response. I was wondering if the transistor itself has resistance? But yes, that's what I suspected and when measured, I was only getting about 1.25 volts across the electromagnet... Thanks again. \$\endgroup\$ – Darren Oct 25 '15 at 13:08
1
\$\begingroup\$

The circuit looks feasible, but you don't give a transistor type or an indication of what current the relay coil wants, so we can't be sure.

It's not surprising that a doorbell doesn't work very reliably at 3.3 volts, especially with a series transistor. In my experience, they might use a 24 volt AC transformer, expecting lots more juice than 3.3 VDC. But maybe your doorbell has a different voltage rating?

Also I would be cautious about tying an inductive load to your 3.3 volt line, even with the relay. An inductive kick or sag could give your Pi some trouble. Better to use an isolated supply, probably with higher voltage.

\$\endgroup\$
  • \$\begingroup\$ I think the doorbell supply here is actually 5V, that might be my fault for editing the question a bit before migrating it; the control line from the GPIO through the transistor is 3.3V. Not that this makes much difference vs. 24V. \$\endgroup\$ – fizzle Oct 25 '15 at 13:00
  • \$\begingroup\$ Hi. Thanks for the response. Yes, sorry, the transistor is a P2N2222A (TO92?) if that helps? The relay is actually a DPDT although the picture shows a SPDT since I'm only using one side of it -- on the top it just says NRP04-C05DH 2C 5VDC 120ohm 1A 120VAC 30VDC. Hopefully the diagram is showing 5VDC going to the relay -- the 3.3VDC is just the signal to the base of the transistor? Is using the 5 volt line for the inductive load ok? \$\endgroup\$ – Darren Oct 25 '15 at 13:14
0
\$\begingroup\$

E-Magnet is driven by Current not by Voltage. So I think if you reduce the resistor R1 value, you may get enough current to drive. Secondly, I may understand the Ding but when switch is OFF, how will door bell Dong? I am just curios, really did not understand. I hope this works.

\$\endgroup\$
  • \$\begingroup\$ Hi, Thanks for the response. The resistor is just for the 3.3v to the base of the transistor -- originally I didn't have that resistor there when I was testing this circuit and also with the circuit that just had the transistor in it. Thanks again. \$\endgroup\$ – Darren Oct 25 '15 at 13:07
  • \$\begingroup\$ Oh, just with the Dong, that happens when the voltage is released from the electromagnet and the solenoid(?) springs back to it's resting position... \$\endgroup\$ – Darren Oct 25 '15 at 13:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.