• Registration is now limited to people that can answer the question(s) given. If all else fails, just ask me for the answer. ;-) If you already have an account, you can still login normally.

Arduino/MQTT Home Assistant workshop controller

travis_farmer

Administrator
Staff member
Joined
Jul 9, 2023
Messages
47
Location
Farmington, Maine, USA
Website
www.tjfhome.net
GitHub, with PDF Schematic and Arduino code: GitHub - travis-farmer/ard_shop_automation: the MQTT automation shop controller project (https://github.com/travis-farmer/ard_shop_automation)

the controller will monitor AC power status and usage, act as a thermostat, turn the lights and the air compressor on and off, and anything else i dream up as i work on it.

the lights and compressor i will control with 2 Solid State Relays (AC, 25A). i will also have a sensor to monitor air compressor charge PSI. this is a 0-150PSI sensor that outputs 0-5Vdc analog.
the thermostat outputs via a I2C controlled relay board, and uses a DHT11 sensor for temperature and humidity.
 

travis_farmer

Administrator
Staff member
Joined
Jul 9, 2023
Messages
47
Location
Farmington, Maine, USA
Website
www.tjfhome.net
Changes:
  • replaced MCP23017 relay board with direct opto-isolated relay board
  • will remove AC power monitor code, in favor of a separate controller to handle it
  • lights and compressor control will be via relay, connected to a SPDT switch, to a SSR, with feedback.
the MCP23017 board does not seem to work, so i replaced it with a opto relay board. still with 16-channels.
the AC power monitoring code seems to be lagging the controller, so i will move them to a separate controller, where it will not be an issue.

the thermostat code seems to work well now, though it will require some real testing.

to control a window A/C unit, i will have to modify the A/C. i will remove the A/C controller board and directly control the fan and compressor with a pair of SSRs. this way it can be thermostat controlled. i have coded in a compressor start delay, so the compressor shouldn't start within 30 seconds of stopping. A/C compressors need this to protect them from short-cycles. if the compressor starts with high-pressure refrigerant in the lines, it can be damaged. the delay allows the refrigerant pressure to bleed off.

the furnace control is simple, as furnaces are already setup for thermostat control. i simply need to just use the relay to switch the furnace thermostat wires.

the reason for the lights and air-compressor being switched the way i have them, is so i can control the compressor either with HA, or a switch by the door. the feedback to the Arduino inputs are there so i can remotely see the actual state of the lights and compressor power.

i was trying to think of a good stable power source for this controller, and the best i could find was an old AT computer power supply. it will provide the 5V arduino power, and the 12V relay power.

i will want to have some backup options. like a flashlight by the door, in case the lights won't turn on. and if the temperature is too low for the Arduino to function, i may want a furnace override switch so i can manually turn it on to bring the temperature up enough for the Arduino to work. the Arduino chip itself has a temp range of -40c to +85c, but other components may be different.
 

travis_farmer

Administrator
Staff member
Joined
Jul 9, 2023
Messages
47
Location
Farmington, Maine, USA
Website
www.tjfhome.net
Screenshot 2023-07-19 at 15-21-07 Overview – Home Assistant.png
And this is why i need to install A/C out in my workshop...

the plan is, take an old but working A/C, and remove the electronic controls, exposing the fan and compressor wiring. then, with solid-state relays, i can control it with my project here. should be very simple. but getting the A/C to fit in the hole already in the workshop wall... i think it will be tight, if it fits at all. may have to modify slightly, the hole. i mean, the current shop is only temporary, until the new shop is built and insulated anyway. still need a furnace for the new shop, too.
 
Top