# Rectifier Circuit Questions

Thread Starter

#### rainyday101

Joined Sep 24, 2009
50
I am using a variac to take 0 to 120 Vac and rectify it so that I can get 0 to 5 Vdc for an analog input to my Arduino. I have attached my circuit. The precision rectifer was tested (in Tina TI). With a 169 (peak to peak) Vac from the variac I get about 12 Vac on the secondary of the transformer. Rectified output is approximately 8 Vdc. I then use the voltage divider to get 5 Vdc with the variac at max. My question is, what will the loading effect of the analog input on the Arduino be? I can't find or don't know what I am looking at to see a spec for input resistance. The Arduino is an ATmega328. I assume that the loading would be minimal and I could compensate with the pot in the voltage divider. Is that a bad assumption or is there a better way of converting the 0 to 8 into 0 to 5? Also what do you think of my filter cap sizing. I get about 40mv of ripple. Is there a point of diminishing returns on filter cap sizing? A larger cap reduces the ripple more, but haves a longer charge time on power up.

#### Attachments

• 41 KB Views: 52

#### MrChips

Joined Oct 2, 2009
27,168
The voltage divider will work but it would be better to use a voltage clamp using a diode to +5V or a 5.1V zener diode to GND (assuming your Arduino input max is +5V).

#### ErnieM

Joined Apr 24, 2011
8,336
Is there a point of diminishing returns on filter cap sizing? A larger cap reduces the ripple more, but haves a longer charge time on power up.
That is the basic trade off, faster means more ripple, less ripple means slower.

You would have to go to a more involved acquisition scheme to speed things up. Something like a peak detector grabbing every peak. Or something that tells the contrller you are nearr the peak so it can grab multiple A2D readings and search the array for a peak value.

#### n1ist

Joined Mar 8, 2009
189
While it doesn't matter for the simulation, in reality you would want to keep the input neutral separate from the circuit ground...
/mike

#### crutschow

Joined Mar 14, 2008
30,821
A Variac has no isolation from the mains and should not be used for a voltage input to your Arduino without an added isolation transformer.

#### SgtWookie

Joined Jul 17, 2007
22,227
The Arduinos' ADC input needs to be low impedance, and the voltage divider on the output spoils that. You would be better off to put the divider on the output of the transformer instead. You could also add a voltage clamp on that opamps' noninverting input.