Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

AVR Microcontroller Current Source Switch Design

Status
Not open for further replies.

wolfdown

New Member
Can someone give me some advice about this simple circuit in the attached schematic? ()

lamp_source2-gif.45863


I originally had the circuit with only the T1, but I realized it must be a changed to a high-side switch design. So what I have now is:

T1 = TIP120
R1 = 3k6
La2 Imax ~ 1.5A
La2 Inominal ~100mA

I need help choosing T2, R2, R3 ... or worst case start over from scratch replacing all components. For T2 it sounds like TIP125 or TIP42 are common. (hopefully something that can be found at radio shack. Also I've seen P-FET designs instead of PNP, but not sure if sold locally and/or necessary). If possible I'd like a relatively low power design. The circuit will be used in a system powered by a solar array.

TIP42 I think needs about 560 ohm R3 for to achieve 20mA Ib, correct? I didn't look at the necessary value for a TIP125, but much higher since Hfe is around 1000.

As for R2 I'm guessing anything above 2 or 3k is good?

Also I guess I can increase my R1 since I no longer need the 1A sink it was selected for, but its already at 1mA which is low enough I imagine.

Thanks for any help you can give. Please correct any mistreatments I might have made above. I have done any circuit design in years.
- Casey

P.S I also have a protection diode for the load, but not shown in the schematic.
 

Attachments

  • lamp_source2.gif
    lamp_source2.gif
    2.3 KB · Views: 3,186
Last edited:
What is T2? That is the critical component, and should be a Darlington or a PFET. T1 is non critical.
 
Last edited:
T2 is either a TIP42 or TIP125. I think radio shack only has a TIP42 though. T1 is necessary to turn off the base of T2. An AVR micro will not let the pin output go above 5.3V. When T1 is off R2 will pull-up the base of T2 to 12V. If you read the source link, it explains it.
 
Last edited:
I understand how the driver works. Contrary to what you called it, it is not a constant current source. It is just a high-side switch.

Looks like these values work for a 120mA load, with some reserve. These values do not work if the load is 1A.
 

Attachments

  • DF69.png
    DF69.png
    30 KB · Views: 342
Last edited:
I'm curious how you picked these resistor values? I would think the Ib of the TIP42 would be too low using 4.7k ohm. I'll look into getting a spice simulator. Do you recommend any specific one?
 
Whoops, my error. I was thinking that the TIP42 is a Darlington, but now I see that it is not. At 120mA of collector current, and to get it well saturated, its base current should be 12mA, so R3 should be ~1K. That in turn requires R4 to be changed to 4.7K. Here is a resim (using LTSpice, to answer your other question) that shows the currents in the two resistors.
 

Attachments

  • DF69a.png
    DF69a.png
    28 KB · Views: 311
I simulated w/ the TIP125 and TIP42. The interesting thing about result was that at the 1A range, the power draw of the circuit (minus load) were both around 0.8W. I was expecting the TIP125 to outperform the TIP42. Can anyone explain that?

R1 = 20k
R3 = 500/5k (TIP42,TIP125 respectively)
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top