Cryptanalyse Your Air Con

Infrared remote controls are simple and ubiquitous. Emulating them with the aid of a microcontroller is a common project that hackers use to control equipment as diverse as televisions, cable boxes, and home stereos. Some air conditioners can be a little more complicated, however, but [Ken]’s here to help.

The root of the problem is that the air conditioner remote was using a non-obvious checksum to verify if commands received were valid. To determine the function generating the checksum, [Ken] decided to bust out the tools of differential cryptanalysis. This involves carefully varying the input to a cryptographic function and comparing it to the differences in the output.

With 35 signals collected from the remote, a program was written to find input data that varied by just one bit. The checksum outputs were then compared to eventually put together the checksum function.

[Ken] notes that the function may not be 100% accurate, as they’re only using a limited sample of data in which not all the bytes change significantly. However, it shows that a methodical approach is valuable when approaching such projects.

Thirsty for more checksum-busting action? Check out this hacked weather station.

Snitch On Your AC Devices With Stolen Power

Low power devices are always intriguing, as they open up possibilities for applications with the need to operate remotely, or for very long periods without attention. There are all manner of techniques for powering such devices, too, such as using solar panels, super capacitors, or other fancy devices. The Micro Power Snitch is one such device, which can report wirelessly on your AC-powered appliances.

The device is built around a tiny ARM microcontroller and an RFM69 radio module. The entire circuit is run by leeching power from an AC current transformer, wrapped around one of the power lines of an AC appliance. When an appliance draws over the minimum threshold current (500W on 230VAC, 250W on 115VAC), the device sends a packet out, which can be received and logged at the other end.

The best part of this project, however, is the writeup. The project is split into an 8-part series, breaking down the minutiae of the concepts at work to make this possible. It’s a great primer if you’re interested in designing low-power devices.

We’ve seen some of [jcw]’s power research before – such as this guide to the effects of code on power consumption.

[Thanks to Ronald for the tip!]

Skin (Effect) In The Game

We love to pretend like our components are perfect. Resistors don’t have capacitance or inductance. Wires conduct electricity perfectly. The reality, though, is far from this. It is easy to realize that wire will have some small resistance. For the kind of wire lengths you usually encounter, ignoring it is acceptable. If you start running lots of wire or you are carrying a lot of current, you might need to worry about it. Really long wires also take some time to get a signal from one end to the other, but you have to have a very long wire to really worry about that. However, all wires behave strangely as frequency goes up.

Of course there’s the issue of the wire becoming a significant part of the signal’s wavelength and there’s always parasitic capacitance and inductance. But the odd effect I’m thinking of is the so-called skin effect, first described by [Horace Lamb] in 1883. [Lamb] was working with spherical conductors, but [Oliver Heaviside] generalized it in 1885.

Put simply, when a wire is carrying AC, the current will tend to avoid traveling in the center of the wire. At low frequencies, the effect is minimal, but as the frequency rises, the area in the center that isn’t carrying current gets larger. At 60 Hz, for example, the skin depth for copper wire — the depth where the current falls below 1/e of the value near the surface — is about 0.33 inches. Wire you are likely to use at that frequency has a diameter less than that, so the effect is minimal.

However, consider a 20 kHz signal — a little high for audio unless you are a kid with good ears. The depth becomes about 0.018 inches. So wire bigger than 0.036 inches in diameter will start losing effective wire size. For a 12-gauge wire with a diameter of 0.093 inches, that means about 25% of the current-handling capacity is lost. When you get to RF and microwave frequencies, only the thinnest skin is carrying significant current. At 6 MHz, for example, copper wire has a skin depth of about 0.001 inches. At 1 GHz, you are down to about 0.000081 inches. You can see this (not to scale) in the accompanying image. At DC, all three zones of the wire carry current. At a higher frequency, only the outer two zones carry significant current. At higher frequencies, only the outer zone is really carrying electrons.

Continue reading “Skin (Effect) In The Game”

How Do They Synchronize Power Stations With The Grid?

There are probably times in every Hackaday reader’s life at which you see something and realise that the technology behind it is something you have always taken for granted but have never considered quite how it works. Where this is being written there was such a moment at the weekend, an acquaintance on an amateur radio field day posted a picture of three portable gas-powered alternators connected together and running in synchronization. In this case the alternators in question were fancy new ones with automatic electronic synchronization built-in, but it left the question: how do they do that? How do they connect a new power station to the grid, and bring it into synchronization with the line? There followed a casual web search, which in turn led to the video below the break of a bench-top demonstration.

If two AC sources are to be connected together to form a grid, they must match each other exactly in frequency, phase, and voltage. To not do so would be to risk excessive currents between the sources, which could damage them and the grid infrastructure. The video below from [BTCInstrumentation] demonstrates in the simplest form how the frequencies of two alternators can be matched, by measuring the frequency difference between them and adjusting their speed and thus frequency until they can be connected. In the video he uses neon bulbs which flash at the difference frequency between the two alternators, and demonstrates adjusting the speed of one until the bulbs are extinguished. The two alternators can then be connected, and will then act together to keep themselves in synchronization. There are further videos in which he shows us the same process using a strobe light, then demonstrates the alternators keeping themselves synchronized, and phase deviation between them.

Of course, utility employees probably do not spend their time gazing at flashing neon bulbs to sync their power stations. The same measurements are not performed by eye but by electromechanical or electronic systems with automatic control of the contactors, just as they are in the fancy electronic alternator mentioned earlier. But most of us have probably never had to think about synchronizing a set of alternators, so to see it demonstrated in such a simple manner should fill a knowledge gap even if it’s one only of idle curiosity.

Continue reading “How Do They Synchronize Power Stations With The Grid?”

What Voltage For The All-DC House?

The war of the currents was fairly decisively won by AC. After all, whether you’ve got 110 V or 230 V coming out of your wall sockets, 50 Hz or 60 Hz, the whole world agrees that the frequency of oscillation should be strictly greater than zero. Technically, AC won out because of three intertwined facts. It was more economical to have a few big power plants rather than hundreds of thousands of tiny ones. This meant that power had to be transmitted over relatively long distances, which calls for higher voltages. And at the time, the AC transformer was the only way viable to step up and down voltages.

acdc
No, not that AC/DC

But that was then. We’re right now on the cusp of a power-generation revolution, at least if you believe the solar energy aficionados. And this means two things: local power that’s originally generated as DC. And that completely undoes two of the three factors in AC’s favor. (And efficient DC-DC converters kill the transformer.) No, we don’t think that there’s going to be a switch overnight, but we wouldn’t be surprised if it became more and more common to have two home electrical systems — one remote high-voltage AC provided by the utilities, and one locally generated low-voltage DC.

Why? Because most devices these days use low-voltage DC, with the notable exception of some big appliances. Batteries store DC. If more and more homes have some local DC generation capability, it stops making sense to convert the local DC to AC just to plug in a wall wart and convert it back to DC again. Hackaday’s [Jenny List] sidestepped a lot of this setup and went straight for the punchline in her article “Where’s my low-voltage DC wall socket?” and proposed a few solutions for the physical interconnects. But we’d like to back it up for a minute. When the low-voltage DC revolution comes, what voltage is it going to be?

Continue reading “What Voltage For The All-DC House?”

Tesla Vs. Edison

The phrase “Tesla vs. Edison” conjures up images of battling titans, mad scientists, from a bygone age. We can easily picture the two of them facing off, backed by glowing corona with lightning bolts emitting from their hands. The reality is a little different though. Their main point of contention was Tesla’s passion for AC vs. Edison’s drive to create DC power systems to power his lights. Their personalities also differed in many ways, the most relevant one here being their vastly different approaches to research. Here, then, is the story of their rivalry.

Continue reading “Tesla Vs. Edison”

Animated EV Charge Cable Enlightens Us

[ch00f] was searching for an idea to build for his father this Christmas, and cast his gaze across those novelty phone charging cables that have “flowing” LEDs along their length. Not one to stick to the small scale, he set out to create a flowing LED effect for a Tesla EV charger.

ch00f-led-ev-chargerThe basic components behind the build are a current transformer, a NeoPixel LED strip, and an ATtiny44 to run the show. But the quality of the build is where [ch00f]’s project really shines. The writeup is top notch — [ch00f] goes to great lengths showing every detail of the build. The project log covers the challenges of finding appropriate wiring & enclosures for the high power AC build, how to interface the current-sense transformer to the microcontroller, and shares [ch00f]’s techniques for testing the fit of components to ensure the best chance of getting the build right the first time. If you’ve ever gotten a breadboarded prototype humming along sweetly, only to suffer as you try to cram all the pieces into a tiny plastic box, you’ll definitely pick something up here.

Perhaps you’d like to check out this teardown of a Tesla Model S battery. Video after the break.

Continue reading “Animated EV Charge Cable Enlightens Us”