Arduino ADC on AC Vref

Hey guys.

Quick Q:

Can I use the built in ADC on my 328p to convert an AC voltage source?

Also I looked at the datasheet, theres no indication of signed support. So if this does work does that mean it will only be >=0 ?

BTW Ill be using an AC source less than 5v ( An current transducer for the mains :slight_smile: )

Thanks guys

The adc is positive voltage only. If you can rig the AC to be floating, you can superimpose it on a DC voltage to make it swing 0 - 5 volts like I do here :

All the gory details :

http://pluggy.is-a-geek.com/arduino/index.html

Lol.

Just trying to get hold of pluggy on his website. No email!

I dont get how you hooked up your ct to the arduino?

Please could you explain in more detail or a schematic if you have one.

Oh yeh. Ive seen this but you do something different

I should maybe link the Arduino site to my 'other' one that does have my email address :slight_smile:

Heres a quick knock up of the circuit for the Current transformer - not very elaborate.

A0 is analogue pin of your choice. Burden resistor to suit CT / amperage of mains circuit and voltage swing less than 5volts at maximum amperage and not to exceed VA rating of CT. Mine is 0.33 Ohms 3Watts with a 100/5 CT. The burden is VERY important, open circuit the CT can generate some frightening voltages.....

I gave up on trying to measure power usage with the CT, getting meaningful figures from the typical spikey mess coming out of the CT under low loads with dodgy power factors and switch mode computer power supplies is a nightmare. With pure resistive loads its a beautiful sine wave and the figures mean something. It can be done but not without some fancy silicon doing the maths and measuring. I use the 'other' sensor on the electric meter for power usage. Much easier and far more accurate, if you have a new fangled electic meter with a blinking led, its just a cheap phototransistor and a resistor job. :slight_smile:

Also I looked at the datasheet, theres no indication of signed support.

Yes there is under electrical characteristics:-

Operating Temperature.................................. -55°C to +125°C Storage Temperature ..................................... -65°C to +150°C
Voltage on any Pin except RESET with respect to Ground ................................-0.5V to VCC+0.5V
Voltage on RESET with respect to Ground......-0.5V to +13.0V
Maximum Operating Voltage ............................................ 6.0V
DC Current per I/O Pin ............................................... 40.0 mA DC Current VCC and GND Pins................................ 200.0 mA
Absolute Maximum Ratings*
DC Characteristics
*NOTICE:
Stresses beyond those listed under “Absolute Maximum Ratings” may cause permanent dam- age to the device. This is a stress rating only and functional operation of the device at these or other conditions beyond those indicated in the operational sections of this specification is not implied. Exposure to absolute maximum rating conditions for extended periods may affect device reliability.

I think I will count the blinks. Now I just got to make up a circuit to trigger an external interrupt.

Cheers guys

5v - Phototransistor - digital pin - 500k resistor - Gnd . Put it into Pin 2 or 3 have it trigger an interrupt. The only slight downside that at low loads the updates can be a long time apart......