Brits are among the world’s biggest tea drinkers, so it’s a no-brainer to have a cupboard stocked full of tea bags at all times. However, it is not unheard of to open the tea bag container and find it empty. This is an unhappy situation to find one’s self in and is best avoided at all costs.
In this episode, we will build the Intelle-T—an intelligent tea bag container that estimates the number of tea bags left and will inform us as we start to run out!
- Raspberry Pi 3 Model B
- Arduino Uno
- HX711 ADC for load sensors
- Weight sensor (between 3KG and 15KG)
- Reed switch
- 10KΩ resistor
- 3.5mm cable (for speaker)
- USB B cable (for Arduino Uno to Raspberry Pi connection)
You can check out the full schematic in Scheme-It here.
You can check out the full schematic for this project on Scheme-It!
How Does It Work? How to Build a Weight Sensor with an Alarm
The Intelle-T is a tea bag box sitting on an electronic scale that estimates the number of tea bags by weight. The user first turns on the Photon and then places a single tea bag into the pot. From there, the user can fill the container and the system can make an estimate on how many bags remain.
When the user opens the lid a small contact/reed switch is broken, informing the Arduino Uno the container has been opened. This opening action triggers the Raspberry Pi to play a witty message about how great Britain truly is, a fun fact about tea, or how coffee is an inferior beverage.
If the number of teabags begins to fall below a predetermined threshold, the Raspberry Pi will inform the user that the number of teabags is becoming dangerously low.
The load sensor has two sets of two screw mountings which are used to hold the sensor down to a platform and the tea bag container that will hold the tea bags. The sensor has a resistor bridge configuration resulting in four outputs each connected to the HX711 serially accessed ADC. The ADC is a read-only device but is specifically designed for load sensors. It’s very easy to interface, thanks to the HX711 library available for the Arduino Uno.
Using the sensor requires zeroing and measuring the weight of a tea bag. This way, the initial weight applied to the sensor can be ignored and additional bags can be accurately counted. Having said that, tea bag weights will vary so the final number will be an accurate estimate.
While a reset button could be used externally, it is simpler to have the Arduino run a simple procedure on start-up that zeros the sensor, wait for a weight increase, then use that increase as a divider for future recorded weights.
When the lid is opened, the Arduino Uno sends a message to the Raspberry Pi indicating the quantity of tea bags. It also alerts that the lid has been opened. The lid detection is done with the use of a simple reed switch that is mounted on the inside of the tin, while a small yet powerful magnet is mounted on the lid.
Therefore, during normal conditions, the magnet causes the reed switch to close. This means that the Arduino Uno will read a digital “1” when the lid is closed and “0” when the lid is opened.
The Raspberry Pi
The Raspberry Pi is used to play the audio files using the PyGame library, as well as interact with the tea bag quantity data.
For example, as the number of tea bags begins to fall below a pre-defined threshold, the Pi will announce to the user that the number of bags is low. During a typical lid opens the Pi plays the audio recording of the fun facts about tea and Great Britain.
You can find the code for the Intelle-T project below:
Never worry about embarrassingly running out of tea when entertaining guests, celebrating Her Majesty’s next birthday, or simply wanting a hot cuppa with your Intelle-T.
With all your spare time this holiday season, why not indulge in more of the Gentleman Maker? Check out all of the previous installments below:
- How to Make Your Umbrella into a Weather Station with a Particle Photon
- Make Your Own Home Brewing Sensor Kit with the Gentleman Maker’s Adafruit IO SmartBrewer
- Protect Your Personal Castle With the Gentleman Maker’s Photon Trebuchet
- Protect Your Summer Harvest with the Gentleman Maker’s Raspberry Pi and Arduino Dog Corrector
- Feeling Flashy? Tone It Down with the Gentleman Maker’s Raspberry Pi Colorboringizer
- Take a Gander at Wildlife with Your Raspberry Pi: The Gentleman Maker’s Life-Cam!
- Save for Your Own Royal Wedding (of Sorts) with the Gentleman Maker’s Savings Incentivizer
- The Gentleman Maker’s Sun Informer Lets Homebodies Safely Enjoy Intermittent Sunshine
- The Gentleman Maker’s Auto-Apologizer: A Clever, Polite Device for the Everyday Brit
- How to Make an IoT Teapot so You Can Put the Kettle on from Your Smartphone
- Put an End to Stockings Full of Coal with the Raspberry Pi Santa Detector