Open the (mosfet) gate!

What level is your initial signal source, 0->5V, or 0->15V ? ...Jim Thompson

--
| James E.Thompson                                 |    mens     | 
| Analog Innovations                               |     et      | 
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    | 
| STV, Queen Creek, AZ 85142    Skype: skypeanalog |             | 
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  | 
| E-mail Icon at http://www.analog-innovations.com |    1962     | 

     Thinking outside the box... producing elegant solutions. 

"It is not in doing what you like, but in liking what you do that 
is the secret of happiness."  -James Barrie
Reply to
Jim Thompson
Loading thread data ...

When used in the same configuration, both NPN and PNP will invert the signal. Inversion is a function of circuit topology. A common emitter circuit inverts. The common base and common collector circuits do not invert.

--

Rick C
Reply to
rickman

5v (Arduino PWM output port).
Reply to
mrdarrett

Ok thanks. I'll look into the common collector circuit then.

Michael

Reply to
mrdarrett

Just drive it with the Arduino output. That should be fine.

George H.

Reply to
George Herold

The common collector configuration provides no voltage gain, only current gain. Will that work for you?

The common emitter configuration provides no current gain, but provides voltage gain.

The bottom line is driving MOSFETs has been done before and optimized. Why reinvent the wheel?

--

Rick C
Reply to
rickman

Ah. That explains a lot. No.

To make it fun, and to learn something new.

I suppose I'll try using the inverting common emitter and just update my Arduino code with analogWrite( 255 - value ).

Thanks,

Michael

Reply to
mrdarrett

...

That's what I'm doing now, with an IRLZ34N.

Yeah, perhaps adding a PN2222 to amplify the voltage will introduce more losses than the Rds,on loss I'm taking by operating at just 5V (below Vgs,max).

I found this. Pretty. $0.57 for one, Rds,on = 6.2 mOhm (~10 mOhm at 5v).

formatting link

Michael

Reply to
mrdarrett

That is certainly a valid reason.

I'm a bit confused. Is this a discrete control or a proportional control? What exactly is this controlling?

--

Rick C
Reply to
rickman

e:

te:

ote:

:
5V or so to

T.

12 or 15V

out

age,

tion

1kHz, ???

late

solution that won't invert it?

e

ter

ot invert.

ent

s

Why

y Arduino code with analogWrite( 255 - value ).

?

It's controlling a coolant pump motor. If I look over at the thermometer a nd the temperature is too high, I type say for instance a "6" on my laptop, and it sends a 60% PWM duty cycle to the pump motor to send cooling water. It's laughable for now, but it took me a year to get the dang thing built , and it works for now. Someday I'll get around to getting a thermistor (m aybe from the car's coolant sensor) and installing it, and getting some PID control in there. Someday.

Michael

Reply to
mrdarrett

Where does the analog output come in?

--

Rick C
Reply to
rickman

e:

ote:

rote:

te:

15V or so to

FET.

ve 12 or 15V

em out

ltage,

pation

, 1kHz, ???

mulate

P solution that won't invert it?

the

itter

not invert.

rrent

des

d. Why

my Arduino code with analogWrite( 255 - value ).

rol?

er and the temperature is too high, I type say for instance a "6" on my lap top, and it sends a 60% PWM duty cycle to the pump motor to send cooling wa ter. It's laughable for now, but it took me a year to get the dang thing b uilt, and it works for now. Someday I'll get around to getting a thermisto r (maybe from the car's coolant sensor) and installing it, and getting some PID control in there. Someday.

Does this clarify?

formatting link

Michael

Reply to
mrdarrett

Not really. If you are driving this with a PWM signal, that is just on or off with variable timing. That would normally be driven by writing a one or a zero to an I/O pin. Writing an integer to a DAC gives signal with many values that will turn the drive on to a range of strengths which is pretty much the opposite of PWM. Or are you calculating a value of 0 or 255 and nothing in between to drive the DAC?

--

Rick C
Reply to
rickman

ote:

rote:

ve 15V or so to

OSFET.

have 12 or 15V

them out

voltage,

sipation

Hz, 1kHz, ???

simulate

PNP solution that won't invert it?

t the

emitter

do not invert.

current

vides

zed. Why

te my Arduino code with analogWrite( 255 - value ).

ntrol?

eter and the temperature is too high, I type say for instance a "6" on my l aptop, and it sends a 60% PWM duty cycle to the pump motor to send cooling water. It's laughable for now, but it took me a year to get the dang thing built, and it works for now. Someday I'll get around to getting a thermis tor (maybe from the car's coolant sensor) and installing it, and getting so me PID control in there. Someday.

r
e

any

y

Oh, I guess the Arduino is unique then.

Here's a description of analogWrite.

formatting link

Michael

Reply to
mrdarrett

No, it's not unique, I'm just not familiar with the libraries for the Arduino. This one is called "analog" when it is actually PWM. I expect it uses PWM hardware built into the MCU chip you are using. There is no DAC, it is a counter/timer instead.

--

Rick C
Reply to
rickman

hove 15V or so to

MOSFET.

u have 12 or 15V

f them out

e voltage,

issipation

0kHz, 1kHz, ???

o simulate

a PNP solution that won't invert it?

ert the

n emitter

s do not invert.

y current

rovides

mized. Why

date my Arduino code with analogWrite( 255 - value ).

control?

ometer and the temperature is too high, I type say for instance a "6" on my laptop, and it sends a 60% PWM duty cycle to the pump motor to send coolin g water. It's laughable for now, but it took me a year to get the dang thi ng built, and it works for now. Someday I'll get around to getting a therm istor (maybe from the car's coolant sensor) and installing it, and getting some PID control in there. Someday.

n or

one

h many

etty

and

it

,

To get a PWM frequency of greater than ~500 Hz, I might have to use these f unctions anyway :p

formatting link

Michael

Reply to
mrdarrett

I can't imagine a PWM timer would only work up to 500 Hz. Rather than relying on canned I/O routines, I suggest you read the data sheet for your device and program the PWM counter directly. I think the library code is leaving out a *lot* of capability.

--

Rick C
Reply to
rickman

What are the source/sink current specs on the Arduino output pin? ...Jim Thompson

--
| James E.Thompson                                 |    mens     | 
| Analog Innovations                               |     et      | 
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    | 
| STV, Queen Creek, AZ 85142    Skype: skypeanalog |             | 
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  | 
| E-mail Icon at http://www.analog-innovations.com |    1962     | 

     Thinking outside the box... producing elegant solutions. 

"It is not in doing what you like, but in liking what you do that 
is the secret of happiness."  -James Barrie
Reply to
Jim Thompson

It looks like 20 mA per pin. The Arduino Uno that I'm using uses an ATmega328p.

formatting link

Michael

Reply to
mrdarrett

I don't think that is the relevant spec. That number if a guaranteed spec for continuous operation. To determine the rise/fall time of the gate voltage you need to know the *actual* current over the range of voltage as the gate capacitance charges. They may have a curve showing this, but it won't be a single number.

--

Rick C
Reply to
rickman

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.