![]() | ![]() | ![]() |
| | |||||||
| 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. |
| | Thread Tools | Display Modes |
| | (permalink) |
| New Member | 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. |
| | |
| | (permalink) |
| Experienced Member | 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 |
| | |
| | (permalink) |
| Experienced Member | 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 |
| | |
| | (permalink) | |
| Experienced Member | Quote:
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. | |
| | |
| | (permalink) |
| Experienced Member | 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 |
| | |
| | (permalink) |
| New Member | 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. |
| | |
| | (permalink) |
| Experienced Member | 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. |
| | |
| | (permalink) | |
| New Member | 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? 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. | |
| | |
| | (permalink) | ||||
| Experienced Member | Quote:
Quote:
Quote:
Quote:
__________________ Uncle $crooge | ||||
| | |
| | (permalink) |
| Experienced Member | 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 |
| | |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| 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 |