Video Design Idea: Leverage PWM output and add a low-cost DAC to your system
Bonnie Baker, senior applications engineer at Texas Instruments and regular EDN columnist, demonstrates a simple way to add DAC functionality to a microcontroller-based system using only an op amp and two passive components.
By Staff -- EDN, July 19, 2007
| Leverage PWM output for low-cost DAC Bonnie Baker, senior applications engineer at Texas Instruments and regular EDN columnist, demonstrates a simple way to add DAC functionality to a microcontroller-based system using only an op amp and two passive components. EDN Tech Clips deliver technical depth and tutorial design information for engineers involved in analog circuit design, power management, embedded-system design, board-level design, signal integrity, and more. |
Most systems ultimately connect to the real world and the inherently analog nature of that world. A host of analog companies offer data converters just for such interface needs. But look closely at your system design and you may find that you don’t need a dedicated data converter. Indeed a system with a microcontroller that has a PWM (pulse width modulation) output can offer DAC functionality with a simple op amp and a couple of passive components. The low-cost design yields simple programmability and 10-bit accuracy. |
-
Dear Sir/Madam,
The video and the method of presentation are impressive.
But the text and the figure are questionable from my point of view.
I think that is a bit misleading way to produce “analog reference voltage”.
To drive a DC motor it may be good, but for “analog reference”?
I would like comments of the following notes and questions:
1. The “frequency plot” of the first order RC filter is definitely not plat and very “curved”. Test it and you will see it!
2. The place of 3*f and 5*f of the plot as it is shown is a bit misleading.
3. Achieving 10 bits “accuracy” without at least 12-bit analog reference voltage seems quite difficult to me.
4. The accuracy of the Voh and Vol levels from the microcontroller are very far from 10- bit accuracy.
5. The shape of the PWM (ripples, overshoots, deformations) and its energy depends on the duty cycle. So achieving 10-bit accuracy is difficult.
6. I think that the internal ADC f the oscilloscope you are using is 8 –bit and the accuracy in not better than +- 1.5%. How do you guarantee +-0.08% (approximately) for 10 bits?
7. The difference between the “resolution” and accuracy” should be stated explicitly.
8. The frequency spectrum of the rectangular signal produced by the microcontroller is very large and could created a lot of problem without appropriate filtering and PCB layout. This should be said explicitly.
9. If you do not have appropriate RC and OP AMP with appropriate frequency characteristics you are in a trouble with that method.
10. Showing a piece of the code could be useful.
11. The question of the borders (min and max values of the PWM) is not discussed.
And may be some more question.
Conclusions:
1. It is too simple and misleading.
2. No real application is disused.
I hope that is helpful
The feedback is welcomed
Best regards
Petre Petrov
Petre Petrov - 2008-30-12 00:00:00 PST -
Charles, Thanks for the feedback. 1. You are right, the square wave doesn't seem too square. That was an artifact of the layout more than anything. A precision volt meter would have been very good.
2. Again, you are right. When I designed this I tried to make it a simple as possible. And a Bessel filter would be your best bet!
Bonnie Baker - 2007-15-8 13:55:00 PDT -
There are two comments to share :
1) the shape of the squared signal we can see is not very ... square! This mean that the 10 bits precision is out of question. A proof of the precision with a voltmeter connected at the output would have been more pedagogique maybe ?
2) Using just a second order Sallen and Key filter instead of an simple RC will give, for the same ripple level, a much faster response time. The cost is just one more RC. And if the filter is a Bessel one, you will have the rigth value in an even shorter time.
That said, doing that with video is a great idea. Congratulations !
Charles Rydel, France
Charles Rydel - 2007-29-7 02:27:00 PDT


















