Gesture Controlled Hand (TinkerCad)

by 649723 in Circuits > Arduino

1400 Views, 4 Favorites, 0 Comments

Gesture Controlled Hand (TinkerCad)

Tremendous Rottis-Lappi.png

This instructable will teach you how to make a gesture-controlled hand with an Arduino microcontroller through TinkerCad. This gesture-controlled hand will use flex sensors to receive input and will output to servo motors. The servo motors will move depending on how much the flex sensor has been bent. This project will also include a lock using logic gates and dip switches so the motors only respond depending on the code entered.

Supplies

Basic Setup

T1.png

This is a picture of all major components needed (not including resistors). When making your actual project, make sure you space them out an appropriate amount as to not be too clustered.

Wiring Flex Sensors

T1.png
T2.png

To wire flex sensors, you will need to create a voltage divider circuit. This will need to be done by connecting 5V to one of the terminals, and connecting ground through a 10K Ohm resistor and the analog pin into the other terminal. The resistor connected will affect the range of the flex sensor, so the resistor size will depend on the project. The flex sensors must be connected to the analog pins as they give us a range rather than simply LOW and HIGH.

Wiring Servo Motors

T3.png
Servo.png

The servo motors have 3 terminals, one for power, one for ground, and one for signal. We will use 5V for the power and connect the motor to the ground. The signal pin must be connected to a PWM pin. This is because PWM pins can simulate analog pins and have a range it works in. Connecting the signal to a PWM pin ensures that the motor won't just have LOW and HIGH values.

Dip Switch and Logic Gates

L1.png
T3.png

After wiring the sensors and motors, the next step is wiring all the logic gate connections. This circuit inputs data from the dip switch and depending on the numbers entered, the rest of the circuit won't work. For this circuit however, the correct combination is 0101, so if any other number is input from the dip switch, the circuit will be locked and won't work. The green led will turn on when the right number in entered, and the red led will turn on if it's a wrong number. There also needs to be a connection between one of the digital pins to the output of the green led so the arduino can read when the right input is entered. The orange pathway is for the green led, and only works for the code 0101, while the blue pathway is responsible for the red led, so it turns on for every combination other than 0101.

Void Setup & Headers

Setup.png

The circuit of this code is pretty simple. so now we move on to the code. Using servo motors means we have to use the servo library, which means we have to use add the servo.h header. Next is to initialize the servos, which is done by writing Servo (insert variable). The next part is initializing the flex sensors, which are constant, so they can be defined as constant integers.

Void Loop

Loop.png

The first step of this loop is defining the flexValue as data from the flex sensors. This is done in the loop and not the setup because the flex sensor values are constantly changing. The next step is initializing variables that the servo outputs. The if statement is there to read the green led, as if the green led is on, the correct number has been entered. The final step is adding a delay to the end so that the Arduino has enough time to read the data from the sensors and isn't constantly been overwritten.

Code File

Attached here is the .ino code file.

Downloads

Final Product

Copy of Tremendous Rottis-Lappi.png

This is what your final product should resemble. This project will look different depending on the logic gates and resistor sizes you used for your project but this shows all required materials for this project.

Real Life Applications

This project can be applied to real-life as well by connecting flex sensors to a person's fingers and connecting servo motors to act like fingers. This project has applications in robotics and prosthetics and can be expanded upon through additional sensors and more servo connections to simulate other body parts.