Smart Boat 14: Oil Pressure monitor with ESP32, INA219 and Home Assistant

Поділитися
Вставка
  • Опубліковано 2 сер 2024
  • In this video, we delve into setting up oil pressure monitoring for an engine using the versatile ESP32 microprocessor. Having previously utilized the ESP32 for engine temperature monitoring, we'll also it for this new task.
    The integration of oil pressure monitoring into our Smart Boat system has multiple benefits. Notably, it allows for setting alerts when oil pressure deviates from the desired range, triggering alarms, flashing lights, or sending notifications to devices. While many engines have built-in alarms, their effectiveness is often limited in volume. Our system also enables users to review historical oil pressure data, providing valuable insights into engine health and performance.
    The project utilizes the compact and affordable INA219 device, which is connected to the pressure sensor and linked to the ESP32. The final step involves some elementary configurations in Home Assistant.
    Equip yourself to monitor and analyze your boat engine's oil pressure trends efficiently with this detailed setup guide.
    ✔ ESP32 - 38 pins
    🎁 Amazon: Select 38pin model
    geni.us/esp32-38pin
    🎁 AliExpress:
    s.click.aliexpress.com/e/_DFE...
    ✔ ESP32 38 pins Breakout Board
    🎁 Amazon:
    geni.us/esp32-38pin-breakout
    🎁 AliExpress:
    s.click.aliexpress.com/e/_DdP...
    ✔ ESP32 - 30 pins
    🎁 Amazon: Select 30pin model
    geni.us/esp32-30pins
    geni.us/esp32-30pin-kit
    🎁 AliExpress: Mirco USB or USB C models
    s.click.aliexpress.com/e/_DdF...
    ✔ ESP32 30 pins Expansion Breakout Board
    🎁 Amazon:
    geni.us/esp32-30pin-breakout
    🎁 AliExpress:
    s.click.aliexpress.com/e/_DFM...
    ✔ 12v to 5v Converter
    🎁 Amazon:
    geni.us/12v-5v-converter
    🎁 AliExpress: Select the 12V to 5V 3A option
    s.click.aliexpress.com/e/_Deu...
    ✔ INA219 Module:
    🎁 Amazon:
    geni.us/yE8oa
    🎁 AliExpress: Select soldered option or ask them
    s.click.aliexpress.com/e/_Dd2...
    ✔ Dupont breakout cables:
    🎁 Amazon:
    geni.us/Dupont-cables
    🎁 AliExpress:
    s.click.aliexpress.com/e/_DdQ...
    ✔ Junction Box (80mm x 80mm):
    🎁 Amazon:
    geni.us/n9oc7
    geni.us/a3xe
    🎁 AliExpress: Select 83x81x56mm
    s.click.aliexpress.com/e/_DBO...
    If you'd like to support me so that I can buy extra sensors and equipment for future projects:
    💖 Buy Me a Coffee:
    ko-fi.com/smartboatinnovations
    Some links above are affiliate links, meaning I may earn a small commission if you make a purchase. Your support helps fund valuable content. Thank you!
    Chapters
    0:00 Introduction
    3:09 Sa Calobra
    3:18 ESP32 and INA219 Overview
    4:21 Soldering INA219 pins
    6:11 Wiring up INA219 and ESP32
    8:45 Wiring Diagram
    9:29 Connect Oil Sender
    10:37 Add to Home Assistant
    15:10 Sensor Configuration
    22:20 Outro
  • Навчання та стиль

КОМЕНТАРІ • 23

  • @yannistsopelas7217
    @yannistsopelas7217 9 місяців тому +1

    Very nice and helpful video, Rob. Thank you for sharing your knowledge. Looking forward to the next one. :)

    • @SmartBoatInnovations
      @SmartBoatInnovations  9 місяців тому

      Thanks a lot, Yannis! I'm glad you found it helpful. Your feedback encourages me to share more. Stay tuned for the next video! 😊

  • @paial
    @paial 4 місяці тому +1

    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

    • @SmartBoatInnovations
      @SmartBoatInnovations  4 місяці тому +1

      Thanks! I am hoping to make a RPM video next.

    • @SmartBoatInnovations
      @SmartBoatInnovations  Місяць тому

      I now have a Tachometer video. Works great.
      ua-cam.com/video/-xflWB3R2Go/v-deo.html

  • @user-et4oe7pv9z
    @user-et4oe7pv9z 6 місяців тому +1

    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?

    • @SmartBoatInnovations
      @SmartBoatInnovations  6 місяців тому

      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.

    • @user-et4oe7pv9z
      @user-et4oe7pv9z 5 місяців тому +1

      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!

    • @SmartBoatInnovations
      @SmartBoatInnovations  5 місяців тому

      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. @@user-et4oe7pv9z

  • @jaumevadell5924
    @jaumevadell5924 7 місяців тому

    Thanks for sharing your knowledge. It's a very interesting project. Are you considering sending the data to signalk server?

    • @SmartBoatInnovations
      @SmartBoatInnovations  6 місяців тому

      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.

  • @SVRockChalk
    @SVRockChalk 7 місяців тому +1

    Will this work if you are reading resistance or oms will this work if you are reading resistance or ohms?

    • @SmartBoatInnovations
      @SmartBoatInnovations  7 місяців тому

      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.

  • @aktxyz
    @aktxyz 3 місяці тому

    is this with a DS18B20 based temp sensor ?

    • @SmartBoatInnovations
      @SmartBoatInnovations  3 місяці тому

      This video uses the DS18B20...
      ua-cam.com/video/hfo4Pd6KxlE/v-deo.html

  • @SVRockChalk
    @SVRockChalk 8 місяців тому

    I know that my Oil sensor is monitored via resistance. Will this still work?

    • @SmartBoatInnovations
      @SmartBoatInnovations  8 місяців тому +1

      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!

  • @MarleyMarlz1234
    @MarleyMarlz1234 Місяць тому

    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?

    • @SmartBoatInnovations
      @SmartBoatInnovations  Місяць тому

      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.

    • @MarleyMarlz1234
      @MarleyMarlz1234 Місяць тому

      @@SmartBoatInnovations Thanks so much. That all makes sense and I will give it a try.

  • @MarleyMarlz1234
    @MarleyMarlz1234 Місяць тому

    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!

    • @SmartBoatInnovations
      @SmartBoatInnovations  Місяць тому

      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.

    • @MarleyMarlz1234
      @MarleyMarlz1234 Місяць тому

      @@SmartBoatInnovations Thank you, I will keep trying.