An Arduino+python Blood Alcohol Content project. It's a fun project where you can estimate how drunk you are! It doesn't provide a metric with units, as the measurements must be calibrated. This process is left as an exercise for the reader.
We equipped an Arduino with a MQ-3 sensor. The MQ-3 is a cheap alcohol gas sensor with an analog readout. The C code for this setup is lost, but we do a simple readout from one of the analog pins where the sensor is attached. We print the output to the serial console.
A jupyter notebook connects to the Arduino over USB and asynchronously reads the output while updating a figure over the current levels of alcohol.
pip install -r requirements.txt
- Start jupyter lab:
jupyter lab
- Attach USB to a laptop.
- Wait for the sensor to warm up, around 1-2 minutes.
- Breathe slowly with the mouth open wide, onto the sensor.
- Record the peak value.