Laser Glove

by IlyasTosun in Circuits > Arduino

173 Views, 0 Favorites, 0 Comments

Laser Glove

IMG_1444.jpg
IMG_1444.jpg

The instructable is made for a project that is part of an assignment at HKU called If this and that.


This instructable will be explaining how to build a robot arm that turns on the laser when you move your arm straight and also when you hit the laser on the light sensor the monster stops moving.



Supplies

ITTTsup1l.PNG
ITTTsup2l.PNG

For this build we will need a lot of different parts. They are listed in the image above, they will also be categorized under here by different parts of the build.

Main components:

Arduino Uno

Breadboard for testing

wires

USB B to USB A


Arm:

Arduino

Satin Glove

Wires

Arduino Laser KY 008

Tilt Grove Sensor

EVA Foam

PowerBank

Paint


Monster:

2 servo 9g sg90

Foam

LDR sensor

Wires

Arduino

PowerBank

220 ohm Resistor


Soldering:

Solder

Tin and Lead Solder Wire

Dot PCB

Flux


Concept and Research

IMG_0793.png
IMG_0792.png

This project is my first attempt with arduino and I always try to challenge myself to do way too ambitious projects, which hurts me at the end a lot. The finalized product will be my second attempt at it and I made sure to make it as easy as possible for me. 


Before this project I was very interested in space and the galaxy, because I was playing a game called Outer Wilds and No Mans Sky. that is really what inspired me to make a space themed glove. I also took some inspiration from a character from Valorant called Astra, who also wears a glove with a purple milky way going through it.



Doing Code

ITTTCODE.PNG

Then I did some research about how I could build this project. My First attempt used one Arduino but that made it so the wires were exposed too much for me so I then changed it to two, which made my life way easier. I have a friend of mine that is very good with electronics and has some experience of working with arduinos and codes. I made some concepts and they went over how I could build it the easiest. Then we made a sheet so I had more of an idea how everything is connected and how the build would work.


A friend of mine helped me a bunch with setting up the code. As I said earlier, I used two different arduinos, because it made the cables not expose and made it more clear for me how the circuits worked. That is the reason why there are two different codes. One for the arm itself, the other one is for the monster that you have to hit with the laser. I have tested the code a bunch of times on the breadboard before soldering the circuit together, and made sure the project worked the best for me.


Some things really were really tricky like making the laser go on when the tilt sensor is horizontal, I had to figure out on which position the light will go on. and also make sure the light sensor actually could handle the laser. Which it luckily did.

Arm Code:

int pos = 0; //first position

int pos2 = 180;//second position


int laserPin = 5;


void setup()

{


//connection speed with the arduino

 Serial.begin(9600);

//pins voor de tilt switch

 pinMode(2, INPUT);

 pinMode(3, INPUT);


 pinMode(laserPin, OUTPUT);



}//end bracket setup

 



void loop()

{


//read the tilt switch

if (digitalRead(2)==HIGH && digitalRead(3)==HIGH)

  {

Serial.println("lol loser");

digitalWrite(laserPin,HIGH);

// delay(50);

 }

//delay(100);

if (digitalRead(3)==HIGH && digitalRead(2)== LOW)

  {

Serial.println("insert time here");

digitalWrite(laserPin,LOW);

//digitalWrite(8,LOW);

//delay(100);

  }

  }// end loop


Monster Code:

#include <Servo.h>

Servo servo1, servo2;


int i = 0;



void setup() {

 // initialize serial communication at 9600 bits per second:

 Serial.begin(9600);

 servo1.attach(10);

 servo2.attach(6); 

}


void loop() {

 // reads the input on analog pin A1 (value between 0 and 1023)

 int analogValue = analogRead(A1);


 Serial.print("Analog reading: ");

 Serial.print(analogValue);  // the raw analog reading


 // We'll have a few threshholds, qualitatively determined

 if (analogValue < 800) {

  Serial.println(" move/ no light");

 for (i = 0; i < 90; i++) { 


  servo1.write(i);


  servo2.write(i);


  delay(10);


 }


 for (i = 90; i > 0; i--) { 


  servo1.write(i);


  servo2.write(i);


  delay(5);


 }

 } else {

  Serial.println(" stop/ too muchlight");


 }


 delay(500);

}

Circuts

Arduino arm cicuit.PNG
Arduino Monster cicuit.PNG

These are the circuits that I used for both the arduinos. This is also the path way that soldered them together.


The Case for the Arduino

IMG_1432.jpg
IMG_1451.jpg
IMG_1443.jpg
IMG_1439.jpg

This case was one of the things that was bothering me a lot. Because the arduino, powerbank and the breadboard take up so much space. So I was first thinking or hiding everything under the glove with foam, but it would have looked a lot bulkier. That is the reason why I chose to make a bag for my upper arm to hold everything together. I made the whole bag out of EVA foam. The glove was made out of 1 glove and the shards on top of it are made out of EVA foam that I heated up and molded them to fit around my arm. Then I glued them on top of the glove with some contact glue.


The stage the monster is on is made out of wood and is built so all the panels fits perfectly together. They are screwed together and then glued for security. The rock on the stage is made out of gray EVA foam and is holding the rest of the arduino and circuits of the monster together.



Soldering

IMG_1456.jpg

This was the part that I was dreading the most, but luckily I got the hang of it and it was pretty easy to solder everything together. I used two small parts for each arduino. The trickiest part was the part of the light sensor, because it had to be small enough to be attached to the servo and secure to be able to move constantly, but it was doable.

Video

Arduino laser arm

As the final result, I made a short video of me trying it out and trying to shoot the middle of the eye of the monster. Everytime the monster is hit with the laser it stays in one position. Until you miss the laser, it is pretty hard to constantly hit the eye and keep it in one position. 


FInal Thoughts

IMG_1444.jpg
IMG_1445.jpg

This project was really difficult for me, because it is not really one of my main interests, but I tried to make it as fun as possible. I really made it so much harder for myself by adding the monster, but it made it a lot more fun and interactable. I am very happy with the results, It of course could have been a bit better with the final touches like the bag and making the environment a bit more intriguing. But at the end I learned a lot and had fun making it