It's has been more than 4 years since I started the hydrometer project. I re-discovered a number of photos on my phone, and thought it would be a shame to not at least upload those and give an update of where this project ended up. These pictures were taken January to February 2023.
The project involved a lot of different skills which made it really exciting: CAD + 3D printing, soldering/circuits, coding, and physics. I wanted to design every aspect of the device but use as many off the shelf electronics components as possible. I didn't want to design any custom PCBs or anything like that -- just prototype on perf boards, power it up, and write code for well documented micro-controllers.
The device was heavily inspired by the Tilt hydrometer, which I own and used for a couple of brews. I knew I wouldn't be able to get my hydrometer down to the same size, but it didn't matter as long as it fit in the fermenter.

My first design (Stubby) was short. It used a NodeMCU ESP-8266, MPU6050 3 Axis Accelerometer, MT3608 DC-DC Step Up Boost Power Converter, and powered by an 18650 battery. The converter was needed to step up the voltage to 5V from the nominal 3.6V of the battery.
I went to a container supply store and grabbed a few different cylindrical samples for the project housing. The 3D printed skeleton was designed to fit one of those containers (sorry no picture of the container).



You might have noticed the threads on the battery compartment. The idea there was to have a screw-cap and metal spring to make an electrical connection.
The problem with this short design became apparent when I did a float test. It sat horizontal in the water with no perceivable tilt without applying significant downward force on it's bottom and top edges. Because the tilt/angle measurement of our device was dependent on very small changes in specific gravity in the suspending liquid, this design was dead in the water.

Initially I didn't want to redesign the circuit board, so I looked for some other container options online. One that would elongate the design and place the battery below the circuit board. I ended up finding these 2 liter bottle pre-forms that are popular for geocaching.

I threw the circuit board and the battery into the pre-form to do a quick test before spending any time redesigning the plastic skeleton. It seemed to work! I got a tilt angle, and it seemed to be more influenceable when applying a light force to either ends.

I went to work on designing a new skeleton for the existing board.
In this design, I replaced the screw-cap battery enclosure with a small plastic door containing a metal nut. After inserting the battery, the door slid into channels at the top, and a metal screw was used to tighten against the battery and complete the electrical connection.

I'm not exactly sure what happened at this stage, but I decided to scrap the first board design and start from scratch. I think the first board design might have been a little too tall in the y-axis and I was unable to compensate with the skeleton to get everything to fit in the pre-form container.

I decided to go with the Seeed Studio XIAO ESP32C3 as the base micro-controller, as it was a quarter of the size of the original MCU, and it had some additional features: more powerful processor, antenna, bluetooth, and an integrated battery charging circuit. And since I had room to spare, I also added a DS18B20 sensor for measuring the temperature of the fermentation.






At this point, the first prototype was probably 80% done, and programming was all that was left. Rather than mathematically figuring out where the center of buoyancy was and creating a theoretical formula, I planned to calibrate the device by placing it in water and gradually adding in salt to measure the relationship between tilt and density of the fluid, and extrapolate that into a formula.
Will I ever finish this project? Maybe. It's tempting because the first prototype is so close to completion. However, the ease of calibration and sensitivity of the device is a big unknown at this point, and would probably result in at least 1 or 2 more prototypes to get things right. That would require a little more motivation than I have at this moment.
Bonus:
I created a demo to illustrate Archimedes' Principle in September 2023, but never got around to publishing that either. So here it is!