Arduino Forum

Using Arduino => General Electronics => Topic started by: cjdelphi on Aug 12, 2012, 03:58 pm

Title: Control a 12v from 5v.
Post by: cjdelphi on Aug 12, 2012, 03:58 pm
This is driving me insane.  - I've tried a TIP31 (lights dimly) and an IRF730

Basically, I have a 12v rail, which goes to the collector (12+) 0 to ground, the circuit is fine, if i feed 12v directly from the rail, both transistors light up the 12v bulb... but, connect the 5v to the transistor, the tip31 glows (a little) and the IRF, does not even light up.


Surely, I can control a 12v source from 5v? without the need of a SSR/Relay ? (I want a 12v car bulb to switch on from 5v without using a relay, this seems futile)

Thanks :) (yes, the IRF has a pull down resistor to stop it from constantly being on, it works if the base gets 12v, if it gets 5v, nada!)

So i'm left wondering... Transistors ? in order to get the power flowing, you need the same voltage in and out? (eg 12v on base, 12v on collector vs 5v base, 12v collector)

Title: Re: Control a 12v from 5v.
Post by: runaway_pancake on Aug 12, 2012, 04:09 pm
5V is a marginal Vgs for the IRF730.  It needs more.
See circuit / attachment.
Title: Re: Control a 12v from 5v.
Post by: cjdelphi on Aug 12, 2012, 04:13 pm
ahhhhh, thank you, i'm so glad it can't be done I honestly thought i was going mad lol

Thanks for the circuit :) - muchos gracias senor.
Title: Re: Control a 12v from 5v.
Post by: michael shiloh on Aug 12, 2012, 05:58 pm
For this reason I almost exclusively use logic level MOSFETs, that is, MOSFETs designed to be driven by the relatively low voltage of 5V.

I like the 12N10L from Jameco, part # 1071214 $0.65.

Costs a little more but saves time and extra parts.
Title: Re: Control a 12v from 5v.
Post by: johnwasser on Aug 12, 2012, 06:37 pm
Is this how you had it hooked up?

+12 -> bulb -> TIP31 Collector
Arduino digital OUTPUT pin -> 80 (or more) Ohm resistor -> TIP31 Base
TIP31 Emitter -> +12 Ground -> Arduino Ground

Did you remember to set the pin as an OUTPUT?
Did you remember to set the OUTPUT pin to HIGH?

The TIP31 DC Current Gain is about 20 to 25.  You can only draw 40mA from the Arduino pin so you can only switch 800mA (0.8A) with the TIP31.
Title: Re: Control a 12v from 5v.
Post by: dc42 on Aug 12, 2012, 11:36 pm

This is driving me insane.  - I've tried a TIP31 (lights dimly) and an IRF730

Basically, I have a 12v rail, which goes to the collector (12+) 0 to ground, the circuit is fine, if i feed 12v directly from the rail, both transistors light up the 12v bulb... but, connect the 5v to the transistor, the tip31 glows (a little) and the IRF, does not even light up.


Surely, I can control a 12v source from 5v? without the need of a SSR/Relay ? (I want a 12v car bulb to switch on from 5v without using a relay, this seems futile)

Thanks :) (yes, the IRF has a pull down resistor to stop it from constantly being on, it works if the base gets 12v, if it gets 5v, nada!)

So i'm left wondering... Transistors ? in order to get the power flowing, you need the same voltage in and out? (eg 12v on base, 12v on collector vs 5v base, 12v collector)


Title: Re: Control a 12v from 5v.
Post by: dc42 on Aug 12, 2012, 11:43 pm
Your description is unclear. Do you have the load connected:

(a) between the drain of the mosfet/collector of the TIP31 and +12v; or

(b) between the source of the mosfet/emitter of the TIP31 and 0v?

Method (b) will not work because only 4V or less will get passed to the load using the TIP31, and even less with the IRF730.

Method (a) will probably work with either the TIP31 or the mosfet. However, if you use the TIP31 then it may get hot because of the high saturation voltage. If you use the mosfet then it may also get hot because the IRF730 is designed to be switched from 10V not 5V, so it will not be turned on fully. The best solution is to use a logic-level mosfet instead.

Title: Re: Control a 12v from 5v.
Post by: MarkT on Aug 13, 2012, 03:25 am
What is the bulb?  Bulb filaments take significantly higher currents at start up than when hot (up to 10 times as much) so you have to rate the transistor or MOSFET accordingly.

The IRF730 is an odd choice of MOSFET - 400V rating and far too high an on resistance (1 ohm) for a low voltage circuit.  You need a logic level MOSFET with an on resistance perhaps in the 50 to 10 milli-ohm range (I'm assuming the 12V bulb is a automotive bulb needing several amps and you don't want the bother of a heat sink on the MOSFET).

MOSFETs rated in the 20 to 60V range will have lower on-resistances than high-voltage parts, all other things being equal.
Title: Re: Control a 12v from 5v.
Post by: cjdelphi on Aug 13, 2012, 05:30 am

Your description is unclear. Do you have the load connected:

(a) between the drain of the mosfet/collector of the TIP31 and +12v; or

(b) between the source of the mosfet/emitter of the TIP31 and 0v?

Method (b) will not work because only 4V or less will get passed to the load using the TIP31, and even less with the IRF730.

Method (a) will probably work with either the TIP31 or the mosfet. However, if you use the TIP31 then it may get hot because of the high saturation voltage. If you use the mosfet then it may also get hot because the IRF730 is designed to be switched from 10V not 5V, so it will not be turned on fully. The best solution is to use a logic-level mosfet instead.





Method (b) will not work because only 4V or less will get passed to the load using the TIP31, and even less with the IRF730.

precisely . - i'm now using two tip31's to drive the bulbs by completing the circuit (ie, gate from digital out, drain sits on a 12v and source drain sits on 0v (common with arduino gnd) )...

works perfectly, want to see a video?... i'll post one...
Title: Re: Control a 12v from 5v.
Post by: cjdelphi on Aug 13, 2012, 05:53 am
http://www.youtube.com/watch?v=an2oYgBf14k

500ms delay

http://www.youtube.com/watch?v=vxTk_s5MpEM

100ms delay.

Title: Re: Control a 12v from 5v.
Post by: JoeN on Aug 13, 2012, 11:01 pm
Nice.  I'd say you figured that one out.