Pages: [1]   Go Down
Author Topic: TIP31A Transistor Help  (Read 904 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16540
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16540
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Are you rich?  smiley-wink
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 220
Posts: 6587
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: November 20, 2011, 08:13:26 pm by dc42 » Logged

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.

Greenwood, Indiana
Offline Offline
God Member
*****
Karma: 0
Posts: 508
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

If it was designed by man it can be repaired by man.

United Kingdom
Offline Offline
Tesla Member
***
Karma: 220
Posts: 6587
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

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.

Offline Offline
Newbie
*
Karma: 0
Posts: 37
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 514
Posts: 31534
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16540
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Edison Member
*
Karma: 4
Posts: 1730
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Pages: [1]   Go Up
Jump to: