Flite - Keg Level, Temperature, and Pressure Sensor

HomeBrewTalk.com - Beer, Wine, Mead, & Cider Brewing Discussion Community.

Help Support Homebrew Talk:

OP
UncleD

UncleD

Supporting Member
HBT Supporter
Joined
Dec 1, 2018
Messages
162
Reaction score
167
How will I be able to sleep at night knowing one of my kegs is 0.5℃ different from the others?
I know I get up about 3 times a night just to check the temperature of my kegerator, so glad I have it on my phone now 😂
 
Joined
Dec 19, 2014
Messages
5,397
Reaction score
1,563
Location
West Palm Beach
I see you have the moral support of @BrunDog :) does this mean that BruControl can read the sensor data?

It seems each sensor needs its own controller (+display). That makes sense if you want a display for each tap. But can multiple sensors be connected to a central controller to be read by something like BruControl or another program?

Awesome awesome awesome project you have here!

Edit (v2): actually, I see that the WeMos D1 is an ESP8266, which I know will play nice with BruControl since I have a few 8266 controllers connected already. And I now see that the headless controllers have the D1 in them, which is awesome. So, set the lid, plug in the headless controller, then happy beer time from there :) I would just need to play with my BruControl to figure out how to connect and get the data.
Not that I know of right now, but maybe I could talk @BrunDog into it :p



As of now, there is a 1:1 relationship between the sensor and controller. The model is built out to support additional wired sensors at additional I2C addresses (or with some type of multiplexer) possibly in the future. However, the most simple and scaleable model is a controller per sensor. This also streamlines the wireless integration effort into other software, in my opinion.



Yes, both the headless controller and the display have an ESP8266. In regards to getting data, check out the API documentation here:

Cheers!
Beat me to the response!
Moral Support: Unequivocally!! The concept, design, and execution are really cool. I think it’s a better idea than measuring keg weight and can also have some more universal applications. I’ve tested the unit and it works really well.

BruControl integration: yes, we need to finalize that. The data can go from the controller tothe application via REST (we just need to put the code into Flite). That can happen immediately. Alternatively,our interface could read the sensors directly via I2C, which is a development effort that will take a bit longer.
 

CDCTx

Active Member
Lifetime Supporter
Joined
Feb 6, 2013
Messages
42
Reaction score
13
Location
Washington, DC
Beat me to the response!
Moral Support: Unequivocally!! The concept, design, and execution are really cool. I think it’s a better idea than measuring keg weight and can also have some more universal applications. I’ve tested the unit and it works really well.

BruControl integration: yes, we need to finalize that. The data can go from the controller tothe application via REST (we just need to put the code into Flite). That can happen immediately. Alternatively,our interface could read the sensors directly via I2C, which is a development effort that will take a bit longer.
Nice! Yeah, dealing with weight/scales just seems a little too involved, and sometimes I have to play musical kegs in my keezer, so shifting the scale systems would be a pain.

I look forward to word about BruControl integration. I might have to stimulate the homebrewing economy if these stimulous checks finally go out :)
 
OP
UncleD

UncleD

Supporting Member
HBT Supporter
Joined
Dec 1, 2018
Messages
162
Reaction score
167
Nice! Yeah, dealing with weight/scales just seems a little too involved, and sometimes I have to play musical kegs in my keezer, so shifting the scale systems would be a pain.

I look forward to word about BruControl integration. I might have to stimulate the homebrewing economy if these stimulous checks finally go out :)
I will keep this thread updated with BruControl integration progress! Happy Holidays everyone!
 

yowzers

Well-Known Member
Joined
May 4, 2017
Messages
178
Reaction score
63
Location
Denver
Great project. I use the keg level indicators from Ballandkeg, which are cheap and super effective, but I'd love to have something electronic that is relatively inexpensive. I'm a sucker for electronic gadgets.
 
OP
UncleD

UncleD

Supporting Member
HBT Supporter
Joined
Dec 1, 2018
Messages
162
Reaction score
167
Just an update, V1.4.0 is released and supports BruControl integration. Here's a link to the support literature:


Thanks @BrunDog for your help! As a professional HMI developer, I've gotta say BruControl is a really easy platform to use to build custom displays for your brewery!
 

CDCTx

Active Member
Lifetime Supporter
Joined
Feb 6, 2013
Messages
42
Reaction score
13
Location
Washington, DC
And here here on BruControl. Hell, if I were a total homebrew nut (...), I could just make my whole house run on the same platform I manage my homebrewing with... Lights, coffeemaker, and all. I love the open and easy way BruControl connects to cheap mainstream controllers for anything.
 

poupou

Supporting Member
HBT Supporter
Joined
Nov 30, 2019
Messages
10
Reaction score
14
It's been mentioned before (either here or on the original thread) about having a single controller to handle multiple flite sensors. The flite documentation even hints at this feature.

This was something I really wanted due to physical kegerator constraints. The good news is that it can be achieved with a "smart" I2C hub that allow multiplexing. I started to clean up my notes about this. You can see what I used to achieve this here and the history behind it. The code also needs a good cleanup but will eventually make it to the repo.

Again a huge thank you to @UncleD for his excellent documentation and encouragements.
 
Last edited:
OP
UncleD

UncleD

Supporting Member
HBT Supporter
Joined
Dec 1, 2018
Messages
162
Reaction score
167
@poupou thank you for documenting your projects and making your design public for anyone to build from! The intent of this project is to create an open sourced alternative to other keg measurement methods! Your feedback has been helpful, and I'm glad to hear this is a good solution for you! I look forward to following your progress!

Cheers!
 

CDCTx

Active Member
Lifetime Supporter
Joined
Feb 6, 2013
Messages
42
Reaction score
13
Location
Washington, DC
Hey y'all! Just posting here in case anyone has had similar issues and can help me sort them. I've sent this issue through the Flite Sense website, but figured maybe someone else has sorted this out.

I am using the headless controller, connected through WiFi. I do not have the controller with display. I intend to watch my keg levels via BruControl.

I have connected my Flite headless controller to my own Wifi network and can load the configuration page in my browser when connected to my home network.

Following the setup instructions as best I can since the instructions assume I have the controller with display, I opened the PRV on my keg to neutralize any pressure and click CALIBRATE ZERO PRESSURE on the server site. It thinks for a second, then I get this (for url http://192.168.1.181/zeroPressure):
1614547008042.png


I've tried a few times, and I get the same result. I decide to see what else I can try to calibrate. I go back to the main page and click CALIBRATE LOW LEVEL. When I do that, I immediately get this (for url http://192.168.1.181/lowCalibration):
1614547092422.png


Just to see if anything will work for me, still with an empty keg, I clicked CALIBRATE HIGH LEVEL. This will make the browser think for a moment, then give me the same error as the pressure calibration (for url http://192.168.1.181/highCalibration):
1614547182304.png


The thing for high level, even though I get an error, it still updates the measured distance... but that isn't helpful since the keg is empty and the low level calibration won't even update the numbers.

Anyone else run into this and/or have some advice? I get the same errors whether I use Edge on my PC or Chrome on my Android phone.
 
OP
UncleD

UncleD

Supporting Member
HBT Supporter
Joined
Dec 1, 2018
Messages
162
Reaction score
167
Great catch @CDCTx !

I found the bug that cause the problem with the low calibration (classic copy and paste error), and I've added feedback in the browser for high/low calibration and zero pressure.

The firmware has been updated to 1.4.1 and can be flashed with BrewFlasher. Let me know if you have any other issues after the update!

Cheers!
 

CDCTx

Active Member
Lifetime Supporter
Joined
Feb 6, 2013
Messages
42
Reaction score
13
Location
Washington, DC
I'll try, thanks for the response! I thought about a firmware update earlier and plugged the headless in to my USB. But I couldn't get the device to be recognized as a COM port. Windows only viewed it as a USB 2.0 Serial connection with some alert shown in Device Manager, and I couldn't work around that recognition (driver updats, etc.). Anything I should do to help get BrewFlasher to see it?
 

CDCTx

Active Member
Lifetime Supporter
Joined
Feb 6, 2013
Messages
42
Reaction score
13
Location
Washington, DC
Great update (and turnaround on pushing it out). No issues with pressure and low calibration now. I tried to do high calibration with just water, but it doesn't seem to be playing right. Does the ToF sensor work well with just water? Or do I need to use something with some gravity/color in it to have it pick up the high level?
 

LBussy

A Cunning Linguist
HBT Supporter
Joined
Jan 19, 2013
Messages
3,197
Reaction score
1,221
Location
Kansas City
I used it with water. You may however have splashed water on it, or maybe it's too full? The sensor should not be submerged.
 
OP
UncleD

UncleD

Supporting Member
HBT Supporter
Joined
Dec 1, 2018
Messages
162
Reaction score
167
@CDCTx water should work for calibration, which is what I usually do for an "initial" calibration. Once I keg a beer, I will re-calibrate the "high" with my known volume of beer. And once the keg blows I will re-calibrate my "low" at 0 there. You should only need to do this for the first batch through the keg, not every time.

I have found less stability with water than beer, but you should still be getting some good numbers. How far away from the sensor face is the top of the water? What readings are you getting? Also, it's worth noting that the sensor cannot read distances CLOSER than 30mm, so if the water level is within that distance, your readings will likely be erratic.

I'll make a note to add this to the user's guide calibration procedure.
 

CDCTx

Active Member
Lifetime Supporter
Joined
Feb 6, 2013
Messages
42
Reaction score
13
Location
Washington, DC
It looks like it is now reading correctly. Maybe some water got on it when I put the lid on and it dried overnight. I measured 5 gal, which got me just below the gas tube in thr keg. It reads 28mm, which sounds about right.

The sensor is bouncing with gallon volumes, so I assume that's just instability with pure water. Fortunately, I have a gose that needs to be transferred today :) thanks again for your assistance!
 

CDCTx

Active Member
Lifetime Supporter
Joined
Feb 6, 2013
Messages
42
Reaction score
13
Location
Washington, DC
Huh... how about another one for you, @UncleD. I had it all calibrate with water. I then sanitized the keg and lid, with drying around the sensor points and the contact points for the headless sensor. I pushed the sanitizer solution out with CO2, then pressure transferred the beer into the keg, stopping well below the sensor since I had transferred a small amount in a smaller keg. I've also tried depressurizing the keg, removing the lid (don't worry, I kept some CO2 streaming to keep oxygen out), cleaned and dried around the sensor points, then reinstalled the lid and plugged it in again. Sadly, still no dice... These numbers aren't moving or bouncing; they just hold here no matter what I do.

1614701397693.png
 
OP
UncleD

UncleD

Supporting Member
HBT Supporter
Joined
Dec 1, 2018
Messages
162
Reaction score
167
Sorry to hear @CDCTx, those are the default values when the controller isn't seeing any data from the sensors.

Silly question, It looks like the controller is disconnected from the sensor. Are you sure the controller is plugged all the way into the sensor lid connector?

I'm also happy to send you a test sensor and controller to troubleshoot what may be the problem!
 

CDCTx

Active Member
Lifetime Supporter
Joined
Feb 6, 2013
Messages
42
Reaction score
13
Location
Washington, DC
Thanks, @UncleD For helping me sort through the issue!

For the benefit for all here, the lid seemed to be the issue. We aren't sure what led to it, but once I got a replacement one to test with, it became clear the original lid was the point of issue. The original lid will sometimes function properly, but then throw numbers that are 1) impossible and 2) indicate an issue. The good news is, the headless controller is good to go. Just in case there was a cleaning/sanitizing issue, I will gently clean the sensor area and pat dry with a paper towel. For added safety, I will stick a corner of a paper towel into the external port (where the controller plugs in) so I get all the water out.

I also had an issue with BruControl not showing the numbers that Flite was sending it. UncleD asked me to check my firewall settings, and that was the cause; Windows Defender was blocking incoming connections, even from my home (private) WiFi network. I confirmed this by disabling Windows Defender's firewall for my private network and then went to my Flite's IP and sent a cloud test. The numbers immediately appeared in BruControl. Success! I then reactivated the firewall for security.

To keep my firewall protection, even from my home network devices, I did the following:

1) Opened Windows Security by going to the task bar search option and typing "Windows Security"
2) Clicked Firewall & network protection (left column)
3) Clicked Advanced settings at the bottom
4) When the Windows Defender Firewall with Advanced Security window opened, I clicked Inbound Rules
5) Click New Rule... in the Actions pane
6) Select the Port radio button, then select Next
7) Select TCP, then enter the port number set in BruControl in Specific local ports. Select Next
8) Select Allow the connection radio button
9) For security, ensure only the Private network is selected (deselect Domain and Public)
10) Enter whatever name you want for this rule, then select Finish
11) Have a homebrew

Thanks again, @UncleD! I already see my beer level decreasing as I serve my new NEIPA to friends. If you could come up with a device that automatically refills the beer I served so I didn't have to rebrew it, what would be fantastic ;)
 

lablover

Well-Known Member
Joined
Feb 22, 2018
Messages
62
Reaction score
17
Have you guys done anything to use and or certify that you use food grade plastic in the enclosure? It sounds like most people on this thread don't seem to care about that, but if you ever want wide distribution you will have to get some sort of certification that the plastic is of food grade quality.
 
Joined
Jan 3, 2021
Messages
10
Reaction score
2
Hello,
I need some troubleshooting help. I'm using the display only. When the sensors are hooked to the display assembly, the display will freeze. With sensors unhooked, display works. What I mean by the display works is I get responses when touching the calibration buttons. I have checked the wiring and for shorts over and over. All checks good. I have checked 3.3v and ground. I did continuity test from sensors through the cable to the WeMos. All is good.
See the attached pictures. First picture is when the Flite is first turned on. Second picture is after around five minutes. And the third picture is after the display has been on for about seven minutes. The display is frozen. Touching the calibrate buttons has no response.
Thank you
 

Attachments

LBussy

A Cunning Linguist
HBT Supporter
Joined
Jan 19, 2013
Messages
3,197
Reaction score
1,221
Location
Kansas City
I'm not sure if Derrick left Serial output - but have you checked that? Maybe a clue there.

He's either working or golfing, I'm sure @UncleD will be around sooner or later with another idea.
 
Joined
Jan 3, 2021
Messages
10
Reaction score
2
LOL.
Here are some pictures of the results using Putty. The first picture is with the sensors connected to the display. The second picture is with the sensors disconnected from the display.
 

Attachments

Joined
Jan 3, 2021
Messages
10
Reaction score
2
LOL.
Here are some pictures of the results using Putty. The first picture is with the sensors connected to the display. The second picture is with the sensors disconnected from the display.
Also notice that it will not get past the DNS Services Started with the sensors connected. With the sensors disconnected, the screen will go to ready.
 

LBussy

A Cunning Linguist
HBT Supporter
Joined
Jan 19, 2013
Messages
3,197
Reaction score
1,221
Location
Kansas City
Okay I looked back at the code and realized he repurposed the serial connection for the I2C. So, while you learned a valuable skill dealing with microcontrollers - it's not gonna help here. Sorry about that! :)

Aside from checking the docs and tracing out all the wires, I'm not sure what else to say. If you've potted in the parts it's going to be challenging to check everything.
 
Joined
Jan 3, 2021
Messages
10
Reaction score
2
No, its not potted. I did check the distance sensor with an Arduino program and it works fine. I have no Arduino program to check the pressure sensor. I did disconnect the pressure sensor and only the distance in the circuit but still does not work.
Yes, I traced the wires and they are correct.
 

LBussy

A Cunning Linguist
HBT Supporter
Joined
Jan 19, 2013
Messages
3,197
Reaction score
1,221
Location
Kansas City
Well, another thing you can try that's free is to re-flash using BrewFlasher. Make sure you check the "Clear settings" box (which will wipe out your WiFi as well) and then when it comes up, be sure to attach it to your WiFi again. Sometimes EEPROM gets corrupt for no good reason. Clearing the flash seems to be good first aid with these projects.
 
Joined
Jan 3, 2021
Messages
10
Reaction score
2
Well, another thing you can try that's free is to re-flash using BrewFlasher. Make sure you check the "Clear settings" box (which will wipe out your WiFi as well) and then when it comes up, be sure to attach it to your WiFi again. Sometimes EEPROM gets corrupt for no good reason. Clearing the flash seems to be good first aid with these projects.
Ok, reflashed with BrewFlasher and erasing all data. Still not working. I did notice when I touch the screen, the blue LED on the WeMos will turn on. Another thing, when I tried to reflash the WeMos with the sensors connected, BrewFlasher will not connect to the WeMos. Also, the configuration(192.168.4.1) page will not load with the sensors connected.
It is a mess :)
 

LBussy

A Cunning Linguist
HBT Supporter
Joined
Jan 19, 2013
Messages
3,197
Reaction score
1,221
Location
Kansas City
Not connecting with the sensors connected makes sense - the sensors are on those pins. The rest ... well, we need Derrick back. Maybe he's hit this before.

I know work is getting in the way of play for him lately, so it may be a minute.
 
Joined
Jan 3, 2021
Messages
10
Reaction score
2
Not connecting with the sensors connected makes sense - the sensors are on those pins. The rest ... well, we need Derrick back. Maybe he's hit this before.

I know work is getting in the way of play for him lately, so it may be a minute.
Thats ok, I really appreciate your help.
 
Joined
Jan 3, 2021
Messages
10
Reaction score
2
Well, I got the Flite working. Here is what I did; I decided to test the distance sensor again from the cable connector to the sensors using the Arduino. The Arduino program would not run. So I disconnected the pressure sensor and sure enough, the distance sensor was working. I decided to take another look at the spec data for the pressure sensor. Apparently, when identifying pin one, I was using the dimple on the bottom side of the pressure sensor as pin one. I never seen the dimple on top of the sensor next to the lettering. So, I had the sensor wired wrong. How stupid of me!!! I have checked the wiring so many times. Now, I feel like a idiot.
Maybe this will help someone else.
LBussy, again thank you for all your help.
 
Top