The percolations are imminent.
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:
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.
pi
raspberry
(we'll change this later)sudo raspi-config
Advanced Options - Hostname
- change the hostname of your Pi (optional)Advanced Options - Enable I2C
Advanced Options - Enable SSH
Advanced Options - Enable SPI
sudo reboot
ssh pi@192.168.x.x
raspberry
sudo apt-get update
sudo apt-get upgrade
node
cd /tmp
wget http://node-arm.herokuapp.com/node_latest_armhf.deb
sudo dpkg -i node_latest_armhf.deb
git
sudo apt-get install git
i2c
nano /boot/config.txt
dtparam=i2c1=on
dtparam=i2c_arm=on
dtparam=i2c=on
dtparam=i2c_arm_baudrate=10000
ssh-keygen -t rsa -C pi@<your host name>
id_rsa.pub
as a new GitHub SSH keycat /home/pi/.ssh/id_rsa.pub
coffeebot
code
git 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 is brewing
consecutive
- How many consecutive brewing
discharges should occur until you're confident the pot is brewing.
brew_time
- after the threshold
has been met the # of consecutive
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 the notification_type
notification_messages
- a random collection of notifications for the coffee is brewing
state or the coffee is done
state.
./run.sh
/src
npm run build