I'm working with some HTHS016L Hall Effect current sensors. On another, on-going project InqLiPb - An Off-Grid, RV or Marine Battery Bank Manager I am using them to monitor some high-current (up to 200A) DC circuits. Since these sensors came from China and I had to wait for nearly a month, I thought I'd get a couple extra.
In this project, I wanted to monitor AC power usage in my home. My house has 200A service and here in the US, we have both 120VAC and 240VAC via three incoming lines. As such, to monitor the whole house usage, I have to monitor the current on two lines. Unfortunately I didn't think to check my wire diameter or what these sensors can take. My incoming lines are 4/0 Aluminum and have a diameter of a little over 17mm. These sensors only can fit up to 16mm wires. Well... <insert bad words>. I used most of them.
So as a fall back, I decided I would like to monitor individual circuits also. In my first study, I will be monitoring my water heater and my well pump. The idea being that I can determine how much energy I use heating water and by estimating a quantity based on how much the water pump runs, I can get a crude efficiency of the the water heater. I have been looking at Heat Pump based water heaters and would like to get a better handle on the power (and thus my electric bill) and get an ROI on the upgrade.
InqPower
Its a trivially simple set of components and circuit board to put together. I use one ESP8266 WeMos boards for the CPU horsepower and WiFi connectivity. I use one ADS1115 16bit analog to digital converter. It can handle 4 inputs and we have to use all 4 (Thanks to @davee for cluing me in on using two channels for differential sampling). And for immediate gratification, I've added a 128x64 pixel OLED display. Both the A2D and display run on one I2C bus. No other components are necessary. The circuit board simply supplies ground and power to the two sensors, A2D and display. Also two pins are used to connect the I2C bus up... Easy, Peasy!
Here is the basic assembled InqPower.
Here it is powered up for the first time. InqPower will update the screen at 1Hz and supplies the amount of current being used and a running integration of the Amp-Hour usage. Secondarily, it is also hooked up to my home WiFi and submits this data to a Raspberry Pi set up as an MQTT Broker for historic data analysis thanks to @byron's excellent tutelage in MQTT Broker. I'm now an MQTT convert.
I printed a little 3D case and used sticky magnets attached to the back.
With the usual warning "Don't try this at home!". Oh wait... I am home. Anyway, I don't want to hear how you electrocuted yourself. Be vary careful inside your circuit breaker box... it is hot... very hot! But all you need to do is clamp the sensors around the wires you want to monitor.
And here it is all buttoned back up the InqPower magnetized to the outside, being power by an old phone AC adapter and USB chord.
More to come once I get a little data accumulated...
Inq
3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide
Yeah, something died!
I thought I'd have a full 24 hours worth of data to show today. First, a description of what I've learned and used. For home automation, I have a Raspberry Pi 4 with 8GB of ram running 64bit Ras-OS. On it is running the Mosquitto MQTT Broker. I pretty much did everything using - Install Mosquitto MQTT Broker on Raspberry Pi
I then loaded Node-RED. This is a graphical development environment that I'm a complete Noob using, but its been a pretty light learning curve. I used - Getting Started with Node-RED on Raspberry Pi Most of it is simply dropping components on it, wiring them up and filling out forms. To get down and dirty with it, you can add functions that are using JavaScript.
On top of Node-RED is a dashboard plug-in. I used - node-red-dashboard 3.6.5 Here is the "program" if you can call it that for the UI to InqPower.
To give a brief overview, the far left column is the pallet with all the components. I've only looked at a few of the dozens of built-in components. And as mentioned there are tons of plug-ins to add even more. The center area is where the components are dropped and you see from left to right --- MQTT messages coming in, being renamed, spitting out to graphs and charts and also being combined up and averaged for more long term charts and for figuring running watt-hours of power used for some more gauges. It also saves the data to disk and reloads it on the fly in case of power failures and for more detailed analysis when I think of something. I use a headless Raspberry Pi. I hook up to it using RealVNC Viewer; however, Node-RED is a server program also and exposes the UI Editor above to any browser on your network. That actual image is on my Windows 10 Desktop.
That programs once uploaded to the RasPi, Node-RED server is then available on any device - PC, tablet or phone. Here is the dashboard, again running on my Windows desktop.
A little overview of this. The three charts on the left are really only showing the same to data feeds from the InqPower module. The top one is in Amps and shows a data point every second for the last hour. The second chart simply converts it to Watts and shows one data point every minute in the last 24 hours. Each data data point is average of the 60 actual data point coming in. The third chart does the same Mickey Mouse, but each data point is one hours worth for the last 31 days... or will be if there was 31 days worth of data. On the right column are two gauges each monitored device giving the real-time current amps and the tally of kilowatt-hours that device has used. In my area, I simply multiply that by $0.114 / kWh.
First thing that slapped me in the face this morning was all this red noise on the top graph. Well... no wonder my electric bills are so high this year. But NO... on further evaluation, I noted in the second chart that all this noise started right around midnight while the house was dead asleep. And then I realized... my water heater is not analog. It is either on or off. And when on, it runs about 17 amps. The curve is always a step function on - flat line 17 amps, off - flat line zero. My next thought was I needed to degauss it. Didn't know anything about why or how, but I've heard the term. I read a little and determined that couldn't be it. I pulled the sensor off the wire and it still spit out the same noise. Long story shorter... I finally determined at midnight with no one around that one channel of the ADS1115 analog to digital converter died. Fortunately, I used sockets and simply pulled it out and replaced with a new one. It now back in service to start another day of data recording.
More to come...
Inq
3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide
Here in the US, there is a hard push in marketing to buy heat pumps, heat pump water heaters, solar panels, house batteries, insulation and other energy conserving items. Even the government is giving tax rebates for these things to encourage conservation... or is it just more consumerism?
I'm curious (Inq = Inquisitive) - Is the rest of the world also encouraging these conservation items?
Don't get me wrong, conservation is good, but I'd also like it to be worth while in my remaining life time. Now, I am a Boomer, but on the young end of that scale, so I'm optimistically expecting another 30 decent years toward recouping that ROI.
I had a heat pump water heater in my house while raising kids and having the career in the big city. My qualitative assessment was that it was saving me a noticeable amount of electricity and thus my power bill. We (just the two of us) now live in a drastically downsized (1/4 the size) house in the mountains. It came with a "contractor grade" electric water heater that, if installed when the house was built is thirty years old.
InqPower gives me the tool to actually quantify whether a new water heater is necessary, or a high-end, heat pump water heater deserves my dollars. I have a little over a full day's worth of data. At least I didn't have any failures introducing random current values into the data.
It is too early to determine anything for certain. I'll wait for a full month to be more certain. According to this, the water heater has only used 4.5 kWh over a period of 35 hours. If this is representative of an average, extrapolating out to a full month's worth of usage would be 96 kWh or about $11 of my power bill. Let's see what the Internet says I should save:
Heat pump water heaters, which are 3-4 times more efficient than standard electric water heaters, can save a family of four an estimated $550 annually on their energy bills, with potential lifetime savings exceeding $5,600.
OK, let's be optimistic an say, it's 4x more efficient. That would indicate I should save $8.25/month on my power bill. Hmmm.... $99 per year. Let's say I can do my own installation and the $1800 for the water heater is the only thing I'll pay for (I'm dubious). So the ROI is 18 years. Will this far more complex water heater last as long as my stupid, wasteful water heater? Will it last even the 18 years?
Anyone have any thoughts?
3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide
Inq, I am dubious of anything built today lasting very long. I have found appliance replacements keep getting more expensive, so I try to fix what I have or get the least expensive items to get by. As times have changed so has the requirements for code compliance and as we hope things will get better with gonvernment oversight, doing things in the future on the home worry me on the ROI front. IMHO, more data is useful if immediate repair or replacement is not the issue.
Take Care,
DZ