reed frequency meter simulator

fernando_g

Senior Member
I'm building an emulator for an AC powerline reed frequency meter.

If you have not seen such a meter, please see the attached photo.

Essentially, an powerline electromagnet excites a line of reeds, which have slightly different resonant frequencies. The reed whose resonant frequency is closest to the the actual AC frequency, will have a very wide amplitude, whereas the immediate reeds will show a smaller amplitude, and the rest of the reeds are quiet, as shown in the image.

I've the software all fleshed out and operational, but my question to you, the best and brightest, is how to actually simulate the reed display.
I attempted with a 16 column LCD but the results were...naaah. Not aesthetically pleasing.

My next though will be with LEDs, there are many nice looking LED bargraphs cheaply available.
To show the resonant frequency, I would fully light up the corresponding LED, and dim the two adjacent LEDs, via PWM.
And there lies my puzzle...how to achieve that?
I originally used three external 4 to 16 (CD4514) decoders . One of them drives the LED at full brightness, the other two thru PWM, drive the dimmed ones.

But the solution is very kludgy and enormous...I don't like it at all. Not at all.

???????????
 

Attachments

hippy

Technical Support
Staff member
Can you clarify how many LED's there are and how they are arranged; is it a triple row with above and below PWM'd or a single row with left and right of the one selected ?

You can bit-bang PWM on any pin so a PICAXE with enough outputs should be enough to do what you want.
 

AllyCat

Senior Member
Hi,

You haven't said anything about the PICaxe, but for mains frequency you prresumably need about +/- 0.1% which suggests an external resonator, so an X-series with plenty of (spare) pins?

I would fully light up the corresponding LED, and dim the two adjacent LEDs, via PWM.
Do you mean one LED is to be "bright", the adjacent pair "dim" and the others off? As hippy says, easy with "software" PWM if the PICaxe hasn't much else to do. Sometimes a candidate for Charlieplexing, but presumably the "bargraph" has a Common Anode or Cathode?

However, if you want some lateral thinking (and an analogue solution :) ), how about bleeding "dim" currents to all the LEDs (or perhaps even using the internal weak pullup resistors, if the LEDs are reasonably efficient) and then the associated PICaxe pins "brighten" the central LED and "short out" all the LEDs that are required to be off.

Cheers, Alan.
 

hippy

Technical Support
Staff member
I'd never heard or a reed frequency meter but the idea's quite neat -

http://www.ibiblio.org/kuphaldt/electricCircuits/AC/AC_12.html#xtocid99201

I'm surprised it didn't work well with an LCD because I've done multi-channel vertical bar graphs with LCD and they look quite good, probably even better with OLED.

Though not to the spec of a reed meter simulation, I have personally always liked the UK frequency meter on the page below. That ( excluding the digital readout ) should be pretty easy to do with a servo or an analogue meter.

http://www.dynamicdemand.co.uk/grid.htm

On the determination of mains frequency, if you are doing that; a 1Hz change is about 408us, so using a PULSIN that should give plenty of resolution. It's then a question of how accurate as AllyCat notes.
 

geoff07

Senior Member
I always thought they made sure there were always enough cycles in a day to keep the clocks with synchronous motors on time. As I type this, here in the UK we are about 0.1% fast, if that link is accurate. So presumably there has to be a compensating period when the grid is slow. That must muck up the interpretation. Perhaps it is different in the 60Hz world.
 

Pongo

Senior Member
Very common instrument on generators.

If you want a quasi-analog display on an LED bargraph, let's suppose it's common anode and turned on by grounding the cathodes via resistors, try adding resistors between the cathodes. The grounded cathode LED will be bright and the adjacent leds will be illuminated but much less brightly. You'll have to play with the resistor values to get the desired effect.
 

Hydroid

Senior Member
So presumably there has to be a compensating period when the grid is slow. That must muck up the interpretation. Perhaps it is different in the 60Hz world.
No, it' the same here in 60Hz North America. The grid usually loses a little bit of time during the day when demand is high and it's made up for at night when demand is low by over generation. Can't really see it without specialized instrumentation. When I was a powerplant control room operator (retired now.. Much better job!), we could see it on the 'ACE' meter (Area Control Error) which was usually -ve during the day and +ve at night when extra (above grid load) generation was making up for the daytime. We even had a few of those reed frequency meters. I always thought they were neat!

Regards, John.
 

rq3

Senior Member
My next though will be with LEDs, there are many nice looking LED bargraphs cheaply available.
To show the resonant frequency, I would fully light up the corresponding LED, and dim the two adjacent LEDs, via PWM.
And there lies my puzzle...how to achieve that?
I originally used three external 4 to 16 (CD4514) decoders . One of them drives the LED at full brightness, the other two thru PWM, drive the dimmed ones.

But the solution is very kludgy and enormous...I don't like it at all. Not at all.

???????????
How about strobing the led's sequentially at the line frequency, and then vibrating the entire display at exactly 50 Hz. An LED Reed meter! Sorry,
it doesn't help you, but I couldn't resist (and it would look cool)!
 

fernando_g

Senior Member
Thanks for all your replies.
Yes, this is for a stand alone gasoline-powered generator. The AC grid itself is very stable. It has to be, otherwise, one would not be able to interconnect all the power stations. Though this is changing with high voltage DC links, but this is another story.

I was attempting to use 15 segments on a single row.... One segment for exactly 60 Hz, and seven for each side. And indeed, I was considering a Picaxe with an external resonator.

"You can bit-bang PWM on any pin so a PICAXE with enough outputs should be enough to do what you want."

By that, do you mean a loop similar to:

do
high C.1
low C.1
loop

"However, if you want some lateral thinking (and an analogue solution ), how about bleeding "dim" currents to all the LEDs (or perhaps even using the internal weak pullup resistors, if the LEDs are reasonably efficient) and then the associated PICaxe pins "brighten" the central LED and "short out" all the LEDs that are required to be off."

Excellent out of the box idea, let me try that one.
 

fernando_g

Senior Member
I tried the "analog approach" and it looks great! A high output lights up at full brilliance, a low output lights up a low brilliance, and a high impedance shuts off the LED.

So I think I'm going that way.

So my question to y'all is would be: the procedure to execute this function would be, for instance:

let dirsB = %00000111 'to disable all the LEDs with except of 0,1,2
let pinsB = %00000010 ' to have LEDs 0 and 2 dim, and led 1 bright

or should it be better

let dirsB = %00000111 'to disable all the LEDs with except of 0,1,2
low B.0: high B.1: low B.2 ' to have LEDs 0 and 2 dim, and led 1 bright
 

hippy

Technical Support
Staff member
The dirsB/pinsB looks neater and likely easier to write and debug, and both achieve the same result.

And that better suits setting each using data from a LOOKUP command.
 

hippy

Technical Support
Staff member
I always thought they made sure there were always enough cycles in a day to keep the clocks with synchronous motors on time. As I type this, here in the UK we are about 0.1% fast, if that link is accurate. So presumably there has to be a compensating period when the grid is slow.
Which, if one believes the conspiracy theorists, allows businesses to get more than 8 hours a day work out of us for a 9-5 job :)
 

Dippy

Moderator
Well, I don't know who is right or wrong but the dynamic demand link doesn't agree with the (UK) National Grid's own '15 second update' semi-rolling graph on http://www2.nationalgrid.com/uk/services/balancing-services/frequency-response/

You will also notice that they are obliged to keep to 50.00 +/- 1%. (Someone told me it was averaged daily but I'm not sure).

This, of course, doesn't explain Hippy's 9-5 hours :)
I don't know how much time is subtracted for lunch-break; assume 30 minutes.
So, that's 8 x 5 - (5 x 0.5) = 37.5 hours.
Minus 1% for his AC clock = 37.1 hours.

Ah, I'd better not moan as my working week is 37 hours.

Oh, hard luck JW - you may work longer but I bet your weather is nicer ;)
It's a pity you have to miss it by going to work (haha).
I can sympathise; stuck in an office looking at the sun out of the window, with the A/C blowing all the bugs around from the brave sniffling types who bring their diseases to work....lovely.
 

neiltechspec

Senior Member
Interesting stuff !.

My Solar Inverter doesn't agree with either of them. But I guess the readout from that may not be that accurate.

But it does tend more to follow the same trends as the Dynamic Demand one rather than the National Grid version.

Neil.
 

fernando_g

Senior Member
The dirsB/pinsB looks neater and likely easier to write and debug, and both achieve the same result.

And that better suits setting each using data from a LOOKUP command.
Thanks hippy, I'll follow that approach.
I'm still experimenting and tweaking. As soon as I have a working project, I'll post it.
 

fernando_g

Senior Member
Found the following bargraph display, which fits my bill exactly:

untitled.JPG

For exactly 60 Hz, both center green LEDs would light up. For 59 and 61 Hz, either the left or right pair (respectively) of yellow LEDs. And finally, for 58 or 62 Hz it would be the red pairs.

For half Hertz representation, i.e. 59.5 Hz, the left green and its adjacent yellow LED would light up. Similar adjacent color pairs would light up for other half frequencies.

Not exactly a reed emulator I originally had in mind, but one could at a glance immediately tell whether the generator is running slow, fast, or exactly at the frequency.
And coding should be a piece of cake.
 

Pongo

Senior Member
For exactly 60 Hz, both center green LEDs would light up. For 59 and 61 Hz, either the left or right pair (respectively) of yellow LEDs. And finally, for 58 or 62 Hz it would be the red pairs.

For half Hertz representation, i.e. 59.5 Hz, the left green and its adjacent yellow LED would light up. Similar adjacent color pairs would light up for other half frequencies.
Seems like you have a pretty high expectation for frequency stability, what kind of generator is this?
 

papaof2

Senior Member
I have a couple of well-used generators, one an 1850 watt Coleman (perhaps 15-20 years old) and the other a 5500 watt Generac (about 10 years old). Both are usually within +/-1Hz of 60Hz as the load varies from nothing to 1500 watts (checked with two different Kill-a-Watt units). Starting the fridge or freezer does get a bigger dip, but both return to within 59-61HZ. The 1500 watt load is a 500 watt halogen lamp (very low resistance when cold, so excellent for checking the surge capability of a generator) and a 1000 watt heater (simple basic resistive load that any generator should handle).

Why two generators? For 120 volts only and smaller loads, the Coleman uses less gas, is slightly less noisy and is easier to move from the shed to wherever it's needed. If I need 240 volts or have bigger loads (fridge, freezer and microwave simultaneously), the Generac can handle it. I also got a deal on the Generac because the seller couldn't keep it running when he tried to demonstrate how well it ran - $80 isn't a bad price for a used 5500 watt generator that only needed to have the bent carb linkage fixed ;-)

There's also a 3000 watt generator (bought new last year for a good price when the store discontinued the model) which stays within a few tenths of 60Hz from no load to 1500 watts. It's 120 volts only, but that's all we've used 99% of the times a generator was needed.
 

bluejets

Senior Member
As far as I am aware, frequency is directly related to speed.
So I guess it depends how long after the load connects and speed stabilizes that one looks at the frequency meter.
Never seen small generators with a 1 hz instantaneous speed compensation.
 

Pongo

Senior Member
I also have a Generac 5500 watt, I'll have to test the frequency, I had no idea it would be that good.
 

papaof2

Senior Member
If you apply a load near the generator's maximum capability, it could take several seconds to stabilize - more likely with newer and lighter units. Those with lots of iron benefit from the inertia of spinning mass.

If you want very close frequency stability, be prepared to part with additional funds - the better inverter generators have very stable frequency. Or you can buy a 20KW CAT diesel generator that's designed as a prime power source - there's enough rotating mass to keep the frequency very stable with changes in load ;-)
 

fernando_g

Senior Member
If you apply a load near the generator's maximum capability, it could take several seconds to stabilize - more likely with newer and lighter units.
That is precisely what I would like to check.
I don't have an urgent requirement for a standby generator, but I'm in hurricane country, and when one hits every couple of years, power does go out for a while.

Therefore, I don't want to spend a lot of money and have been looking for an used one. An acquaintance has offered me one, but the instruments were shattered during an impact.
I could just go and purchase some meters, but hey, I see it as an opportunity to Picaxe it.
 

papaof2

Senior Member
This item on ebay
http://www.ebay.com/itm/111298318869
covers everything - voltage, frequency, run-time for $15US

Run-time is needed because service (oil change, etc) is based on hours of use. Not a concern when you only run it a few minutes each month for testing, but very important when you're using the generator as your primary power source.
 

fernando_g

Senior Member
Sigh... There is even one which includes the current transformer for US$19
Sometimes is a little depressing that one can buy a complete unit, for half the price of the raw components.

But the learning experience is not there....so I think I'll still give it a try.
 

Jeremy Leach

Senior Member
I know this is an old thread but I saw this reed frequency meter yesterday at a local Steam Rally and couldn't help checking the forum to see if anyone had ever thought about this type of meter in relation to PICAXEs :). Such a simple but clever approach to measuring frequency and interesting to see in action especially when harmonics kick in. So I thought I'd add this photo if anyone ever stumbles on it.
Frahm.JPG
 

premelec

Senior Member
There are some reed types surplus e.g. http://www.ebay.com/itm/JBT-Instruments-30-FHXX-Reed-Type-Frequency-Meter-New-Surplus-in-Original-Box-/371418683852?hash=item567a4759cc - It's also noteworthy that you can make your own with an electromagnet and steel [magnetic stainless would last best ] - the tuning is done like one tunes a reed organ or accordian. Frequency can be moved up or down by filing, leading, shortening etc... It used to be an RC model decode method for tones as well - a bunch of reeds to hit contacts when they resonated. Mechanical filters have also been used for high frequencies and quartz or other resonators are used... That instrument shown is certainly a classic from perhaps 80 years ago - a beauty!
 

Pongo

Senior Member
@Jeremy - That certainly is a beautiful old instrument.

I found this not quite so nice old one on ebay. It has an unusual scale covering 55 to 75 Hz with a center frequency of 65 Hz. Doesn't make much sense for monitoring 60 Hz, and I don't know of any system using 65 Hz :confused:
 

Jeremy Leach

Senior Member
Nice ! What I like is that it's using a simple natural property without masses of circuitry or processing. I never knew that about RC models either Premelec.
 
Top