Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > Electronic Projects Design/Ideas/Reviews


Electronic Projects Design/Ideas/Reviews Are you building an electronic project or want to? Maybe you need some assistance? Come and submit your electronic questions here and let our experienced members find a solution.

Reply
 
Thread Tools Display Modes
Old 9th May 2008, 07:28 PM   (permalink)
New Member
halloween_man is a jewel in the roughhalloween_man is a jewel in the rough
Send a message via Skype™ to halloween_man
Default PIC Microcontrollers & TIP120

Hi,

I am learning about PIC microcontrollers and want to drive a 12VDC (9 - 14VDC) pneumatic solenoid Valve (inductive load). The valve is 12VDC and draws 500mA.

I have found the TIP120 darlington transistor and would like to use it as it is inexpensive AND easily replaced if I damage it.

Depending on what web site you find you get many different views on how to implement the use of the TIP120.

The controller output is 5VDC, I want to drive 12VDC with a max of 1 AMP. It appears this can be determined by the resistor that is connected to the base of the TIP120, so many site imply. I often see a 1K resistor in series between the PIC output pin and the base on the TIP120.

First, is a resistor between the PIC pin and the base required, many sites do not show one.

Second, if it is, how do I calculate the proper resistance (ohms) value and power (watts) rating for the resistor?

I have even seen sites that says you need an optoisolator between the PIC pin and TIP120 base.

Third, the TIP120 has a built in "kickback" diode. Many sites still show an external diode - 1N400x across the coil of the inductive load. Is this second diode really necessary?


Please help out a newbie....

Thank you for your time, it is greatly appreciated.
halloween_man is offline   Reply With Quote
Old 9th May 2008, 08:11 PM   (permalink)
Experienced Member
joshua17ss2 is on a distinguished road
Default Uln2003

If your max is only 500 MA, take a look at the ULN2003 or 2004 Driver chips, they have a max of 500, but i use them to run all of my 24 volt 500ma pneumatic vales and led lights, they can be driven directly from the micrconotroller, and they are less then a dollar each and allow for 7 controls
joshua17ss2 is offline   Reply With Quote
Old 9th May 2008, 09:40 PM   (permalink)
Experienced Member
 
audioguru is a splendid one to beholdaudioguru is a splendid one to beholdaudioguru is a splendid one to beholdaudioguru is a splendid one to beholdaudioguru is a splendid one to beholdaudioguru is a splendid one to beholdaudioguru is a splendid one to behold
Default

The datasheet for the TIP120 shows it saturating well at 500mA with a base current of only 2mA.
The datasheet for a PIC says its max output current is 25mA.
So why not feed the TIP120 base 10ma?
The output of the PIC is about 4.0V with a 10mA load.
The input of the TIP120 is about 1.3V at our currents.
So the current -limiting resistor is (4V - 1.3V)/10mA= 270 ohms.
__________________
Uncle $crooge
audioguru is online now   Reply With Quote
Old 9th May 2008, 10:47 PM   (permalink)
Experienced Member
crutschow is just really nicecrutschow is just really nicecrutschow is just really nice
Default

Quote:
Originally Posted by halloween_man
Third, the TIP120 has a built in "kickback" diode. Many sites still show an external diode - 1N400x across the coil of the inductive load. Is this second diode really necessary?
Only if you want to save the transistor. This "kickback" diode polarity is opposite the diode across the solenoid and will not diminish the inductive transient.

When the transistor shuts off, the solenoid current will attempt to keep flowing due to its inductance. This will cause the voltage to increase on the transistor collector (and the transistor diode cathode) until the transistor breaks down or avalanches. The diode does not conduct under these conditions, so will not protect the transistor.

You need a separate diode connected across the solenoid, cathode to the + supply and anode to the transistor collector. That way as soon as the collector voltage rises above the supply voltage the inductive current has a path through the diode to the power supply, protecting the transistor.
crutschow is offline   Reply With Quote
Old 10th May 2008, 07:59 AM   (permalink)
Experienced Member
 
Blog Entries: 2
gramo is just really nicegramo is just really nicegramo is just really nicegramo is just really nice
Default

I'd go with the ULN2003


There is only one power connection, a common ground. Here's an example of driving two lamps with logic voltages via the ULN2003;



Note that the Lamps are not inductive, hence Pin 9 is not connected. For inductive loads, Pin 9 is connected to the loads +V to shunt back EMF safely.

Using the same analogy, this chip is my primary choice to controlling external components, its cheap, effective, and requires no operating voltages, simply a common ground.
__________________
Spency.

PIC Micro's - Your mind is the limit

PIC's and interfacing with other devices - a PIC Basic Guide @ digital-diy.net
gramo is offline   Reply With Quote
Old 10th May 2008, 10:49 AM   (permalink)
New Member
halloween_man is a jewel in the roughhalloween_man is a jewel in the rough
Send a message via Skype™ to halloween_man
Default

Hi,

I want to thank everyone that has responded, ths is great.

I have looked at the ULN2803A, it has a different pinout than what is posted.

Pin 1 IN1 to Pin 18 OUT1
Pin 2 IN2 to Pin 17 OUT2
Pin 3 IN3 to Pin 16 OUT3
Pin 4 IN4 to Pin 15 OUT4
Pin 5 IN5 to Pin 14 OUT5
Pin 6 IN6 to Pin 13 OUT6
Pin 7 IN7 to Pin 12 OUT7
Pin 8 IN8 to Pin 11 OUT8
Pin 9 GND
Pin 10 + Supply

Can the ULN2803A handle 2 AMPS all at the same time? The worst case situation would be 4 solenoid valves on at the same time, at 500mA each would be 2 AMPS.

This is why I started looking at the TIP120, it can handle 500mA easily, and with 8 TIP120's total current draw is not an issue from what my limited knowlege tells me.

Thanks...

Last edited by halloween_man; 10th May 2008 at 10:52 AM.
halloween_man is offline   Reply With Quote
Old 10th May 2008, 11:24 AM   (permalink)
Experienced Member
 
ericgibbs is a splendid one to beholdericgibbs is a splendid one to beholdericgibbs is a splendid one to beholdericgibbs is a splendid one to beholdericgibbs is a splendid one to beholdericgibbs is a splendid one to beholdericgibbs is a splendid one to beholdericgibbs is a splendid one to behold
Default

hi,
If you relook at the datasheet it will show what the maximum individual driver power can be and also the total power the ULN can handle..

Added ULN28xxxx graph
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/

Last edited by ericgibbs; 7th July 2008 at 11:24 AM.
ericgibbs is online now   Reply With Quote
Old 13th May 2008, 02:41 PM   (permalink)
New Member
halloween_man is a jewel in the roughhalloween_man is a jewel in the rough
Send a message via Skype™ to halloween_man
Default

Quote:
Originally Posted by audioguru
The datasheet for the TIP120 shows it saturating well at 500mA with a base current of only 2mA.
The datasheet for a PIC says its max output current is 25mA.
So why not feed the TIP120 base 10ma?
The output of the PIC is about 4.0V with a 10mA load.
The input of the TIP120 is about 1.3V at our currents.
So the current -limiting resistor is (4V - 1.3V)/10mA= 270 ohms.
I have been unable to locate the pic output voltage/current relationship in the PIC data sheet. Audioguru states 4.0V at 10mA, where do I look in the pic Data Sheet to find this information?

If I understand the gain of the TIP120 = 1000, if the base current is set to 10mA, then .01A * 1000 would mean I could drive a theoretical load of 10 amps, is this correct?

1.3 or 1.4VDCVDC I believe is the voltage drop across the darlington pair, is this correct?



ULN2803A

I also want to to layout a prototype board with the ULN2803A (8 outputs). If I understand the ULN2803A the +12VDC is pulled to ground through the darlington pair. Is this ground connection the actual ground pin (9) on the IC itself? The reason I ask is that I would like to socket the ULN2803A, but most DIP socket pins have a maximum current ratings of 1 Amp. If 4 solenoids are ON at the same time then this would be 2AMPS of current through the ground pin, not good.


I have been using another formula for my calculations, which produces the same result.

((Drive Voltage - 1.4) / Current Required) * 1000

The main issues for me right now is where do I find the TIP120 information "saturates well at 500mA with base current of 2mA" and the "output Voltage/current relationship" for the PIC. The TIP120 data sheet I found has no graphs in it, and I looked in the PIC data sheet but could not locate the output voltage/current relationship.

Thank you for the learning experience!

Last edited by halloween_man; 13th May 2008 at 02:56 PM.
halloween_man is offline   Reply With Quote
Old 28th May 2008, 09:09 PM   (permalink)
Experienced Member
 
audioguru is a splendid one to beholdaudioguru is a splendid one to beholdaudioguru is a splendid one to beholdaudioguru is a splendid one to beholdaudioguru is a splendid one to beholdaudioguru is a splendid one to beholdaudioguru is a splendid one to behold
Default

Quote:
Originally Posted by halloween_man View Post
I have been unable to locate the pic output voltage/current relationship in the PIC data sheet. Audioguru states 4.0V at 10mA, where do I look in the pic Data Sheet to find this information?
The PIC is made with the same Mosfets as 74HCxx logic gates. Texas Instruments shows the voltage vs current on their 74HCxx datasheets.

Quote:
If I understand the gain of the TIP120 = 1000, if the base current is set to 10mA, then .01A * 1000 would mean I could drive a theoretical load of 10 amps, is this correct?
The current gain is spec'd for a linear amplifier when its collector voltage is not less than 3V. The datasheet spec's a max saturation voltage when its base current is 1/250th its collector current when it is turned on hard as a switch.

Quote:
1.3 or 1.4VDCVDC I believe is the voltage drop across the darlington pair, is this correct?
The datasheet shows a max saturation voltage of 3V when its base current is 12mA and its collector current is 3A. The max saturation voltage is 4V when its base current is 20mA and its collector current is 5A.

Quote:
ULN2803A
You can't use a socket if the current is too high for it.
__________________
Uncle $crooge
audioguru is online now   Reply With Quote
Old 29th May 2008, 02:55 AM   (permalink)
Experienced Member
Mike, K8LH is a name known to allMike, K8LH is a name known to allMike, K8LH is a name known to allMike, K8LH is a name known to allMike, K8LH is a name known to allMike, K8LH is a name known to all
Default

As convenient as a ULN2803A or a serial-to-parallel MIC5841 might be it seems you might be pushing the limits with your 2 amp requirement and if it did work I suspect those chips would get pretty darned hot.

Have you considered using an N-channel MOSFET in a TO-220 package with logic level gate control and low Rds(on) (drain-source resistance when 'on') specification? An inexpensive IRL520 for example has an Rds(on) of something like 0.27 to 0.38 ohms with 4 to 5 volts applied to the gate.

Mike
Mike, K8LH is online now   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Latest
Quik PIC Programming kit Krumlink General Electronics Chat 5 27th January 2008 11:27 PM
Banks in PIC Microcontrollers baberjaved Micro Controllers 5 22nd January 2008 11:36 PM
Capturing and reproducing audio with a PIC Fred.Amoson Micro Controllers 14 14th December 2007 08:21 PM
Problems switchin relay with PIC Andy1845c General Electronics Chat 5 17th November 2007 06:13 PM
High ADC sampling rate PIC, 18F needed? bananasiong Micro Controllers 24 28th October 2007 12:13 PM



All times are GMT. The time now is 06:03 PM.


Electronic Circuits  |  Radio Controlled
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.