Prototype
PIC18F27J13
Multisim
Design
The IR receiver on each fountain will modulate the 38 kHz bursts (64 cycles for cup 1, 32 cycles for cup 2) emitted by each cup into a 300 Hz and 600 Hz square wave, respectively. When the fountain detects 10 consecutive identical lower frequency pulses, it knows that the cup is then pouring.
When the cup begins pouring, the fountain will display audio and visual effects. If the cup pours steadily for enough time, different audio and visual effects will begin to indicate that the game has been finished. After another brief display, the fountain will shut down.