September 18, 2012

Simple Arduino DAC using internal pull-up resistors

 Next in our series of creating your own digital-to-analogue converters comes a simple yet somewhat genius idea from Arduino forum member 'raalst'. With the knowledge of how an R/2R resistor ladder works to create reasonable analogue output, he has used a clever way of harnessing the internal pull-up resistors inside the microcontroller to act as part of the ladder, thereby minimising the external parts required. However as they internal resistors can vary in value, a bit of testing is required to find ones that are close to equal. From that point some bitwise arithmetic to control the ports and an external resistor leaves you with a basic DAC, for example:


Note that the output signal will be quite weak, and requires amplification - a simple op-amp circuit would suffice. For more information and discussion about this method, visit the Arduino forum. And we're on twitter and Google+, so follow us for news and product updates as well.


When making your own DAC, you'll need a protoshield to mount the external circuitry. In doing so, consider our range of ProtoShields. From the tiny LeoStick to the Mega range, we offer a complete range for you to work with.

Leave a comment

Comments have to be approved before showing up.