I searched on google about anxiety tests to detect if the user is an anxious person or not.
I found this test LINK
7 questions showed on LCD, the user can answer by push on (yes OR no)
then the result showed the degree of anxiety but but this test doesn't mean you are suffering from anxiety disorder.
If you want to know more about an anxiety disorder read this Article
Finally, i wanted to help these people by playing quite music (complete features) and emitting light according to the degree of anxiety.
Firstly, I wanted to make a robot so it can move and touch the user and hugging him, but i made it like a game! :D
My final project is a device that can helps anxious and nervous people to calm down by playing the music and emitting light that they love and provide support.
I thought about this project because I am an anxious person and it might help me become calmer.
this video for a similar idea.
To sketch and assembly the design.
To prepare the living hinge pattern
To prepare the design before cutting.
To prepare the design for 3D printing
I wanted to make an attractive design like a joystick game,so
I used these softwares to design and fabricate my project:
1-Autodesk Fusion 360.
2- Auto-cad.
3- Laser works.
4- Ultimate cura
4- Arduino
5- Tinkercad
6- Fritzing
Tinkercad and fritzing for wiring the circuit.
Software Arduino for coding
1-Laser cutting machine
2- 3D printer (prusa)
3-Plywood
4- White PLA filament material
5-Driller to make holes
6- Arduino uno
7- Jumpers
8- Resistors (220 ohm)
9- LCD screen
10- 2 push buttons
11- RGB LED
12- Battery
13- LM 35 (temp sensor)
14-Bread board
2 push buttons
LCD with i2c
Jumpers
Temp sensor
RGB LED
Resistors 220 ohm
choosing sketch then drawing 2 circles with diameter= 120 mm, the distance between their centers is 150 mm.
connecting between 2 circles with lines then drawing the rectangle that represent the place of LCD screen with 4 circles for the screws.
then drawing 2 circles with 12& 12.2 mm diameter for 2 push buttons.
to fix the part with the sides i make 2 t-slots and tabs.
then i copied this part and pasted it to sketch the bottom.
Adding holes for Arduino uno
After finishing the sketch, extruded it (choosing new component with 3mm) then choose the appearance (wood)
making ellipse shape for speaker
For sketching side parts, i make to sketches to sketch the front and back sides then divided them into 2 parts, each of them connected to living hinge pattern to make a bending circular shape.
then making t-slot and tabs to fix them with top and bottom parts.
making circle (with 40 mm diameter) for light diffuser.
prepared living hinge pattern on auto-cad then copied and pasted it on fusion 360 and connected to the half part of side.
Giving the living hinge thickness to show on extrude
by going to surface then choose extrude then select the living hinge pattern then extrude at both
the next step is going to surface then choose thickness option (0.01 mm)
from modify choose combine (between the first part and living hinge, making sure that you select cut option.
then extruded them (3mm)
For the light diffuser, I sketched half circle with (diameter 40 mm) then revolved it to make a half sphere then shelled it bu shell feature.
sketching circle with ( diameter 50 mm ) and 2 small circles for screws with (3.2 mm diameter)
then extruded it (2mm) to make edge for the half sphere
from appearance i select ABS white.
For making the RGB led fixed and stable, i closed the light diffuser by a circle of wood to concentrate the light.
prepared all files for laser cutting as DXF files.
Then I opened Laser works and import them all through the laser works software.
Adjusting the settings of the program by selecting all lines are cutting. ( black color for cutting)
with ( 18 speed & 68 power)
prepared 3D printed file as STL file.
Then i opened Ultimate cure and open file and adjusting the settings as:
profile is 0.2 and infill is 20% and the temperature is 215, with no supports only skirts.
To prepare the file for leaser cutting:
I turned on the laser cutting machine and made sure that the switches are on.
downloading the file into the laser cutting machine after i named it.
putting the plywood sheet in the workspace area and made sure by the lens that the distance from the nozzle and the sheet is suitable.
I made sure that the nozzle starts from the origin.
choosing the file name and press work frame to know the working area and finally, press start.
All the lines are to be cut thoroughly with speed of 18 m/s and power of 68%.
the Electronic components used in the project:
Input components:
user input: 2 push buttons (yes, no)
Temperature sensor (LM35) (sensing element)
Action components:
Minimum User Features
LCD screen (showing the questions)
RGB LED (emitting light)
Complete User Features:
mp3 module and speaker (for making sound)
Firstly, wiring LCD screen and 2 push buttons together on fritzing
connecting lcd with arduino (SCL to A5 pin)
(SDA to A4 pin) & (gnd with gnd) &( vcc with 5 v)
connecting the 2 push buttons:
Yes button ( one of its leg to pin 2 in Arduino and the another leg to the gnd)
No button (one of its led to pin 3 in Arduino and the another leg to the gnd)
connecting the 2 push buttons:
Yes button ( one of its leg to pin 2 in Arduino and the another leg to the gnd)
No button (one of its led to pin 3 in Arduino and the another leg to the gnd)
Secondly, connecting the temp sensor and RGB LED on Tinkercad:
Red leg to resistor (220 ohm) then connected to pin 6
the tallest leg (common cathode) to gnd
Blue leg to resistor (220 ohm) then connected to pin 11
Green leg to resistor (220 ohm) then connected to pin 10
The left leg to 5v
The second leg to A0
The last leg to the gnd
connecting the temp sensor and RGB LED on breadboard:
Red leg to resistor (220 ohm) then connected to pin 6
the tallest leg (common cathode) to gnd
Blue leg to resistor (220 ohm) then connected to pin 11
Green leg to resistor (220 ohm) then connected to pin 10
The left leg to 5v
The second leg to A0
The last leg to the gnd
Then integrated all components together in 2 small breadboards and moving to the next step (coding)
For the complete features i had to use battery (7.4) volt
But i reached ti the minimum features so i didn't use the battery, i used the Adapter (5v) instead.
in minimum features i used:
RGB led
Temp sensor
LCD screen
Push buttons
All of them can work with 5v.
Dividing the code into two parts:
Writing the code of Temp sensor and RGB led.
#define LM35 A0
#define RED 6
#define GREEN 10
#define BLUE 11
float lm_value;
float temperature;
void setup() {
Serial.begin(9600);
pinMode(RED, OUTPUT);
pinMode(GREEN, OUTPUT);
pinMode (BLUE,OUTPUT);
}
void loop() {
lm_value = analogRead(LM35);
temperature = (lm_value * 500) / 1023;
Serial.println(temperature);//Temperature in Celcius
//Condition
if (temperature <= 25) {
digitalWrite(RED,LOW);
digitalWrite(GREEN,HIGH);
digitalWrite (BLUE,LOW);
}
else if (temperature > 25 && temperature < 30)
{
digitalWrite(GREEN,LOW);
digitalWrite(RED,HIGH);
digitalWrite (BLUE,LOW);
}
else if (temperature >=30 && temperature < 50){
digitalWrite(GREEN, LOW);
digitalWrite(RED, LOW);
digitalWrite (BLUE,HIGH);
}
delay(100);
}
temp = 29.8 so the RGB led emitting red light
2. Writing the code for LCD and 2 push buttons :
const int Yespushbutton = 2, Nopushbutton = 3;
int button1_State = 0, button2_State = 0;
float count_value =0;
char *myStrings[] = {"1- Feeling nervous?","2- Not being able to stop or control worrying", "3-Worrying too much about different things",
"4-Trouble relaxing", "5-Being so rlesests that it is hard to sit still", "6-Becoming easily annoyed or irritable",
"7- Feeling afraid something awful might happen"
};
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup() {
pinMode(Yespushbutton,INPUT_PULLUP);
pinMode(Nopushbutton,INPUT_PULLUP);
lcd.backlight();
Serial.begin(9600);
lcd.init();
}
void loop() {
for (int i = 0; i<=6 ; i++) {
Serial.println(myStrings[i]);
Serial.println("Yes No");
lcd.clear();
lcd.setCursor (0,0);
lcd.print (myStrings[i]);
lcd.setCursor (1,1);
lcd.print ("Yes NO");
while( digitalRead(Yespushbutton) !=LOW && digitalRead(Nopushbutton)!=LOW){
for (int positionCounter = 0; positionCounter <18; positionCounter++) {
// scroll one position right:
lcd.scrollDisplayLeft();
// wait a bit:
delay(500);
button1_State= digitalRead(Yespushbutton);
button2_State = digitalRead(Nopushbutton);
if(button1_State == LOW || button2_State == LOW) {break;}
Serial.println(button1_State);
Serial.println(button2_State);
//delay(100);
}
}
}
}
define all variables and input data ( pins of push buttons)
(pins of RGB led, temp sensor)
(temp value and counter value)
entered the questions in array then
I include the header "Wire.h". This library help to communicate with I2C device. Then include "LiquidCrystal_I2C.h" for better communication with display.
Next set the address, number of column and number of rows using the function "LiquidCrystal_I2C lcd(). The address is 0x27 Number of columns is 16 and number of rows is 2. After this, we can call the display using "lcd".
Next code the setup part. First initialize the display using the function " lcd.init();"
initialize digital pin 2,3 as an input with the internal pull-up resistor
make RED, GREEN and BLUE OUTPUT pins
Firstly, temp degree will be displayed on LCD screen and according to its range the RGB led will emit certain color:
as if the temp is less than or equal 25 c the light will be red.
else if the temp between 25 and less than 30 the light will be green.
else if the temp between 30 and less than 50 the light will be blue.
The temp will be present until any body pressed on one of 2 buttons then, the questions will appear.
after each question there is count value that recorded the result as a points
At the end of the questions according to the summation of the points the result will displayed:
if the range between 0 :4 then print
("minimal anxiety") and take an action (light will be purple)
if the range between 5:9 then print
("mild anxiety) and take an action ( light will be cyan )
if the range between 10:14 then print ("moderate anxiety") and take an action (light will be yellow )
if the range between 15: 21 then print
("severe anxiety") and take an action
(light will be red)
This code for Minimum Features
Writing the code for all integrated circuit
const int Yespushbutton = 2, Nopushbutton = 3;
int button1_State = 0, button2_State = 0;
float count_value =0;
char *myStrings[] = {"1- Feeling nervous?","2- you can't stop or control worrying", "3-Worrying so much about differentthings",
"4-Trouble relaxing", "5-Being rlesests thatit'S hard to sitstill", "6-Becoming easily annoyed or irritable",
"7- Feeling afraid something awful might happen"
};
// an array of set of questions that showed in LCD screen
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
#define LM35 A0
#define RED 6
#define GREEN 11
#define BLUE 10
float lm_value;
float temperature;
void setup() {
pinMode(Yespushbutton,INPUT_PULLUP);
pinMode(Nopushbutton,INPUT_PULLUP);
lcd.backlight();
pinMode(RED, OUTPUT);
pinMode(GREEN, OUTPUT);
pinMode (BLUE,OUTPUT);
Serial.begin(9600);
lcd.init();
}
void loop() {
//digitalWrite(RED, LOW);
//digitalWrite(GREEN, LOW);
//digitalWrite(BLUE, LOW);
lm_value = analogRead(LM35);
temperature = (lm_value * 500) / 1023;
Serial.println(temperature);//Temperature in Celcius
lcd.clear();
lcd.setCursor (0,0);
lcd.print (String("Temp: ") + String(temperature));
//Condition
if (temperature <= 25) {
digitalWrite(RED, HIGH);
digitalWrite(GREEN, LOW);
digitalWrite(BLUE, LOW);
}
else if (temperature > 25 && temperature < 30)
{
digitalWrite(GREEN, HIGH);
digitalWrite(RED, LOW);
digitalWrite (BLUE,LOW);
}
else if (temperature >=30 && temperature < 50){
digitalWrite(GREEN, LOW);
digitalWrite(RED, LOW);
digitalWrite (BLUE,HIGH);
}
delay(100);
while( digitalRead(Yespushbutton) !=LOW && digitalRead(Nopushbutton)!=LOW){}
digitalWrite(RED, LOW);
digitalWrite(GREEN, LOW);
digitalWrite(BLUE, LOW);
delay(1000);
// read the state of the pushbutton
for (int i = 0; i<=6 ; i++) {
Serial.println(myStrings[i]);
Serial.println("NO YES");
lcd.clear();
lcd.setCursor (0,0);
lcd.print (myStrings[i]);
lcd.setCursor (1,1);
lcd.print ("NO YES");
while( digitalRead(Yespushbutton) !=LOW && digitalRead(Nopushbutton)!=LOW){
for (int positionCounter = 0; positionCounter <18; positionCounter++) {
// scroll one position right:
lcd.scrollDisplayLeft();
// wait a bit:
delay(500);
button1_State= digitalRead(Yespushbutton);
button2_State = digitalRead(Nopushbutton);
if(button1_State == LOW || button2_State == LOW) {break;}
Serial.println(button1_State);
Serial.println(button2_State);
//delay(100);
}
}
}
delay(2000);
if (button2_State == HIGH ) {
count_value += 2.5;
delay(100);
}
// counter decrement if the pushbutton 2 is pressed.
else {
count_value += 0.5;
delay(100);
}
Serial.println(count_value);
lcd.clear();
lcd.setCursor (0,0);
if (count_value >= 0 &&count_value <= 4) {
lcd.print ("minimal anxiety");
digitalWrite(RED, HIGH);
digitalWrite (BLUE,HIGH);
digitalWrite (GREEN,LOW);
}
else if (count_value >=5 && count_value <=9){
lcd.print ("mild anxiety");
digitalWrite (BLUE,HIGH);
digitalWrite (GREEN,HIGH);
digitalWrite (RED,LOW);
}else if (count_value >=10 && count_value <=14) {
lcd.print("moderate anxiety");
digitalWrite (RED,HIGH);
digitalWrite (GREEN,HIGH);
digitalWrite (BLUE,LOW);
} else if (count_value >=15 && count_value <=21) {
lcd.print ("severe anxiety");
digitalWrite (RED,HIGH);
digitalWrite (GREEN,LOW);
digitalWrite (BLUE,LOW);
}
delay(5000);
}
fixed all electronic components on the parts
2. Assemble the parts together
3. Putting 2 sides parts on the base
video showing how to integrate the project's parts
After assemble all the parts and uploaded the code
temp displayed on LCD screen, the color light change according to the temp degree
Demo Video showing the final outcome
The most person I'm grateful for her helping and caring over all the maker diploma is Amany (instructor of group A4)
I wanted to thank my instructor Sherif for helping me in the code, how to write it and his suggestions for my projects.
Shimaa amer and Rashida helped me to prepare the living hinge pattern on auto-cad then to fusion
Shymaa nasser helped me to extrude the living hinge and giving it thickness to appear in the 3D
Ahmad samy and Mahmoud el-gazzar helped me in the code of LCD
Sara Alaa, Salma, Ramie, Esraa and Ahmed they all supported me in my project, we shared special moments together and more and more of laughing, thank you all <3
I shared with eslam that i learned about the living hinge
Telling yomna how to get the dimensions of the speaker
Firstly, i cut the first design but the dimensions of the device wasn't appropriate, so i had to redesign it again :)
you should mount the components on fusion to make sure that the dimensions are suitable to avoid my problem :"D
In he right part the no of flexible lines are too little so it couldn't reach at the end :''
The middle part the no of flexible lines are too much
the last part is good but!! the hole for speaker wasn't right so i changed the shape to ellipse to be more suitable
Before download the file into the machine you should make sure that there is no overlapping :"
If i have more time i want to do the complete features :")
Adding the mp3 module and the speaker to make sound