My favorites | Sign in
Project Home Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
Fount_IR_DECODING  
Updated Oct 28, 2013 by rijadsul...@gmail.com

Fount IR Decoding

PURPOSE:

The fountain needs to know when the cup is pouring, and also needs to uniquely identify the other team’s cup.

Code

DESIGN:

The fountain microcontroller will utilize two capture modules (one per pin) that will detect the rising and falling edges of the IR signal being received.

During each falling edge routine, the fountain will determine if the cup is pouring or not. In order to initially begin the cup pouring procedure on the fountain, the fountain must receive a set number of consecutive pulses with similar widths. Each cup transmits at 38 kHz, but cup 1 will transmit with a 50% duty cycle, while cup 2 will transmit with a 25% duty cycle.

If the microcontroller operates at 8 MHz, the timers will have enough resolution to clearly identify a 50% duty cycle pulse from a 25% duty cycle pulse.

Results

Testing with a 300 Hz square wave, the fountain was triggered between 290 – 310 Hz. This is acceptable, and should not affect or be affected by the 600 Hz signal from the other cup.

The effects triggered by the cup pouring, pour completion, and fountain shutdown were simulated by 2 LEDs and were demonstrated to perform as expected.

Flow Chart

Powered by Google Project Hosting