Go Down

Topic: TIP31A Transistor Help (Read 1 time) previous topic - next topic

picklednerd

Im working on a project that uses an electronic door lock. It needs a lot more power than an arduino can supply, so my thought was to use a transistor to switch on a second power source solely for the door lock. I've been trying to figure this out for hours. I thought transistors were just electrical switches. Just plug the + side of a battery into the collector of a transistor, and a side of the door lock into the emitter, then connect theother sides of both together.Then send a little electrical signal to the base from arduino. Nothings working. Please help.

retrolefty


Im working on a project that uses an electronic door lock. It needs a lot more power than an arduino can supply, so my thought was to use a transistor to switch on a second power source solely for the door lock. I've been trying to figure this out for hours. I thought transistors were just electrical switches. Just plug the + side of a battery into the collector of a transistor, and a side of the door lock into the emitter, then connect theother sides of both together.Then send a little electrical signal to the base from arduino. Nothings working. Please help.


A TIP31A is a NPN transistor so is most suitable for 'low side' switching of a device load, meaning you wire as follows. + external voltage to the load (solenoid), other load lead to the collector, emitter wired to external negative terminal, base wired to suitable series resistor (200-1,000 ohms), other side of resistor wired to arduino output pin, and finally a wire from arduino ground pin to external negative terminal (or emitter lead).

That make sense?

Lefty

picklednerd

will you marry me? thank you so much. it works perfectly.

retrolefty


will you marry me? thank you so much. it works perfectly.


Are you rich?  ;)

dc42

#4
Nov 21, 2011, 02:09 am Last Edit: Nov 21, 2011, 02:13 am by dc42 Reason: 1
When the honeymoon's over, don't forget to connect a diode across the solenoid to catch the back emf when the transistor switches off, otherwise you'll blow the transistor after some number of operations. See http://arduino.cc/playground/uploads/Learning/solenoid_driver.pdf. Ignore the bit about using a Schottky diode, an ordinary silicon diode rated at the solenoid current or greater is all you need.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

mrmeval

If you ever want to drive high voltage and high amps see about getting a few of these as a sample.
https://ec.irf.com/v6/en/US/adirect/ir?cmd=catProductDetailFrame&productID=IPS1011

I've used them and they're pretty damned tough. It's a low side driver like an NPN transistor but it is designed for logic levels and it's more efficient due to the very low on resistance.
If it was designed by man it can be repaired by man.

dc42

I hadn't come across those before. It looks to be a nice device, although not suited to PWM applications because of the slow switching speed.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

jvdb


base wired to suitable series resistor (200-1,000 ohms), other side of resistor wired to arduino output pin

Lefty


Sorry I don't mean to hijack your thread, but this question seems relevant to the topic;

How do you choose a resistor value for this application? I have been using N-channel MOSFET for low-side drivers. Example here:

http://www.ladyada.net/products/rgbledstrip/#usage

But they are kind of expensive. I have lots of cheap 2N2222 transistors that I could use for lower current projects, but I'm not sure how to choose the resistor on the base.

Grumpy_Mike

Quote
but I'm not sure how to choose the resistor on the base.

Choose it such that the base current is at least the collector current divided by the transistor's gain. Then give it a bit of margin by halving it.

retrolefty

Quote
How do you choose a resistor value for this application?



technically you can calculate the base resistor value required by determining the load current requirement and then dividing that by the current gain of the transistor, it's beta value, and then size the base resistor to that amount of base current value or more. It's easier to just use a resistor that limits the base current to somewhat less then the maximum arduino output pin current rating (20-30ma) or the maximum base current rating for the transistor being used (whichever is less), that will insure the transistor is turned on to maximum saturation, with minimum voltage drop from emitter to collector.


Lefty

winner10920

Sometimes its easy just to use something like a tip122
you can get them 50c a piece on ebay and with a hfe(gain) of 1000 because its a darlington pair it is easy to saturate fully like a switch with just a 1k resistor and not bother with the calculations, and its good to 5 amps so it can do a decent amount of work

Go Up