Turning a Dumb AC Unit Smart Without Losing My Security Deposit
Turning a Dumb AC Unit Smart (Without Losing My Security Deposit)
After moving to a New York City apartment with only analog AC controls, I built a DIY automation system using an ESP32 and a stepper motor. Instead of risky electrical modifications, I rigged a low-cost robot to turn the temperature dial, integrating it with Home Assistant via MQTT. This janky but effective solution lets me control the unit from my couch while keeping my security deposit intact.
The hardest problems in life can usually be solved with nothing more than a stepper motor, an esp32, and a dream.
- EvanAnderson
The "couple a stepper motor to a shaft" API is so much better than any "smart" appliance API.
Speaking more seriously, I wish classes of appliances would expose some simple analog and digital interface pins in a standardized configuration to let users choose whatever automation or monitoring hardware they want. HVAC equipment does this with standardized thermostat terminals. I'd love to see that on other types of appliances, too.
The manufacturer's crappy "app" that will inevitably be abandoned and require keeping some old phone / tablet in good "health" lest you lose the "smart" functionality (or worse, any use of) the appliance.
Then current way of putting the "smarts" inside the appliance is just planned obsolescence and a recipe for all of us being eyeball deep in ewaste.
- Graziano_M
Damn. I have wanted to do the same at my place for years (also in NYC). He beat me to it. I also can’t just use a smart plug. Unfortunately I only have one knob, it has four positions (and is open anywhere between), and requires a good amount of torque to move. I’d need to gear down the stepper and figure out a way to detect when it’s in the correct position (maybe an encoder, maybe current sense to ‘feel’ when it’s reached a close position?)
- kazinator
If all you need to do is replace a potentiometer with electronic control, it may be possible to do that with a vactrol. It's more invasive perhaps, but then we're not dealing with anything mechanical.
A vactrol is a device which combines LED and photoresistor in one package (sealed against the leakage of light).
The photoresistor has a "dark resistance" that is typically very high, like hundreds of thousands of ohms. When it is illuminated by the LED, the resistance goes down: you control how much via the current to the LED.
Another possibility is using a digital potentiometer, like this: https://ww1.microchip.com/downloads/en/DeviceDoc/20005207B.p...
A digital pot is an integrated circuit that switches a bank of resistors with FETs to create a desired resistance, or combination of resistances to simulate a wiper position along an analog pot's track.
They are programmed with I2C and such.
These things have certain disadvantages; like the one I linked to requires that power rails be provided for the analog domain where the resistors "live", and the voltages on them must be within this range. The vactrol has no such issue; it is a passive resistor with light shining on it.
- nightfly
> so it took a few Amazon returns until I found the right one
This a pet peeve of mine. If you buy the wrong $2 part don't return it. If you don't eat the loss the seller will and the part will wind up in the landfill.
- vayun
https://esphome.io/ would make the software side of this a 10 minute job
- chem83
It's insane to me that some new construction buildings still use PTACs. Having used too many of those, this was a deal-breaker last time I was in the market for an apartment. Such a New York thing, just like how you cannot have a balcony on the 2nd floor, or how you won't find those sink garbage disposal grinders in any kitchen. But cross the Hudson toward NJ, and my understanding is that they're common. It's a combination of hyper-local regulations and economic incentives that date from god-knows-when and make American cities very unique in their quirks.
- asveikau
> Imprecisely yeet the stepper motor all the way left/right, toggling the target temp between “really really hot” or “really really cold”
> Option 2 certainly is the “jankier” of the two options, given that it relies on a second-order property (target temp) to power the unit on/off… but hey - whatever’s easier, right?
Isn't this basically how a thermostat works? I.e. there is a component that is binary on/off, and a thermometer is used to decide to switch on or off.
- scottlamb
> The rest of this blog post is a walkthrough of a software engineer’s approach to home automation and building custom hardware, and let me tell you: both the final product, and the journey to get there, are hella jank.
IMHO it's not that bad? With the disclaimer that I'm also a software engineer who dabbles very very lightly with electronics and has no mechanical engineering expertise. But the overall approach of doing this by stepper motor seems quite defensible given the security deposit constraint. The only part that seems really janky to me is that it's not physically held in place that well as noted in this paragraph:
> Ultimately, the biggest issue is that binder clips and cardboard aren’t quite as robust of a mounting mechanism as I’d hoped they’d be… and over time, the stepper motor tends to “sag” a bit, resulting in a bit too much friction between the motor, the coupler, and the underlying knob, causing the mechanism to stall out until someone manually goes and reseats it…
Involving MQTT and HA can sometimes get frustrating too; having your AC not working properly if there's a problem on a Linux machine can suck. If this becomes a problem in practice, iirc ESPHome also has a thermostat component, and temperature sensors are really cheap and easy to wire in, so you could do it all on the microcontroller pretty easily in a low-code way. But if this part is working, no need to mess with it.