Maker Pro
Maker Pro

general pull down/pull up microcontroller input/output questions

T

tehtehteh

I'm designing an in-car circuit with 2 step down converters (lm2596), to put them into standby the on/off pin must read high

I'm using a picaxe microcontroller powered with a linear regulator to control them, the linear regulator wastes too much power to run off the battery alone, so when the car is off the picaxe will also be off, this left me with a bit of a challenge in that I had to let the on/off pins default to high and have the picaxe come on and set them low (does this make sense?)

I have come up with the attached circuit

my issues with it is the on/off pin has to see potentially up to 2v for high with a max of 25v, so for protection I added R2 to make that into a voltage divider so the 12v can basically go up to 48v without doing any damage, but it wastes a lot of power (yenka says less than 0.7ua without R2 and 130ua with)

the converters use up to 250uA each in standby mode, so with 2 of these on/off circuits added I'm looking at 0.75mA standby current, which is too much

I'm also wondering does the on/off pin draw any current and can it cause current to flow from the transistor base out through the collector, but my knowledge isn't good enough to really understand what's going on there

so, thoughts and suggestions please?

thanks for reading
 

Attachments

  • Untitled-1.jpg
    Untitled-1.jpg
    275.7 KB · Views: 123
I calculate that the 0.75mA will run down your car battery in just 266,666 hours, so I see your problem.

Seriously, though. Draw the power from one of the lines that is turned on only when the ignition is on. Problem solved.

Bob
 
1. The on/off pin draws a maximum of 15 μA
2.The TIP is an overkill,you should use a much smaller Tr like the 2N3904 or better yet a small MOSFET
3.You can provide protection from high battery voltage with a zener diode(25V) instead of the resistor.
4. You can omit R2 and use a higher value for R1
 
1. The on/off pin draws a maximum of 15 μA
2.The TIP is an overkill,you should use a much smaller Tr like the 2N3904 or better yet a small MOSFET
3.You can provide protection from high battery voltage with a zener diode(25V) instead of the resistor.
4. You can omit R2 and use a higher value for R1
But why go to all this trouble when there is switched power available?

Bob
 
T

tehtehteh

1. The on/off pin draws a maximum of 15 μA
2.The TIP is an overkill,you should use a much smaller Tr like the 2N3904 or better yet a small MOSFET
3.You can provide protection from high battery voltage with a zener diode(25V) instead of the resistor.
4. You can omit R2 and use a higher value for R1
yes the transistor was left over from a previous revision of the circuit where it was driving a relay, so it is overkill
can you explain more about the diode? it sounds promising
removing R2 is great, if the diode provides voltage protection, but can I really use a higher resistor? the data sheet example had 47k and I thought that was on the high end of the scale with pull up / pull down
 
With a Zener-Diode that replaces R2, the R1 value should be lower at about 1kohm.
A 1N4749A (24V zener) or 1N4750A(27V zener) can be used.

The current in non-protection(Vi<24V) is about 5μA ( zener leakage).
In protection ,the current can be 24ma for vi=48V.

Is the 25V limit for for a 24V truck battery?
zener.png
 
T

tehtehteh

sorry this is probably really basic stuff but I have no experience with zener diodes, what's the reason for needing lower resistance when it's included? also what happens once it reaches reverse voltage, R1 would stop it being a complete short to ground, but would there be any voltage going to the on/off pin to keep it high?

also the data sheet recommended a 2N3904 but you said a mosfet would be better, why is this? I have tried to test it in yenka but the only thing obvious is the behaviour around the base / gate, the transistor is drawing current and the mosfet isn't, R4 seems to be acting like a voltage divider when the mosfet is there but with the transistor I see hardly any voltage there and I don't know where it's disappeared to!
 
Yes,it is basic Zener stuff.
Please enter the zener link in #8 for understanding it better.

In short,, till the "Zener voltage is reached" the zener isn't conducting and the current through it is the leakage current..
When the zener breakdown occurs the voltage across the zener will remain at Vz and the current will increase.
This Vz is the voltage the zener will protect the circuit at.
The current is limited here by R1.
In this mode there is a need to allow for a minimum Iz(which depends on the specific Pd of the specific zener) .
The minimum in this case is in the mA range, thus R1 should be lower.
For Vi=48V the current will be 24mA ,at 25V it will be 1mA.

The on/off pin will get the vin voltage up to Vin=24V.
It will be high.

About the FET/BJT issue:
Yes, the current needed to drive a FET is practically zero.
And the leakage current of a BJT is also higher.

In the case of the BJT you should have about 0.8V the rest of the voltage is falling on R3.
You can use the 2N3904 if you like.
 
Last edited:
T

tehtehteh

yes I read it but I didn't find much that really went into detail about how the zener operates

I think I get it now, for anyone else who may be reading this thread looking for info I found this link very helpful:

http://sound.westhost.com/appnotes/an008.htm

I have attached a circuit similar to yours but with a slightly lower leakage zener diode, one thing I don't understand was the 2.2k resistor you added to your example, no idea what it was for so I left blank for now, would you mind explaining it to me?
 

Attachments

  • Untitled-1.jpg
    Untitled-1.jpg
    196.7 KB · Views: 108
yes I read it but I didn't find much that really went into detail about how the zener operates

I think I get it now, for anyone else who may be reading this thread looking for info I found this link very helpful:

http://sound.westhost.com/appnotes/an008.htm

I have attached a circuit similar to yours but with a slightly lower leakage zener diode, one thing I don't understand was the 2.2k resistor you added to your example, no idea what it was for so I left blank for now, would you mind explaining it to me?
The 2.2K is for limiting the current through the Tr.
while maintaining the zener voltage.
 
T

tehtehteh

ok, do you think it is still needed with the mosfet? if I'm understanding everything right I couldn't see a route for any significant current to go through it
 
Top