Sorry to be a pain but I only just discovered your channel and find it really helpful. Are you aware that I2C can have many, many devices on the same bus? For the second sensor you just bridge one of the A0 or A1 or both to change the address and you can have up to four INA219 in parallel on the same pins before you need to use the second interface that you mentioned. You are not wrong but you only need to resort to using the second set of pins once your four places on the first bus are used up. Also, you are not limited to the INA219s, you can put all of your I2C devices on the same wires. BMX280, touchscreens, displays, whatever. It really simplifies wiring and reduces points of failure. If your I2C bus is working then it only comes down to whether it can see the new device on the bus or not which is usually a simple matter of making sure you have the right address for each device. Hope this helps.
Thanks for the detailed comment. Yes I am aware of this. I have specific article on my website that shows how to do this. smartboatinnovations.com/ina219-voltage/ But for beginners it is easier just to connect a 2nd INA219 to different ESP32 pins as nothing needs to be soldered.
Just a heads up, play dough is just dough with heaps of salt added for preservation purposes so it would not be good exposing your modules to it. I would recommend your first suggestion of BluTack instead. But I suppose if you are a yachtie then you are used to salt being everywhere.
great video! I have been tinkering with making a potmeter, current leak sensor between the hull (metal) and batteries, with the INA219B and esp2, i got the adafruit feathers. initially i looked to make a device with a tiny screen with microphyton, but now i am looking to get home assistant and get more smart boat stuff, such as your brilliant videos with relays! thanks for sharing!
I will not be back to my boat until mid April in North Carolina. I recently got Home Assistant working, in a docker container, on a Raspberry pi 5 with 500 Gb SSD. The pi5 also has Openplotter automatically booting with necessary charts and services running. I look forward to re-watching your videos and implementing my HA smart boat. I realize there is hardware cost involved but wondering if a video showing Home Assistant running on a pi5 in a docker container might be in order. This spring I'll be testing Openplotter pypilot running on a pi4, an arduino, an IBT-2 motor controller using a RV awning motor. I made my own steering wheel (disc) similar to the commercially available CPT autopilot. Works well from home. I'll also be testing the bluetooth autopilot app, by Pieter Oskam, using an esp2, arduino, ibt-2, and motor. Since it runs on a esp32, I'm wondering if it would be useful to integrate it into Home Assistant.
Sounds like you have a lot going on! Home Assistant on a separate Rpi is the easiest but you can also install it in supervised mode along side other Linux apps. community.home-assistant.io/t/installing-home-assistant-supervised-on-a-raspberry-pi-with-debian-11/247116
Really helpful. I'm wondering if it's possible to use an ESP32 with a display attached to it as an alternative to buying a full tablet. My idea would be essentially a fixed position dedicated dashboard display, possibly with a touch screen to switch between panes. Much like fancy marine displays from Raymarine, b&g etc. I'm assuming the easiest is to use an spi display and put a dashboard on it with a web browser library?
I use these 2 tablets. They are very cost effective. Especially the waterproof one. Oukitel RT3 Mini Rugged Tablet 8 Inch HD IP68 s.click.aliexpress.com/e/_Dehawj1 PRITOM 8 Inch Tablet Android 13 s.click.aliexpress.com/e/_Dd8BkAX Running a full-featured browser on an ESP32 with a display is highly impractical due to the limited hardware capabilities of the ESP32.
@SmartBoatInnovations that's a lot cheaper than most of the tiny TFT displays for the esp32. I do like the idea of creating fixed cockpit instrument displays but that can be a future winter project.
@SustainableSailing Here is the waterproof tablet installed in the cockpit. Simple fast menu to switch from HA to Navigation etc. drive.google.com/file/d/14sFfZFIz1F30SlPQo-H4NSAyV3eKbCfr/view?usp=drivesdk
Can you explain where your ground goes, as with your explanation the voltage is floating. Also worth noting that if you add a second board, make sure you solder the A0 or A1 address tabs on the board.
See my article for more info smartboatinnovations.com/ina219-voltage As I mention in the video to ensure accurate voltage measurements with the INA219, the ground (GND) of the INA219 needs to be connected to the same ground reference as the voltage source being measured. This is crucial for maintaining a common reference point and avoiding measurement errors.
Thanks for the video Rob! I am looking to digitize my generator gauges (4 analog dials) and have it display on my HA Dashboard. For this I think I will need 1 ESP32, 4 INA219 and then wire it up to the Westerbeke gauge box. Correct?
@@PtJudeRI Yes that is correct. The esp32 supports 2 I2C devices with the same address so you can connect 2 ina219 directly using different pins. But the other 2 ina219 you will need to connect them in parallel with one of the existing ina219 and you will also need to change their default address. See on my website under articles and ina219 how to do this.
I was wondering if the analogue gauge could be omitted in the set-up i.e. connect the sensor directly to the INA219 and get readings on HA, only. I would like to add a level sensor for my water tank but I don't want to install an analogue gauge, too.
The analogue gauge supplies a constant voltage so you would need to emulate that. In theory it should be possible. Just need to use a buck converter like we power the ESP32 with and setup a voltage divider with a single resistor. The 2nd resistor would be the resistance of the sensor.
Hi Rob, very interesting video. Could you please tell what is the sensor type. I have on my boat sensors for detecting water level in the tanks and I am using KUS 0-190 Ohm sensor. Will the solution you presented also work for that type of sensor? The fee on the sensor is 12VDC. Do you really need the eps32? Can't this INA219 be plugged directly to Arduino or PI ? Thank you!
Yes this should work with your resistance sensor with a 12v supply. The INA219 will measure the voltage and this needs to correlated with a % tank full. With Home Assistant it is much easier to use an esp32 for this type of project. The HAOS is a managed OS and accessing GPIO pins is not straightforward. But if you are using another OS then the Rpi has I2c GPIO pins you can attach the INA219.
Hey Rob, thanks for making these videos. I have been trying to find a suitable semsor for my Rpi5 mcarthur hat set up that will meaure diesel and water tank levels. Both tanks are metal. Any suggestions? Thanks!
If you already have an internal tank sender then you can use the method I showed in this video. Or you have nothing then maybe install a Ultrasonic Level Sensor on the top of the tank. But I think it would require an entry hole to be made.
There are some Ultrasonic sensors available that can be installed outside the steel tank. Only complication is that they need to be installed under the tank which is not always easy on a boat
@@ATARI_1962I understand your concern about managing multiple apps. It sounds like a great opportunity to consider transitioning to Home Assistant. Home Assistant is a robust platform that is rapidly growing and widely supported by a vibrant community. It offers the flexibility to integrate a vast array of sensors and devices, which could simplify your setup by bringing everything under one roof. While OpenPlotter has been a fantastic tool, you might find that Home Assistant’s extensive capabilities and ongoing enhancements provide a comprehensive solution that can meet all your needs more efficiently.
{% set volts_empty = 0.1 * volts_half - volts_full %} Can you explain what this does, I could not get gauge to scale with this in place, and ended up placing just a constant in here like the lines above but for empty voltage.
My original yaml was {% set volts_empty = 2 * volts_half - volts_full %} I am not sure why you have 0.1 instead of 2 This line is a calculation for the empty voltage. If you know the actual empty voltage then a constant is fine. I hope this helps.
The Aliexpress one is available and they sell the breakout board to suit. From Amazon you need to buy the 38pin esp32 that has no mounting holes in the corner. This model will fit the breakout boards the best.
Hello great video. Could you explain how to handle current sensor 0 to 20 mA? An other connexion option would be to send data to nmea network in order to share with both home assistant and also boat screens.
You can send the data by connecting your ESP32 to Raspberry Pi (Wifi) with Signal-K server running on. Using the framework SensESP you can get all the data shared and then send it on your NMEA network with a RS485 Expansion HAT. That's a project I am thinking about :)
Great new video!
Thank you!
Great video, Rob! Thanks for sharing your knowledge.⛵
Sorry to be a pain but I only just discovered your channel and find it really helpful.
Are you aware that I2C can have many, many devices on the same bus?
For the second sensor you just bridge one of the A0 or A1 or both to change the address and you can have up to four INA219 in parallel on the same pins before you need to use the second interface that you mentioned. You are not wrong but you only need to resort to using the second set of pins once your four places on the first bus are used up.
Also, you are not limited to the INA219s, you can put all of your I2C devices on the same wires. BMX280, touchscreens, displays, whatever. It really simplifies wiring and reduces points of failure. If your I2C bus is working then it only comes down to whether it can see the new device on the bus or not which is usually a simple matter of making sure you have the right address for each device.
Hope this helps.
Thanks for the detailed comment. Yes I am aware of this. I have specific article on my website that shows how to do this.
smartboatinnovations.com/ina219-voltage/
But for beginners it is easier just to connect a 2nd INA219 to different ESP32 pins as nothing needs to be soldered.
Just a heads up, play dough is just dough with heaps of salt added for preservation purposes so it would not be good exposing your modules to it. I would recommend your first suggestion of BluTack instead. But I suppose if you are a yachtie then you are used to salt being everywhere.
Good job.
Thank you!
great video! I have been tinkering with making a potmeter, current leak sensor between the hull (metal) and batteries, with the INA219B and esp2, i got the adafruit feathers. initially i looked to make a device with a tiny screen with microphyton, but now i am looking to get home assistant and get more smart boat stuff, such as your brilliant videos with relays! thanks for sharing!
Thanks. Home Assistant with EspHome make integrating INA219 really easy. See esphome.io/components/sensor/ina219.html
Great video! You manage to make it really simple.
Thanks!. That is the plan.
Fantastic video😊
Thanks!
great job Rob
Thanks!
I will not be back to my boat until mid April in North Carolina. I recently got Home Assistant working, in a docker container, on a Raspberry pi 5 with 500 Gb SSD. The pi5 also has Openplotter automatically booting with necessary charts and services running. I look forward to re-watching your videos and implementing my HA smart boat. I realize there is hardware cost involved but wondering if a video showing Home Assistant running on a pi5 in a docker container might be in order.
This spring I'll be testing Openplotter pypilot running on a pi4, an arduino, an IBT-2 motor controller using a RV awning motor. I made my own steering wheel (disc) similar to the commercially available CPT autopilot. Works well from home. I'll also be testing the bluetooth autopilot app, by Pieter Oskam, using an esp2, arduino, ibt-2, and motor. Since it runs on a esp32, I'm wondering if it would be useful to integrate it into Home Assistant.
Sounds like you have a lot going on! Home Assistant on a separate Rpi is the easiest but you can also install it in supervised mode along side other Linux apps.
community.home-assistant.io/t/installing-home-assistant-supervised-on-a-raspberry-pi-with-debian-11/247116
ok , it's working , but i want to see de PV Voltage and PV Current. It's that possible ? thank you
Really helpful.
I'm wondering if it's possible to use an ESP32 with a display attached to it as an alternative to buying a full tablet. My idea would be essentially a fixed position dedicated dashboard display, possibly with a touch screen to switch between panes. Much like fancy marine displays from Raymarine, b&g etc.
I'm assuming the easiest is to use an spi display and put a dashboard on it with a web browser library?
I use these 2 tablets. They are very cost effective. Especially the waterproof one.
Oukitel RT3 Mini Rugged Tablet 8 Inch HD IP68
s.click.aliexpress.com/e/_Dehawj1
PRITOM 8 Inch Tablet Android 13
s.click.aliexpress.com/e/_Dd8BkAX
Running a full-featured browser on an ESP32 with a display is highly impractical due to the limited hardware capabilities of the ESP32.
@SmartBoatInnovations that's a lot cheaper than most of the tiny TFT displays for the esp32.
I do like the idea of creating fixed cockpit instrument displays but that can be a future winter project.
@SustainableSailing Here is the waterproof tablet installed in the cockpit. Simple fast menu to switch from HA to Navigation etc.
drive.google.com/file/d/14sFfZFIz1F30SlPQo-H4NSAyV3eKbCfr/view?usp=drivesdk
@SmartBoatInnovations are you using opencpn? Is it possible to connect that to ha? (Or is the NMEA 2000 all that is needed)
Can you explain where your ground goes, as with your explanation the voltage is floating. Also worth noting that if you add a second board, make sure you solder the A0 or A1 address tabs on the board.
See my article for more info
smartboatinnovations.com/ina219-voltage
As I mention in the video to ensure accurate voltage measurements with the INA219, the ground (GND) of the INA219 needs to be connected to the same ground reference as the voltage source being measured. This is crucial for maintaining a common reference point and avoiding measurement errors.
Thanks for the video Rob! I am looking to digitize my generator gauges (4 analog dials) and have it display on my HA Dashboard. For this I think I will need 1 ESP32, 4 INA219 and then wire it up to the Westerbeke gauge box. Correct?
@@PtJudeRI Yes that is correct. The esp32 supports 2 I2C devices with the same address so you can connect 2 ina219 directly using different pins. But the other 2 ina219 you will need to connect them in parallel with one of the existing ina219 and you will also need to change their default address. See on my website under articles and ina219 how to do this.
You can use 1 INA3221 (3 channels) and 1 INA219 (1 channel)
@@kinyo666Yes you can. Very good point. Esphome supports the INA3221 as well.
I was wondering if the analogue gauge could be omitted in the set-up i.e. connect the sensor directly to the INA219 and get readings on HA, only. I would like to add a level sensor for my water tank but I don't want to install an analogue gauge, too.
The analogue gauge supplies a constant voltage so you would need to emulate that. In theory it should be possible. Just need to use a buck converter like we power the ESP32 with and setup a voltage divider with a single resistor. The 2nd resistor would be the resistance of the sensor.
Hi Rob, very interesting video. Could you please tell what is the sensor type. I have on my boat sensors for detecting water level in the tanks and I am using KUS 0-190 Ohm sensor. Will the solution you presented also work for that type of sensor? The fee on the sensor is 12VDC. Do you really need the eps32? Can't this INA219 be plugged directly to Arduino or PI ? Thank you!
Yes this should work with your resistance sensor with a 12v supply. The INA219 will measure the voltage and this needs to correlated with a % tank full. With Home Assistant it is much easier to use an esp32 for this type of project. The HAOS is a managed OS and accessing GPIO pins is not straightforward. But if you are using another OS then the Rpi has I2c GPIO pins you can attach the INA219.
Hey Rob, thanks for making these videos. I have been trying to find a suitable semsor for my Rpi5 mcarthur hat set up that will meaure diesel and water tank levels. Both tanks are metal. Any suggestions?
Thanks!
If you already have an internal tank sender then you can use the method I showed in this video. Or you have nothing then maybe install a Ultrasonic Level Sensor on the top of the tank. But I think it would require an entry hole to be made.
There are some Ultrasonic sensors available that can be installed outside the steel tank. Only complication is that they need to be installed under the tank which is not always easy on a boat
The mopeka sensor would work, but I'm not sure I can sync that to a dashboard in open plotter. Trying to avoid having several apps.
@@ATARI_1962I understand your concern about managing multiple apps. It sounds like a great opportunity to consider transitioning to Home Assistant.
Home Assistant is a robust platform that is rapidly growing and widely supported by a vibrant community. It offers the flexibility to integrate a vast array of sensors and devices, which could simplify your setup by bringing everything under one roof. While OpenPlotter has been a fantastic tool, you might find that Home Assistant’s extensive capabilities and ongoing enhancements provide a comprehensive solution that can meet all your needs more efficiently.
{% set volts_empty = 0.1 * volts_half - volts_full %} Can you explain what this does, I could not get gauge to scale with this in place, and ended up placing just a constant in here like the lines above but for empty voltage.
My original yaml was
{% set volts_empty = 2 * volts_half - volts_full %}
I am not sure why you have 0.1 instead of 2
This line is a calculation for the empty voltage.
If you know the actual empty voltage then a constant is fine.
I hope this helps.
@@SmartBoatInnovations Thanks Rob. Great videos by the way.
Amazon breakout board is not available !! Yikes seems there are many Amazon reviews on various boards that they don’t actually fit
The Aliexpress one is available and they sell the breakout board to suit. From Amazon you need to buy the 38pin esp32 that has no mounting holes in the corner. This model will fit the breakout boards the best.
I have updated the Amazon link to a breakout board that is available.
Hello great video.
Could you explain how to handle current sensor 0 to 20 mA?
An other connexion option would be to send data to nmea network in order to share with both home assistant and also boat screens.
You can send the data by connecting your ESP32 to Raspberry Pi (Wifi) with Signal-K server running on. Using the framework SensESP you can get all the data shared and then send it on your NMEA network with a RS485 Expansion HAT. That's a project I am thinking about :)