NetCore2K.net - Brought to you by Napalm and Typhoon
HOME PROJECTS ARTICLES FORUM LINKS
Username: Password:



Duty cycle: n. A washing machine setting thats particularly effective for getting skid marks out of underwear.

 Welcome

 Napalm's Blog

> Napalm's Blog
> Typhoon's Blog
> Ecks' Blog
> EvilFourZero's Blog

Creating a DAC using PWM and a Low-pass Filter

8th February 2010

I wanted to experiment with the idea of making a DAC (Digital to Analog Converter), the method I have used in the past was to use a R-2R Ladder Network of Resistors. But having huge amounts of resistors all tightly tied together is quite a pain. So as an alternative Wikipedia suggests using PWM (Pulse Width Modulation) and a low-pass filter.

So with Limitz excellent knowledge of audio we set about creating a program to output a PWM signal from a serial port. We did that by bit-banging the DTR pin (pin 4). We pass the output signal through our low-pass filter which is simply a 12K ohm resistor and a 47 nF capictor.

Below is some photos of the result on my brand new Oscilloscope (OWON 6062T). I've also recorded a video of it running live although the quality suffers from a crappy camera phone.


OWON 6062T Oscilloscope (Image 1). Click to enlarge.
Click to enlarge.

OWON 6062T Oscilloscope (Image 2). Click to enlarge.
Click to enlarge.

Comments: (0) View All

No comments found!


Copyright © Netcore2K.net.
All rights reserved.
Contact Us