Any cheap ideas on monitoring 120 VAC power, and recording date/time of brownouts, blackouts, etc.?
Sure they're commercially available, but I'm looking for a cheap homebrew alternative, and battery powered. 24 hour monitoring capacity.
Line monitor
Line monitor
WA2RBA
- Chris Smith
- Posts: 4325
- Joined: Tue Dec 04, 2001 1:01 am
- Location: Bieber Ca.
Re: Line monitor
A Rotating paper drum like a seismograph, and a spring loaded solenoid that is energized by the power to remain straight with a pencil that drops off the line when the power goes out marking the 24 hour drum at that point. Power on equals a straight line, While the power off moves the line slightly off center like an o-scope reading.
As the drum rotates each day, the marker arm moves to a new line in a geared linear motion to make a new line each day. The gear ratio sets this distance between lines.
Chart recorders they are called, but a plotter head and clock motor with a linear drive at 90 degrees should do the trick
As the drum rotates each day, the marker arm moves to a new line in a geared linear motion to make a new line each day. The gear ratio sets this distance between lines.
Chart recorders they are called, but a plotter head and clock motor with a linear drive at 90 degrees should do the trick
Re: Line monitor
you could use a spring escapement to turn the drum when power is out. rube goldberg would be proud...
I'd avoid anything mechanical and instead go for a uC based solution. If you get one with enough eeprom, you should be able to store a fair number of events. I'd use a uC with an ADC to determine voltage level via an analog opto isolator. Serial I/O to get the data out. You can use line power when it's there and a battery when its not. Use a resistor to trickle up the battery when power is on. It could probably be done for less than $10. For a deluxe model, I'd add more eeprom (for more event storage) and an RTC. That might push the cost to $15.
I've been playing around with a design for this using a PIC16F88, DS1302 and a Serial EEPROM. An LED gets lit if there was a power event that hasn't been acknowledged.
Phil
I'd avoid anything mechanical and instead go for a uC based solution. If you get one with enough eeprom, you should be able to store a fair number of events. I'd use a uC with an ADC to determine voltage level via an analog opto isolator. Serial I/O to get the data out. You can use line power when it's there and a battery when its not. Use a resistor to trickle up the battery when power is on. It could probably be done for less than $10. For a deluxe model, I'd add more eeprom (for more event storage) and an RTC. That might push the cost to $15.
I've been playing around with a design for this using a PIC16F88, DS1302 and a Serial EEPROM. An LED gets lit if there was a power event that hasn't been acknowledged.
Phil
Re: Line monitor
By the time you fiddle around trying to make
something that will probably resemble a Dogs
Breakfast, when finish anyway.
Just get the cheapest Data Logger you can find
and a small transformer, monitor the output.
You could look at the Dallas/Maxim range of
Logger / Temperature logger / Power logger, etc
chips. Theres a heap of stuff they make just for
this purpose, they have internal clock/date onboard.
I'm sure someone has programming circuits and
simple software you could use.
something that will probably resemble a Dogs
Breakfast, when finish anyway.
Just get the cheapest Data Logger you can find
and a small transformer, monitor the output.
You could look at the Dallas/Maxim range of
Logger / Temperature logger / Power logger, etc
chips. Theres a heap of stuff they make just for
this purpose, they have internal clock/date onboard.
I'm sure someone has programming circuits and
simple software you could use.
Re: Line monitor
Appreciate the inputs! I'm surprised there is no off-the-shelf box to do this! It does seem like a uC application, and like you say philba, only a few bucks!
To conserve memory, could the uC log only events outside the normal 110-125 VAC? And instead of self-contained, could it download to a thumb drive, or PC via USB or RS232?
To conserve memory, could the uC log only events outside the normal 110-125 VAC? And instead of self-contained, could it download to a thumb drive, or PC via USB or RS232?
WA2RBA
Re: Line monitor
microchip has an appnote that explains how to set up a USB enabled 18f series uC so that MS Windows detects it as a mass storage device. You could write your code on a 18f2550 to monitor the line and then, when you're ready to see what happened, simply plug the circuit into your PCs usb board and download the data.
You'd have to make sure you kept your data in some FAT compatible format I think, but I suspect that just writting a CSV/text file wouldn't be hard.
You'd have to make sure you kept your data in some FAT compatible format I think, but I suspect that just writting a CSV/text file wouldn't be hard.
- Chris Smith
- Posts: 4325
- Joined: Tue Dec 04, 2001 1:01 am
- Location: Bieber Ca.
Re: Line monitor
Id stick with the reliable, same as the USGS and their drum. They us the mechanical for a good reason also.
Re: Line monitor
Yeah, that's what I was thinking. Create a record format that looks like (time, date, event) Event would be one of no-power, brown-out (several levels?) or power-good. When the power goes away, record no-power, when it comes back, record power-good. There are lots of ways of reducing that amount of memory the record takes up. However, a reasonably big serial eeprom is pretty cheap - a 16KByte serial eeprom costs a couple of dollars, comes in an 8 pin package and is easy to interface to via SPI. You could store several thousand events easily. I'd go that route.Originally posted by jwax:
Appreciate the inputs! I'm surprised there is no off-the-shelf box to do this! It does seem like a uC application, and like you say philba, only a few bucks!
To conserve memory, could the uC log only events outside the normal 110-125 VAC? And instead of self-contained, could it download to a thumb drive, or PC via USB or RS232?
Downloading via serial or usb would be fairly easy. Making a fat filesystem could simplify the PC side of the problem. However, that does make the PICs job more complex. I was thinking of keeping the data as human readable text so I could just read it from the com port and directly drop it into a spreadsheet or database. I think one could create a macro that would do it. no muss, no fuss. A simple VB or C app could do this as well.
Re: Line monitor
philba, please kindly keep us posted of your progress! It sounds marketable to me!
John
John
WA2RBA
Re: Line monitor
Single phase or three phase?
As someone that is responsible for historizing about 4 gigs of data every month (and that's at only one of the locations) via a program called Wonderware... I would like to make a point or two...
Once a second is probably a good "collect" frequency. There are 86,400 seconds in a day. Depending on the size of each piece of data storage could be a problem real quick (I'm thinking a 16 bit integer for each (voltage, date, and time) so 3 words x 2 bytes = 6 bytes of data every second = over .5 meg per day) The point is that normal doesn't need to be monitored. Just deviations from normal. You can save a lot of "space" by deciding what is important and what isn't.
The paper and drum method is fine if you own your own paper company. The USGS uses paper to BACK UP the electronic data. In this case I doubt if the world will end if he loses his data.
Input device, monitored by a serial connection to a data logger which is downloaded at least daily to a PC is a good way to go.
These guys (Advanced Google search for "power line data logger") have some cool tools:
Self-Contained By-Pass Meter Base Single Phase Recorder
Single Phase Plug In Scanner
As someone that is responsible for historizing about 4 gigs of data every month (and that's at only one of the locations) via a program called Wonderware... I would like to make a point or two...
Once a second is probably a good "collect" frequency. There are 86,400 seconds in a day. Depending on the size of each piece of data storage could be a problem real quick (I'm thinking a 16 bit integer for each (voltage, date, and time) so 3 words x 2 bytes = 6 bytes of data every second = over .5 meg per day) The point is that normal doesn't need to be monitored. Just deviations from normal. You can save a lot of "space" by deciding what is important and what isn't.
The paper and drum method is fine if you own your own paper company. The USGS uses paper to BACK UP the electronic data. In this case I doubt if the world will end if he loses his data.
Input device, monitored by a serial connection to a data logger which is downloaded at least daily to a PC is a good way to go.
These guys (Advanced Google search for "power line data logger") have some cool tools:
Self-Contained By-Pass Meter Base Single Phase Recorder
Single Phase Plug In Scanner
"If the nucleus of a sodium atom were the size of a golf ball, the outermost electrons would lie 2 miles away. Atoms, like galaxies, are cathedrals of cavernous space. Matter is energy."
Re: Line monitor
Funny you should ask. I've got the basic design done for a PIC16F88 based system. I'm struggling with the desire for lots of features vs the need to keep it simple. This version keeps it simple. Features:Originally posted by jwax:
philba, please kindly keep us posted of your progress! It sounds marketable to me!
John
- RS232 or Ethernet connection
- EEPROM for logging
- RTC for time stamping logged items
- 2 sense inputs (ADC) with +5V and GND
What's left to do:
- a lot of fussing over the details (these ain't final by a long shot)
- figure out actual sensors
- power leds
- determine if a Vref for the ADC is really needed. I'll probably add it in - it could be omitted at build-time if not needed.
- battery backed power supply. Not yet designed. I have a pretty good idea how to do it but haven't gotten to that yet. I want to integrate power sensing into the PS and keep 120/240 vac off the logging board.
- fish or cut bait on the xport NIC. It sucks a lot of power and lantronix doesn't have a virtual serial driver for linux. The power consumption issue is a big one for power outtages. it can be handled but it is just more work. I sure wish it had a power-down pin.
- board layout
I have tested out the circuit pieces and they work pretty well seperately. Of course, integration testing needs to get done.
However, I'm probably going to move to a bigger PIC so i can add a bunch of features like:
- status LEDs (event indication, error indication)
- MMC/SD interface
- LCD display
- control buttons
- if I keep the xport, network signaling of power events and perhaps a "heart beat" message.
I think a pic16F876 might work ok though I'm also considering the 18F series.
Logger board BOM looks like about $15 for the rs232 version.
Anyway:
RS232 Version
Ethernet Version
I've copyrighted these diagrams but people are free to use them for non-commercial purposes. enjoy
Phil
Re: Line monitor
Thanks NE5U- that "Plug-In Scanner" is much like what I was looking for.
The $1000 price is a bit out of range, however.
Like I said philba, keep us posted!
<small>[ November 30, 2005, 05:24 PM: Message edited by: jwax ]</small>
The $1000 price is a bit out of range, however.
Like I said philba, keep us posted!
<small>[ November 30, 2005, 05:24 PM: Message edited by: jwax ]</small>
WA2RBA
Who is online
Users browsing this forum: No registered users and 61 guests