NPN transistor emitter giving unexpected reading

Thread Starter

GarrettVD

Joined Apr 13, 2013
10
Hi there,

I'm attempting to use a PN2222A NPN-type transistor to power a 5VDC relay, using my Raspberry Pi as the power sources for the collector and base. For reasons I cannot comprehend (though I'm sure one of you bright people would know...), when the base is set to 3.3v, the emitter only reads 2.9v. I expected it to read much closer to 5v.

For simplicity's sake, I've removed the relay from the entire equation for the time being, and have simply made the following connections:

  1. Connected the Pi's 5v pin to the collected of the transistor, via a 1kOhm transistor.
  2. Connected the Pi's GND to the emitter (in lieu of the relay).
  3. Connected the Pi's 3.3v pin (in lieu of a GPIO) to the base of the transistor, via a 1kOhm transistor.
See attached image for a visual.


Any ideas how I can get the expected 5v reading from the emitter of the transistor? Or, is it more likely that my transistors just duds?


Thanks!
 

Attachments

#12

Joined Nov 30, 2010
18,224
Stop expecting 5 volts on the emitter. It can never be higher than the base voltage.
The relay belongs on the collector side.
Add a diode from the collector to the +5V supply with the stripe toward +5V.
That should get a "click".
 

Attachments

Thread Starter

GarrettVD

Joined Apr 13, 2013
10
Stop expecting 5 volts on the emitter. It can never be higher than the base voltage.
The relay belongs on the collector side.
Add a diode from the collector to the +5V supply with the stripe toward +5V.
That should get a "click".
Oh... Okay I'll try that this evening. Not sure why it didn't occur to me.
 

wayneh

Joined Sep 9, 2010
17,496
Everyone goes through that. It seems to be human nature to think in terms of switching the high side, never the low. Once you get into electronics, your brain changes and you always switch the path to ground when you can, as #12 has shown.
 

Thread Starter

GarrettVD

Joined Apr 13, 2013
10
@wayneh and #12, thanks for your help guys. I appreciate it. However, I may need to clarify a bit. The 8-channel SainSmart relay board has 8 active-low inputs. A signal of 0v on each respective pin will activate said relay. I'm actually seeking to power the 5v relay board itself, using a transistor of some sort. Or perhaps a MOSFET. Not just control the input channels the relay channels.

It works if I plug the VCC/JDVCC directly to +5V and GND to 0v. But not via the collector side of the transistor, as suggested.

I've just discoved it may have something to do with the jumper between VCC and JDVCC pins... I'll play around with it tomorrow.

In the mean time I am attaching the relay's schematic, for what it's worth.

http://cdn.imthi.com/c70689/wp-content/uploads/2013/04/SainSmart-8-Channel-DC-5V-Relay-03.jpg

Since I am a newbie, and I realize that this likely is not sufficient enough to come up with a solution, is there any kind of analysis between points I can do with my multimeter?

Cheers
 
Top