Implementing a DAC (digital to analog converter)A simple way to implement a DAC is by using a R2R network which “converts” a binary pattern to an analog voltage. binary value (eg 8 bit: b0..b7) ==> R2R network ==> analog buffering ==> Analog value R2RTutorial on R2R network R2R network for doing a DAC Fast digital output on Arduino UNOIn this example we wil use an Arduino (UNO) wg´here we will use direct register access to speed up the DAC. See here: fast DAC direct register access for digital output on Arduino UNO Pin overview on ArduinosAn overview over pins and PORTs on AVR Arduios(uno,mega,…) Unipolar versus bipolar voltagesNormally a microcontroller is powered by 3,3 to 5V. So there is no negative voltages available. and Normally or often we want to have bipolar voltages on our DAC. An example: We have [0-5]V as output on our R2R network - Vdac We would like to have [-2.5 2.5]V as output - Vo So we just need to add -2.5V to Vdac: Vo = Vdac -2.5V
Voltage summing circuit.could be …
If you want to have more output then set gaing in backend opamp (Ra, Rb) NB: This is not a comprehensive guide but should give you some ideas. JEns |