Git Product home page Git Product logo

sugarboat's Introduction

sugarboat logo

A digital hydrometer. The main use case is measuring the amount of sugar in liquids during the process of beer and wine making.

How does it work?

Sugarboat floats on top of the liquid being measured. Because of its shifted center of mass, it will float at an angle. This tilt angle (see image below) is larger for denser liquids and smaller for less dense liquids. We can then estimate the density of a solution from this angle.

sugarboat logo

As is usual in the beer and wine making processes, we can additionally correlate the estimated density of a solution with the amount of sugar present in it.

The estimated density and sugar content are exposed - along with the temperature, relative humidity, current battery voltage and more - through Bluetooth Low Energy (BLE) services. This repository contains examples of how to read these values under clients/.

Tech specs

  • nRF52840 system-on-a-chip
  • SHT30 temperature & humidity sensor
  • MPU6050 accelerometer + gyroscope estimates the tilt angle
  • Li-Ion 18650 battery
    • Battery life of over a year on a single charge
    • Built-in TP4056-based charging circuit
  • USB-C for battery charging and programming

Waterproof enclosure

A preform PET tube (or "petling") is used to enclose the electronics and provide sugarboat with the buoyancy it needs. The printed circuit board is designed to fit tightly into a tube with the inner diameter of around 33 mm and inner height of 123 mm. The board is slightly wider than 33 mm - some light sanding needs to be done to ensure a nice, snuggly fit. I bought my containers from this eBay offering.

Repository organization

Directory Description
kicad/ Electronics - schematic, PCB layout, bill of materials and fabrication files
code/ Firmware - a PlatformIO project using the Arduino framework
clients/web/ A web interface for calibrating, configuring and reading sugarboat's sensors
clients/arduino/ A barebones Arduino sketch showing how to read sugarboat's tilt angle, temperature & battery voltage using a Bluetooth Low Energy client
clients/esphome/ An ESPHome client that integrates with Home Assistant

Web client

web client screenshot This client is a web page that connects to sugarboat using the Web Bluetooth API. It lets you calibrate, configure and read the sensor values right from your web browser, wirelessly.

The web client's source code is in clients/web/.

Calibration

TODO.

Bootloader flashing

To support programming via the built-in USB-C port (via UF2), sugarboat requires a bootloader to be flashed to the chip. This is a one-time operation.

I have forked the Adafruit nRF52 Bootloader and added support to sugarboat. To build and flash the bootloader:

$ git clone [email protected]:rbaron/Adafruit_nRF52_Bootloader.git
$ cd Adafruit_nRF52_Bootloader/
$ make BOARD=sugarboat all
$ make BOARD=sugarboat erase
# Look for the build target that contains the merged bootloader + Nordic's SoftDevice and flash it.
# It will be something like _build/build-sugarboat/sugarboat_bootloader-X.X.X-XXX-XXXXXXXXX_s140_6.1.1.hex:
$ nrfjprog --program _build/build-sugarboat/sugarboat_bootloader-0.4.0-149-g5ffac2e_s140_6.1.1.hex -f nrf52 --reset

Note that you will need a SWD programmer to complete this operation. A good choice for hobbyists is a J-Link EDU Mini. If you buy one, consider getting it from Adafruit.

License

CC BY-NC-ND 4.0.

sugarboat's People

Contributors

rbaron avatar

Stargazers

Aram Bayadyan avatar droidface avatar Jose Gustavo Abreu Murta avatar Hugo Jeller avatar Alejandro Fernández Trigo avatar  avatar  avatar Cristian avatar Peter Pal Kovacs avatar CHAISIT CHOOSONG avatar Raúl Lázaro Sánchez avatar  avatar Jason Hutson avatar  avatar Reid avatar  avatar Dan avatar  avatar Sevin Straus avatar Sebastien Pouliot avatar Stephan S. avatar  avatar Alex avatar  avatar Jon Raymond avatar Scott Hatfield avatar  avatar  avatar Vincent Kok avatar  avatar Peter Remøy Paulsen avatar  avatar Sudarshan Patil avatar Colin Hickey avatar Orion Lawlor avatar Alexander Strotmann avatar Phil Nachreiner avatar  avatar

Watchers

 avatar Jason Hutson avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.