Making a 12 bit DAC Using an Arduino - The Learning Circuit

preview_player
Показать описание


Visit the element14 Community for more great activities and free hardware:

Рекомендации по теме
Комментарии
Автор

This R/2R DAC was my first sound card (just 8 bits) on my first PC back in the early ‘90s! I managed to fit 18 resistors and a 100nF capacitor for integration of the output signal in a DB25 plug back then, playing WAV files from the printer port of that old PC! 😊 Great video! It literally took me back to those years!

skesinis
Автор

This is an excellent video explaining how early DACs were built and the principles behind them, nice work! One thing got me at the end however, you mentioned that the original input signal captured by the ADC could never be reconstructed exactly by the DAC. This is (mostly) incorrect though, as it ignores Nyquist–Shannon.

If you band limit the input of the ADC at 1/2 your sampling frequency (idealized case) or lower (practically, 1/5 to 1/10 is sufficient for slow, non-specialty filters), then include an exact copy of this input filter on your output, you will reconstruct a mathematically identical signal to the one received! The limitation bit depth poses in this scenario is an increase in base noise floor, rather than a distortion of the signal itself. Because of this, these filters are nearly always included on off-the-shelf components designed for distortion sensitive applications.

peter.s.
Автор

Although a year old now, just a quick thanks for the video. It has inspired me further, to explore the MCP4728 device on my latest IPEC ESP32 ATM90E32 IoT Power Energy Controller and Monitor board (variation on the original IPEM). So many different DACs and ADCs available v massive variations in cost and availability, it is sometimes not straight forward to choose one device for a particular design. Keep up the good work.

ditronix
Автор

Hi...
I did a similar thing almost twenty years ago, through the "User-port" of my Vic 20 with 16 KBytes RAM expansion, to make a long research about PCM synthesis of percussive sounds (bass drums, snare drums, toms, claps, hi-hats etc... ).
My "DAC" wasn't a R/2R type, but just eight resistors (10K-20K-40K-80K... ) from MSB to LSB, linked to a common line and "grounded" through a 10K resistor to convert the out from current to voltage levels.
I created the sounds with BASIC programs that simulates sine oscillators, white and pink noise generators, "click" and "crack" A-R envelope generators, mixers and LP/HP filters (the elaboration's time was a little terrible, as you can guess!!!) and played with a simple Assembler programs, with a sample rate around 25 kHz.
The result wasn't bad, it was a fun experience, but i soon discovered that 8 bit is too low as resolution for percussive sound voices (anyway some commercial drum-machines, as Korg's DDM 110/220 or DDD5 actually makes use of 8 bit samples... ).
Now I'm thinking to assemble a vintage-style drum-machine with Eight sampled voice-cards triggered via MIDI by a DAW (as "Caustic 3" and the like), with a Pic and a simple cheap 16 bit DAC in any voice-card. Today a 16 bit DAC is cheaper than a bunch of 1% resistors... :-D
Anyway I would like to listen to a 44/16 wav file through your home-made DAC expanded to 16 bit...
Bye... :-)

kennymd
Автор

These DACS are still still used in single chips since waffering Resistors is easy and produces very high tolerances. There are different kinds of DACs, and each of them have there specific requirements on their implementation.

dzee
Автор

I will use this to power my stepper motor because i wanted to make a mechanical clock

catthecommentbothunter
Автор

Useful for raspberry Pi GPIO also if you don't want to use any dedicated chips. If you use a standard shift register that almost any hobbyist has, you don't need many pins

dashamm
Автор

Hi Karen, really enjoy your approach. Make it easy to understand. I want my kids to get into circuits and your approach will really help, Thanks!

TheRealSneakyPlayz
Автор

The tx and rx ports are always on due to the Serial.begin() command. This way, the first two bits are always on. To get over this problem you have two solutions, you can shift the pins by two, starting in pin 2, or just delete the Serial commands.

AKONBATISTA
Автор

Why not using a low pass filter for the 8 bit one to see the difference to the 12 bit one?

RetroShare
Автор

This is who I need to teach me arduino

mavericklast
Автор

4 bits should show 16 different values?

magiclay
Автор

Please next video on Delta Sigma ADC with Arduino

ajinkyamahajan
Автор

Thank you, this video really helped me. I have a question for you, if i were to use a controller that does not have any easy to use ports, could i use a shift register and a serial input to control the resistor ladder?

XanCraft
Автор

I love your videos! Can you make one explaining class D amplifiers and PWM?

johnj
Автор

Congratulations ! Very good video. One question, please. Can I use this to audio? What is the high frequency possible? Thanks

jorgeaalmeida
Автор

3:40 oh wow, this is exactly how a 6522 VIA is programmed, I didn't realize my Arduino was so similar to my homebrew 6502 computer, cool

bbqgiraffe
Автор

0:56 Isn't more bits purely the scale of assignable amplitude? Isn't 5:15 the digital version? I'd like to see the 8 bit sine on an oscilloscope after it is converted to analog.

iggynub
Автор

Where can I get the source code and full review of the schematic diagram..??

iamNaddy_
Автор

I can't find the project code, is it available anywhere?

ForSynthsSake