# How does this biasing work with the two 100 ohm resistors and the 5V to create only positive voltages? The 5 V is a pin in the Arduino Uno and the 100M Ohm is the input impedance to the analog pin in the Arduino.

R3 and R4 form a voltage divider across the Arduino's 5 volt supply. The point between R3 and R4 will be 2.5 volts. (Incidently, the 100 Ohm values shown make a very heavy load on the Arduino 5 volt regulator - I'd probably use 10K for those resistors.)

Since the bottom terminal of the transformer is connected to that 2.5 volt point, the junction of R1 and R2 will vary around that 2.5 volt potential.

The two 100 Ohm resistors would draw 25 mA from the Arduino's power supply, which may be an excessive load for the arduino's 5 volt regulator. Increasing the resistors to 1K would reduce the draw to 2.5 mA, and 10K would reduce it to .25 mA. If the signal is going into a 100 Megohm load, the current drawn from the divider is insignificant, even with 10K resistors (although I'd add an 0.1 uF capacitor between the 2.5 volt point and Ground, just to remove any transient variations.)

• Maybe 1k ~ 3k would be my preference, with a hand full of mu's (microfarads). But that may be flavour, though the UNO does definitely not have an aparent 100MOhm input impedence – Asmyldof Oct 11 '16 at 0:18
• Agree with Asmyldof - 10k seems a bit high to me because that voltage divider forms part of the source impedance driving the analog input. – brhans Oct 11 '16 at 11:09
• @Peter Bennett the 5 V pin in the Arduino is DC voltage, correct? – user6132277 Nov 19 '16 at 0:25
• @user6132277: Yes, the 5Volt pin is DC. – Peter Bennett Nov 19 '16 at 0:48
• @Peter Bennett I guess I just don't understand how a DC voltage source and AC voltage source from the transformer can be combined like that. How does the 2.5 V override the AC voltage at the junction of R1 and R2? – user6132277 Nov 20 '16 at 1:49

Are you attempting to detect AC mains only create a zero cross detector? An optocoupler would be smaller\cheaper\better or you can even use a single 1Mohm resistor directly to mains 120V.

AVR182: Zero Cross Detector http://tinyurl.com/jcuk2bt

• In addition to using a link leading to an unknown page, this does not answer the question. You can leave a comment on the question if you wish to comment on a question. – pipe Oct 11 '16 at 3:56
• Directly connecting Arduino to mains 120V would be a big risk. Always you some form of galvanic isolations (transformer or optocoupler) unless you really know what you are doing and are aware of all risks and their mitigations. – Marki555 Oct 11 '16 at 8:31
• This links to the Atmel appnote in the description. The link is enormous hence the tinyurl but I understand if you are apprehensive to click simply google AVR182. The appnote explains, in great detail, the applications, pro's and con's of using this circuit. It does lack electrical isolation however it has a lot of benefits and is sanctioned by Atmel. – Neelix Oct 11 '16 at 14:04