NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Sensors, Actuators, and Robotics » Fq meter Ac Mains

March 23, 2014
by leedawg
leedawg's Avatar

Hey guys well the few that are still here. Ive been thinking about a project for sometime and just have not had time to start on it however thought I might get some opinons on the best way to go about doing it.

I have an old Diesel Generator that i would like to build a fq meter for so that I can dial it into 60 hz line power for running loads on the home when the main utility service is out for whatever reason. i know I could buy one to do this but thought it would be more fun to build a micro project to do this with.

My question is what do you guys think would be the best way to measure the fq of the ac line power same as if you plugged into the wall of your house 120v at 60hz. I attempted the project about a year ago and used a 12 v transformer and then ran that through a half bridge rectifier to generate a pulsed DC signal and passed that through a voltage regulator and then fed that 5v pulsed dc to an infrared LED and put an infrared phototransister on the other side of the LED and fed that to one of the pins on the micro and set up a timer to count the pulses coming in. It sort of worked for verifying the 60hz from the wall but when I hooked it up to the generator I was getting eronous readings compared to my fluke multimeter.

There must be a better way to do this perhaps just some resistors to one of the micro pins directly from the ac mains. Would it be better to feed the signal into the ADC and have it just add to a varaiable each time the sine wave goes over a certain value?

thanks again for any thoughts.


March 23, 2014
by JimFrederickson
JimFrederickson's Avatar

I think you could just use the 12v transformer that you used before, a diode to block the negative 1/2 of the AC, and a voltage divider to get the voltage down to a range measurable by the AVR.

Choose high enough values for the voltage divider to get the current down to 1ma or less.

You could probably do away with the 12v tranformer all-together and just use a diode and a voltage divider. (Probably not quite as safe...)

March 23, 2014
JKITSON's Avatar

I would strongly recommend using the 12v transformer. This keeps the high voltage out of the micro circuit. The voltage divider & diode setup should work fine.

Jim Kitson

March 24, 2014
by Noter
Noter's Avatar

Probably could use atmel's zero cross detector circuit -

March 24, 2014
by leedawg
leedawg's Avatar

Thanks guys man fast response for a dead forum. I will have to play with trying to use something like the atmels zero cross detector circuit and I agree the transformer does seem a lot safer way to go.

June 08, 2014
by mongo
mongo's Avatar

A method I have used in the past is to use a capacitively coupled rectifier and a current limiting resistor along with a 5V Zener diode. It gives you a pretty much square wave at 60Hz.

Post a Reply

Please log in to post a reply.

Did you know that Morse code is a compact way to transmit human-readable text over binary channels? Learn more...