Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

3v3 PWM to 0-5V analog out

Status
Not open for further replies.

Cicero

Active Member
Anyone got any clever ideas as to how to do this elegantly? Everything I come up with seems too bulky.

I should add: And try keep it as linear as possible.

PWM @ 30-40kHz
 
Last edited:
Is this close enough?
LevelShiftedPWMtoVoltage.PNG
The graphs are for PWM duty cycles of 10% to 90% at 10% intervals.
 

Attachments

  • LevelShiftedPWMtoVoltage.asc
    1.6 KB · Views: 109
Ah nice Alec - that'll work. I had a similar version, but I think my cap was too big because it didn't work very well.

I tried an opamp version, low pass into amplifier, but unless its properly rail to rail you lose a lot.
 
Here's an alternative, giving a better approximation to linear :-
LevelShiftedPWMtoVoltage2.PNG
 

Attachments

  • LevelShiftedPWMtoVoltage2.asc
    1.4 KB · Views: 83
Go to a parts vendor and search for this:
logic translator OR logic level shifter

Attached is one I use. It is bidirectional which you don't need so ground the DIR pin.
They come 1/IC or 2, 3,4 8, or 16.
This one converts up or down but some only go one way. There are some that only do the 3.3 to 5.0 translation.
 

Attachments

  • sn74lvc1t45.pdf
    1.3 MB · Views: 131
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top