Monday 17 August 2015

arduino - Single supply op amp to convert 0-5VDC to +/-2VDC (microcontroller to line level)


I am generating a 0-5 volt sine wave using an arduino with a DAC. I would like to level shift this signal (DC bias?) by -2.5 volts and have a gain of .8, so that I end up with a line level sine wave.


Thus I am trying to design a single supply op amp with the following equation:


$$V_{\text{o}} = (V_{\text{i}}-2.5) \times 0.8$$


I found this white paper that is supposed to describe a way to do this but I'm having trouble following as I am new to op-amps.


https://www.eecs.umich.edu/courses/eecs452/Labs/circuit4.pdf


Does anyone know of a way to do this with a single op amp or IC?


The frequency range of 20Hz to 20KHz must be preserved.




Answer



You have the following situation:


Arduino with DAC generates 0V - +5V sin wave (2.5V +/- 2.5V).


The output should be -2V - +2V sin wave (0V +/- 2V).




POSSIBLE SOLUTIONS:


solution #1:


Arduino with DAC + C1 + R1 + R2 (all elements are in series).



  • C1 + R, where R = R1 + R2 is a high pass filter


  • R1 and R2 is a voltage divider with the gain of 0.8 V/V

  • can be used if DAC is able to source/sink enough current


.


solution #2:


Arduino with DAC + opamp buffer + C1 + R1 + R2 (all elements are in series).



  • use in case your DAC is not able to source/sink enough current


.



solution #3: Arduino with DAC + opamp subtractor + C1 + R1 (all elements are in series).



  • C1 + R1 is a high pass filter


A single opamp in a configuration of the subtractor takes care of your equation:


Vo = (Vi-2.5) * 0.8


subtractor


Look here: http://www.mtcmos.com/subtractor/ . You would like to use the configuration at the end of the article, that is, the left from this picture:


the solution


You set:




  • R2/R1 = 0.8

  • V1 = 2.5V

  • V2 = Vi


So you get:


Vo = 0.8 * (Vi - 2.5)


You may also refer to this e-book https://payhip.com/b/5Srt. The subtractor circuit explanation is a bit improved there (the core is the same), but you also find other configurations explained.


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...