I am learning Arduino. I have read the analogWrite actually uses a digital signal, via the PWM technique.
I also read that is good enough for dimming LED's, controlling motors, generating audio...a lot of things, after all.
My question is, what are the main things you can't achieve with PWM, but you definitely need DAC instead? I am asking in general, but also particularly in the Arduino/microcontrollers arena.
With PWM, you have an oscillating signal that you filter with a low pass filter to smooth into a ripply level.
With a DAC, you are basically writing the level you want and it stays there until you write again.
You can have dual and quad DACs with higher resolution than the 8 bits offered with PWM, easily accessed with fast I2C or even faster SPI commands.
Its also possible to create more complex waveforms if desired, such as playback of sampled files from memory.
dan_plan:
My question is, what are the main things you can't achieve with PWM, but you definitely need DAC instead? I am asking in general, but also particularly in the Arduino/microcontrollers arena.
In general? Not much.
In Arduino terms? Quite a lot. Arduino has quite a limited PWM frequency/resolution. eg. You can't do high quality audio output.
My question is, what are the main things you can't achieve with PWM, but you definitely need DAC instead? I am asking in general, but also particularly in the Arduino/microcontrollers arena.
To generate low frequency analog output; to generate fine analog output; to generate fast analog output; etc.
My question is, what are the main things you can't achieve with PWM, but you definitely need DAC instead? I am asking in general, but also particularly in the Arduino/microcontrollers arena.
Well I pose a question to your. If one wires a PWM signal to a digital voltmeter what would it read at 50% output? If you have a DAC that outputs 0-+5vdc what will the same voltmeter display with a 50% signal?
There lies the difference and should point to applications best suited for one or the other.
My question is, what are the main things you can't achieve with PWM, but you definitely need DAC instead? I am asking in general, but also particularly in the Arduino/microcontrollers arena.
To generate low frequency analog output; to generate fine analog output; to generate fast analog output; etc.
I guess all those "1-bit-DAC" CD players are a figment of my imagination....
From wikipedia:
"A Bitstream or 1-bit DAC is a consumer electronics marketing term describing an oversampling digital-to-analog converter (DAC) with an actual 1-bit DAC (that is, a simple "on/off" switch) in a delta-sigma loop operating at multiples of the sampling frequency. The combination is equivalent to a DAC with a larger number of bits (usually 16-20). The advantages of this type of converter are high linearity combined with low cost, owed to the fact that most of the processing takes place in the digital domain and requirements for the analog anti-aliasing filter after the output can be relaxed. For these reasons, this design is very popular in digital consumer electronics (CD/DVD players, set-top boxes and the like)."
So not sure what you are trying to point out fungus.
CrossRoads:
Guess it helps to have a higher power uP also to send it data that fast.
I think we would be well into (multiple?) CPLD/FPGA territory on that DAC. Certainly a (relatively) slow but smart uP to direct all the action of the heavy equipment.