This project was built as the final deliverable of our Embedded System course.

Introduction

when you hard work and have a hard day in work it's so desirable to drink a hot tea when you arrive home. but you so tired and it's difficult to go to kitchen and start making tea .

so what's the remedy ?

maybe you want a device to make tea for you like me ?

I produce a device that work with a telegram bot .when you arrive home and also you are so tired, just tell it about temperature and thickness of your tea and it start making a good tea for you . it first start heating water and after that pump the hot water into a glass and then start drowning a tea bag in it . after reaching your ordered thickness device call you to drink it.

Top-Level Design

the intelligent tea maker is made of two primary component

an electric kettle, a temperature sensor and a water pump that work togethe.

Electric Kettle , Temperature Sensor and Water Pump

an DVD Drive that Drowning tea bag into glass.

after joining these two part we have this view :

according to this view when you ask teaMaker to make a tea , it first turn of electrical kettle and measure temperature every one second until rich to desired temperature . after that teaMaker turn off electrical kettle and turn on water pump to transfer water from kettle to glass . then teaMaker turn off water pump and turn on DVD drive motor and drowning tea bag. after these steps your tea is ready to drink !

Hardware Design

we need to design multiple modulo and combine theme to build tea maker

first we need a motor driver to run DVD drive motor . I use a L293D IC to accomplish this task . the following step is wiring L293D :

L293D Wiring

but we want to drive only one motor(DVD drive motor) with this IC so you need to connect only pin3 and pin6 or pin11 and pin14 of L293D to your motor ( I use pin3 and pin6)

the important point that you should be careful about is how to number L293D pins . you should start from left side of a hole that placed in top of the IC . look at this picture to see this point :

L293D pins

to start connecting motor to L293D I first connect VCC and GND this picture can help you to accomplish this :

Connecting VCC and GND to L293D

be aware that pin2 of raspberry pi is VCC (5 v) and pin6 is GND.

you should connect pin16 of L293D to VCC of raspberry pi and pin 4,5,12,13 to GND and also pin8 of L293D to power supply that depend on type of your motor.

then you most connect data wires . this picture help you :

Adding data Wires

GPIO 25–Pin 22 of raspberry --> pin1 of L293D

GPIO 24–Pin 18 of raspberry --> pin2 of L293D

GPIO 23–Pin 16 of raspberry --> pin7 of L293D–Pin 7

so far we learn how to connect DVD drive motor to raspberry pi .in following steps we learn about temperature sensor (DS18b20) .

· to connect temperature sensor to raspberry pi you should use 1-wire protocol and I2C port that is enabled by default . but if it is disabled you can enable it from raspberry configuration . you can google this to get more information . be aware that you should use GPIO4 by default to read temperature but you can change it if necessary. this picture help you to wiring DS18b20 :

reading temperature from this modulo is a long process . so i give you a link that completely show you how to connect DS18b20 and how to work with it.

https://www.modmypi.com/blog/ds18b20-one-wire-digital-temperature-sensor-and-the-raspberry-pi

be aware that if you connect wires properly and double check it but the sensor is not working yet connect it's VCC to 5v power instead of 3.3v.

the last modulo we most build is relay . kettle is work with 220 v but raspberry GPIOs is only 3.3 v . so to turning the kettle on we most use a switch . this switch should connect kettle to 220 v when we send a 1 to it and should disconncet it when we send 0 . such a switch is called relay . we use two 3.3 v relay in this project .one for water pump and one for electric kettle . maybe you ask why we don't use L293D to turning on water pump ? because i use an strong motor that L293D can't supply proper current to run it . if you use a light motor then it should work with L293D .

remember that you can't connect relay to raspberry pi directly because it can't supply proper current . you should build and use this circuit :

Relay circuit

to identify relay pins use this picture :

Relay Pins

by default input pin of relay is connected to normally open pin . when you connect coil pins it disconnect from normally open and connect to normally close pin.

after building relay circuit you have see something like this :

remember that you need 2 item of this circuit so start building another.

2 Relay Circuit

now we can start assembling modulo that we already build .

i use GPIO17,GPIO18 for controlling relays . if you also use this two pins , your breadboard most be something like this :

lets start preparing kettle and DVD drive .

in first step you most transfer temperature sensor to kettle.i do it like this :

Temperature sensor

and then put the water pump in the kettle :

after that you most ready up DVD drive . it is so simple . open DVD drive and put this two wire in it.

inside the DVD drive

now every thing is OK and we can connect kettle and DVD drive to raspberry PI

first connect water pomp to one of two relays that we build earlier and then connect signal pin of relay to GPIO17 on raspberry (breadboard) . also connect the VCC of relay to 3.3 v pin of raspberry (pin 1 or pin 17) and connect GND pin of relay to GND pin of raspberry PI (pin 6 for example) .

you can use 4 battery to run the water pump . after connecting the water pump you breadboard most be like this :

connecting water pump to raspberry PI

then connect DVD drive to raspberry PI . simply connect that two wires that we put in DVD drive earlier to pin 3 and pin 6 of L293D.

after doing this you most have this this view :

connecting electric kettle is similar to connecting water pump so i don't take picture of it . remember that you most use 220 v instead of 4 battery for kettle.

at last the completed device is :