A Comforting Blueberry With Arduino [BlueBuddy]
by Nickepick in Circuits > Arduino
373 Views, 1 Favorites, 0 Comments
A Comforting Blueberry With Arduino [BlueBuddy]
Using Arduino, I made a blueberry that hugs you when you wipe your tears. This Arduino project is very soft and soothing. The berry makes a sound once it has registered that you are wiping your tears, together with a tight and comforting embrace.
While this project started out as a silly idea, I ended up being able to actually make use of it once (which is bittersweet, however it turned out to be a great playtest). Because of this I can confirm that it does actually work when you cry! Not just when you messily put water on your face to test it to the best of your abilities.
Some advice in hindsight
- The housing of this project uses one longer string to attach the Arduino to your wrist. This turned out to impact the stability of the Berry negatively. My advice is to use two parallel strings, this way the Arduino won't slide around on your wrist.
- My powerbank has no blue case around it. If - for consistency's sake - you'd like to crochet a cover for this, I recommend crocheting around your powerbank to get its width and then turning this into a circle. Then single crochet around until you reach your desired length.
Supplies
For this project you'll need the following supplies:
Electrical components:
- Arduino Uno
- Watersensor for Arduino | ESP32 | ESP8266 (OT722-D66)'
- Micro Servo motor 9g with one arm attachment.
- RS PRO 83dB Through Hole Continuous Internal Piezo Buzzer.
- Cables to connect sensor, motor and buzzer to arduino.
- Powerbank (I use 2000 mAh capacity, 5.0V output, the shape and size of the powerbank does not matter, but keep in mind it will be fastened to your arm, so it shouldn't be too heavy.)
Housing components:
- Blue yarn (Size depending on your preffered way to crochet.)
- Crochet hook (Size depending on the size and weight of your yarn.)
- Wire (Iron, to wrap around the arm attachment of the Servo.)
- Piece of wood the size of your Arduino.
- Some thin elastic bands.
Iterate
The idea for this project started as a one sentence proposal: "I want a robot that hugs you when you cry."
Considering the fact I have no previous experience with Arduino (and its many components) it took me a while to find the right components for the job.
Arduino Iteration 1
Here, I used a button, which when pressed, triggered a Servo to rotate 90 degrees. The goal of this button was to be attached to your finger, and when you wipe your tears, it should be pressed by touching your face. This was quite a strange way to trigger the mechanism, and also not failsafe. Wiping your tears softly would result in the button simply not being pressed.
Arduino Iteration 2.0
In iteration 2 I found out about the wondrous world of water sensors. Water sensors make use of different levels of water in order to be able to trigger different parts of code with each level. However, I wanted to trigger just one piece of code with this sensor, so it took a couple of small iterations until I was happy with the sensitivity of the sensor. This iteration also does not make use of the buzzer, which meant the Arduino was totally silent when water touched the sensor.
Arduino Iteration 2.1
In this final iteration, the sensitivity of the sensor was exactly what I needed it to be. This, paired with the buzzer I now added to the Arduino, made the final design of my components.
Housing iteration 1
For the housing, my original intent was to make it out of crochet granny squares. However, these squares were gray, small in size and looked very depressing over all. This was absolutely no match with the comforting feeling the project was supposed to give up, so I ended up using these crochet granny squares to make a cardigan instead (Make sure to recycle anything you end up not using for a project!).
Housing iteration 2
The second iteration of the housing is also the final one. I found some soft, blue yarn in my cupboard, which was perfect to crochet a nice cover with. You might now also notice that the original intent of this project was not to make a blueberry. This idea mainly came into existence because the housing began to look like a blueberry once I started on it. The blueberry theme stayed because of the expression "Feeling blue" when you're feeling sad, and with some clever wordplay I ended on the title BlueBuddy because of this. He's a Blueberry, that hugs you when you're feeling blue!
Assembling the Arduino
The images should be the majority of the explanation done during this step. The first image is a digital drawing of how I have attached the cables (Which is not the optimal way, however, for clarity's sake, this is how I've done it before starting on the soldering.)
Make sure your cables are going into the right ports!
Soldering
In terms of soldering, there are a couple of things I have not soldered, and a couple of things I have soldered.
This is with good reason. The things I haven't soldered are the attachments of the Servo motor, and the attachments of the water sensor. I've chosen to leave these unsoldered to make sure I am able to replace these assets if they ever were to break. I was experiencing issues with my Servo motor when testing my project, and being able to quickly attach another one was something that made my life a lot easier.
You can however choose to still solder these, that won't make a difference in terms of the functionality of the product. I've just chosen to leave them to be quickly replaceable, considering I tend to be clumsy and break things.
Coding
In terms of difficulty, this code is not too challenging. In the images above you see the code as a whole, and the assembly of the Arduino. With this code and assembly the project should already work as intended. I have pasted the code down below as well for ease of use.
Explanations for which lines of code trigger what are included in the comments in the code down below!
#include <Servo.h> //Makes sure to Include the Servo library in the Arduino.
Servo Servo1; //Create a Servo in order to be able to control it.
const int read = A0; //Sensor AO pin to Arduino pin A0
int value; //Variable to store the incomming data
int a = 880; //These integers are various musical notes, there are more notes than those I use, so you can change the tune the Arduino plays to your preference.
int c = 523;
int g = 784;
int gS = 831;
int f = 698;
int d1 = 587;
int d2 = 1174;
void setup() {
//Begin serial communication
Serial.begin(9600);
Servo1.attach(11);
pinMode(8, OUTPUT);
}
void loop() {
value = analogRead(read); //Attaches the Value integer to the amound of water the water sensor registers.
Serial.println(value);
if (value <= 480) {
Servo1.write(90); //If the sensor sees no water, the Servo will be turned to 90 degrees. This is also its default, non hugging pose.
Serial.println("Water level: Empty!");
} else if (value > 480) {
Servo1.write(180); //If the sensor sees water, the Servo will be turned to 180 degrees. This is its hugging state.
Serial.println("Water level: 35mm to 40mm");
tone(8,g,300); //This is the tune the buzzer plays when this hugging-state is triggered.
delay(300);
tone(8,d1,300);
delay(500);
tone(8,d2,300);
}
delay(2000); // Check for new value every 5 seconds, in order to have the hug last a while.
}
Crochet the Housing
Explaining how to crochet the housing is going to be difficult, as there are plenty of different sizes of yarn that severely impact how many stiches you'll need in order to get to the right size. I've made a pattern that suits all sizes of yarn and hooks, however you will need to eyeball how big your housing will be. According to the size of your yarn you can increase or decrease the amount of rounds you make.
Be aware this pattern has some crochet jargon that might be confusing for first-time crocheters.
The pattern
Magic circle (Round 1)
Start your housing with a magic circle. Work six single crochet stiches into the center of your circle. Join these six with a slip stitch. You now have a circle with 6 stitches.
First section (Round 2-???)
This is where the eyeballing starts. In this section, you will have to do some math in order to get to your desired size. I'm going to be explaining rounds 2-4, and then how to continue from there if your circle isn't quite big enough.
Round 2: Chain 1. Do two single crochet in the next stitch (Increase), do this around your 6 stitches. You should now have 12 stitches.
Round 3: Chain 1. Do one single crochet, and then two single crochet in the next stitch (Increase). Follow this pattern around your 12 stitches. (Single crochet, increase, single crochet, increase). You should now have 18 stitches.
Round 4. Chain 1. Do one single crochet, a single crochet in the next stitch, then two single crochet in the stitch after that (Increase). Follow this pattern around your 18 stitches. You should now have 24 stitches.
The pattern here increases the amount of stitches by 6 every round. In order to achieve this further than round 4, you should keep in mind that the amount of stitches the pattern makes is equal to the round number. So, for round 5, you'd be making 3 single crochets, and then an increase. Round 6 would be 4 single crochets and then an increase, and so on.
Second section (Round ???)
Once you've reached your desired circumference, all there is left to do is to do a single crochet in every stich until the housing reaches its desired length. Make sure you fit your Arduino into the housing every now and then, so you don't accidentally make it too small. (Too big is fine, you can stuff the housing with leftover yarn in order to fill it up and make it more dense.)
Around the half-way point of your housing, chain three, then skip 2 stiches and start single crocheting around again. Do this once again once this newly created hole is on the opposite side of where you're crocheting. These holes are to fit the water sensor, powerbank and Servo through. DO NOT SKIP THIS STEP. You will not be able to fit these components through your housing if you forget to make these holes!
The housing should be long enough to cover all of the interior components and then tie shut.
Closing the housing
To make the housing into its signature berry shape, there isn't much you need to do. Simply cut off a piece of your yarn, about twice the length of the circumference of your housing, and weave it through the top stitches of your housing. When you pull both ends of this string, the housing should close itself up. You can then tie a bow. This makes sure the Arduino is no longer visible while also making it easy to open and alter if anything goes wrong.
Covering the wires
In order to cover the wire from the water sensor, and the iron wire we will be attaching to the Servo arm later, I used a simple knotting technique. Cut a string that is at least three times the length of the wire you are intending to cover, and tie a knot around the base of the wire. Wrap the string around the wire once again and knot again. Do this until your wire is covered from top to bottom. To finish off these knots, simply tie two knots and the yarn is secured. Cut off the excess string. For the water sensor, leave the excess string on. This makes sure you can tie the water sensor to your finger later.
Crocheting the attachment string.
In order to attach the BlueBuddy to your wrist, measure out the circumference of your wrist and then double this. Chain stiches until you reach this length. This string should go through the bottom of your BlueBuddy and come out on the other side. You can then tie a bow around your wrist and the housing will be secured to your arm.
Assemble
It is time to place the components inside of the housing! Before starting on this, now is the time to attach the piece of wood to the bottom of your Arduino for stability with some elastic bands. Gently(!) place your Arduino inside the housing, and pull through the Servo motor and powerbank cable through one hole. Through the other hole, pull the water sensor. If everything is snugly inside the housing, tie it shut. If there's too much spare room, grab some excess yarn and stuff this (gently!) inside the berry. This gives the housing some density.
Tie some excess yarn around your powerbank (for this, use the same measuring method as for the attachment string) and attach the bank to your upper arm. Attach BlueBuddy to your wrist, and the water sensor to your index finger. You are now ready to cry and be comforted!
Conclusion and Reflection
What have I learned?
During this project, there were a lot of things I had never done before. One of these was - of course - soldering. Soldering turned out to be harder than I thought. It seemed like I needed three hands in order to be able to solder something together, and unfortunately I had yet to invent an extra hand robot using Arduino. Being able to solder now has made me more confident creating projects I've wanted to create for a while but didn't know how to. I enjoy Arduino and despite the scale of this project being quite small, dipping my toes into a project like this has me thinking I will be using Arduino more often in the future.
Another thing I've come to realize during this project is that I often underestimate how good I am at something. Soldering aside, I thought I was going to have the worst time assembling and coding this Arduino. This turned out to be false, much to my surprise. I'm glad it was not the other way around, or I would've come across some huge issues along the way.
Lastly, I've reflected on the way I plan things. I had planned a whole week on the assembly of this project, this included the soldering. This was also the second-to-last week we had until presenting our projects. In this week, my grandma unexpectedly passed away. I ended up having to assemble the Arduino in the last week, which added a big stress-factor to my project. In the future, I want to start sooner on projects, so unexpected events don't influence the result of something I am making as much as this event has influenced this project.
All things considered, this project was fun to create and assemble, and has taught me a lot.