Transmit Tilt Hydrometer to ESP32 microcontroller

Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum

Help Support Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

eimar

Brasserie Montfort No NEIPA brewed here
Joined
Oct 11, 2009
Messages
160
Reaction score
128
Location
Montreal, Canada Eh
I just completed a "sketch" to program an ESP32 microcontroller using the Arduino IDE ( integrated development environment ) . The Tilt acts as a BLE ( bluetooth low energy ) ibeacon ) . The ESP32 starts a scan and if the Tilt is detected the ESP32 acquires the Gravity and Temperature. The temperature and Gravity are displayed on the arduino IDE terminal. The 2nd part of the project will be to control my fermentation refrigerator using a 5V relay.
If anyone is interested I can email you the sketch.

Jacques
 
While I'm not that tech savvy, especially around these kind of components but isn't what you're doing already been done using Fermentrack and Tiltbridge?
 
I just completed a "sketch" to program an ESP32 microcontroller using the Arduino IDE ( integrated development environment ) . The Tilt acts as a BLE ( bluetooth low energy ) ibeacon ) . The ESP32 starts a scan and if the Tilt is detected the ESP32 acquires the Gravity and Temperature. The temperature and Gravity are displayed on the arduino IDE terminal. The 2nd part of the project will be to control my fermentation refrigerator using a 5V relay.
If anyone is interested I can email you the sketch.

Jacques


Nice! I use BruControl to do this, but a sketch for standalone would be great also...

Thoughts :
1 - start with 2-channel from the beginning for heat/cool, making it fairly simple to choose any of the available GPIO for the heating and cooling(commenting in the sketch if nothing else) for use with any off-the shelf products like smart-switches that have outputs pre-wired
2 - add 1-wire temp control for a backup temp probe
3 - add ability for a local display for either nodemcu or huzzah-feather format.. (feather format has a battery backup, which is nice
 
myndflyte : You are correct.
1)Fermentrack " Additionally, a Bluetooth receiver is required for Tilt Hydrometer support. "
2) TiltBridge "The only component required for a TiltBridge is an ESP32-based board "
I"m a ( retired ) electronic technician so I needed some challenge.
clearwaterbrewer:
step 1) First I started with the Arduino , and wanted to do a simple refrigerator controller without any display.
I purchased a thermowell from Amazon and built a 110 volts outlet controled by a 5 Volts relay.

step 2) Then I learned about the Wifi ESP8266 controller so I bought a NodeMCU .
The arduino measured the temperature of the DS18B20, transmit the data via Software Serial to the ESP8266 .
The ESP8266 then transmis the data via wifi to my headless Raspberry pi .
The temperature is nicely displayed on the raspberry using Tkinter.

step 3) Then I purchased a Tilt hydrometer and learned about the ESP32 etc... :)
Here are the pictures of the

I like the huzzah feather suggestion for battery backup

picture of step 2 hatdware:

IMG_2946.JPG
 
Last edited:
I wish i had enough programming knowledge to do this. I have tried 3 different things with my Pi and have failed at all of them so far.
 
Some small progress:
1) The Tilt transmit the data ( via Bluetooth BLE) to the ESP32-1
The sketch requires 85% of the ESP32-1 memory, just to acquire the Tilt data.
2) the ESP32-1 transmits the Tilt data ( via Hardware serial ) to the ESP32-2
3) The ESP32-2 transmits the Tilt data ( via Wifi ) to the headless Raspberry Pi .
4) The Raspberry Pi displays the tilt data in nice Tkinter labels
5) As the Raspberry Pi is headless, I have to display the Temperature and gravity labels on my laptop using VNC viewer.

IMG_2962.JPG
 
I added a Dallas DS18B20 temperature probe to the ESP32-2. The final version will use the DS18B20 waterproof version in a thermowell for controlling the refrigerator. Here is a picture of the display on the raspberry pi.
The name of my homebrewery is Brasserie Montfort ( where I was born in Belgium ) . So I named my brewery controller the "Montroller"

Jacques
Montrollerdisplay.jpg
 
I just completed a "sketch" to program an ESP32 microcontroller using the Arduino IDE ( integrated development environment ) . The Tilt acts as a BLE ( bluetooth low energy ) ibeacon ) . The ESP32 starts a scan and if the Tilt is detected the ESP32 acquires the Gravity and Temperature. The temperature and Gravity are displayed on the arduino IDE terminal. The 2nd part of the project will be to control my fermentation refrigerator using a 5V relay.
If anyone is interested I can email you the sketch.

Jacques
Hi, I know this is a very old post. I was wondering if you still had the sketch for the ESP32. I am trying to use the ESP32 as a repeater from the Tilt to the Raspberry PI Zero W with a small HDMI monitor. I can get the tilt to work on the raspberry PI and screen to the HDMI monitor, but I cannot get the ESP32 to work even though this sketch is listed in Github ;- I will upload the file
 

Attachments

  • 72658a024eb0dfde6d1c0958092acd42-5018cd65d78fe204128685a06833f5bcb12950a6.zip
    2.6 KB · Views: 41
Nedhbb, 3 days ago I had the same request from a member of the Tilt facebook group. Unfortunately I left home last week and will be back in june. So I'm afraid you'll have to wait. From the picture on your avatar it looks like you are the John Seamons who asked the same question on the Tilt facebook group. ( same moustache :) ) . I never heard about the ESP32-S2 before . A quick look at the specifications shows that he ESP32-S@ does not have Bluetooth low energy so can't get data from the Tilt. You' ll have to be patient.

Jacques
 
Not sure if this is the sketch you're using, but here is a Tilt Repeater sketch for the ESP32. I had no issues with loading it on an ESP32S.
https://gist.github.com/N3MIS15/72658a024eb0dfde6d1c0958092acd42
I wish i had enough programming knowledge to do this. I have tried 3 different things with my Pi and have failed at all of them so far.
Not sure if this is the sketch you're using, but here is a Tilt Repeater sketch for the ESP32. I had no issues with loading it on an ESP32S.
Yeah thats the one I have been using, but still cannot get the ESP32 to read the tilt and log to the PI, not sure which one. It think it was loaded sucessfully as it said 100% and hard pin resetting. I have been using the Tilt - PI - Hdmi successfully for 12 months just need something with a bigger range for another brew fridge. Cheers
 
Nedhbb, 3 days ago I had the same request from a member of the Tilt facebook group. Unfortunately I left home last week and will be back in june. So I'm afraid you'll have to wait. From the picture on your avatar it looks like you are the John Seamons who asked the same question on the Tilt facebook group. ( same moustache :) ) . I never heard about the ESP32-S2 before . A quick look at the specifications shows that he ESP32-S@ does not have Bluetooth low energy so can't get data from the Tilt. You' ll have to be patient.

Jacques
Ha Ha Jacques, ;) Thats me no disguising that moustache. :yes: Hey mate you know brewers have no patience:D. I promise that I will not email you again. Untill you converse with me. Its only a ESP32 I think RocketBrewer mentioned a ESP32S (might have been a typo)
ESP32.jpg
 
Not a typo, here is the version I used. I didn't think it was working at first, but it was. For whatever reason, it was only repeating the reading about every 66 seconds. I kept moving my Pi as far as I could without unplugging it. The readings started coming over a minute apart and I thought it wasn't working, just getting harder to pick up the Tilt. Then I unplugged the repeater and I quit getting a reading at all, plugged it back in and the readings started coming in again (about 66 seconds apart). I followed these instructions before flashing with the Arduino IDE. I didn't have to hold the "Boot" button when flashing it though.
 
Not a typo, here is the version I used. I didn't think it was working at first, but it was. For whatever reason, it was only repeating the reading about every 66 seconds. I kept moving my Pi as far as I could without unplugging it. The readings started coming over a minute apart and I thought it wasn't working, just getting harder to pick up the Tilt. Then I unplugged the repeater and I quit getting a reading at all, plugged it back in and the readings started coming in again (about 66 seconds apart). I followed these instructions before flashing with the Arduino IDE. I didn't have to hold the "Boot" button when flashing it though.
RocketBrewer Sorry Mate I did not mean to offend in that statement. Anyway good news. I feel blood stupid.
I flashed the esp32 that many times its a wonder it did not give up the ghost. I Flashed it with one of the samples and had a BLE scanner on my phone and low and behold it came up before I unplugged it from the computer (Would not do that with the power pak)
The little book converters for the power LM2596 you can regulate the volts (I was just using any old Power Pak from a phone etc 6 volts)
To get to the solution I had the converters running a 3.95 volts (What HarryBrew69) said to do. Once I powered it up to 5 volts they both worked. Looks like they are very sensitive to a voltage. Bloody Hurrah.
You can actually change that 60 sections in sketch section before you upload it. 3rd Line. Cheers.

// User Settings
int SCAN_TIME = 5; // Duration to scan for bluetooth devices (in seconds).
int TIME_TO_SLEEP = 60; // Duration ESP32 will go to sleep between scans (in seconds).
int fastSleep = 4; // Scan more often if no Tilts are found. TIME_TO_SLEEP(60) / fastSleep(4) = scan every 15 seconds. Use 0 to disable.
int repeatColour = 0; // Choose Tilt colour to repeat. 0=All, 1=Red, 2=Green, 3=Black, 4=Purple, 5=Orange, 6=Blue, 7=Yellow, 8=Pink.
bool Celsius = true; // Use Celcius while logging to serial.
 
Nedhbb, 3 days ago I had the same request from a member of the Tilt facebook group. Unfortunately I left home last week and will be back in june. So I'm afraid you'll have to wait. From the picture on your avatar it looks like you are the John Seamons who asked the same question on the Tilt facebook group. ( same moustache :) ) . I never heard about the ESP32-S2 before . A quick look at the specifications shows that he ESP32-S@ does not have Bluetooth low energy so can't get data from the Tilt. You' ll have to be patient.

Jacques
Anyway good news. I feel bloody stupid.
I flashed the esp32 that many times its a wonder it did not give up the ghost. I Flashed it with one of the samples and had a BLE scanner on my phone and low and behold it came up before I unplugged it from the computer (Would not do that with the power pak)
The little book converters for the power LM2596 you can regulate the volts (I was just using any old Power Pak from a phone etc 6 volts)
To get to the solution I had the converters running a 3.95 volts (What HarryBrew69) said to do. Once I powered it up to 5 volts they both worked. Looks like they are very sensitive to a voltage. Bloody Hurrah.
 
RocketBrewer Sorry Mate I did not mean to offend in that statement. Anyway good news. I feel blood stupid.
I flashed the esp32 that many times its a wonder it did not give up the ghost. I Flashed it with one of the samples and had a BLE scanner on my phone and low and behold it came up before I unplugged it from the computer (Would not do that with the power pak)
The little book converters for the power LM2596 you can regulate the volts (I was just using any old Power Pak from a phone etc 6 volts)
To get to the solution I had the converters running a 3.95 volts (What HarryBrew69) said to do. Once I powered it up to 5 volts they both worked. Looks like they are very sensitive to a voltage. Bloody Hurrah.
You can actually change that 60 sections in sketch section before you upload it. 3rd Line. Cheers.

// User Settings
int SCAN_TIME = 5; // Duration to scan for bluetooth devices (in seconds).
int TIME_TO_SLEEP = 60; // Duration ESP32 will go to sleep between scans (in seconds).
int fastSleep = 4; // Scan more often if no Tilts are found. TIME_TO_SLEEP(60) / fastSleep(4) = scan every 15 seconds. Use 0 to disable.
int repeatColour = 0; // Choose Tilt colour to repeat. 0=All, 1=Red, 2=Green, 3=Black, 4=Purple, 5=Orange, 6=Blue, 7=Yellow, 8=Pink.
bool Celsius = true; // Use Celcius while logging to serial.

No offense taken at all, hopefully I didn't offend you either, sounds like you have a bit more knowledge than me about these units. I was pretty surprised that mine worked on the first try! Glad you got it figured out and thanks for the tip on the repeating time. I figured it was a setting in the code, just hadn't taken the time to look for it. Probably won't bother to change it. interesting info about the voltage too, I had planned to regulate the voltage down to 3.3v, but maybe I will just continue to use a USB charger. I'm still pretty new to using these micro controller/computers and have a lot to learn. Cheers!
 
No offense taken at all, hopefully I didn't offend you either, sounds like you have a bit more knowledge than me about these units. I was pretty surprised that mine worked on the first try! Glad you got it figured out and thanks for the tip on the repeating time. I figured it was a setting in the code, just hadn't taken the time to look for it. Probably won't bother to change it. interesting info about the voltage too, I had planned to regulate the voltage down to 3.3v, but maybe I will just continue to use a USB charger. I'm still pretty new to using these micro controller/computers and have a lot to learn. Cheers!

No not at all. I had zero knowledge of the ESP. Just did it off the utube video by HarryBrew69. I was about to give up and okay that's not in my nature and I put a BLE scanner on my phone to see that the ESP sketch was working. Downloaded a example BLEBeacon sketch (I think that was it) and it showed up when it was hooked via the USB to the computer. Light bulb moment, I thought okay perhaps it was something to do with the low voltage I had set, and it was and it needed 5 volts to the USB. I just use an old phone charger, hooked to the LM2596 (you can regulate the voltage up and down) Little bit of soldering and ensuring you get the polarity correct. I think it only cost me $25 AUD for two sets from "Bangood" I don't log to google. I have a small HDMI screen in the brew room in the shed and I have WIFI via a powerline kit, so that I can view on the PC in the house to see what going on. I would also love to learn more about micro/controllers, but I think it beyond me. Stay Safe
 
Back
Top