This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sailor Hat with ESP32
#17
I finally got this working!

I ended up using a Moda sensor from Tank-Edge https://tankedge.com/accessories.html. It was easier thank trying to make one and use touch sensor to try to figure it all out. This sensor takes 12volt in and outputs a signal that I measure through a voltage divider. The divider probably isn’t necessary, as I think the sense wire is less than 5 volts, but I figured better safe than sorry.

I used the ADC code as the base. Due to voltage fluctuations I added MovingAverage after linear to level out the readings.

To get calibration numbers, I had added in a new SK field to display the reading, making it easy to see my highs and lows. Commented it out when I was done.

My next idea is to try to figure out how to use MovingAverage to create a high and low readings averaged over long periods, add some simple math to adjust offset/scale and make the unit self-calibrating.

Question: When you choose “Reset Device” on the web interface of SensESP, does it reset the data also? In essence, would it reset the calibration averages to start from scratch? That would be very slick.
Reply


Messages In This Thread
Sailor Hat with ESP32 - by mairas - 2021-03-29, 10:09 AM
RE: Sailor Hat with ESP32 - by Sailoog - 2021-03-29, 12:50 PM
RE: Sailor Hat with ESP32 - by mairas - 2021-03-29, 12:59 PM
RE: Sailor Hat with ESP32 - by Sailoog - 2021-03-29, 01:12 PM
RE: Sailor Hat with ESP32 - by mairas - 2021-04-01, 07:06 PM
RE: Sailor Hat with ESP32 - by SCarns - 2021-05-18, 03:35 AM
RE: Sailor Hat with ESP32 - by mairas - 2021-05-19, 07:37 AM
RE: Sailor Hat with ESP32 - by SCarns - 2021-05-19, 04:07 PM
RE: Sailor Hat with ESP32 - by SCarns - 2021-06-24, 09:00 PM
RE: Sailor Hat with ESP32 - by mairas - 2021-06-26, 12:08 PM
RE: Sailor Hat with ESP32 - by theseal - 2021-05-18, 11:40 AM
RE: Sailor Hat with ESP32 - by SCarns - 2021-06-26, 11:14 PM
RE: Sailor Hat with ESP32 - by mairas - 2021-06-28, 03:22 PM
RE: Sailor Hat with ESP32 - by SCarns - 2021-07-03, 05:47 PM
RE: Sailor Hat with ESP32 - by SCarns - 2021-07-21, 06:33 PM
RE: Sailor Hat with ESP32 - by mairas - 2021-07-23, 08:38 PM
RE: Sailor Hat with ESP32 - by SCarns - 2021-11-22, 12:18 PM
RE: Sailor Hat with ESP32 - by dwynalda - 2023-12-07, 02:45 PM
RE: Sailor Hat with ESP32 - by SCarns - 2023-12-08, 01:51 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)