Best way to get 0-5v variable output?


I'm looking for a kick start in the right direction. I need to output a 0-5V signal baised on time. For instance after 1 second output 2 v and 4 seconds output 5v. ETC. Is the best way to do this a RC filter & PWM? Does anyone have any examples handy?

Something come to my mind...A/D & D/A converter. Look into them, check how they work, check differents type and check for a "stair case" waveform type. You will need external circuits.

Sorry that the best I can help at the moment.

Maybe not the 'best' way, but probably the easiest is to use a PWM pin with a low pass filter.

What you're looking for is a basic integrator circuit viz a circuit which increases its output with respect to time.

This can be done with a simple OP amp using a capacitor as a feedback loop.

For a comprehensive explanation have a look at the following The Integrator Op Amp - Wisc-Online OER


Thanks guys, I think I've decided just to us a simple RC filter for the time being. Looks like I can get pretty good response and relatively low ripple pretty easy.