Pressuremon Launch!

I have been working on a pressure monitor for a few years with the focus on digital I2C sensors for good accuracy. There has been two main challenges; the connection between the sensor and the keg/fermentation vessel and a service to collect and use the data in combination with gravity data. To adress the data needs I created the Brewlogger project, see a seprate blog post about that one.
A user called nzbrewer found my early version of the project on github and had found some really good pressure sensors from a chineese company called XIDEBEI. They have stainless steel casing and various options for fittings that was really good for this project compared to my 3d printed fittings.

I ordered a few samples to test out. This was not a really well known brand so I had to start with writing a library/driver for interacting with the device and read the data. This was a challenge in itself since they sent me the wrong datasheet for the device i ordered, but that was sorted out eventually. I have publised that driver for the XIDIBEI sensors here if anyone else wants to use them for some other purpose/project.
This is the approach I use to connect the senors to my kegs/ferementation vessels. I found a sensor that had an 1/4" NPT connector which I combined with a John Guest adapter and reduction for my 8mm gas line.

Tthe sensors worked fine and I wrote down a few things I had as a goal for the device:
- Build it on the same framework as gravitymon, most of the code should be same.
- Support multiple brands of I2C sensors (and perhaps analog in the future)
- Support 2 pressure sensors per device (Software supports one sensor for now)
- Operate on constant power or battery with long battery life
- PCB design and 3d model for case
- ESP32 based board
Creating the software & Hardware
When the sensor driver was done than I started on refactoring gravitymon so I could use most of that as a base for pressuremon. This was the most time consuming part of the project, 80% of the code is the same and its only small changes that was needed for supporting this project. Once I had a prototype I started on the PCB design and I have now gone through 4 iterations which is what takes time. The main hardware setup for this project will be:
- ESP32c3 PICO from Lolin which have a built in charger for batteries.
- LiPo batteries that exist in multiple formats and capacity, just ensure you have the right polarity (or switch the cables to match)
- Small formfactor
- Temperature sensor (since the temperature sensor in the pressure sensor is real bad)
- Easy connection options to keg or fermenentation vessel
In the preliminary tests I have done, I would estimate the battery life to 6 months when runnning on WIFI and 15 min intervals with a 2000mAh battery. When using BLE I would assume we can increase that further.
You dont really need that many components for this project since the XIDEBEI sensors have built in pullup resistors for the I2C, but I wanted to prepare for other type of sensors in the future so there are room for adding these on the PCB. This is the schema I ended up with for the first revision.

I have also created a PCB for the device and which is availabe to order from here
If you are building a device, i would recommend to flash the ESP board before soldering it so you know that it works fine. Sometimes it can be tricky to flash a fresh board for the first time. If you are using the ESP32c3 PICO board don't forget to solder the jumbers on the back of the board for the voltage measurment and LED.
Future plans
This is the first real usable version (0.5) of the project and I have some few things that I'm considering to add in the future:
- Format templates for services that support pressure data
- Enabling the second pressure sensor (PCB is prepared for this)
- Creating an option to use Analog pressure senors (Code already exist)
- Creating a 3d printable case for the PCB
Other things
In order to make use of this project I also added features to Gravitymon Gateway and Brewlogger to collect and manage pressure data, but more on that in a separate blog post.
Happy brewing, Magnus