EasyManuals Logo

Arduino Pro Mini User Manual

Arduino Pro Mini
311 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #147 background imageLoading...
Page #147 background image
Building a Digital-to-Analog Converter (DAC)
The Arduino doesnt natively support analog output signals, so we need to
find a way around this limitation. The solution is a digital-to-analog converter
(DAC).
1
As the name suggests, such a circuit turns a digital input into an
analog output. You can find DACs in a lot of consumer devicesfor example,
in your MP3 player. It turns your digitally encoded music into an analog
sound wave.
One of the most important characteristics of a DAC is its resolution. In our
case we need to generate four different voltage levels to create a video signal.
To encode four voltage levels, we need two bitsthat is, our DAC has a 2-bit
resolution. The following table shows how we could map the four binary input
values to their voltage levels.
11100100
Binary input:
1.0V0.6V0.3V0.0VOutput voltage:
We can use two of the Arduinos digital pins to control the DACs input value,
but we still have to find a way to generate different voltages depending on the
pins values.
There are several ways to achieve this, but one of the easiest is by using a
binary-weighted DAC. It has the following characteristics:
You need a resistor for every input bit.
All resistors have to be in parallel.
Resistor value for bit #0 is R. For bit #1 its 2R, for bit #3 its 4R, and so
on.
Lets say we use the Arduinos digital pins D7 and D9 to control the DACs
input value. In the following figure, you can see our DACs circuit. You have
to add the 470 and 1k resistors yourself, but you get the 75 resistor for
free, because its part of your TV sets input connector.
In principle, the binary-weighted DAC is a voltage divider
2
that is, it turns
an input voltage into a smaller voltage. The output voltage depends on the
1.
http://en.wikipedia.org/wiki/Digital-to-analog_converter
2.
http://en.wikipedia.org/wiki/Voltage_divider
Chapter 8. Generating Video Signals with an Arduino 130
report erratum discuss
www.it-ebooks.info

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Arduino Pro Mini and is the answer not in the manual?

Arduino Pro Mini Specifications

General IconGeneral
BrandArduino
ModelPro Mini
CategoryMotherboard
LanguageEnglish

Related product manuals