• Please visit and share your knowledge at our sister communities:
  • If you have not, please join our official Homebrewing Facebook Group!

    Homebrewing Facebook Group

Yet another DYI Plato scale

Homebrew Talk

Help Support Homebrew Talk:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
Nice to find this thread. I has been experimentig with hx711 and load cells to weight the fermenter.
I want to find the delta as co2 exit to calculate the amount of alcohol and then the Plato.
As you mention time drift make it almost impossible.
I have not noticed that there is much drift when I have done long term tests. My main issue is interference from the fridge and temperature that causes the level to change in intervals.

I dont know if the load cells have the needed accuracy for your applications, what is the difference in weight that you are trying to detect ?

You are probably better off trying to measure the gas that is exiting using some kind of flow sensor. I've been tinkering on another project for measuring pressure in a fermentation vessel but I haven't worked on that for a while.
 
What do you guys mean by time drift? Inaccuracies of measuring over time? What causes this? Software or hardware issue?
 
What do you guys mean by time drift? Inaccuracies of measuring over time? What causes this? Software or hardware issue?
Typically the level will change over time, for example it can drop over time. This is most often hardware related and due to poor quality in the load cells. A cheap scale will typically do a zero leveling when starting up and turn off over time. These scales are most reliable that way, which is not really the case here... I have noticed that temperature and humidity will have an effect but it quite stable over time. I try to compensate for some of these issues in the software which is a challenge.
 
I have been running Kegmon v0.6.0beta1 with ESP32-s2 for a few days now. Stable and no big issues.

When I first built the unit with D1 mini, I connected VDD on DHT22 to 3V3 according to the schematic at that time.
Yesterday, I changed DHT22's VDD connection to JP1.5/D6 as in the latest schematic.
ESP32-s2 did not recognize any temp sensor unless I flashed firmware via Web interface again. Then it worked for some time before temp sensor was gone again (Web interface/ MQTT).
Today, I connected VDD back to 3V3. All ok.

I wonder if the voltage level from ESP32-s2 I/O's is on the edge to be too low for the DHT22 (Rated 3.3 - 6V). Sorry, forgot to measure.
DHT22 current (1-1.5mA) should be ok.
Any voltage differences on the I/O ports for D1 mini vs ESP32-s2 maybe?
 
I have been running Kegmon v0.6.0beta1 with ESP32-s2 for a few days now. Stable and no big issues.

When I first built the unit with D1 mini, I connected VDD on DHT22 to 3V3 according to the schematic at that time.
Yesterday, I changed DHT22's VDD connection to JP1.5/D6 as in the latest schematic.
ESP32-s2 did not recognize any temp sensor unless I flashed firmware via Web interface again. Then it worked for some time before temp sensor was gone again (Web interface/ MQTT).
Today, I connected VDD back to 3V3. All ok.

I wonder if the voltage level from ESP32-s2 I/O's is on the edge to be too low for the DHT22 (Rated 3.3 - 6V). Sorry, forgot to measure.

DHT22 current (1-1.5mA) should be ok.
Any voltage differences on the I/O ports for D1 mini vs ESP32-s2 maybe?
You can run the DHT22 on VCC as well, but I had issues that it stopped working and I lost the temperature readings, if its connected to D6 I can try to power on/off the sensor and get it up and running again. I also read that the sensor should not be read too often so I also changed the interval when the sensor is read. I have not confirmed if the read interval was the reason or not.

Both the ESP8266 and ESP32 should deliver enough current on the GPIO to power the temp sensor. The S2 can deliver 40mA which I think is twice the power of the ESP8266.

Its interesting that you have issues with powered by the D6 pin, i have not converted my build to ESP32S2 yet but I plan to do that.

It could be that the power drops too much if the cable to the temp sensor is long. I will check that when I convert my build. I have only tested it on my breadboard setup with the S2.

I have added support for DS18B20 in the beta 1 so that might be a more stable option for temperature and long distance, but you will loose the humidity data then.
 
I have been running Kegmon v0.6.0beta1 with ESP32-s2 for a few days now. Stable and no big issues.

When I first built the unit with D1 mini, I connected VDD on DHT22 to 3V3 according to the schematic at that time.
Yesterday, I changed DHT22's VDD connection to JP1.5/D6 as in the latest schematic.
ESP32-s2 did not recognize any temp sensor unless I flashed firmware via Web interface again. Then it worked for some time before temp sensor was gone again (Web interface/ MQTT).
Today, I connected VDD back to 3V3. All ok.

I wonder if the voltage level from ESP32-s2 I/O's is on the edge to be too low for the DHT22 (Rated 3.3 - 6V). Sorry, forgot to measure.
DHT22 current (1-1.5mA) should be ok.
Any voltage differences on the I/O ports for D1 mini vs ESP32-s2 maybe?
I swapped my esp8266 to a esp32s2 and I got the same result as you, no temp sensor. I will do some more tests during the weekend to figure out if this is the power level or data signal from the sensor. There is a recommendation to add a pullup resistor (5k) the data signal that might solve the problem.
 
I swapped my esp8266 to a esp32s2 and I got the same result as you, no temp sensor. I will do some more tests during the weekend to figure out if this is the power level or data signal from the sensor. There is a recommendation to add a pullup resistor (5k) the data signal that might solve the problem.
From datasheet, there seems to be a possibility to define pullup/down in software for GPIO pins. Maybe it is only a "fake" pullup.

I did some tests yesterday. Connected AM2302 (DHT22) with short leads to the replaced D1 mini. Unfortunately, I do not have any spare ESP32-s2 at the moment, which would be more correct to test with.
D6 voltage on the D1 mini was negligible lower than the 3V3 pin.
On the scope, everything seemed to be fine.

According to your build description, pin8/Brown on the Cat6 is DHT22 data. Pin7/Brown-White is unused. Instead of floating, maybe it is better to connect it to DHT22 GND (Pin1/Orange-White)?
I have to check my layout if I have already done this.
Btw: My Cat6 cables are 1.5m round UTP.

I read somewhere that the 4-pin AM2302 already has an inbuilt pullup(?) Some also recommends adding a 100nF, and maybe a 10nF cap close to the DHT22 to fight noisy signals.

According to misc forums, it looks like the DHT22 is quite unpredictable. A good idea you added DS18B20 as an alternative. Rock solid if you are able to get hold of original Maxim ones :)
 
From datasheet, there seems to be a possibility to define pullup/down in software for GPIO pins. Maybe it is only a "fake" pullup.

I did some tests yesterday. Connected AM2302 (DHT22) with short leads to the replaced D1 mini. Unfortunately, I do not have any spare ESP32-s2 at the moment, which would be more correct to test with.
D6 voltage on the D1 mini was negligible lower than the 3V3 pin.
On the scope, everything seemed to be fine.

According to your build description, pin8/Brown on the Cat6 is DHT22 data. Pin7/Brown-White is unused. Instead of floating, maybe it is better to connect it to DHT22 GND (Pin1/Orange-White)?
I have to check my layout if I have already done this.
Btw: My Cat6 cables are 1.5m round UTP.

I read somewhere that the 4-pin AM2302 already has an inbuilt pullup(?) Some also recommends adding a 100nF, and maybe a 10nF cap close to the DHT22 to fight noisy signals.

According to misc forums, it looks like the DHT22 is quite unpredictable. A good idea you added DS18B20 as an alternative. Rock solid if you are able to get hold of original Maxim ones :)
I've tried the GPIO pin configuration on the ESP32 and none of them seams to work when I have long cables. I measured the output on my board and it was 3.3V which is the same as on the ESP8266. I also tried adding a 4.7k pullup to the data signal without success.

Connecting the brown white to GND is a good idea, I will update the build instructions. Could not hurt.

I'm building an extra base and I will use the DS18B20 sensor on that instead to see if that work better with the s2. I've also read that the DHT22 is an unstable sensor so I might be better to move away from that one. I have had issues, which is why I added the possibility to reset it and get some readings. For the temperature correction to work I need to have a stable temperature reading.
 
I've tried the GPIO pin configuration on the ESP32 and none of them seams to work when I have long cables. I measured the output on my board and it was 3.3V which is the same as on the ESP8266. I also tried adding a 4.7k pullup to the data signal without success.

Connecting the brown white to GND is a good idea, I will update the build instructions. Could not hurt.

I'm building an extra base and I will use the DS18B20 sensor on that instead to see if that work better with the s2. I've also read that the DHT22 is an unstable sensor so I might be better to move away from that one. I have had issues, which is why I added the possibility to reset it and get some readings. For the temperature correction to work I need to have a stable temperature reading.
Is the DS18B20 connected the same way:
GND ---> GND
VCC ---> 3V3
DQ ---> D7
And a 4k7 between DQ and VCC "as usual" ?
 
Is the DS18B20 connected the same way:
GND ---> GND
VCC ---> 3V3
DQ ---> D7
And a 4k7 between DQ and VCC "as usual" ?
4k7 is “usual” on 5v vcc. On 3v you are better off with 3k3.
Lower pullup get better noise inmunity. I go as low as 820 ohms on long lines.
 
Nice to find this thread. I has been experimentig with hx711 and load cells to weight the fermenter.
I want to find the delta as co2 exit to calculate the amount of alcohol and then the Plato.
As you mention time drift make it almost impossible.
Is evaporation not large enough to make a difference?
 
After some chemistry calculations, for every 40g of alcohol 44g of co2 are produced. Some of it remains in the liquid and in head space. But the co2 that goes out in the bubbles leave the system, the weight goes down.
 
After some chemistry calculations, for every 40g of alcohol 44g of co2 are produced. Some of it remains in the liquid and in head space. But the co2 that goes out in the bubbles leave the system, the weight goes down.
So if you have a 23 liter batch (make that 23 kg for easy math) and the alcohol content is 5% that would mean that the alcohol would weigh 23*0,05=1,15kg and the co2 weight would be 1,265kg. Would the weight then be reduced by 1.265 kg or the difference between 1,15 and 1,265 (165 grams) ?
 
So if you have a 23 liter batch (make that 23 kg for easy math) and the alcohol content is 5% that would mean that the alcohol would weigh 23*0,05=1,15kg and the co2 weight would be 1,265kg. Would the weight then be reduced by 1.265 kg or the difference between 1,15 and 1,265 (165 grams) ?
1.265g - the co2 inside the fermenter. You know the exact weight cos you know the OD.
 
I have been running Kegmon v0.6.0beta1 with ESP32-s2 for a few days now. Stable and no big issues.

When I first built the unit with D1 mini, I connected VDD on DHT22 to 3V3 according to the schematic at that time.
Yesterday, I changed DHT22's VDD connection to JP1.5/D6 as in the latest schematic.
ESP32-s2 did not recognize any temp sensor unless I flashed firmware via Web interface again. Then it worked for some time before temp sensor was gone again (Web interface/ MQTT).
Today, I connected VDD back to 3V3. All ok.

I wonder if the voltage level from ESP32-s2 I/O's is on the edge to be too low for the DHT22 (Rated 3.3 - 6V). Sorry, forgot to measure.
DHT22 current (1-1.5mA) should be ok.
Any voltage differences on the I/O ports for D1 mini vs ESP32-s2 maybe?
Is likely that there is not enough power from a GPIO pin towards the DHT22, I modified my build with an transistor to ensure that there is enough power and I steer the transistor with the GPIO pin.

I added an CAT6 2m cable and there was no drop in voltage over that distance so its probably a power issue (Amp) and the latest beta worked with both an esp8266 and esp32s2

I have asked a friend of mine to make a PCB and look over the schema. So we will see what he comes up with, he is much better at the electronics side than me.
 
@mper Thanks for sharing this project,this stable keg scale is brilliant.
I suppose to substitute an I2C 20x4 LCD for the 2 x OLED displays would require a lot of code changes ?
Possibly 2 lines per keg showing numeric value and possibly a bar graph of the remaining volume.
All other information could still be viewed on the web interface or pushed via MQTT.
Would you consider this option ?
Cheers
 
I suppose to substitute an I2C 20x4 LCD for the 2 x OLED displays would require a lot of code changes ?
Possibly 2 lines per keg showing numeric value and possibly a bar graph of the remaining volume.
All other information could still be viewed on the web interface or pushed via MQTT.
Would you consider this option ?
Cheers
Sure, give me a link to the display you consider and i can see whats possible.
 
https://www.robotics.org.za/LCD-2004-5V-WB-I2C
These LCD's work well with the I2C backpack.

The LCD needs 5v to operate properly and the ESP boards IO's are not 5v tolerant.

I lift the 2 x 4k7 pullup resistors for SCL and SDA on the backpack,disconnecting them from the 5v supply and connect to the 3.3v supply instead,this drops the SCL and SDA voltage levels to 3.3v which is suitable for the ESP boards IO's and no level shifter is needed.

I can post a picture of the 2 resistors that need to be unsoldered,if needed.

This is very fiddly and a level shifter is much easier to wire up and no component modification is needed.

Would be great if you could look at this.

Cheers
 
Last edited:
https://www.robotics.org.za/LCD-2004-5V-WB-I2C
These LCD's work well with the I2C backpack.

The LCD needs 5v to operate properly and the ESP boards IO's are not 5v tolerant.

I lift the 2 x 4k7 pullup resistors for SCL and SDA on the backpack,disconnecting them from the 5v supply and connect to the 3.3v supply instead,this drops the SCL and SDA voltage levels to 3.3v which is suitable for the ESP boards IO's and no level shifter is needed.

I can post a picture of the 2 resistors that need to be unsoldered,if needed.

This is very fiddly and a level shifter is much easier to wire up and no component modification is needed.

Would be great if you could look at this.

Cheers
Would not be to hard, I have used a similar lcd in another project. There are 3.3V versions of this display which would be much easier than having both 3.3V and 5V in the same build. You can also change the i2c address so using 2 displays will be possible.
 
@mper Thanks for sharing this project,this stable keg scale is brilliant.
I suppose to substitute an I2C 20x4 LCD for the 2 x OLED displays would require a lot of code changes ?
Possibly 2 lines per keg showing numeric value and possibly a bar graph of the remaining volume.
All other information could still be viewed on the web interface or pushed via MQTT.
Would you consider this option ?
Cheers
Just for clarification did you want to replace the 2 oled with one LCD ? You can chance address for most of the LCD i2c controllers so I can add support for 2 LCD displays, one per keg. This would allow for more information to be shown and use the layout from the OLED as well. I can add both options as well.
 
Just for clarification did you want to replace the 2 oled with one LCD ? You can chance address for most of the LCD i2c controllers so I can add support for 2 LCD displays, one per keg. This would allow for more information to be shown and use the layout from the OLED as well. I can add both options as well.
Your idea of having 2 LCD displays sounds good.
The option to use OLED or LCD displays would be brilliant.
Please see what you can do when you have a chance,
Thanks
 
Your idea of having 2 LCD displays sounds good.
The option to use OLED or LCD displays would be brilliant.
Please see what you can do when you have a chance,
Thanks
Im still working on it but you can try the latest build in the dev branch. It supports the lcd driver. You need to change display type in the web config page and reboot for it to work.
 
@mper Thanks for heads up,I have the ESP8266 binary flashed and running on a nodeMCU dev board,will play with it further.

Have flashed the ESP32s2 binary to my node32s board,I do not have an S2 version dev board, but the AP failed to come up on reboot.
Assuming this is because the binary is built for the S2 and not the S version of the ESP32 ?
Would like to confirm this is why the AP is not starting up and not me doing something stupid.
Cheers
 
@mper Thanks for heads up,I have the ESP8266 binary flashed and running on a nodeMCU dev board,will play with it further.

Have flashed the ESP32s2 binary to my node32s board,I do not have an S2 version dev board, but the AP failed to come up on reboot.
Assuming this is because the binary is built for the S2 and not the S version of the ESP32 ?
Would like to confirm this is why the AP is not starting up and not me doing something stupid.
Cheers
S2 is a different board and processor so it will not work.
 
@mper Sorry to be a pita but my LCD backpacks I2C addresses are in a different range to the OLED displays.
They are reporting addresses of 0x21 and 0x25 would you mind compiling a binary for the ESP8266 using these addresses ?
Just getting blocks displaying on the LCD
 

Latest posts

Back
Top