Need help - RFID door lock.. using 1 power supply only

Thread Starter

quilesbaker

Joined May 25, 2013
3
I am working on an rfid door lock. I have this circuit and I need some help. It works as is. But my goal is to use only one adapter/power supply instead of two.



On image 1, as you can see, right now I have a 9V source that powers the relay and a 12V (1A) that powers the arduino and the door lock. The rest of the circuit is not shown because it works stand-alone.. they are just some additional things connected to the arduino (rfid reader and leds). There are two grounds, marked as 0 and 1, because of the two power supplies. And there is a ground pin in the Arduino that closes the circuit for the output at pin 2 to work, using ground 0 (the transistor acts as a switch).



I tried to get rid of the relay and just use a transistor (image 2), connecting the 12VDC (1Amp) to the door lock, arduino and transistor. This seemed like a bad idea anyways, but I wasn’t sure what to try. It did not work, as I expected. So the circuit for that is on the second attached image. I tried using both the 2N3904 (from the first working circuit) and the TIP31C for it. My theory is that for the first, the 2N3904 goes into saturation and stops acting as a switch, and the TIP31C needs more current, since the power supply starts blinking and does not supply current.

I’m a little rough on my electronics since I haven’t done anything since college and would like to start again. I know that for both circuits, and even more for the second, I may be either shorting something or putting the arduino in trouble since I’m using the GND pin to close the out from pin 2 into the same ground as the power supply.

Either way, I would like your input on both circuits, if I have done a bad practice, but most importantly if there are any ideas on how to make the circuit use 1 power supply only.

Your help is appreciated.
 

tracecom

Joined Apr 16, 2010
3,944
Is there some reason you didn't use a common ground for both supplies?

You can get rid of the 9V supply by using a relay that will operate on 12V, or you can use an LM7809 to regulate the 12V down to 9V.

It looks to me like the transistor idea is the way to go; I frankly don't know why it didn't work. What value did you use for the base resistor?

You do know that the pinout on the TIP31C is completely different from the 2N3904, right?
 

dougy83

Joined May 11, 2011
12
The reason the transistor is not working is likely due to the fact that there's not enough current passing through it to trigger the door latch. From http://www.fairchildsemi.com/ds/TI/TIP31C.pdf, the TIP31C has a current gain of <50, so for the <5mA you're using to drive it, the transistor can only conduct <250mA; this probably isn't enough for your solenoid. The 2n3904 can't handle more than 200mA, so that's not a good idea either.

You should be able to use both the 2n3904 and the TIP31C in a darlington pair configuration to get the required current through the solenoid. http://en.wikipedia.org/wiki/Darlington_transistor
 

Thread Starter

quilesbaker

Joined May 25, 2013
3
Is there some reason you didn't use a common ground for both supplies?

You can get rid of the 9V supply by using a relay that will operate on 12V, or you can use an LM7809 to regulate the 12V down to 9V.

It looks to me like the transistor idea is the way to go; I frankly don't know why it didn't work. What value did you use for the base resistor?

You do know that the pinout on the TIP31C is completely different from the 2N3904, right?
I didn't use a common ground for both supplies since they were 2 different power supplies. Did not see the point in that version of the circuit.
Good idea about changing the relay type.. I guess I got caught up on building the circuit with the parts I had available. Will try that thanks :)

The base resistor was 1k, but yeah I wasn't sure the transistor only idea would work..although I prefer it to using a relay plus a transistor. I think that what dougy83 said below your reply makes sense and I will try that. Thanks to you input too.
 

Thread Starter

quilesbaker

Joined May 25, 2013
3
The reason the transistor is not working is likely due to the fact that there's not enough current passing through it to trigger the door latch. From http://www.fairchildsemi.com/ds/TI/TIP31C.pdf, the TIP31C has a current gain of <50, so for the <5mA you're using to drive it, the transistor can only conduct <250mA; this probably isn't enough for your solenoid. The 2n3904 can't handle more than 200mA, so that's not a good idea either.

You should be able to use both the 2n3904 and the TIP31C in a darlington pair configuration to get the required current through the solenoid. http://en.wikipedia.org/wiki/Darlington_transistor
Nice idea! I'm going to try the darlington configuration or see if I can get a more appropiate transistor. What you said makes sense. Thanks.
 
Top