Arduino Replaces Bad AC Thermostat, Hacker Stays Cool

Most of North America has been locked in a record-setting heat wave for the last two weeks, and cheap window AC units are flying out of the local big-box stores. Not all of these discount units undergo rigorous QC before sailing across the Pacific, though, and a few wonky thermostats are sure to get through. But with a little sweat-equity you can fix it with this Arduino thermostat and temperature display.

We’ll stipulate that an Arduino may be overkill for this application and that microcontrollers don’t belong in every project. But if it’s what you’ve got on hand, and you’re sick of waking up in a pool of sweat, then it’s a perfectly acceptable solution. It looks like [Engineering Nonsense] got lucky and had a unit with a low-current power switch, allowing him to use a small relay to control the AC. The control algorithm is simple enough – accept a setpoint from an encoder, read the temperature sensor, and turn the AC on or off accordingly. Setpoint and current temperature are displayed on an OLED screen. One improvement we’d suggest is adding a three-minute delay between power cycles like the faceplate of the AC states.

This project bears some resemblance to this Arduino-controlled AC, but it seems more hackish to us. And that’s a good thing – hackers have to keep cool somehow.

Continue reading “Arduino Replaces Bad AC Thermostat, Hacker Stays Cool”

Put a Reverse Engineered Power Meter in Your Toolkit

It seems that one can buy cheap power meters online and, well, that’s it. They work just fine, but to use them for anything else (like datalogging or control or…) they need a bit more work. The good news is that [Thomas Scherrer], alias [OZ2CPU], just did that reverse engineering work for us.

Inside these budget power meters, you’ll find an LCD driver, a power-monitoring chip, and an STM32F030, which is a low-cost ARM Cortex M0 chip that’s fun to play with on its own. [Thomas] traced out the SPI lines that the power-monitoring chip uses to talk to the microcontroller and broke in to snoop on the signals. Once he got an understanding of all the data, tossing an ATmega88 chip on the SPI line lets him exfiltrate it over a convenient asynchronous serial interface.

If you’re going to do this hack yourself, you should note that the internals of the power meter run at line voltage — the 3.3 V that powers the microcontroller floats on top of the 230 V coming out of [Thomas]’s wall plug. He took the necessary precautions with an isolation transformer while testing the device, and didn’t get shocked. That means that to get the serial data out, you’ll need to use optoisolation (or radio!) on the serial lines.

Now that we know how this thing works on the inside, it’s open-season for power-management hacks. Toss a mains socket and an ESP8266 in a box and you’ve got a WiFi-logging power meter that you can use anywhere, all for under $20. Sweet.

Google Contest Builds More Efficient Inverters

A few summers ago, Google and IEEE announced a one million dollar prize to build the most efficient and compact DC to AC inverter. It was called the Little Box Challenge, with the goal of a 2kW inverter with a power density greater than 50 Watts per cubic inch.

To put this goal into perspective, the DC inverter that would plug into a cigarette lighter in your car has a power density of about 1 or 2 Watts per cubic inch. Very expensive inverters meant for solar installations have a power density of about 5 Watts per cubic inch. This competition aimed to build an inverter with ten times the power density of what is available today.

Now, the results are in, and the results are extremely surprising. The best entry didn’t just meet the goal of 50 W/in³, it blew the goal out of the water.

The winning entry (PDF) comes from CE+T Power, and comes in a package with a volume of 13.77 in³. That’s a power density of 143 W/in³ for a unit you can hold in the palm of your hand. The biggest innovations come from the use of GaN transistors and an incredible thermal management solution.

Other finalists for this competition include Schneider Electric Team from France that managed a 100 W/in³ and a Virginia Tech team that managed a power density of 61.2 W/in³.

Thanks [wvdv2002] for the tip.

DIY AC for the Hot Shop

Working out in the shop is usually super fun but if it’s summertime, watch out, it can get hot! We’ve all been there and we’ve all wished we could do something about it. Well, woodworker and general DIYer [April] has stepped up to the plate and built a portable low-buck AC unit to cool her shop down to an acceptable temperature.

The unit is very simple and starts off with an old thrift store cooler. A hole is cut in the back of the cooler to make room for a fan that is directed to blow air inside the cooler and across blocks of ice. The air cools down as it passes over the ice and leaves out the top of the cooler through five 90-degree PVC elbows. After all the inlets and outlets were caulked, the entire unit was given a monochromatic black paint job.

[April] says you can feel the cool air blowing from about 5 feet away from the unit. She has measured the output air temperature to be 58-62ºF. If using loose ice cubes, the unit will work for 2-3 hours. Freezing milk jugs full of water gets about 5 hours of use.

Scope Noob: Bridge Rectifier

Welcome back to this week’s installment of Scope Noob where I’m sharing my experiences learning to use my first oscilloscope. Last week I started out measuring mains frequency using an AC-AC wall wart adapter. Homework, for those following along, was to build a bridge rectifier and probe the signals from it. Let’s take a look.

Continue reading “Scope Noob: Bridge Rectifier”

Scope Noob: Probing Alternating Current

I finally did it. After years of wanting one (and pushing off projects because I didn’t have one) I finally bought an oscilloscope. Over the years I read and watched a ton of content about how to use a scope, you’d think I would know what I’m doing. Turns out that, like anything, hands-on time with an oscilloscope quickly highlighted the gaping holes in my knowledge. And so we begin this recurring column called Scope Noob. Each installment will focus on a different oscilloscope-related topic. This week it’s measuring a test signal and probing Alternating Current.

Measuring a Signal

test-signal

Hey, measuring signals is what oscilloscopes are all about, right? My very first measurement was, of course, the calibration signal built into the scope. As [Chris Meyer] at Sector67 hackerspace here in Madison put it, you want to make sure you can probe a known signal before venturing into the unknown.

In this case I’m using channel 2. Everything on this scope is color-coded, so the CH2 probe has blue rings on it, the probe jack has a blue channel label, and the trace drawn on the screen is seen in blue. I’m off to a fantastic start!

This scope, a Rigol 1054z, comes with an “auto” button which will detect the signal and adjust the divisions so that the waveform is centered on the display. To me this feels like a shortcut so I made sure to do all of this manually. I started with the “trigger” which is a voltage threshold at which the signal will be displayed on the screen. The menu button brings up options that will let you choose which channel to use as trigger. From there it was just a matter of adjusting the horizontal and vertical resolution and position before using the “cursor” function to measure the wave’s voltage and time.

I played around with the scope a bit more, measuring some PWM signals from a microcontroller. But you want to branch out. Because I don’t have a proper signal generator, the next logical thing to measure is alternating current in my home’s electrical system. I suppose you could call it a built-in sine wave source.

Probing Alternating Current

acac-wall-wart

I sometimes take criticism for never throwing things away. Seven years ago we had a cat water fountain whose motor seized. It was powered by a 12V AC to AC converter seen here. Yep, I kept it and was somehow able to find it again for this project.

Of course at the time I thought I would build a clock that measures mains frequency to keep accurate time. This would have done the trick had I followed through. But for now I’m using it to protect me (and my fancy new scope) from accidental shock. I’ll still get the sine wave I’m looking for but with a source that is only 12V at 200 milliamps.

Don’t measure mains directly unless you have a good reason to do so.

Continuing on my adventure I plugged in the wall wart and connected the probe to one of the two wires coming out of it. But wait, what do I do with the probe’s reference clip? I know enough about home electrical to know that one prong of the plug is hot, the other is neutral. The clip itself is basically connected directly to mains ground. Bringing the two together sounds like a really bad idea.

This turns out to be a special case for oscilloscopes, and one that prompted me to think about writing this column. Had this been a 3-prong wall wart, connecting the probe’s reference clip to one of the wires would have been a very bad thing. Many 3-prong wall warts reference the mains earth ground on one of the outputs. If that were the case you could simply leave the clip unconnected as the chassis ground of your scope is already connected to mains ground via its own 3-prong power cord and the reference clip is a dead short to that. If you did need to probe AC using the reference clip you need an isolation transformer for your scope. There are bigger implications when probing a board powered from mains which [Dave Jones] does an excellent job of explaining. Make sure you check out his aptly named video: How NOT to blow up your oscilloscope.

As I understand it, and I hope you’ll weigh in with a comment below, since the wall wart I’m using has a transformer and no ground plug I’m fine using the ground clip of the probe in this case. Even though I’m clipping it to an AC line, the transformer prevents any kind of short between hot/neutral mains and earth ground (via the probe’s ground clip). What I don’t understand is why it’s okay to connect the transformed side of the 12V AC to mains ground?

At any rate, the screenshots above show my progress through this measurement. I first connected the probe without the ground clip and got the sad-looking trace seen on the left. After conferring with both [Adam Fabio] and [Bil Herd] (who had differing opinions on whether or not I should “float the scope”) I connected the ground clip and was greeted with a beautifully formed sine wave. I’m calling this a success and putting a notch in the old bench to remember it by.

What’s Next?

bridge-recctifier-teaserI don’t want to get too crazy with the first installment of Scope Noob so I’ll be ending here for now. I need your guidance for future installments. What interesting quirks of an oscilloscope should a noob like me explore? What are your own questions about scope use? Leave those below and we’ll try to add them to the lineup in the coming weeks.

Homework

For next week I’m working my way through the adventure of rectifying this 12V AC signal into a smoothed DC source. Here you see a teaser of those experiments. I’ve built a full-wave rectifier using just four diodes (1N4001) and will plunk in a hugely-over-spec’d electrolytic capacitor to do the smoothing. If you want to follow along on the adventure you should dig around your parts drawers for these components and give it a try yourself this week. We’ll compare notes in the next post!

Zero-Dollar AC System Looks Funny But Works Well

Summer is here and with summer comes hot days. You probably know that us humans get uncomfortable if the temperature rises too much. Sure, we could turn on the loud and inefficient window AC unit and try to stay mildly comfortable while the electric company pick-pockets pennies from our change purse, but what is the fun in that? [Fran] had a better idea.

He noticed that his basement was always in the upper 50°F range regardless of how hot it was outside. He wanted the cool basement air to reside upstairs in the living area. After thinking long and hard about it he decided that a box fan and two long, skinny cardboard boxes assembled together would be enough to move the required amount of air. Both the fan and boxes were kicking around the house so was no cost and no risk to try this out. Continue reading “Zero-Dollar AC System Looks Funny But Works Well”