Close
0%
0%

Home Automation with NodeMCU

Modify your gas furnace thermostat and electric hot water heater controls and save $750+/year

Similar projects worth following
This is the first of many NodeMCUs I am using to save $1,000+/year total. All programs uploaded wirelessly and web page HMIs used for monitoring and control. Adafruit MQTT used for recording data. Upgraded from Arduino Uno. NodeMCU records furnace operation every hour. Complete details are here: https://sites.google.com/site/nodemcu12e/#furnacewaterheater Furnace ON seconds per day is sent to a Google cloud spreadsheet and used to calculate furnace cubic metres of natural gas used per degree day furnace efficiency. That number greatly improved from 0.6 to 0.4 with longer furnace run times. Furnace is either OFF or ON for 1/2 hr+ now. I was thinking of switching to a gas water heater but it would cost $3,000. Only heating at the new ultra low 2.8 cent/kWh Time of Use overnight is cheaper than gas. More expensive gas water heaters would be obsolete here. Saves $150+/yr. Electric water heaters are quiet, don't need holes in the wall, are far less expensive and much easier to install

My projects are all documented here https://sites.google.com/site/nodemcu12e/.

For two reasons.

1. Many people assisted in helping me to get all the microcontroller functions working. I put links to all their help in one location for others to use. Pay it forward.

2. To assist myself in the future when I forget how I got one of the functions working.

The gas furnace and water heater mods are set up with normally closed relays. The new functions open the relays. If you unplug the microcontroller the relays close and it goes back to the original thermostat and hot water control. The gas furnace thermostat mod only prevents furnace operation for up to an hour in any case so it will not prevent the furnace from operating for any great length of time.

  • 1 × LoLin V3 NodeMCU12E - I prefer this 3.3V board since it includes 5V VU output from the USB charger to power relays.
  • 3 × 17X10 protoboard. I mount the NodeMCU board across two of them. This makes it easy to wire and creates two isolated areas .
  • 1 × 4 channel relay
  • 1 × photoresistor to detect furnace ON LED so no electrical connection between furnace and NodeMCU
  • 1 × telephone jacks and cords for remote sensors

View all 16 components

  • Switched from mechanical relay to SSR for hot water tank

    nodemcu12ecanada10/20/2024 at 14:55 0 comments

    I used to use a 30 amp 240VAC mechanical relay to switch the hot water tank but the relays would only last a year or two.

    I have now switched to an inexpensive, ($7.32 Cdn with free shipping over $10 so I bought two), DC-AC Solid State Relay instead which should last forever.

    I bought one capable of switching 60 amps even though I measured only 15 amps used by the water heater.

    Bigger because, why not? 

    Difference in cost is insignificant. Same size.

    The 3.3V NodeMCU is only 12 mA per output so it can't directly turn on the SSR from an output.

    The previous 30 amp mechanical relay needed 5 VDC to turn on so I used a small 4 channel relay for switching the 5V which is what I now use for the SSR. The small 10A 4 channel relay is only switching mA so no issue with durability.

    I mounted the SSR to a flat aluminum plate with heat sink grease because I read SSRs can get hot while on.

    But it doesn't even get warm.

    The datasheet says it has a 1.6 volt drop x 15 amps which should mean 24 watts of heat needs to be dissipated.

    I could have bought a heat sink for it which costs $5.25 Cdn.

    But I only measured a 0.9 volt drop x 15 amps which means only 13.5 watts of heat, but it doesn't even get warm.

    In Ontario there is a 2.8 cent per kWh optional overnight rate.

    We switched to the new rate and save another $150/year on top of the fact we have always had timers on the hot water tank and hot tub. We save even though the new low rate comes with a 28.4 cents per kWh 4-9 pm weekdays cost.

    2.8 cents per kWh is cheaper energy than natural gas. More expensive to buy and now more expensive to operate natural gas water heaters are obsolete with the new rate.

    Also it's only $100/year to "fuel" an EV at the ultra low cost overnight rate. 

  • Switching from DHT22s to BME280s

    nodemcu12ecanada12/07/2023 at 16:59 0 comments

    I was having issues with my DHT22 humidity sensors which also include a temp sensor. Random very high values. Apparently the sensors don't last forever. The humidity sensors are used to determine when to open the windows in the basement in the summer to greatly reduce the humidity. Without a noisy, kWh guzzling dehumidifier. It's not obvious when it's a good time to open or close the windows.

    I have two of them on one controller for upstairs and downstairs. There is a separate one of a different type, SHTC3, outside on a separate microcontroller. I only use DS18B20s for critical temp sensing used for control.

    The sensors each take up one input with some dedicated DHT22 protocol.
    With the new I2C sensors I free up those two inputs. It's better to use the limited NodeMCU I/O for a bus to talk to various devices instead of each device taking up dedicated I/O.  Two inputs with I2C talk to many devices. 

    One input using the OneWire protocol talks to many DS18B20 temperature sensors. With multiple temp sensors it's much more reliable to use the unique 64 bit sensor address method. Otherwise I found temps can be mixed up occasionally. https://lastminuteengineers.com/multiple-ds18b20-arduino-tutorial/

    I looked around for some I2C humidity sensors. There are quite a few different ones.
    If you use I2C sensors they don't take up any new I/O if you put the data lines in parallel with the ones used for the clock. Many different sensors as well as digital and analog I/O expanders can go on the same two I2C inputs.

    Different types of sensors have different I2C addresses so there is no conflict.
    The issue I had was I want to use two of the same I2C sensors on the same I2C inputs.
    One way is to get an I2C multiplexer chip that selects which device to talk to if they have the same address.
    Another way is to get a sensor where you can change the I2C address. This is what I did.
    Putting 3V or Gnd on one of the pins changes the address.
    This sensor not only does humidity but also temp, pressure and altitude which is interesting. 

    It can tell if you lift it up a couple of feet based on the slight change in air pressure. 

    Altitude, instead of pressure, is used to determine if the trend is high pressure (lower than actual altitude reading) or low pressure (higher than actual altitude reading). High pressure can indicate good weather and low not so good.

    I got 3 of them for $12. I always buy more than I need for stuff worth next to nothing in case I smoke a few. Or there is a defect. 

    I followed this website to work with multiple BME280s. Not waterproof like DS18B20s.
    Tiny little board. The actual sensor is a teeny tiny 2.5mm cube.
    New sensors usually need you to load a new library if it isn't already included with Arduino IDE.
    https://bluedot.space/tutorials/how-to-connect-two-bme280-sensors-on-i2c-bus/

View all 2 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates