Output Pin "Low" but still producing minor voltage

sailgene

Member
Hello Group.

I'm running a small (.14 amp) fan via an NPN TIP 29 transistor. In testing the system, I've simply programmed the Picaxe 08M (Pin 1) to go high for 5 seconds, low for 5 seconds and then loop.

But I've noticed that Pin 1 produces the expected 5 volts at high but also produces .04 volts at low. The amperage is .03 amps at high and 0 amps at low. Should there be any voltage on the pin at Low??

Thanks.

Gene Darby
 

Andrew Cowan

Senior Member
The PIC12F683 datasheet says:

Output low = <0.6V
Output high = >Vdd - 0.7

So anything under 0.6V is considered normal.

Max current out of any output is 25mA, so 0.03A (30mA) could damage the chip. Sounds like you should stick a resistor on it.

The gain of a TIP29 is between 40 and 75. If you have a 0.14A load, you need at least 4mA on the base. Put a 1K resistor in line with the base, and it'll ensure the PICAXE isn't damaged.
 
Last edited:

sailgene

Member
Thank You, Andrew.

I'd had a 500 ohm resistor between the chip and gate and with your advice, went to a 1K resistor.

I guess I should have mentioned that when the pin is "low", my fan keeps running at a lesser speed (versus a complete shut-off). I've tried using a 5K resistor from gate to ground, thinking that would help to turn off the transistor - but no luck. Maybe a larger resistor for this purpose?

I'm a neophyte at electronics and have previously run mechanical relays off of power mosfets to in turn run high amperage devices. But given the whimpy amperage of my fan, I figured a transistor would do the job.

Anyway, thanks for your help. If you have any suggestions on a fool-proof way to de-saturate a transistor, I'm all ears.

Gene Darby
 

hippy

Ex-Staff (retired)
As a non electrical engineer my guess would be PICAXE output pin signal, via a diode, via an R to base of transistor, pull-down R after diode to 0V. That should stop any current into the transistor until the signal goes above 0V6 ( or something ).

It wouldn't reach 5V any more (4V4), but I imagine that's not a problem.
 

MartinM57

Moderator
If you've 1K between picaxe and the base of the transistor, and 0.04 volts (where - picaxe side or transistor base side?) then you shouldn't really be getting saturation of the transistor.

You could try a 10K pull down on the base of the transistor to earth (i.e. after the 1K).

If the fan still runs with that, there's something odd going on.
 

Andrew Cowan

Senior Member
0.04v at 1K: max current is 0.04mA.

With a gain of 100, the max current getting to the fan should be 4mA. I doubt this is enough to turn it. Can you measure the current to the fan?

Andrew
 

BeanieBots

Moderator
There's something else going on here.
Something is WRONG, possibly with the circuit.
That is NOT correct behaviour.
A small voltage on a low PICAXE output is to be expected but it will not be enough to turn on a bipolar transistor unless something else is wrong.
Double check you have wired the transistor up correctly.
If in doubt, post a diagram or a picture of your setup.

EDIT:
What happens if you power up the circuit with the PICAXE removed?
Does the fan still run?
 
Last edited:

sailgene

Member
Well, for whatever reason, removing the resistor between the gate and ground seems to have improved the "low" issue. It goes down to 1 ma to the fan which effectively turns the fan off. Don't know if 1 ma should be acceptable (I'd prefer 0 ma) but at least it works.

As for the resistor between the Picaxe output pin and gate, I finally found that I needed to reduce it to 100 ohms to get the full amperage (160 ma) to the fan. Seems to be working but I'll re-check the transistor specs to make sure that won't fry it.

Thanks everyone for helping me out with this. These Picaxe chips are a kick to work with!

Gene Darby
 

BeanieBots

Moderator
Still something wrong. You really should get much much less than 1mA.
You also keep mentioning "gate". A TIP29 is bipolar. It doesn't have a gate. Your PICAXE should be driving its "base" in common emitter mode.
It's minimum hfe is 15 so you would only need about 10mA to get the required 0.15A for your fan.

The base does not conduct until it is at about 0.6v so ZERO base current will flow at voltages below that. Hence, why I keep saying soemthing is WRONG if you still get collector current with a base voltage of 0.04v.

To get the required 10mA base current, you need a resistor of:-
R=(5-0.6)10mA = 440R.

If you need 100R to make it work, something is STILL WRONG.
Also, (5-.6)/100 = 44mA which is too much for a PICAXE output. You could damage your PICAXE with such a low resistance on its output.
 

Ralpht

New Member
As BB said, with less than 0.6 v at the base, there should be zero base current therefore zero CE (collector/emitter) current flowing as well.

If there is collector current, maybe the tranny is leaky or you wired your tranny leads wrong - misidentified the leads and considering you mistakenly give the tranny's leads incorrect names, it is a high possibility you have it miswired.

If leaky your TIP29 is U/S.

Have you tried another one? If so and still the same problem, then you have a wiring issue.
 

sailgene

Member
Whoops - gate-base/base-gate....

Thanks guys. My bad on using the "gate" word as I'd considered a power mosfet in my design and then switched over to the TIP 29C.

The specs for the TIP 29C call for a maximum base current of 40 ma. With a 100 ohm resistor, I'm getting approximately 25 ma of current to the base and the transistor seems to be running "cool". Any larger resistor seemed to limit the transistor's output.

As for current leakage, my meter last showed 0 ma when the transistor switched off. So perhaps I'm home free. I'll keep checking that. Pretty sure I'm wired up correctly.

But thanks to everyone for their help and I apologize for my nomenclature foul-up between mosfets and transistors. Just a neophyte.

Gene Darby
 

Ralpht

New Member
As for current leakage, my meter last showed 0 ma when the transistor switched off. So perhaps I'm home free. I'll keep checking that. Pretty sure I'm wired up correctly.
Gene Darby
Getting 0ma with the base off is good. You may be worried about nothing ???

The specs for the TIP 29C call for a maximum base current of 40 ma. With a 100 ohm resistor, I'm getting approximately 25 ma of current to the base and the transistor seems to be running "cool". Any larger resistor seemed to limit the transistor's output.
Bear in mind that a transistor is a current amplifier, so in a nutshell, the higher the base resistor the more limited the Base/Emitter current, therefore the more limited the Collector/Emitter current. Don't go too much below a 100 ohm base resistor otherwise the Picaxe might become upset as it's outputs can't supply more than 25mA.
To use the transistor as a switch, you want the maximum base current possible to ensure the transistor is fully saturated (fully turned on).

If its running cool and the fan is running OK, then there may be no problem. This transistor has a max rating of 1 Amp, so the fan drawing approx 140mA C/E current will help it to run cool and have no requirement for a heatsink.

I would'nt worry too much over the fine detail in using one of these power transistors. As long as you don't exceed the limits too much you really won't go too far wrong. Most of the time I just throw in any resistor value from about 1K downward, get it all to work first then work out the "fine print" afterwards. The trannies are pretty tough, soyou won't easily break them. It's the Picaxe you need to worry about.

Good luck.
 

sailgene

Member
Thank you, Ralph.

I hadn't considered the maximum allowable output of the Picaxe when messing with my base resistors. So I guess I'm on the edge of the envelope at 25 ma. Hopefully, my Picaxe will continue to live another day.

Gene
 

Ralpht

New Member
You're welcome Gene,

Another thing that might be worth considering and will help the Picaxe is using a darlington arrangement with your TIP29. Have the Picaxe drive a small transistor, ie a 2N2222 or something similar and this transistor then drives the TIP29.

The 2N22222 is a low power switching transistor and you can saturate it with an B/E current of approx 15mA. The Picaxe can easily handle that so you won't be sailing too close to the wind. As well it's CE current is around 800Ma so more than enough to drive the TIP29C to full saturation.

Only real downside is you need 2 transistors and maybe a couple of resistors - or replace the TIP29 with an actual darlington transistor. Switching speed is slightly reduced and their might be a few other minor problems but in your case, where you are trying to drive a fan there should be no issues.

If you don't know how, look up Wikki on how to wire up 2 transistors as a Darlington pair.

Regards Ralph
 
Last edited:

sailgene

Member
Thanks Ralph. Yes, I'm familiar with Darlighton Pairs although I hadn't thought it out in terms of the benefit of the first transistor saturating at a lower amperage to then turn on the second - which is, of course, THE WHOLE POINT OF A DARLINGTON PAIR. My brain is running at .001 Gig. I'll keep the Dar. Pair in mind as a backup plan.

Thanks again.

Gene
 
Top