Project

Never Run Out of Tea Again! How to Build the Gentleman Maker’s Intelli-T Raspberry Pi Sensor Alarm

February 12, 2019 by Robin Mitchell

Never run out of tea again! The Intelli-T uses a weight sensor and a Raspberry Pi to alert you when your tea supply is running low.

Never run out of tea again! The Intelli-T uses a weight sensor and a Raspberry Pi to alert you when your tea supply is running low.

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.

 

Tragic

 

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!

Intelle-T BOM

The Schematic

You can check out the full schematic in Scheme-It here.

 

Click to enlarge.

 

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.

Load Sensor

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.

Lid Detection

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.

 

Intelli-T code

 

Downloadable Code

You can find the code for the Intelle-T project below:

InteleT.zip


 

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:

1 Comment