Portable Generator made smart

Hello Folks. I am trying to make my portable silent diesel generator smarter with a fuel guage being the first challenge.

It has one of these guages and because it is still under warranty I would like to make a non intrusive sensor to stick on top of the guage.

I need some guidance from the forum please. Would it be better/easier to use esphome esp32 with a color sensor to measure the red/white ratio, or an esp32 cam to determine the guage reading?

I could not find a post where someone has tried this approach to measure this type of guage.

1 Like

3d print a new cap for the tank with a distance sensor on?

I have used ESP32cam as a colour sensor with MQTT connection for sensor data. The code may be able to read that gauge with some mods - but it’s covered by a NDA so can’t link it unfortunately.

The concept was based on some open source code - if you decide to try the ESP32cam I can see if I can find that.

Glue a small magnet on dial and use linear hall sensor to detect it

1 Like

Question: Is the fuel tank on the generator? That would mean vibration is an issue.

If not, then I’d go with an ultrasonic sensor tucked into the existing cap or a replacement one.

If so, look at regular analog float sensors used in vehicle and marine fuel tanks.

Either way, an ESP32 (or even an ESP8266) could easily send the signal to HA.

Thank for all the replies.
Tank is on the generator, so vibration is an issue for ultrasonic.
Could not find a drop in electrical replacement sensor that fit.
I like the option to 3d print a cap with an electrical sensor. Also like the magnet and linear hall sensor.

I had started building a colour detection sensor using a row of red leds and a cool white light source.
Will feed back on how that worked out. If it does not work, I will try the magnet option next.

I have a similar gauge on my home hardware portable generator.
I used esp32 cam module to take a photo every 5 minutes and compare the percentage of white in the gauge window. Defines a region of interest (ROI) with number of pixels…100% white pixels = fuel empty, 0% white = fuel full.

Because it’s a photo it handles the genny vibration well. I added a couple of white LEDs to help the camera “see” in the dark enclosure.

The issue I am trying to solve next is that I don’t leave my genny outside so I am having issues with the ROI when I take out and put the genny back in - it is not 100% in the exact same spot.

1 Like