Scoping Mains - Page 1
Forum section: electronics / beginners

author: waoj
author_rank: Contributor
timestamp: August 20, 2022, 11:31:12 pm
content: I have a UPS battery backup that occasionally thinks there is a power issue and goes to battery and comes right back a second later. Nothing else in the house loses power. non-ups computers don't reboot. None of my VHS players start blinking, yet the UPS sends me an email telling me how lucky I am to have it because it saved the day......I'd like to verify the UPS next time it trips out by running a continuous recording of the waveform of power going into the UPS, and then when I get that email I'll stop recording, and go back to the moment in question.I have a 4CH USB scope and a pc I can dedicate to this task. If I have to I'll set it up to record for 59 minutes every hour to a new file, and delete all files older than a day. I want to catch this!I'm pretty sure I can take care of the software part of this problem. But as for electrically connecting mains into a scope channel, I don't want to spend too much, and don't want to burn down the house. But mostly don't want to spend too much.What's the cheapest way I could plausibly sample mains to a scope input without needing batteries, (since this will need to be running for weeks to months). I was reading something about using a resistive divider. essentially if you had a 100ft long space heater element and measured one foot from neutral you'd see 1% of the voltage.I also saw one probe option in my price range (<$50 each), but it doesn't look any different than a normal probe so I was thinking this might just be a bunk listing on amazon. And I also don't know that "a probe" is what I need. I'm not going to sit down there and hold it all day. So I would be what, soldering a wire to the tip of it?I imagine I'd take male and female nema 5-15 connectors and 12 inches of wire between them, with an extra wire to one of the hot lugs as my test point.Would it work just as well to run the hot conductor through a toroid and wrap some turns of magnet wire around it and connect the ends of the magnet wire to a scope BNC port? Basically I'd be creating a CT then... I wouldn't think that could measure voltage. But the sine wave should show up in measuring current right? And it'd be a hell of a lot safer and wouldn't need the same isolation to avoid things blowing up....I'd have to be absolutely confident in timing though. because the UPS going to battery would sure show up on that CT as a major deviation from the norm.Maybe use a scope channel to probe an LED that I would blink a time-code in binary, visible on camera as well.I'm also kind of curious to compare measurements from different times of day to see just how far off the frequency gets from 60hz exactly. Yeah. I could read about it. But I would enjoy being able to make an actual measurement myself!What's the best way to go about this?

author: bdunham7
author_rank: Super Contributor
timestamp: August 20, 2022, 11:50:35 pm
content: You simply need a small transformer. If you have a collection of old wall-warts, you may find one that has an AC output and that will work as an AC wall-wart is nothing but a transformer, no rectifiers.

author: basinstreetdesign
author_rank: Frequent Contributor
timestamp: August 21, 2022, 04:10:05 am
content: Quote from: bdunham7 on August 20, 2022, 11:50:35 pmYes. This is the way. A small transformer has quite a wide bandwidth (10's of KHz) so will transmit the waveform pretty faithfully during any anomaly. And since it will have a low voltage, isolated secondary it will be quite safe to use.

author: waoj
author_rank: Contributor
timestamp: August 21, 2022, 12:39:26 pm
content: doh! that's pretty easy! And yeah I'm sure I have a few of those sitting in a bin. I definitely have some 24vac ones as those are used in north america for doorbell, irrigation, and security systems.Transformers don't have any sort of "capacitance" to them do they? They don't continue oscillating when the input drops do they? I do know that DC wall warts take a second to go off when unplugged, but I assume that's because of their smoothing capacitors, which a lone AC transformer would not have of course.Actually, I have a cat5e cable already running to the doorbell chime/transformer enclosure in my house, so I could maybe attach the monitor to that, though it'd be a different circuit than the UPS, and possibly on the other Line of my split-phase electrical service.

author: ledtester
author_rank: Super Contributor
timestamp: August 21, 2022, 02:04:30 pm
content: Once you hook up the transformer it seems you should be able to use a computer's microphone input for this purpose after attenuating it. You can sample at 48K which should be enough to catch any glitches.Earlier this year I actually set up a continuous recording on a laptop to catch strange noises in my basement. I used the arecord program on Linux -- it has the ability to automatically start recording to a new file every so often.

author: SmallCog
author_rank: Frequent Contributor
timestamp: August 21, 2022, 10:02:38 pm
content: Is it the same time every day?Maybe it's seeing a ripple control signal (if it's used in your area)

author: waoj
author_rank: Contributor
timestamp: August 22, 2022, 12:25:14 am
content: It's about once a month. random days and times. I exported my logs to a spreadsheet and will start making notes of the major appliances status and who is where in the house next time it happens.I can't believe I never thought of using a microphone input to record this either! But what is a microphone, but an A to D, a scope of sorts. clever! I think I'd want line-in for a powered signal. Isn't the mic input intended for an unpowered microphone, whereas I want to record an attenuated power signal. I'll need to figure out what voltage level is okay for the line-in on a usb sound card. I have a couple for some reason.I also have an OWON "virtual" oscilliscope. usb, ethernet, and wifi output. I'm was planning to use ethernet or wifi, so I could log the data on a server I keep in a datacenter.

author: MrAl
author_rank: Super Contributor
timestamp: August 22, 2022, 06:40:28 am
content: Hi,I use a small AC wall wart myself but if you dont have an AC one you can disassemble an older non regulated DC wall wart by carefully cutting the case off with a Dremel. The internal parts consist of a transformer, some rectifiers, and a large value filter capacitor. You can find the input to the diodes an tap off of that, or even remove the rectifiers and cap if you like. You can epoxy it back together.Again it has to be an older type DC wall wart a non regulated type because the more modern regulated type have different parts inside that work in a very different way. It may be possible to tap off the secondary of the high frequency transformer but the regulating part of it changes the voltage out of the transformer so that would not work unless you could find a way to inhibit the regulation.You could also use a opto coupler although you would have to calibrate it first, which isnt that hard to do really. That way you could also use any DC wall wart and you get fast response.Iron core power transformers do distort the waveform to some degree but you should be able to see transitions without too much trouble.One DC wall wart i cut apart because there was something loose inside you could hear rattling when you moved the wall wart around. It was kind of fun to take apart with the Dremel. I used a special cutter i made from a Dremel type saw blade by grinding down the big teeth until it was just a thin, round disc. It melts it's way through the plastic so no dust particulates and it's fast acting. If you use a saw blade with teeth it keeps grabbing and is kind of dangerous to do that way.

author: Robert763
author_rank: Super Contributor
timestamp: August 24, 2022, 07:24:39 pm
content: An AC wall wart is a good safe option.One thing that is not obvious is that the core of a power transformer is close to saturation when the secondary is unloaded. This can distort the output waveform. Applying a resistive load on the secondary of about 5-10% of the transformer rating will reduce the distortion.