Gesture Controlled RC Car

Hi, my name is Arnav. At BlueStamp this summer, I will be working on the Binary Blaster Kit for my starter project, and a Gesture Controlled RC Car with a Robotic Arm for my main project.

Engineer

Arnav D.

Area of Interest

Electrical Engineering and Computer Science

School

Lynbrook High School

Grade

Incoming Junior

Reflection

During this summer at BlueStamp Engineering I had an amazing time and learned a great deal about the engineering process. I was introduced to the various fields of engineering and found out how to combine aspects of them to create a finished product that works. I learned a lot about the engineering process and how we have to take problems step by step to solve them. I was surprised at how capable and independent I was at making this project and enjoyed my time here at BlueStamp. I am looking forward to building on this experience and increasing my knowledge of engineering by working on new projects in the future.

Final Milestone

The goal of my final milestone was to build the final car and then add ultrasonic sensors to the car so it can stop before hitting a wall. Building the car involved a lot of creativity in mechanical engineering, because many of the parts I had did not fit together well.

The first challenge I came across was connecting the wheels to my DC motors. The axle was poorly designed and was too small for the wheel. The main problem this caused was that the wheel was not centered on the motor, and the wheel would sometimes slip off the axle. I tried using heat shrink and then tape to widen the axle, but it still did not work. I ended up using a combination of heat shrink with hot glue to solve this problem.

More problems arose when I was connecting the motors to the base of the car. The bracket pairs that came with the motors were too small as well, and they could not support the whole motor. I had to bend motor mounts and screw them onto my base to mount the motors. I had to drill holes into my base to screw in the new mounts. They were still slightly loose, so I used some hot glue and super glue to keep the mounts and motors in place.

Then, I created a mount for the servo claw because, yet again, the pan tilt bracket given was too small for the servos I used. I cut a piece of acrylic sheet to build a base for the claw. Next, to mount the front wheels (omnidirectional wheels), I had to drill again and screw them in. However, the base of the car was slanted and leaning forwards at this point, because the back wheels were larger than the front wheels. This stopped the servo claw from tilting, because the servo opening the claw would keep hitting the ground. I had to add an extra piece of wood between the front wheels and the base to make the wheels taller and straighten the base out.

Once I mounted everything on the morning of my demo night, the wheels and servos were turning perfectly according to my gestures. However, the wheels were not strong enough to run the car on the ground; they only ran if I picked up the car and there was no resistance on the wheels. I thought there was an issue with the power, so I switched my H bridge to a motor driverMotor driver are essentially PCBs pre-built with an H bridge, voltage regulators, pins, and a heat sink. This allows for a stronger and more stable power source. Unfortunately, that was not the problem. I found out that I had the wrong motors the whole time, because the motors I had did not have gears. Fortunately, Erik went and bought some geared motors for me to use. I had to remove my old motors, and fit the new motors on my car, which was a challenge because my old motors were super-glued on the base of the car. When I finally mounted the new motors correctly, my car worked perfectly!

However, during demo night, minutes before my presentation, one of the wires on my glove broke, restricting how I could control the car. I presented with limited functionality and had to spend the days I had left after demo night to solder another PCB to fix my glove. I unfortunately did not have enough time to add the ultrasonic sensors as a modification.

Through this milestone I learned that you have to be very creative when solving problems relating to mechanical engineering. I had to design and make all the mounts for my motors for this milestone. I learned how to use different materials, including heat shrink and hot glue, to solve problems relating to building a functional product, such as the car I had to make.

First Modification

The goal of my first modification was to add ultrasonic sensors to my gesture controlled car so it can detect walls and stop before hitting them. I unfortunately did not have enough time at BlueStamp this summer to finish this, so I worked on it at home. The way that ultrasonic sensors work is that they send out a sound wave, and then measure how long it takes for the wave to return to the sensor. Using this time value, I can calculate how far away the nearest obstacle is. Ultrasonic sensors have 4 pins: power, ground, echo, and trig. The Trig pin controls the sound wave that is sent out, and through the echo pin, the arduino can read how long it took for the sound wave to return.

The main challenge I encountered was that the ultrasonic sensors interfered with the XBee communication. All of the data was received far later than when I bent the fingers of the glove. This meant that the car’s movement was delayed from my hand motions, and that delay kept consistently increasing. Using all the troubleshooting skills I learned earlier this summer, I pinpointed the problem in my code: it was the pulsein() function I had to use to get readings from the sensors.

After researching that function, I learned that it had a timeout parameter, which in my case was defaulted to one second. This meant that the sensors waited a whole second to gather data about how long it took for the sound wave to return. The XBee communication was delayed by a second every time, which accounts for the timeout function. With some calculations, I decided to set the parameter to 1.5 milliseconds, which is just enough time for the sensors to detect walls that are close enough for a potential crash. Then, I incorporated the sensors into my code with a series of if statements which constantly check for obstacles around the car.

Resources:

Transmitter

Receiver

Demo Night Presentation

Third Milestone

The goal of my third milestone was to create a circuit running the motors and the servos together based on the motions made by the glove. The servos are connected to a robotic claw that can open, close, and tilt sideways.

The first part of this milestone was connecting both of the servos to the robotic claw. This was slightly difficult because the claw was not perfectly manufactured, so I had to improvise at times to make it work. The main issue was making sure that the gears that run the claw aligned, which I did by using hex nuts and screws to adjust the height of each side of the claw.

Next was creating a circuit with the servos and coding the movements. The circuit is relatively simple, with 2 voltage regulators to ensure that not too much voltage is sent to the servos. The servos each have 3 connections: power, ground, and an input pin. Then, I coded the motions of the glove and added a second aspect to this milestone: 2 separate modes. These modes are when I am controlling the car versus when I am controlling the claw. There is an LED on each Arduino with indicates which mode I am in. I can change modes by making a fist with the glove, and then I can send data in order to move the claw or the car.

The main issue I ran into during this milestone was powering both the motors and servos together. At first, only the servos would run, because there was not enough current to run both the servos and DC motors. I solved this by making 2 separate circuits on the same breadboard: one for the servos and one for the DC motors. These circuits will be powered by separate batteries so there is enough current to run all of the motors together.

My next milestone, or my final milestone, will be to actually build the car with the mounted claw and run it with my glove. I will also be adding modifications after making the car. I will add a multi-color LED to indicate modes and add ultrasonic sensors to the front and back so the car can stop by itself before it hits a wall.

Second Milestone

The goal of my second milestone was to set up the wireless communication between the flex sensors and a circuit running the motors through the use of XBees, and then building the glove by attaching the flex sensors to it.

I used the XCTU software in order to configure the two XBees onto the same channel and to make sure they had the same baud rate. I also had to change their destination and source addresses. Without this, they cannot communicate with each other. Then, I mounted the Xbees onto my two Arduino Unos using XBee shields. The XBee shields connect the Xbee to the Arduino while still giving access to all the pins on the Arduino. In the beginning, I did simple tests between the serial monitors of the XBees to make sure they were communicating properly, without the loss of data. Afterwards, I moved on to using them with flex sensors and LEDs.

I got the LEDs to blink according to the flex sensors easily, but there was one bug that I could not solve. It kept on pausing for 10 seconds every once in a while, because the XBees were not communicating. I spent four days trying to solve this problem to no avail.

I decided to move on to making a circuit to run the two DC motors. I used an H Bridge, which amplifies current and allows the DC motors to turn in both directions. The H bridge has pins for ground, voltage, I also added a voltage regulator to the current to stabilize the voltage inputted to the motors. I had to add two voltage regulators to ensure that the circuit did not heat up.

Then, I coded the XBees to turn the motors according to the flex sensors bends, and it worked perfectly. The only thing I had to change was the battery to make sure I had enough power to run the motors. Finally, I transferred the circuit with the flex sensors to a PCB (printed circuit board). I had to solder the wires and resistors to the PCB, and then mount this on the glove. I used an arm band to mount the Arduino on my arm, because it was too big to fit on the glove.

The main problem I encountered was getting the LEDs to light up without the 10 second delay. I tried troubleshooting through every part of my code using the Serial.print() function, and I changed all the wires and resistors in my circuit, but it still did not work. I thought I was sending too much data from the XBees, but that was not the case. However, it worked when I replaced the LEDs with motors, which is what I need in my final project. I am sticking with the motors for this milestone because the XBees seem to not work well with LEDs.

My next milestone will be to add the robotic claw to the circuit with the motors, and then mount everything onto the chassis of the car.

First Milestone

The goal of my first milestone was to connect the flex sensor to the Arduino Uno so it can record the bend angles. On top of recording the angles, the four flex sensors also work together to blink LED lights corresponding to certain motions of the motor. Each flex sensor corresponds to a finger and bending them mimics the motions of a hand. Bending the sensors blinks the LED lights to show which way it would direct the car to go. The colors are red for stop, green for go, orange for turn left, and yellow for turn right.

The flex sensors are connected to the analog pins, so that the Arduino can read a range of values, and not just zeros and ones. The LED lights are connected to the digital pins because they only need two values: on or off. The flex sensors have a resistance range of 12k ohms when straight and 32k when bent 90 degrees. When the flex sensor is bent, it increases resistance, and decreases the voltage input.  There are also 2 10k resistors placed in series to form a voltage divider that allows us to measure the input voltage from the circuit and how much resistance there was from the flex sensors. Using this data, the bend angle of the flex sensor is calculated using the map function, which uses proportions to find an angle between 0 and 180 degrees.

The main problem I came across while working towards this milestone was I could not get the Arduino to record the data of the flex sensor in the beginning; it kept returning a value of zero. I found out that the 10k resistor was not working, and when I replaced it, the circuit started working. Without that resistor, the voltage divider was not complete and the Arduino could not record the data. Then, the recorded values were changing, but they still were not correct, so I had to use a digital multimeter to measure the resistance values of each individual flex sensor, and I used a weaker resistor in the voltage divider in order to record accurate angle values.

My next milestone will be to attach the flex sensors to my glove and use the XBees to send data from the flex sensors to turn on the LEDs.

Resources:

Flex Sensor Code

Starter Project

Binary Blaster Kit

  My Starter Project is the Binary Blaster. It is a game that teaches you to convert decimal numbers to binary form. A decimal number is displayed on the 7-segment displays and I have to press the LED buttons to toggle them between 0 and 1 to show the binary version of the decimal number. There are 2 switches, one to turn on the game itself, and the other one to turn sound on and off. The micro-controller controls the other parts of the binary blaster and executes the program to run the game. The capacitor stores energy and provides it to the buttons and displays when necessary. The 10K ohm resistor is used to reduce the flow of current when it is not needed to power the displays. The energy for the binary blaster is provided by 2 AA batteries which provide 1.5 volts each. Through this project I mainly learned how to solder and about the basics of a circuit board. The main challenge I came across was soldering all the parts to the board.  I chose this starter project because I think it is a fun game to make while learning to solder and about circuits.

Leave a Comment

Start typing and press Enter to search

Bluestamp Engineering