Go Down

Topic: AC (-2.5v to 2.5v) to DC (0v to 5v)? (Read 608 times) previous topic - next topic

MrPenguin9

Hello, I have a really simple question.  I want to read an AC voltage (from -2.5v to 2.5v) from an arduino input pin.  I know that I cannot just plug it into the pin since the negative voltage will most likely damage the board.  I tried googling and read that a have to shift the voltage so that 0v becomes 2.5v.  I read that I have to use 2 resistors and a capacitor but I don't know what values to use and how to arrange the schematic.

Thanks in advance!!
Tyler

jremington

The question might be simple, but the answer depends on a number of details. In some cases you can do it with a capacitor and two resistors, but there are other approaches. What is the AC frequency? What is the nature of the AC source (is it a transformer)?

CrossRoads

Two 100K resistors, wire AC to cap to junction of resistors, to Arduino input.
Resistors make a 2.5V level, cap lets your AC signal wiggle the level up & down.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

CrossRoads

Basically making a high pass filter with the cap & resistor
http://sim.okawa-denshi.jp/en/CRtool.php
Can play with cap value to see how much the signal will be affected.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Go Up