230V Air Conditioner and HomeKit, part 9: The Box

I knew from the start of this project that I’d need to put all the components in an enclosure. This was to be a semi-permanent installation; I couldn’t have wires and heat sinks dangling everywhere.

Sam Groveman suggested this type of project box. I picked one that would be big enough to hold the solid-state relays along with their heat sinks. Here’s a picture of just the box:

Project box

The size of the box is roughly 12″ x 10″ x 5″, a bit large, but I later became glad I had the extra room to work in it. Those round things on the side of the box are grommets; you can see that I took one out for the picture. The grommets could be easily cut with Xacto knives. I cut small holes in them so that hot air (if any) could circulate through the box, but hopefully discourage insects and cat hair from getting inside.

The lid of the box screws attaches to the base with screws, and there’s a thin rubber gasket around the rim of the lid. Of course, once I cut holes in the grommets the box was no longer water-tight. It’s described as an “electrical project enclosure” but I am under no delusion that this applied to house current. This means I wanted everything in the box to be secure and that no metal part that carried 120V AC would be exposed.

As I mentioned in part 6, I wanted to use fans powered by the Raspberry Pi to cool down the heat sinks. The problem was the fans’ wires weren’t long enough. So I extended the fan wires:

Extended fan

I got a heat-shrink set so I could splice the wires from the fans to the jumper cables.

I followed a suggestion from Sam and used scrap wire to tie the fans to the heat sinks. It looked inelegant, but it worked:

Fan attached to heat sink

The heat sinks came with screws to attach them to the solid-state relays, but no screws to attach them to a project box. So I purchased a set of small nuts, bolts, and washers, along with a cheap tap wrench with taps that corresponded to those screws. I marked where I wanted to put the bolts inside the box, used a Dremel to drill a hole in that spot, and tapped the hole from the outside. I was pleased to see that the bolts screwed into the holes and held nicely until I could get the washers and nuts on them.

The Raspberry Pi case did not not have any mounting holes, and neither does a “bare” RPi board. I settled for attaching the case to the box with adhesive Velcro strips; I guessed (correctly as it turned out) that I would want to take that case out the box frequently for various adjustments.

Here’s the final layout of the box:

Cords held with Sugru

You can see that I held the power cords in place with Sugru. It hardened nicely and I could tug on the cables without them budging. However, it probably would have been less expensive if I used gasket sealant.

Now came the part that Goldy was dreading (and this is your last chance to read part 7 again before you put her life on the line): I plugged the power cord into the NEMA 6-15 outlet. No sparks or flares or anything of the sort. I told HomeKit to turn the circuit on and off… and it didn’t work.

Goldy breathed a sigh of relief. Then she started laughing. It was not her finest moment.

What do I mean by “it didn’t work”? For the first test, I didn’t plug the air conditioner into the female end of the extension cord; if something were to go wrong I didn’t want to damage it. Instead, I used my multimeter to measure the AC voltage at the female end of the cord. When HomeKit turned the relays on, the voltage was 120V AC. When it turned the relays off, the voltage went down to 117V AC, but it did not turn off.

I talked it over with Sam. His first suggestion was that solid-state relays might require a load to function. Then he did some web searching and found this primer on solid-state relays. We looked it over. Perhaps I’d purchased the wrong kind of SSR for the project; I wasn’t sure whether I’d need SSRs that could handle resistive loads instead of inductive loads. Sam thought using a mechanical relay instead of a solid-state relay might be a better choice; then I wouldn’t have to worry about the type of load.

I thought I’d give it one more try before I ordered new relays. This time I would perform the full test, and plug the air conditioner into the hacked extension cord. Goldy covered her eyes with her fins, and…

It worked perfectly. Sam’s first suggestion was the correct one. I later scrolled to the bottom of that primer and confirmed that SSRs require an actual load to function. My multimeter was not sufficient.

I verified I could turn the A/C on and off using HomeKit. Then, as Goldy watched apprehensively, I left the system on for 45 minutes. Again, no sparks, no fumes. Those heat sinks remained at room temperature as far I could tell. Maybe the fans made a difference, but I doubt it.

My knowledge of AC circuits isn’t quite good enough to extrapolate how many watts should be dissipated by an SSR from its data sheet. If I use a calculator like this one and assume a 1.6V voltage drop from the data sheet at a maximum of 15 amps, the power loss within the relay should be about 24 watts. If I believe that number, I might expect the relays to get as warm as a modern florescent bulb. I didn’t even detect that much heat.

The project works! Yay!

So this should be my last blog post on the subject, right? Goldy is giggling. We may learn the reason why in the next installment: “Are we done yet?”

This Post Has 0 Comments

Leave a Reply