Analog Output

Status
Not open for further replies.

jmmjvg

New Member
Does anyone know of any good tutorials/ relevant information on how to output an analog signal (in my case, a pressure valve)?

Cheers!
 
My thoughts...

This can be done with a pulse (square-wave) obtained simply by turning a port on and off with time delays I guess, but from where and how do we obtain the maximum voltage?
 
You run the square wave through a low pass filter. The simplest one-pole low pass filter is a series R and a parallel C. The voltage on the capacitor is the integral of the on voltage times the time, plus the off voltage times the time divided by the period. Another way of saying that is to say the voltage is the average of the two voltages.

If the duty cycle is 100% then the voltage across the capacitor C will asymptotically approach Vcc. If the corenr frequency is low enough it could take a very long time to get there.
 
Papabravo said:
If the duty cycle is 100% then the voltage across the capacitor C will asymptotically approach Vcc. If the corenr frequency is low enough it could take a very long time to get there.

I tried to say "asymptotically" once and almost bit my tongue off.
 
Why not using a standard DAC chip, Maxim has 245 different types!!
I'm absolutely sure one will meet your requirements

Check here: **broken link removed**
 
mcs51mc said:
Why not using a standard DAC chip, Maxim has 245 different types!!
I'm absolutely sure one will meet your requirements

Check here: **broken link removed**
1. A DAC may be expensive and consume board space.
2. A current output DAC may require an opamp.
3. There might be procurement difficulties.

but it is certainly a possible way to go.
 
Could always make a cheap and nasty dac with the old 2r ladder design ... and give it some pins (more pins more bits) ... it is a no brainer to do and cheap too... just some resistors and some pins ... cant say its perfect but I am throwing it in the mix ....
 

Well it might be cheap, but it's not nasty - it's a very high speed, very practical D2A design. It's only drawback is the number of pins it requires.
 
I came across a PIC with built-in D/A converter some time ago. You simply load a special register with an 8-bit value and it produces the analog output. I've never seen the D/A module on a flash-based PIC though.
 
Last edited:
Agree wholeheartedly with the above solution
 
For something really cheap and nasty, you could always use the Vref output. This would give you a 4 bit (16 level) output.

Mike.
 
Pommie said:
For something really cheap and nasty, you could always use the Vref output. This would give you a 4 bit (16 level) output.

Mike.


Now that is just being sneaky but not sure about the PIC vref pin so am guessing from experience ya dont want to put any load on reference pins !
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…