could you do a video on just using the ina219 for voltage monitoring into home assistant? i just ordered the parts in your video and excited to play with these
Thank You for some very impressive work. Very helpful information. I'm hoping to get some feedback regarding the oil pressure sensor you are using. You talk about hooking the INA219 IN+ terminal up to a wire marked "gauge". You also mention additional wires for a warning light and isolated earth terminal. My diesel generator oil sensor has one terminal and is nothing more than a variable resistor connected to engine ground. I'm very new to this but I'm thinking your sensor puts out voltage while mine does not. Is there a way I can make my sensor work and also not impact the operation of its analog gauge? Is there a schematic I can refer to?
Thanks. The oil sensor in my video, and nearly all ones on the market, are based on resistence. Yours also sounds like a single terminal resistence based sensor. The single wire from the ina219 will also be connected to this sensor along with your existing connection. There is a schematic diagram in the video. As the sensor resistence changes with varying pressure we will measure the different resulting voltage. For best results use the engine ground as the negative to the esp32. This ensures that that the voltage reading is accurate. Let me know how you get on.
Appreciate the feedback. I followed your instructions and I now have things working. What I didn't realize is that the generator's sender and gauge had to be fully hooked up and supplied voltage in order for the INA219 to get a reading. The even better news is that the INA219 sensor being connected to the generator's sender does not change the existing gauge reading. Outstanding!
Great to hear you got it working. Yes the INA219 is not very obtrusive when it reads voltages this way. In theory it might change the reading very slightly but in practice it is impossible to view this minor change via a manual gauge. @@RicciConnection
Your channel is awesome. One request I would like to make is for reading RPM of the main engine. I tried some circuits I found online, trying to read from the W signal of the alternator with no luck... Cheers
Hi Rob, another great video and something I need to implement as I don’t have an oil pressure gauge on my narrowboat. Do you think this hardware (excluding the oil pressure switch/sender obviously) could be used to measure the level in the water tank? I’ve seen some similar looking pressure switches that are installed under the water tank and use the water pressure above to calculate the water remaining in the tank. The coding aspect? I’ve no idea at the moment (I’m not a programmer). Do you see any issues?
Yes this approach will work with any resistance based senders that have an analogue gauge attached. A water pressure one might be a little different but I know the normal water tank senders that use a float are resistance based. See this video. ua-cam.com/video/nj_IY5HZdic/v-deo.html
@ thanks Rob, I’ve seen most of your videos over the last couple of weeks but somehow missed the one you linked to - my bad as they say. I’ve been scouring UA-cam for the last couple of days looking for pressure based water tank level sensors and they seem to be few and far between - at least the ones I’m interested which sit below and outside the tank. The video you linked to is just what I’m looking for. Thanks once again
Thanks. I am glad you are enjoying it. I am planning on developing a custom integration to take data from SignalK into the SmartBoat Home Assistant, but in the other direction I'm not quite sure what SignalK could do with information from the SmartBoat Home Assistant.
The setup I have shown works for sensors that work on resistance. And because of OHMs law we can then measure the voltage to determine the reading. Most sensors are in the range 10 - 184 Ohm.
Will this work if I have a pressure sensor that is from 0 to 40 bar? assume that yours is zero to five bar, but does it work the same to plug in another pressure sensor?
@@lukasjonsson3264 Yes it will work for any range of pressure sensors that are currently connected to a working analogue gauge. These sensors also work on resistence which we then measure as a voltage to display the digital pressure value after cakibration in the esphome yaml.
@@SmartBoatInnovations Thanks! If I want to use two sensors to measure the ditch pressure between two sensors. Do you have any clever formula for that? I will measure the pressure at a water filter. One sensor before the filter and the other sensor after the filter. That way I can tell when the filter is full of crap. Because there will be higher pressure on one side of the filter and lower pressure on the other side of the filter when its full.
In Home Assistant, you could create a helper template sensor that calculates this pressure difference dynamically, and you could set up an alert or notification for when the pressure difference exceeds a certain threshold, indicating the filter is clogged.
Absolutely, this setup will work with your oil sensor. It's quite common for oil pressure sensors, like yours, to operate based on changes in resistance in response to varying oil pressures. In the video, we use the ESP32 and INA219 module to measure the voltage derived from this resistance change. This allows us to accurately calculate the oil pressure. This approach is effective for sensors that function on resistance changes, ensuring that you can reliably monitor your oil pressure using the method described. I hope this helps you in your DIY project!
I'm trying this project using a new oil pressure sensor that has 3 wires (red black yellow). I believe this sensor (5V) is quite common on aliexpress, etc and the output is voltage. Any suggestions for how to connect this type of sensor?
The method I show in this video is for a sensor that is also connected to an analogue gauge. This analogue gauge supplies voltage and has a voltage divider circuit. If your sensor has 3 wires then I presume red is +5ve, black is -ve and the yellow would be a signal that corresponds to a variable voltage depending on the pressure. Try connecting the yellow wire to the INA219 VIN+ like I have in the video. You then need to supply +5v and ground as well tonthe sensor. If my assumption is correct the yellow wire voltage will be a range from 0v to 5v depending on the pressure. The Aliexpress product page should have a calibtation chart that matches voltage to psi or bar. You then use this info on the yaml configuration I provided.
@@SVRockChalk Im my latest video about Bilge Pumps I have a tips and tricks chapter for esp32 amd esphome. Watch that and especially the part about removing non essential yaml.
Has anyone gotten this to work for them? Mine doesn't see the INA219 (tried three different boards and checked wiring a hundred times) [16:45:30][I][i2c.arduino:096]: Results from i2c bus scan: [16:45:30][I][i2c.arduino:098]: Found no i2c devices!
Yes many have. It is also used for the digital gauges. Not sure what is going wrong. Set the logger level to DEBUG in esphome. This might show you the problem. And make sure you have the i2c part in the yaml with the correct GPI pins. If it still does not work send me a email with pics of your wiring, yaml and debug logs. In the debug logs you should see the i2c connection with the esp32.
Do you know what and error 104 is? og details (WARNING) Logger: aioesphomeapi.connection Source: runner.py:189 First occurred: 3:32:54 PM (1 occurrences) Last logged: 3:32:54 PM beta60-wsp @ 192.168.2.228: Connection error occurred: [Errno 104] Connection reset by peer
@@SVRockChalk Most likely a Wifi problem. If this happens when you are updating a new config then look a my Bilge Pump video and remove the non necessary definitions from your Yaml configuration. If not send me more info to my email.
Thanks, from Dominican Republic
Very nice and helpful video, Rob. Thank you for sharing your knowledge. Looking forward to the next one. :)
Thanks a lot, Yannis! I'm glad you found it helpful. Your feedback encourages me to share more. Stay tuned for the next video! 😊
could you do a video on just using the ina219 for voltage monitoring into home assistant? i just ordered the parts in your video and excited to play with these
@@vrrevolution9183 I have many videos using the INA219 and also have this page on my website.
smartboatinnovations.com/ina219-voltage/
Thank You for some very impressive work. Very helpful information. I'm hoping to get some feedback regarding the oil pressure sensor you are using. You talk about hooking the INA219 IN+ terminal up to a wire marked "gauge". You also mention additional wires for a warning light and isolated earth terminal. My diesel generator oil sensor has one terminal and is nothing more than a variable resistor connected to engine ground. I'm very new to this but I'm thinking your sensor puts out voltage while mine does not. Is there a way I can make my sensor work and also not impact the operation of its analog gauge? Is there a schematic I can refer to?
Thanks. The oil sensor in my video, and nearly all ones on the market, are based on resistence. Yours also sounds like a single terminal resistence based sensor. The single wire from the ina219 will also be connected to this sensor along with your existing connection. There is a schematic diagram in the video. As the sensor resistence changes with varying pressure we will measure the different resulting voltage. For best results use the engine ground as the negative to the esp32. This ensures that that the voltage reading is accurate. Let me know how you get on.
Appreciate the feedback. I followed your instructions and I now have things working. What I didn't realize is that the generator's sender and gauge had to be fully hooked up and supplied voltage in order for the INA219 to get a reading. The even better news is that the INA219 sensor being connected to the generator's sender does not change the existing gauge reading. Outstanding!
Great to hear you got it working. Yes the INA219 is not very obtrusive when it reads voltages this way. In theory it might change the reading very slightly but in practice it is impossible to view this minor change via a manual gauge. @@RicciConnection
Your channel is awesome. One request I would like to make is for reading RPM of the main engine. I tried some circuits I found online, trying to read from the W signal of the alternator with no luck... Cheers
Thanks! I am hoping to make a RPM video next.
I now have a Tachometer video. Works great.
ua-cam.com/video/-xflWB3R2Go/v-deo.html
Hi Rob, another great video and something I need to implement as I don’t have an oil pressure gauge on my narrowboat.
Do you think this hardware (excluding the oil pressure switch/sender obviously) could be used to measure the level in the water tank? I’ve seen some similar looking pressure switches that are installed under the water tank and use the water pressure above to calculate the water remaining in the tank. The coding aspect? I’ve no idea at the moment (I’m not a programmer). Do you see any issues?
Yes this approach will work with any resistance based senders that have an analogue gauge attached. A water pressure one might be a little different but I know the normal water tank senders that use a float are resistance based. See this video. ua-cam.com/video/nj_IY5HZdic/v-deo.html
@ thanks Rob, I’ve seen most of your videos over the last couple of weeks but somehow missed the one you linked to - my bad as they say. I’ve been scouring UA-cam for the last couple of days looking for pressure based water tank level sensors and they seem to be few and far between - at least the ones I’m interested which sit below and outside the tank. The video you linked to is just what I’m looking for. Thanks once again
Thanks for sharing your knowledge. It's a very interesting project. Are you considering sending the data to signalk server?
Thanks. I am glad you are enjoying it. I am planning on developing a custom integration to take data from SignalK into the SmartBoat Home Assistant, but in the other direction I'm not quite sure what SignalK could do with information from the SmartBoat Home Assistant.
@@SmartBoatInnovations I use InfluxDb Signal-K plugin to store information in a local database and Grafana to visualize historical data.
Will this work if you are reading resistance or oms will this work if you are reading resistance or ohms?
The setup I have shown works for sensors that work on resistance. And because of OHMs law we can then measure the voltage to determine the reading. Most sensors are in the range 10 - 184 Ohm.
is this with a DS18B20 based temp sensor ?
This video uses the DS18B20...
ua-cam.com/video/hfo4Pd6KxlE/v-deo.html
Will this work if I have a pressure sensor that is from 0 to 40 bar? assume that yours is zero to five bar, but does it work the same to plug in another pressure sensor?
@@lukasjonsson3264 Yes it will work for any range of pressure sensors that are currently connected to a working analogue gauge. These sensors also work on resistence which we then measure as a voltage to display the digital pressure value after cakibration in the esphome yaml.
@@SmartBoatInnovations Thanks! If I want to use two sensors to measure the ditch pressure between two sensors. Do you have any clever formula for that?
I will measure the pressure at a water filter. One sensor before the filter and the other sensor after the filter. That way I can tell when the filter is full of crap.
Because there will be higher pressure on one side of the filter and lower pressure on the other side of the filter when its full.
In Home Assistant, you could create a helper template sensor that calculates this pressure difference dynamically, and you could set up an alert or notification for when the pressure difference exceeds a certain threshold, indicating the filter is clogged.
@@SmartBoatInnovations is it possible to get more than 1 decimal place after bar like this: 3.67bar instead of 3.6bar? :)
I know that my Oil sensor is monitored via resistance. Will this still work?
Absolutely, this setup will work with your oil sensor. It's quite common for oil pressure sensors, like yours, to operate based on changes in resistance in response to varying oil pressures. In the video, we use the ESP32 and INA219 module to measure the voltage derived from this resistance change. This allows us to accurately calculate the oil pressure. This approach is effective for sensors that function on resistance changes, ensuring that you can reliably monitor your oil pressure using the method described. I hope this helps you in your DIY project!
I'm trying this project using a new oil pressure sensor that has 3 wires (red black yellow). I believe this sensor (5V) is quite common on aliexpress, etc and the output is voltage. Any suggestions for how to connect this type of sensor?
The method I show in this video is for a sensor that is also connected to an analogue gauge. This analogue gauge supplies voltage and has a voltage divider circuit. If your sensor has 3 wires then I presume red is +5ve, black is -ve and the yellow would be a signal that corresponds to a variable voltage depending on the pressure. Try connecting the yellow wire to the INA219 VIN+ like I have in the video. You then need to supply +5v and ground as well tonthe sensor. If my assumption is correct the yellow wire voltage will be a range from 0v to 5v depending on the pressure. The Aliexpress product page should have a calibtation chart that matches voltage to psi or bar. You then use this info on the yaml configuration I provided.
@@SmartBoatInnovations Thanks so much. That all makes sense and I will give it a try.
Had to start over, long story, lol. But upload to ESP32 via WiFi and get error code 104 any wear from 24% to 63%.
@@SVRockChalk Im my latest video about Bilge Pumps I have a tips and tricks chapter for esp32 amd esphome. Watch that and especially the part about removing non essential yaml.
Has anyone gotten this to work for them? Mine doesn't see the INA219 (tried three different boards and checked wiring a hundred times)
[16:45:30][I][i2c.arduino:096]: Results from i2c bus scan:
[16:45:30][I][i2c.arduino:098]: Found no i2c devices!
Yes many have. It is also used for the digital gauges. Not sure what is going wrong. Set the logger level to DEBUG in esphome. This might show you the problem. And make sure you have the i2c part in the yaml with the correct GPI pins. If it still does not work send me a email with pics of your wiring, yaml and debug logs. In the debug logs you should see the i2c connection with the esp32.
@@SmartBoatInnovations Thank you, I will keep trying.
Do you know what and error 104 is? og details (WARNING)
Logger: aioesphomeapi.connection
Source: runner.py:189
First occurred: 3:32:54 PM (1 occurrences)
Last logged: 3:32:54 PM
beta60-wsp @ 192.168.2.228: Connection error occurred: [Errno 104] Connection reset by peer
@@SVRockChalk Most likely a Wifi problem. If this happens when you are updating a new config then look a my Bilge Pump video and remove the non necessary definitions from your Yaml configuration. If not send me more info to my email.