0-5V PWM to 0-10V output

Hello everyone,

I need a bit of help in converting my PWM output and have 0-10V linear output to drive an EC fan. I have a dual power supply already built, capable of supplying 5V to the ATMega328P-PU chip and another 12V to drive everything else (relays, optocouplers).
I'm thinking to use an op amp to get from 0-5V to 0-10V, but I'm not sure how to achieve this.

Any help is appreciated :slight_smile:

PWM to RC filter with the corner frequency at 1/10th the PWM frequency or lower. Op Amp with a gain of 2 running from a 12V supply. The Op Amp should be rail-to-rail IO RRIO so that the inputs can go down to 0V.

Thanks Polymorph for your quick reply!

Do I need the RC at all? I need 0-10V PWM to drive the fan anyway.
Also, I'm having trouble knocking up a working schematic (no wonder, I'm only a mechanical engineer with limited knowledge of electronics :confused: )

... is the attached schematic maybe something I'm looking for? :slight_smile:

No need for an op amp, just put the PWM through a transistor pulled up to 10V.

Thanks Mike... that's even better... one component will do the trick? Like a 2222 NPN bipolar transistor?

vadkutya:
... is the attached schematic maybe something I'm looking for? :slight_smile:

No.

I need 0-10V PWM to drive the fan anyway.

I wish you'd said that to start with.

Here is what you'd said:

0-10V linear output

vadkutya:
one component will do the trick? Like a 2222 NPN bipolar transistor?

Yes but don't forget the resistor in the base so that is two components. :wink:

Sorry polymorph... I'm just a beginner in this whole malarkey :slight_smile:
What I meant to say is that I need linear conversion through from 0-5V PWM to 0-12V PWM, so for example for a value of 120 output, I'll get 5.65V PWM for the fan... Hopefully.
Thanks for your help guys... Will have a go at it, see hat happens :slight_smile:

What value would you suggest for the resistor btw?

vadkutya:
What value would you suggest for the resistor btw?

1K

What you meant was "proportional", then. You want 50% duty cycle to remain 50% duty cycle.

Exactly :wink: that was the term I was looking for... Thanks!

Grumpy_Mike:
1K

Thanks Mike

Grumpy_Mike:
Yes but don't forget the resistor in the base so that is two components. :wink:

And the fly-back diode? Are we up to 3 yet?

So this, then, but with transistor of choice.

(I love that UMass site, lovely pix :slight_smile: )

Initially I've tried doing this with an optocoupler 4N35M, but I couldn't get a proportional output.
Do I need a flyback diode at all? :slight_smile:

Do I need a flyback diode at all

If it is an inductive load of any type you need a diode.

but I couldn't get a proportional output.

But we have established that you don't need a proportional output you just need your 10V PWM signal.

All you need is a FET (MOS-FET) to control your fan.

Just make sure your FET goes into saturation with the Arduino output voltage (<5V). So look for a logical level FET or have a look at the datasheets.

You might need a resistor between the Arduino output and the gate of the FET. Depending on the FET you might need a second resistor between the gate of the FET and ground.

PWM works very well with motors (a fan is nothing else than a motor). So you do not have to care how to turn a PWM digital signal into a linear signal.

All you need in your case is the FET that turns your Arduino output into a higher voltage output.

I use this setup for controlling a Fischer Technik motor (requires up to 200 mA).

In my case I could optimize the RPM of my motor by installing a 1ยตF capacitor in parallel to the motor by some (3-5%) RPMs.