Listening To Mains Power, Part 2

The electricity on the power grid wherever you live in the world will now universally come to you as AC. That is to say that it will oscillate between positive and negative polarity many times every second. The frequency of 50 or 60Hz just happens to be within the frequency range for human hearing. There’s a lot more than this fundamental frequency in the spectrum on the power lines though, and to hear those additional frequencies better you’ll have to do a little bit of signal processing.

We first featured this build back when it was still in its prototyping phase, but since then it’s been completed and used successfully to find a number of anomalies on the local power grid. It takes inputs from the line, isolates them, and feeds them into MATLAB via a sound card where they can be analyzed for frequency content. It’s been completed, including a case, and there are now waterfall diagrams of “mystery” switching harmonics found with the device, plus plots of waveform variation over time. There’s also a video below that has these harmonics converted to audio so you can hear the electricity.

Since we featured it last, [David] also took some feedback from the comments on the first article and improved isolation distances on his PCB, as well as making further PCB enhancements before making the final version. If you’ve ever been curious as to what you might find on the power lines, be sure to take a look at the updates on the project’s page.

Continue reading “Listening To Mains Power, Part 2”

High Voltage Measurement is Shockingly Safe

With the right equipment and training, it’s possible to safely work on energized power lines in the 500 kV range with bare hands. Most of us, though, don’t have the right equipment or training, and should take great care when working with any appreciable amount of voltage. If you want to safely measure even the voltages of the wiring in your house there’s still substantial danger, and you’ll want to take some precautions like using isolated amplifiers.

While there are other safe methods for measuring line voltage or protecting your oscilloscope, [Jason]’s isolated amplifier method uses high voltage capacitors to achieve isolation. The input is then digitized, sent across the capacitors, and then converted back to an analog signal on the other side. This project makes use of a chip from TI to provide the isolation, and [Jason] was able to build it on a perfboard while making many design considerations to ensure it’s as safe as possible, like encasing high voltage sections in epoxy and properly fusing the circuit.

[Jason] also discusses the limitations of this method of isolation on his site, and goes into a lot of technical details about the circuit as well. It probably wouldn’t get a UL certification, but the circuit performs well and even caught a local voltage sag while he was measuring the local power grid. If this method doesn’t meet all of your isolation needs, though, there are a lot of other ways to go about solving the problem.

Listening To Mains Power

There’s a lot you can tell by looking at the waveform of your mains power. There are harmonics, transient changes, and periodic fluctuations that are correlated to the demand on the grid itself. Frequency shifts will tell you how fast or slow your clocks are running, and someone probably has a poorly isolated power line communication thing somewhere in your neighborhood. There’s a lot you can learn by looking at the waveform coming out of your outlets, but how do you tap into that? [David] is doing it with a PC sound card and some really interesting hardware.

The Grid 2 Audio module is [David]’s entry to this year’s Hackaday Prize, and it consists of three main parts. The first is the mechanical part of the design. This comes in the form of an IEC power socket with a built-in switch, fuse, and illumination. Of course, you could simply buy one of these, but [David] is teaching himself Autodesk Inventor, and you have to start somewhere. The second part of this build is the PCB power supply and mains input. This is basically a pair of transformers, a PCB, and a whole lot of isolation to make this a safe board. The third part is a signal conditioning board that sends the waveform to a 3.5mm jack, for easy processing with any audio capture hardware.

The hardest part of this board is, by far, the PCB design, and for that [David] went all out. There are some big, meaty traces on this thing and real separation between the high voltage and low voltage portions of the board. The end result is something that sends the mains waveform to an audio card for easy processing with MATLAB, and all the goodies that come from that.

Prepping For Power Outages

When the mains power goes, we are abruptly brought face-to-face with how many of the devices and services we take for granted rely upon it. Telephones for instance, where once they were attached to the wall by a cable, now they are a cordless device with a mains-powered base station. Your cellphone can fill that gap, but a modern smartphone with a battery life of under a day is hardly a reliable long-term solution. Meanwhile modern heating systems may still burn gas or fuel oil, but rely on an electric pump for circulation. Your kitchen is full of electrically-powered white goods, your food is preserved by an electric refrigerator, even your gas cooker if you have one will probably expect a mains supply.

When the power goes out we might say that we instantaneously travel back a couple of centuries, but the reality is that our ancestors in 1817 wouldn’t have been in the same mess we are, they had appropriate solutions to surviving a wickedly cold winter when electricity was still something of a gleam in [Michael Faraday]’s eye. In short, they were prepared in a way most of us are not. That’s a shame, so let’s take a closer look sensible modern preparedness.

Continue reading “Prepping For Power Outages”

Mains Clocking A Microcontroller

[Lujji] is playing around with the STM8 microcontroller. In reviewing the official documentation for this chip, he read the external clock can be a sine wave, a triangle wave, or a square wave with a 50% duty cycle. The minimum CPU frequency is 0 Hz. [Lujji] doesn’t have a signal generator, and presumably, he’s all out of crystals. He does have mains AC, though, so why not clock a microcontroller with wall power?

Using mains power as a frequency standard is a concept a hundred years old. Synchronous motors turn at a rate proportional to the mains frequency, and this has been used in clocks for decades. If you’re really clever, you can clock digital circuits with mains AC, but we’ve never seen someone replace a tiny crystal in a microcontroller circuit with mains power.

After an experiment to prove the concept, [Lujji] went on to construct a circuit that wasn’t as dumb as connecting the microcontroller directly to a wall socket. The direct approach didn’t work that well anyway — the STM8 didn’t like low frequency clocks with slow edges. [Lujji] needed a clock with cleaner edges, and a 555 configured as a comparator fit the bill.

The completed circuit sends mains power through an optocoupler to drive a 555 configured as a comparator. The output is a clean 50Hz clock that is connected to the OSCIN pin on an STM8. This is now a chip running at 50Hz, and yes, it works. [Lujji] set up a circuit to write ‘Hello World’ on an old Nokia LCD. That took about three minutes. It works, though, even though it’s completely useless. Maybe this can be applied to some novel timekeeping similar to that one-instruction-per-day clock we looked earlier in the year.

Awesome Prank or Circuit-Breaker Tester?

Many tools can be used either for good or for evil — it just depends on the person flipping the switch. (And their current level of mischievousness.) We’re giving [Callan] the benefit of the doubt here and assuming that he built his remote-controlled Residual Current Device (RDC) tripper for the purpose of testing the safety of the wiring in his own home. On the other hand, he does mention using it to shut off all the power in his house during an “unrelated countdown at a party”. See? Good and evil.

An RCD (or GFCI in the States) is a kind of circuit breaker that trips when the amount of current in the hot and neutral mains power lines aren’t equal and opposite, which would suggest that the juice was leaking out somewhere, hopefully not through someone. They only take a few milliamps of imbalance to blow so that nobody gets hurt. Making a device to test an RCD is easy; a resistor between hot and the protective ground circuit would do.

[Callan] over-engineers. He used a 50 W resistor where 30 W would do under the worst circumstances. A stealthy solid-state relay switches the resistor in, driven by an Uno and a Bluetooth module, so he can trip his circuit breakers from his smartphone, naturally.
Continue reading “Awesome Prank or Circuit-Breaker Tester?”

Wake Up With A NeoPixel Sunrise Alarm Clock

Like many of us, [Lee] wakes up every morning grumpy and tired. Once he decided to try to do something about it, he settled on making a sunrise alarm clock using NeoPixels. Over the course of thirty minutes the clock illuminates 60 NeoPixels one by one in blue mode to simulate a sunrise.

The clock has three modes: 30-minute sunrise, analog time display, and a seconds counter that uses the full RGB range of the LEDs to light up one for each passing second. It runs on an Arduino Pro Mini knockoff and an RTC module for the sake of simplicity. [Lee] chained NeoPixel strips together in five rows of eight, which allowed him to use a 3×5 font to display the time. The only other electronics are passives to protect the LEDs.

NeoPixels are great, but powering them becomes an issue pretty quickly. [Lee] did the math and figured that he would need 3.4 A to drive everything. He found a 3-outlet USB power adapter that delivers 3.4 A total while shopping at IKEA for an enclosure. [Lee] took his first Instructable from beginner to intermediate level by cracking the adapter open and using two of the USB ports wired in parallel to provide 5 V at 3.4 A. [Lee] has the code available along with detailed instructions for replicating this build. Be sure to check out the demo after the break.

We love a good clock build around here, especially when they involve Blinkenlights. For those less interested in building an alarm clock, here’s a word clock that pulls time and weather data with an ESP8266.

Continue reading “Wake Up With A NeoPixel Sunrise Alarm Clock”