Aqua Trace: Smart Water Bottle Stand

by ChironDeloof in Circuits > Raspberry Pi

161 Views, 1 Favorites, 0 Comments

Aqua Trace: Smart Water Bottle Stand

20210615_175250.jpg

Aqua Trace is a stand you can place on your desk that will remind you to drink enough water throughout the day. I made this project because i personally tend to forget te drink water when im bussy working for school or just watching youtube or playing games.

Supplies

Raspberry Pi 4: €39.95 (https://www.kiwi-electronics.nl/raspberry-pi-4-mod...

dht11: €1.95 (https://www.hackerstore.nl/Artikel/607)

load cell 5kg: €6.95 (https://www.hackerstore.nl/Artikel/682)

HX711: €2.95 (https://www.hackerstore.nl/Artikel/696)

RGB led-strip 5v: €6.95 (https://www.ledstripkoning.be/speciale-leds/tv-led...

3 mosfets: €0.45 (https://www.hackerstore.nl/Artikel/373)

lm35: €0.95 (https://www.hackerstore.nl/Artikel/18)

MCP3008: €3.95 (https://www.hackerstore.nl/Artikel/594)

LCD 16x2: €8.95 (https://www.hackerstore.nl/Artikel/82)

potmeter 10k: €1.20 (https://www.hackerstore.nl/Artikel/146)

case €30 (3d printed)

Connecting Lm35 and MCP3008

lm35.png

First off we connect our components to the raspberry pi starting with the lm35 and MCP3008.

To do this we connect them in the following way:

  • 1st pin of the MCP3008 (top left with semicircle cutout at top) to the middle pin of the lm35
  • pin 15 and 16 of the MCP3008 (2 top right) to 3.3v of the raspberry pi
  • pin 14 and 9 of the MCP3008 (below 15 and bottom right) to ground
  • MCP3008 pin 13 to GPIO11: SPI0_SCLK of the raspberry
  • MCP3008 pin 12 to GPIO09: SPI0_MISO of the raspberry
  • MCP3008 pin 11 to GPIO10: SPI0_MOSI of the raspberry
  • MCP3008 pin 10 to GPIO08: SPI0_CE0 of the raspberry
  • the left pin of lm35 (flat end facing you) to 3.3v of the raspberry pi
  • the right pin of lm35 (flat end facing you) to ground

Connecting DHT11

dht11.png

The DHT11 is very simple to connect as it only requires 3 cables

with the gridded side of the dht11 facing you and the pins pointing down:

  • connect the left pin of the dht11 to 3.3v of the raspberry
  • the 2nd pin of the dht11 to GPIO23 of the raspberry
  • and the 3rd pin (and the 4th if present) to ground

Connecting Load Cell and HX711

loadcell.png

For the loadcell and HX711 simply connect the colored wires from the weight cell to the matching pins of the HX711 (red, blck, wht, grn). next for connecting the HX711 to the raspberry (HX711 with the unconnected side facing down):

  • connect the left most pin to 5v of the raspberry
  • the 2nd pin to GPIO06 of the raspberry
  • the 3rd pin to GPIO05 of the raspberry
  • and the 4th pin to ground

Connecting LCD Screen

LCD.png

This is the bulk of the wires as the lcd has 16 pins and requires a potmeter to regulate the brightness. So lets get started (with the pins on the top side and the screen facing you):

  • connect the 1st, 5th and last pin of the lcd to ground
  • connect the 2nd and 15th pin of the lcd to 5v of the raspberry
  • connect the 3rd pin of the lcd to the middle pin of the potmeter
  • connect the potmeter with one side to 5v and the other side to ground
  • connect pin 4, 6, 7 and 8 of the lcd to GPIO 04, 17, 27 and 22 respectively of the raspberry
  • connect pin 9, 10 and 11 of the lcd to GPIO 13, 19 and 26 respectively of the raspberry
  • finally connect pin 12, 13 and 14 of the lcd to GPIO 25, 20 and 21 respectively of the raspberry

Connecting RGB-strip

rgb.png

For the final part we have the RGB-strip:

  • connect the + pin of the RGB-strip to 5v of the raspberry
  • connect the remaining 3 pins of the RGB-strip to the middle pins of the 3 mosfets
  • connect one side of each mosfet to ground
  • connect the other side of each mosfet to GPIO 18, 24 and 16 of the raspberry (i have red to 18, greeb to 24 and blue to 16)

Housing

20210615_001028.jpg

For the housing i chose 3d printing out of interest in this technologie however a fairly simple case can be made using other techniques aswell, if you want to use my design the files can be found in the following google drive link (https://drive.google.com/drive/folders/1Sma9uSdwuyL6s0RFZy4diPxiID613mzQ?usp=sharing)

Coding

The code i wrote is available on github with the following link (https://github.com/howest-mct/2020-2021-projectone-chirondeloof/tree/master/Code), this was created partly with classes i made during my 1st year at MCT so not all lines of code are used for this project.