element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
The Learning Circuit
  • Challenges & Projects
  • element14 presents
  • The Learning Circuit
  • More
  • Cancel
The Learning Circuit
Documents Making a 12 bit DAC Using an Arduino -- The Learning Circuit 96
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join The Learning Circuit to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Engagement
  • Author Author: tariq.ahmad
  • Date Created: 24 Aug 2021 1:10 PM Date Created
  • Last Updated Last Updated: 24 Feb 2021 8:24 AM
  • Views 7006 views
  • Likes 8 likes
  • Comments 13 comments
Related
Recommended

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

element14 presents
Making a 12 bit DAC Using an Arduino

The Learning Circuit | element14 presents |  Project Videos

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

Once analog signals have been processed by electronics and converted to digital, to convert them back to analog, a DAC is needed. In this video, Karen shows how to make an R-2R Ladder DAC using just resistors, all of the same value. The ladder uses 12 of the digital I/O on an Arduino Uno as its inputs. While the Ladder DAC will be 12-bit, Karen is able to use it to show the differences in resolution between a 4-bit, 6-bit, 8-bit, and 12-bit DAC, generating a sine wave as a visual demonstration.

 

Bill of Material:

 

Product NameManufacturerQuantityBuy KitBuy Kit
Through Hole Resistor, 1 kohm, 500 mW, ± 1%TT ELECTRONICS / WELWYN36Buy NowBuy Now
Breadboard, MCM 60 rows, ABS, 8.5mm, 165mm x 56mmMULTICOMP1Buy NowBuy Now
Arduino Uno SMD, ATmega328 MCUArduino1Buy NowBuy Now
Wire Kit, Jumper, Male to Male, Solderless, 100 mm - 250 mm, 75 PieceMCM1Buy NowBuy Now
MULTICOMP PRO USB Cable, Type A Plug to Type B Plug, 0.91 m, 3 ft, USB 2.0, BeigeMULTICOMP PRO1Buy NowBuy Now

 

Additional Parts:

 

Product Name

Computer for programming

  • digital
  • sine wave
  • port manipulation
  • converter
  • resolution
  • e14_makerkaren
  • conversion
  • arduino
  • analog
  • Share
  • History
  • More
  • Cancel
  • Sign in to reply

Top Comments

  • DAB
    DAB over 4 years ago +1
    Very good episode Karen. You did a great job of showing ADC resolution issues and how they affect the information you can pull out of an analog circuit. DAB
Parents
  • koudelad
    koudelad over 4 years ago

    Nice video including the output presentation.

     

    One question - how is it possible that using 4 bits there are only 4 visible voltage values (I would expect 16 steps including 0 V) and using 6 bit there are 16 voltage values (I would expect 64 including 0V)?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • makerkaren
    makerkaren over 4 years ago in reply to koudelad

    I'm not exactly sure which part you're talking about. But, while a 4-bit DAC has a resolution of 16, we only see 4 bits of data. Each bit can be high(on) or low(off). Doing the math for the possible combinations of each bit being on or off, we get 16 possibilities.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • makerkaren
    makerkaren over 4 years ago in reply to koudelad

    I'm not exactly sure which part you're talking about. But, while a 4-bit DAC has a resolution of 16, we only see 4 bits of data. Each bit can be high(on) or low(off). Doing the math for the possible combinations of each bit being on or off, we get 16 possibilities.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
  • koudelad
    koudelad over 4 years ago in reply to makerkaren

    At 5:04 at the video, you adjust the code to 4 bit resolution of the DAC. However, at 5:20, there are only 4 voltage levels. That is where I would expect to see 16 voltage levels, as you described.

    image

     

    At 5:29 the code is adjusted to 6 bits, which should produce 64 different voltage level, however, I can only see 16.

    image

     

    Or maybe I got something wrong...

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • makerkaren
    makerkaren over 3 years ago in reply to koudelad

    That's.....a really good point. I'm not really sure. I'd have to have someone that knows Arduino code better than I, take a look at the code and see if there's anything that is reducing the visual output. But yeah, you're right. It looks like there are fewer steps than the full resolution each time. Hmmmmm.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Hillary
    Hillary over 2 years ago in reply to makerkaren

    Hello! I actually tried this project and had so much fun testing it. I managed modified your code a little, you can check it out on my github: https://github.com/HillaryatGitHub/Multiple-Bit-DAC. Again thank you so much for making such an in depth video Sparkles

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube