Pages: [1]   Go Down
Author Topic: Using analogWrite on transistor(s)  (Read 1246 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Full Member
***
Karma: 0
Posts: 125
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

I'm asking my question here because i have some doubts about lifecycle of transistors if i drive the base with a PWM signal that comes from an analog pin of an arduino.

Does the transistor will last longer if it is driven thru a digital signal ?

I need this for regulating the speed of a 12V DC FAN (computer type).
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 309
Posts: 26489
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Does the transistor will last longer if it is driven thru a digital signal ?
The AVR contatins many thousands of transistors.

What do you think the answer is?

Quote
i have some doubts about lifecycle of transistors
What are the doubts?

You transistor's life may be affected if it isn't adequately protected from back EMF from inductive loads like motors, relays or solenoids.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Offline Offline
Full Member
***
Karma: 0
Posts: 125
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

As i'm clearly not electronician man, i was wondering if the duty cycle of the PWM signal wasn't bad for the transistor's life ?

I'm not very familiar with all these things that's all.

I already tried using a TIP120 on my arduino on an analog pin. It works fine.
But, all i was wondering was only if PWM signals could damage the transistor on long term ?
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 309
Posts: 26489
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I already tried using a TIP120 on my arduino on an analog pin. It works fine.
The only analogue pins on an Arduino are inputs.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Offline Offline
Full Member
***
Karma: 0
Posts: 125
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok i did know that.

What is making me doubt on transistor lifecycle is the frequency of switching of the PWM signal coming out on arduino pseudo-analog pins.
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 309
Posts: 26489
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
What is making me doubt on transistor lifecycle is the frequency of switching of the PWM signal coming out on arduino pseudo-analog pins.
And what sort of device switches the outputs on the PWM pins?

You think the frequency too low?
Too high?

Did you read my comment about protecting the transistor?
« Last Edit: April 01, 2011, 07:41:34 am by AWOL » Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Fort Lauderdale, FL
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6144
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

What is making me doubt on transistor lifecycle is the frequency of switching of the PWM signal coming out on arduino pseudo-analog pins.

Where is your source concern that the transistor has a limited life cycle coming from?
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.c

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 221
Posts: 13853
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The only analogue pins on an Arduino are inputs.

Can't remember the thread but there was stated that all electronics is analog, but we work with it as if it were digital smiley
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 40
Posts: 5594
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The only analogue pins on an Arduino are inputs.

Can't remember the thread but there was stated that all electronics is analog, but we work with it as if it were digital smiley


Pretty much the truth; actually, if you wanted to worry about transistor life, I'd worry about driving them to saturation (as in when they are used as a switch). A transistor is an analog device, that's why they are used as amplifiers.

simkard - you may be currently ignorant of these things, but don't use that as an excuse not to educate yourself; there are many fine ways to do that, available both on the internet and in dead-tree format (indeed, some of the best information is -only- found in physical books).

Good luck with your education.

smiley
Logged

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

0
Offline Offline
Shannon Member
****
Karma: 215
Posts: 12455
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
What is making me doubt on transistor lifecycle is the frequency of switching of the PWM signal coming out on arduino pseudo-analog pins.

I think you are imagining electronics is somehow like mechanical switching.  Electronic devices only move electrons, electrons don't wear out.
Your computer's CPU has transistors that switch at something like 10^10 times a second for years - say switching 10^18 times in the lifetime of the computer.  A cpu might have a billion transistors, any one of which could make the CPU useless if it fails.  There's no way this would be workable if transistors weren't ultra ultra reliable.

Having said that electronic devices can age, mainly due to thermal stresses if run hot, or fail due to overload (current too high, voltage too high).   (Thus never design a circuit that pushes its components to their absolute maximum ratings)
Logged

[ I won't respond to messages, use the forum please ]

Cumming, GA
Offline Offline
Edison Member
*
Karma: 20
Posts: 1657
Ultimate DIY: Arduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

This is why electronics devices (and I mean circuits here) are usually over-engineered.  Lets say you want to use a transistor to drive a standard 12V 1amp incandescent lamp as commonly found in cars.  If you select a part like a 2N2222A, then you will be VERY BRIEFLY be exceeding the parts recommended ratings during the ON/OFF cycles of the PWM Signal... this is actually better than FULL ON as you would get with digital.write() since the device with full on... will "burn out faster... due to longer exposure to the exceeded parameter value... namely... MAX current of the transistor.   In fact, the 2n2222 will likely die immediatly with digital.write() mode.  So... use a big beefy enough transistor.

So both situations burn out the transistor... but the likelihood of the PWM driven transistor burning out before the 100% on transistor is low.  The opposite is every much more likely. So the PWM impact/effect is actually opposite of what you assume.

The PWM drive technique is often used with LED's where you get HIGHER brightness, by driving the LED with HIGHER VOLTAGE and CURRENT... but with low on time PWM Duty Cycle.  

The actual switching action of PWM will not degrade the transistor unless one of it's operating parameters is exceeded in doing so.  An over engineered circuit,  one where it's MAX parameters will not be exceeded... will not be degraded by PWM activity.  So design the circuit so the transistor is not abused... and the switching is safe.  MANY transistors can continuously switch at speeds close to 300MHZ...  so what are a few kilohertz going to do?   (Hint: very little)
« Last Edit: April 03, 2011, 12:11:32 pm by pwillard » Logged

0
Offline Offline
Shannon Member
****
Karma: 215
Posts: 12455
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

One thing that can happen specifically with switching circuits is that during the switching the device temporarily is dissipating much more power than its steady-state power rating.  However datasheets usually have a graph to show the safe limits for this.  The slightly counter-intuitive thing is that switching the device faster (by driving its input harder) actually makes the device suffer less (less time in the switchover).
Logged

[ I won't respond to messages, use the forum please ]

Pages: [1]   Go Up
Jump to: