Gesture-Controlled RC Car with Robot Arm

My project has 2 micro-controllers(Arduino): there is one on the glove, and the other is on the RC car. Using NRF modules these micro-controllers can communicate with each other. Flex sensors are used to control the motors and servo; the motors are used to move the car, and the servo is used to control the robot arm.

Engineer

Nitin V

Area of Interest

Computer Science and Electrical Engineering

School

Evergreen Valley High School

Grade

Rising Junior

Final Milestone

My final milestone is the increased reliability and accuracy of my robot. I ameliorated the sagging and fixed the reliability of the finger. As discussed in my second milestone, the arm sags because of weight. I put in a block of wood at the base to hold up the upper arm; this has reverberating positive effects throughout the arm. I also realized that the forearm was getting disconnected from the elbow servo’s horn because of the weight stress on the joint. Now, I make sure to constantly tighten the screws at that joint.

Final Milestone

My third and final milestone was to make the NRF module on the glove and the one on the RC car communicate with each other. For this milestone, I first got the NRF modules to transmit and receive data from each other. The NRF module on the glove was the transmitter, and the NRF module on the RC car was the receiver. To do this, I simply made the transmitter send a string and I checked if the receiver received the string from the serial port. Then, I started to code the NRF modules to make the flex sensors control the servo and the motors wirelessly. I first included in the libraries. Then like in previous milestones, I got the flex sensor values to be read. Then I sent these values to the receiver. Using these values, I made the Arduino send a signal to the motors and the servo if these values are in between a specified range. This range was created using the map and constrain functions. After getting the NRFs to work, my code was complete, but I still had the mechanical and electrical part of this project to complete. I first got my flex sensors soldered so wires won’t fall off. After soldering, I assembled the robot arm and attached it to the two servos (another servo was added to make the robot arm rotate). Afterwards, I used cardboard to create the base of my car. I attached to the motors and they were attached to the bottom end of my car. An omni wheel was attached to the front of my car. Then, I attached my circuitry to the top of my car. In this whole process, I had to use a drill, dremel and hand saw. I was pretty familiar with the tools, which made this process a lot easier. After the mechanical part, I had to sew my soldered PCB containing my flex sensors onto the glove.   This milestone was the hardest in my opinion based on the amount of troubleshooting I had to do and my initial knowledge on NRFs, which was pretty much negligible. The The mechanical side was a lot of work too and pretty challenging. I also struggled greatly with soldering. Due to my lack of experience, I was not very good at soldering, which caused me to restart the process once. After I got more acquainted with soldering, it got s lot easier. Sewing was also difficult because I have never done it before. Fortunately, I was taught how to sew very well. This allowed me to finish my project. In this milestone, I decided to remove my button, because of its inconvenience. I decided to create a whole new gesture to make the flex sensors control the servos.

Glove Schematic

screen-shot-2019-07-16-at-8.29.50-pm

Car Schematic

screen-shot-2019-07-16-at-8.22.11-pm

Second Milestone

2nd Milestone

My second milestone was to make the flex sensors control the motors, instead of the servo when a button is pressed. So for this milestone, I had to use a button, motor driver, 2 DC motors and a 6V battery. Each flex sensor has a specific function, because each flex sensor had to make the motors rotate clockwise or counterclockwise. For example, my first flex sensor makes both motors rotate clockwise and my second flex sensor makes both motors rotate counter-clockwise. The 6V battery was used, because I needed more power to move the motors. The power from the Arduino was too little to power the motors. The motor driver allows me to use this external battery to power the motors and it also allows the Arduino to communicate with the motors. The button is connected to a digital pin so when I press it, its state becomes High, and then in my code, I said that if it becomes high then the value read by the flex sensors will be used to control the motors. So my code comprised mostly of just defining variables, getting the flex sensor values read, mapping the flex sensor range, and then using a bunch of if statements. These if statements were used so that if the flex sensor values were in a certain range, then the motors will rotate in a specified direction. 

First Milestone

1st Milestone

My first milestone is me achieving to make the flex sensors control the servo. It is not one large accomplishment, but rather the base of my project, which makes it really important.  The first milestone of my project had a: The flex sensor is a variable resistor, so when the sensor is bent, the flex sensor increases in resistance. When the resistance increases, the output voltage and the voltage across the flex sensor increases. The flex sensor is connected to the analog pin A0. The 20k ohm resistor limits the current in the circuit, and prevents short-circuiting. The servo is like a motor which converts electrical energy into mechanical energy. I added a shaft onto the servo, which shows its rotation clearly. I first has to call the servo library: servo.h. After that, I used the attach function to connect the servo to pin 9. Then I used the write function which allows me to give the particular angle I want the servo to move to.This leads to the back-and-forth rotation of the servo. The servo has a power supply wire, ground wire and a control signal wire. In this case, the red wire represents power, the brown wire represents ground and the orange wire represents the control signal. The orange wire is connected to digital pin 9, because this wire controls the servo.

Motion Alarm

Starter Project Video

Starter Project Diagram (This is a diagram all the connections made in this project) I finished my Starter Project, which was a Motion Alarm. I used this link to guide my first steps in completing this project. The components used in this project were:  Arduino – It is a platform that read inputs and turn that into an output. In this project, the outputs are the turning on of an RGB LED, the beeping of a piezo buzzer, the rotation of a servo and the time taken for an ultrasonic pulse bounce back and hit the motor. It controls all the components in this project and is the brain behind this project. All the written code is uploaded to the Arduino for the project to work. RGB LED– This LED is a combination of a red LED, a blue LED and a green LED. Each LED is controlled by a certain pin. In this case, the red LED is controlled by pin 3; the blue LED is controlled by pin 6 and the green LED is controlled by pin 5. Servo– The servo is like a motor which converts electrical energy into mechanical energy. I added a shaft onto the servo, which shows its rotation clearly. I first has to call the servo library: servo.h. After that, I used the attach function to connect the servo to pin 9. Then I used the write function which allows me to give the particular angle I want the servo to move to.This leads to the back-and-forth rotation of the servo. Piezo buzzer –  The piezo buzzer beeps when voltage is applied to it. When the voltage is applied to it, a piezo crystal, a material inside the buzzer, changes shape. This will lead to the production of a pressure wave with a certain frequency, which in turn creates a sound. Distance/ultrasonic sensor – This distance sensor’s use is pretty self-explanatory. It measures the distance from the sensor to the closest object it can sense. The distance sensor is able to do this, because it has a trigger pin and an echo pin. The trigger pin emits ultrasonic pulses and the echo pin measures the time taken for the pulse to bounce back and hit the sensor. This time is used to find the distance. The distance is equal to the speed of sound multiplied by one half the time measured by the echo pin.   So in my project, when the distance sensor senses an object 10 inches or closer, then the LED will turn red, the piezo buzzer will beep, and the servo will rotate. When the distance is in between 10 and 20 inches, then the RGB LED will turn yellow, the piezo buzzer will stop beeping, and the servo will stop rotating. If the distance is greater than 20 inches, then the LED will turn green. 

Leave a Comment

Start typing and press Enter to search