My name is Chris, and I am a rising senior at Regis High School. During the past six weeks, I have built a TV-B-Gone as a starter project and a hand-gesture controlled robot. I chose to build the hand gesture controlled robot out of a desire to challenge myself technically and a developing interest in the engineering field of mechatronics. I was confident that my experience in building this robot would bolster my interest in engineering as both a field of study and occupation.
Before beginning BlueStamp, I had some exposure to both robotics and programming. As a member of my high school’s robotics club and a senior leader this upcoming school year, I have developed a basic knowledge of robotics in regard to chassis design and differences in motors. However, the intensity of this project demanded that I drastically expand my skills in the area. The robot’s multi-functional design allowed me to learn about a greater variety of robotics concepts that I am sure will prove invaluable as I look to lead my school’s robotics club beginning this fall. In regard to programming, I had experience in Java through a class at school and my own self study, along with a small amount of experience in C++ through basic experimentation with Arduino on my own. Although this project did not involve an extraordinarily difficult program to operate the robot, the addition of wireless communication to my project necessitated a careful consideration of my code to ensure that signals did not err. Yet, I still greatly increased my knowledge of C++ syntax and developed the basic ability to code in C++ again in the future.
I consider confidence in my own ability to troubleshoot and creatively come up with solutions to be the most important things I took away from my time at BlueStamp. As a lover of engineering-related toys as child, avid follower of Popular Mechanics, and fan of engineering documentaries, I have always seen a potential in myself to be a ‘maker.’ Until now, however, I had never believed I possessed the skill set to actually become one. After completing BlueStamp, I finally view myself as a ‘maker’ and look forward to building all of those projects I had previously passed over. Consequently, I now know that I would like to pursue engineering in college and as my career.
Hand Gesture Controlled Robot
Since my last milestone, I have added a new element to my hand gesture controlled robot—a robotic arm with two pivot points. Using two servo motors, motors that can be rotated to precise angles, I have mimicked the functions of an arm and claw. In terms of programming, I adjusted the code to include a ‘switch command’ (bending the thumb by itself) to activate control of the robotic arm instead of the DC motors. One can then use a different set of hand gestures to move the individual components that form the arm.
To improve the design of my robot, I replaced the 12V battery of 8AAs with an 11.1V rechargeable battery. The incorporation of a rechargeable battery makes the overall robot design less wasteful and more lightweight. Although I tried to power every component through a single source, using voltage regulators to decrease the voltage to 5V for the serovs, I soon found that the battery outputted too much current. Because of the appreciable power dissipation necessary to drop the voltage, the voltage regulators fried. When I tried using the Arduino’s own voltage regulator to drop the voltage down from 11.1V to 5V, the large amount of current caused the Arduino to constantly reset. I was able to remedy the situation by temporarily powering the servos through a 9V battery and single voltage regulator. In the future, I hope to purchase switching regulator to remedy this problem so that I could power the robot through the lone rechargeable battery.
For my third milestone, I constructed the robot chassis to form the main structure of my project. I cut an 11 inch by 13 inch aluminum board to function as a sturdy but lightweight base and also allowing ample room for modification. There are two 12V, high-torque DC motors mounted onto the back of the chassis and two caster wheels in the front. I later replaced the caster wheels with roller ball bearing wheels to decrease friction and improve maneuverability. An Arduino Uno, a 12V battery, and a breadboard with an H-bridge are also aboard the chassis. I chose to use a breadboard on the chassis instead of a PCB to make future modifications and adjustments easier.
The wireless functionality follows from my second milestone. The wireless connection between the router Arduino in the glove and the coordinator Arduino on the robot uses the same serial communication technique to relay a unique character that would correspond with a unique command. Through a few simple manipulations of the code, I was able to change control of the LEDs in the Second Milestone to control the DC motors. I added a stop gesture—full extension of all fingers—to prevent accidental motor movements due to inadvertent gestures.
Through this milestone, I gained much experience in implementing and using DC motors in a circuit. Having never used an H-bridge before, I was fascinated when learning about its function to change the direction of current through the motors in order to change the direction of the motor’s rotation. In addition, I faced a major obstacle when I discovered that the DC motors I had originally purchased reached their stall torque as soon as they were subject to the full weight of the robot. After learning about torque, the measure of of how much force acting on an object causes it to rotate, I purchased new motors with higher torque. However, I soon learned that one must sacrifice velocity to increase torque. Due to the complexity of implementing gear ratios to combat this problem, I decided against tampering with my robot, especially after considering the limited time remaining to complete it. I will take that knowledge with me on my next project.
My second milestone implemented wireless communication between the glove (flex sensors) and and an output source in the form of LEDs. To achieve this, I used two Series 2 XBees mounted onto two Arduinos with XBee Shields. The XBee shields serve multiple functions, mainly acting as level shifters that lower the logic voltage from 5V to 3.3V and also connecting the XBee’s serial pins to the Arduinos. The XBees communicate using a serial connection, transmitting and receiving data one byte at a time. Because the Arduino’s UART (Universal Asynchronous Receiver/Transmitter) hardware can be troublesome to work with and potentially harmful to the Arduino if used incorrectly, I used the XBee Shield’s DLINE connection, which connects the XBee’s RX and TX pins (receiver and transmitter pins) to a pair of free digital pins on the Arduino. The Arduino’s Software Serial library replaces the functionality of the UART hardware by using software for a serial communications technique called “bit-banging,” which can both set and read the states of the Arduino’s pins.
Similar to my first milestone, I programmed the glove’s Arduino to recognize different combination of flexes within the flex sensors (see First Milestone for an explanation on how this works). However, because I wanted to use the XBees to create a wireless interface between my glove and the robot, I used a second “coordinator” Arduino with an XBee and XBee Shield mounted on it. Through configuring the XBees to share a common code so that they recognize one another and initiating serial communication, I was able to establish a wireless connection between the two Arduinos—the router in the glove and coordinator to be placed on the robot. I programmed the glove’s Arduino to set each gesture combination as a unique character, a single byte, and send out that byte of data through the XBee. The coordinator XBee and Arduino attached to the breadboard receive that bit of data, read it, and convert the character to an integer. A series of ‘if’ statements check to see if that unique integer complies with their parameters. If so, a specific LED turns on, thus creating a correspondence between hand gestures and turning on LEDs.
I encountered many difficulties during this milestone because of the XBees. They took a few days of trial and error and restoring the firmware a few times to finally configure them correctly. Once configured, I began to program the router and coordinator Arduinos. Even when trying to turn on a single LED, the XBees failed to communicate. The Software Serial library solved that issue. When adding a second LED, I experienced even more difficulties. Only one LED would light up, or sometimes neither would. This was solved by checking for an XBee communication each time before the coordinator read the serial data transmitted by the router. Although that did solve the problem momentarily, the correct LED did not always turn on. I deduced that the rate of transmitting and receiving did not completely correspond, often causing the coordinator to receive erroneous data. For example, the transmitter would send out the data to turn on the first LED, but the receiver would turn on the second LED because the rate of transfer was mismatched. This led me to code unique character values for each gesture so that the coordinator Arduino did not simply rely on the order in which the data was sent.
The goal of my first milestone was to mimic the hand gestures I will be using to drive the robot by turning on four LEDs that correspond with driving forward, backward, left, and right. By using flex sensors connected to the analog pins, the Arduino is able to receive a range of values—unlike digital pins’ ability to only be ON or OFF—in the form of varying voltages. Within each flex sensor, there is a variable resistor that ranges from 22 kΩ (fully unbent) to 40kΩ (fully bent). Each flex sensor operates in conjunction with a 22kΩ resistor, creating a voltage divider that will decrease the voltage received by the analog pins. The variable resistor’s resistance is inversely proportional to the voltage output, meaning that increasing the resistance (bending the flex sensor) will decrease the voltage output. The digital value of each resistor when unbent is approximately 720, or about 3.5 volts. The value when bent is 600 or below, about 2.9 volts or less. I used the serial monitor to test whether or not the voltage changed appreciably when bent by examining changes in the printed digital values. After successfully testing the flex sensors, I programmed the Arduino to detect combinations of bends in the flex sensors and turn on a specific LED in accordance with the detected combination. This mimics bending your fingers to control the motors and motion of the robot. The specific hand gestures are stated in the video.
My main difficulty in this milestone was setting up the flex sensors and Arduino to recognize variances in resistance when the sensor was bent. I initially experienced a problem in which the serial monitor consistently outputted a value of 1023 (5V), despite bending the sensor. I tried two different configurations of the flex sensors, resistors, and analog pin—thinking it was a problem with the voltage divider—to no avail. I believe it was a problem with a port. Later on, I encountered a similar problem when using all four flex sensors, only to find out that it was due to inexperience with the breadboard’s divided power and ground rails.
My starter project was the TV-B-Gone, a universal remote that has 230 codes stored in its microcontroller to turn on and off almost any manufacturer’s line of televisions. The device utilizes a microcontroller in tandem with an oscillator to output specific waveforms at certain time intervals through its two narrow-beam and two wide-beam IR LEDs. Once a button is pressed, the program in the microcontroller is reset and the code starts from the beginning. An indicator LED flashes to confirm this. The microcontroller cycles through every one of its codes, transmits various frequencies, and eventually reaches one that turns the television off. The device then enters a low power mode until the button is pressed again.
My primary takeaway from this project was learning how to solder and de-solder. In addition, I learned about the function of PNP and NPN transistors as current buffers and amplifiers. The microcontroller can only output 20-40 mA, but the IR LEDs need more than 100 mA running through them. That is where the transistors come in.
Although assembling the project was relatively easy once I was able to solder correctly, I found learning about the purpose of each component beneficial to my own personal understanding of circuitry and for future projects.