Arthur Dent
Published © CC BY-NC

Soda Counter

Implanted a reed switch and ESP into my sodastream (TM) so I can track the CO2 usage.

BeginnerShowcase (no instructions)1.5 hours884
Soda Counter

Things used in this project

Hardware components

Reed Switch 13mm x 2mm
×1
Neodym Magnet 6x5mm (N42)
×1
Wemos D1 Mini
×1
resistor 10 kOhm
×1
USB Cable, Glue,...
×1
sodastream (TM)
×1

Software apps and online services

ESP Easy

Story

Read more

Schematics

breadboard view

Very simple setup. Please note the push button. In the project is is replaced with the reed switch.

Reed switch and Magnet

Push button of the soda device with glued-in neodym magnet and reed switch

Top view

Perfect fit of the ESP and the cabling.

ESP GUI

"Co2-Push" is the actual counter. The "PulseMonitor" is used to set the blue onboard led on (for troubleshooting etc.)

ESP Config

Config details of the pulse counter

Code

ESP Rules

Plain text
The blue onboard LED is set to ON wile the reed switch is closed.
This is not actual necessary for counting but might help to troubleshoot the setup.
on PulseMonitor#State do
if [PulseMonitor#State]=1 
gpio,2,0
endif
if [PulseMonitor#State]=0
gpio,2,1
endif
endon

Credits

Arthur Dent

Arthur Dent

1 project • 0 followers

Comments