Make Your Own Tea Machine
by Valentine van Steenbergen in Living > Kitchen
862 Views, 8 Favorites, 0 Comments
Make Your Own Tea Machine
With this machine, making your own tea will be a little easier....is the idea!
With this box, you can make your own tea and decide how strong you want it to be. You can also make your tea by adding sweets to it.
You can place your cup with hot water within the circle of the box. To adjust how long you would like the teabag to stay in your cup, turn the potentiometer. Then press the middle button. Once you press the button the teabag will drop, and stay in the cup for as long as you chose for it to stay in. When the time has ran out, the bag will be pulled up again. Lastly you decide whether you want your tea sweet, and press the button to drop some suger drops in your tea. And there you have it, a nice cup of tea.
Supplies
Tools:
- Lasercutter
- Soldering iron
- Painting supplies ( brushes & paint)
- Pliers
- Glue gun
- Scissors
Electronics
- Arduino Uno
- TIANKONGRC TS90A Micro Servo 9g
- DFRobot DF9GMS 360 Degree Micro Servo 9g
- Knop pointer Mengpaneel-stijl black&white
- Potentiometer
- 18mm metal pushbuttons 2x
- Wires
- Cable to connect arduino
- Circuit board
Other:
- Iron wire (to make the hook)
- Fishwire
- Wood
- Foam board
- Ductape
- Woodglue
- Plastic cilinder
- Tinwire
Tea:
- Teabags
- Sweets (sugar drops)
Prototyping First Attempts
In the video you can see my first attempt for the project. It failed in the end because the idea and the way I executed it was just not so great. Also the soldering went wrong so the connection failed. After this, I decided to take a different approach. I wanted to make it more complex by making three arms that lower different tea tastes for a chosen amount of time. However, this also didn't end up working out. I kept struggling with the mechanism and the code. I did try to work it out in 3D first as you can see on the images above.
Final Prototype
This was the final idea I went with. With the 3D model I tried to visualise it for myself to understand how the mechanism could work. I went with two servo's instead of three because it was more doable. Now only one servo is dependent on the potentiometer and not three. For the lowering of the teabag I used a 360 degree servo because it can keep spinning. the wire is winded up on the pulley and when you set the time by turning the potentiometer, then press the button and the servo will spin till a certain point. Once the potentiometer has reached the time it was set to (the max is 3 minutes), the servo spins back to it's original position. For the mechanism of the sugar went for a funnel that is blocked by a block, but when the button is pressed, the servo turns on and moves the block away for to a certain degree. When the button is released the servo turns to it's original state again.
Code
(Apologies for the way the code is presented. I had trouble uploading it as a txt. file. Arduino.ino file attached below).
I mentioned some this in another step, but to put the functioning of the code in simple words:
There are two buttons. One meant to activate the servo used for the teabag, and one used for the sugar. There is one potentiometer that has a range of values from 0 to 180000. This is in miliseconds and in minutes it would be three. There's a function that reads the current set value of the potentiometer. The teabag servo is activated by pressing the middle button. The servo starts spinning instantly and stays in the low position till the amount of seconds have been reached that the potentiometer is set to. Then the servo spins back to the original state.
The servo that moves the plate under the funnel is activated when the button is pressed. The servo has a starting position of 30 and has to turn 55 degrees. When the button is released the servo will return to the original position.
#include <Servo.h>
int knopPin = 2;
int suikerKnopPin = 3; //HIER TOEVOEGEN WELKE PIN VOOR DE SUIKER KNOP
int servoDelay = 2000;
int servoSpeedDown = 120;
int servoSpeedUp = 60;
bool bezigMetTheeZetten = false;
long maxMilliSec = 180000;
Servo arm1_servo;
int arm1_servoPin = 9;
int arm1_draaiknopPin = A0;
long arm1_aantalSeconden;
//long arm1_startTijd;
//bool arm1_bezigMetTheeZetten = false;
Servo arm2_servo;
int arm2_servoPin = 10; //PIN 10 GEBRUIKEN VOOR SUIKER SERVO OF DIT AANPASSEN
bool suikerGatOpen = false;
int suikerDraaiGrootte = 55; //DIT AANPASSEN VOOR HOE VEEL DE SERVO VOOR SUIKER MOET DRAAIEN
int suikerDraaiStart = 30;
void setup() {
Serial.begin(9600); //seriƫle monitor starten
pinMode(knopPin, INPUT);
digitalWrite(knopPin, HIGH);
arm1_servo.attach(arm1_servoPin);
pinMode(arm1_draaiknopPin, INPUT);
pinMode(suikerKnopPin , INPUT);
digitalWrite(suikerKnopPin, HIGH);
arm2_servo.attach(arm2_servoPin);
arm2_servo.write(suikerDraaiStart);
}
void loop() {
if (digitalRead(knopPin) == LOW){
checkInput();
theezakActivate();
}
// if (arm1_bezigMetTheeZetten) {
// telAf();
// } else {
// checkInput();
// if (digitalRead(knopPin) == HIGH) {
// beginMetAftellen();
// }
// }
suikerCheck();
}
void checkInput() {
long draaiknopWaarde = analogRead(arm1_draaiknopPin);
arm1_aantalSeconden = map(draaiknopWaarde, 0, 1023, 0, maxMilliSec);
Serial.print(" Gelezen waarde 1: ");
Serial.println(arm1_aantalSeconden);
}
// void beginMetAftellen() {
// arm1_startTijd = millis();
// arm1_servo.write(0);
// arm1_bezigMetTheeZetten = true;
// Serial.print("Start met aftellen, huidige tijd: ");
// Serial.println(arm1_startTijd);
// }
// void telAf() {
// long tijdSindsKnopIndruk = millis() - arm1_startTijd;
// if (tijdSindsKnopIndruk >= arm1_aantalSeconden) {
// arm1_servo.write(180);
// arm1_bezigMetTheeZetten = false;
// Serial.print("Aftellen: ");
// Serial.print(tijdSindsKnopIndruk);
// Serial.print(" >= ");
// Serial.println(arm1_aantalSeconden);
// }
// }
void theezakActivate(){
arm1_servo.write(servoSpeedDown);
delay(servoDelay);
arm1_servo.write(90);
delay(arm1_aantalSeconden);
arm1_servo.write(servoSpeedUp);
delay(servoDelay);
arm1_servo.write(90);
}
void suikerCheck(){
if (digitalRead(suikerKnopPin) == LOW){
suikerGatOpen = true;
arm2_servo.write(suikerDraaiGrootte);
}
if (digitalRead(suikerKnopPin) == HIGH && suikerGatOpen == true){
arm2_servo.write(suikerDraaiStart);
suikerGatOpen = false;
}
}
Downloads
Building
After testing the circuit and measuring the sizes for the housing, I went to school to lasercut to be able to make a proper housing. Once I put it together. I started building the mechanism inside the housing.
I used foam board to support the servo's, arduino, the pulley, and the funnel for the sugar. I used a plastic cillinder I found to make a pulley to roll the fishwire on. I first tested this with the breadboard. First I tried using sugar kristals but that immediatly became a mess. So I got the sweets in tablet form and that did work.
Finishing the Mechanics
Now the mechanism worked, it was time to solder it and put it all together. I decided to solder female wires so I could attach them to more wires. This seemed like the best option because if something didn't work out I could still detach it. Also the distances between the button, potentiometer and servo's with the arduino were pretty far and had mostly short wires left, so this opened the possibilty to add more wires in between if necessairy. I tried to keep the wires colour coded, but due to lack of the same colour cables I had to make exceptions. To support and organise the wires better, I used ductape to stick it to the housing. The arduino is held in place by foam board.
Decorating the Housing
Now the mechanism works and is secured, it was time to decorate the housing. It started of pretty neat, but as I kept progressing I decided to listen to my desire to make it look a little crazy. I think the project was a little crazy too so it does so in my housing now haha. I tried to atleast make clear where to place the cup, which button activates the sugar mechanism, which button activates the teabag mechanism, and different settings for the potentiometer (also how far it can go).
Reflection
Looking back, this project has been one of the most difficult ones I've had to ever do. I didn't understand anything, it didn't interest me either. It took me 3 years total to get myself to finish it. I didn't know how to approach the project, every step seemed impossible and too hard for me to do. However, I did push myself through the steps that resulted in what I have now. Few times my ideas failed, but I could build on these fails and be more prepared for new ideas. It took help from friends and continuing despite the resistance that led me to this. And there was fun too, because whenever something did work out, and something started moving the way I wanted it to, it felt great. Painting the housing also allowed for some creative freedom.