The percolations are imminent.
- Raspberry Pi Zero
- MCP23008
- Non-invasive current sensor
- 2 10k resistors
- 1 10uF capacitor
- optional - extension cord
Using the non-invasive current sensor (CT sensor), the circuit will measure the time it takes electrical current to fill the capacitor.
When there's a lot of current, the capacitor will discharge quickly. When there's not a lot of current, the capacitor will discharge slowly.
For drip coffee pots, there are three basic states:
- Idle
- Brewing
- Heating
For example, your drip coffee pot might discharge the capacitor in ~2.5 seconds when idle
. When it's actively brewing
, the capacitor might discharge in ~150 milliseconds.
Your coffee pot uses an alternating current (AC). An AC cord is composed of two wires. For your CT sensor to work correctly, you will have to wrap it around only one of those wires.
If you do not want to risk cutting your coffee pot cord, you can buy a cheap extension cord and use that. Carefully separate the two wires by cutting down the middle and pull apart.
- Operating System Installation
- Download Raspian Jessie Lite.
- Put Raspian on your SD card. Follow instructions here
- Opearting System Configuration
- Initially, you will need an external display and keyboard. Get those, plug in and power on the pi.
- When your pi boots up, log in with:
- username:
pi
- password:
raspberry
(we'll change this later)
- username:
- When your pi boots up, log in with:
- Type
sudo raspi-config
- Expand file system
- Internationalization options - adjust as necessary.
- Change your password - if you want
Advanced Options - Hostname
- change the hostname of your Pi (optional)Advanced Options - Enable I2C
Advanced Options - Enable SSH
Advanced Options - Enable SPI
- Reboot
- Setup Wifi
- Follow the instructions here
- You can now ditch your keyboard and display.
sudo reboot
- Find the IP address of your Pi on your network
ssh [email protected]
- Enter password:
raspberry
- Follow the instructions here
- Install updates
sudo apt-get update
sudo apt-get upgrade
- Install
node
cd /tmp
wget http://node-arm.herokuapp.com/node_latest_armhf.deb
sudo dpkg -i node_latest_armhf.deb
- Install
git
sudo apt-get install git
- Initially, you will need an external display and keyboard. Get those, plug in and power on the pi.
- Configure
i2c
nano /boot/config.txt
- Add to the bottom:
dtparam=i2c1=on dtparam=i2c_arm=on dtparam=i2c=on dtparam=i2c_arm_baudrate=10000
- Configure Git
ssh-keygen -t rsa -C pi@<your host name>
- copy contents of
id_rsa.pub
as a new GitHub SSH keycat /home/pi/.ssh/id_rsa.pub
- Get
coffeebot
codegit clone <this repository>
cd coffeebot
cp /config/default.json.example /config/default.json
In /config/default.json
:
-
threshold
- This is an estimation of average milliseconds between capacitor discharges while the coffeepot isbrewing
-
consecutive
- How many consecutivebrewing
discharges should occur until you're confident the pot is brewing. -
brew_time
- after thethreshold
has been met the # ofconsecutive
times, how long until the coffee is done (in milliseconds). -
notification_type
- how should the coffeebot notify that coffee is ready. currently supported:slack
-
notification
- configuration options for thenotification_type
-
notification_messages
- a random collection of notifications for thecoffee is brewing
state or thecoffee is done
state.
./run.sh
- code is in
/src
- to build:
npm run build
- Feel free to issue pull requests or work an any open issues.
- Additional notification options would be appreciated.
- Adding your coffeepot settings to the wiki would also be appreciated.