My name is Bryanna. I am a rising senior at Loyola School (http://www.loyolanyc.org/). For my starter project, I made a gram piano which is a mini piano keyboard. The mini keyboard plays three octaves of notes and a preprogrammed melody. My main project is the gesture controlled robot with a robotic arm.
Bluestamp Engineering has been a great experience and I have learned a great deal from the way that students learn from this program. From the guest speakers, I have learned a lot about the many different fields of engineering which will help me in the future as I look into studying engineering in college. The guest speakers helped me gain a better understanding of ways to apply engineering after college. I am going to take the knowledge I have gained from this program and from building this project and apply it to my everyday life for both individual projects and for my next science club project.
Bill of Materials:
Arduino Uno x2
XBee Series 2 x2
XBee Shield x2
XBee Explorer Dongle
Dual H-bridge, SN754410NE
Flex Sensors x4
Trolley wheels x2
Regular rc wheels x2
12v DC motor x2
Robotic claw
Servo for robotic claw x2
Glove
Aluminum Plate
Final Milestone:
My main project is the hand gesture controlled robot. I chose this project because I was interested in robotics and I wanted to pick a challenging project that would combine both mechanical and electrical engineering and this project seemed to have that balance. Data is able to be sent and received between the glove and robot through XBees which are wireless modules that communicate using radio waves. The XBees have to be configured and set to the same personal area network identifier which allows them to send and receive data on a personal network wirelessly without outside XBee interference. The values of the flex sensors went up to around six hundred. So that I did not have to work with values that large, I set the values on the flex sensors to be between zero and one hundred which also served as way to make the reading of the flex sensors more specific. Attached to the glove are he flex sensors and when the flex sensors are bent, the Arduino reads which fingers are bent and sends a specific character to the other Arduino which then sends a signal to certain motors to move. There are two servos that control the gripper, one for the arm and the other for opening and closing the claw itself. There are also two dc motors for the wheels and they operate on a direct current so there is constant current in only one direction. In order for the dc motors to move both backwards and forwards, they had to be attached to the h bridge which allows voltage to be applied in either direction. The body of the robot is a metal plate with dc motors attached to the two back wheels, a robotic arm mounted near the front, and two rotating front wheels which allow the robot to move in any direction.
Coordinator Code: coordinator_code
Router Code: router_code
Arduino Uno Schematic
2nd Milestone:
My second milestone for the gesture controlled robot was getting the dc motors and servos to rotate. When the flex sensors are bent, a specific character is sent that corresponds to a specific gesture and that sends a signal to the motors and servos to run. The servos contain a small dc motor, potentiometer, and control circuit. The servo motors have a ground, power, and signal wire. The ground wire in this case is brown and is connected to the h bridge pin that is connected to the ground pin on the Arduino. The power wire is connected to the 5v pin on the Arduino by being connected to the h bridge. The signal wire is the wire on the servo motor that goes directly to one of the digital Arduino pins. In this case, it is attached to digital pins 5 and 6 on the Arduino. The servo motors can rotate up to 180 degrees and are programmed to rotate to a certain angle depending on which flex sensors are bent. The dc motors are motors that use a direct current which is a constant current that only flows in one direction. They have magnets with opposite poles and an electric coil which acts as an electromagnet. The electromagnet is able to switch the polarity as the current flows which creates an electro-magnetic field that causes the motors to rotate. Since the motors needed to rotate both forwards and backwards, I had to attach them to the h bridge. The h bridge is an electronic circuit that is able to send voltage in both directions which is what allows the dc motors to move both backwards and forwards.
Some of the challenges I faced were checking all of the connections for both the dc motors and the servos which were connected to both the Arduino and to certain h bridge pins. The dc motors required more than the standard 5 volts that the Arduino could supply and required an external power source in order to operate.
Another challenge I faced was the coding for the servos and the dc motors to make sure they worked properly. The code for the servos had to be moved to be within the same switch case statement as the dc motors to test them. I also had to add additional gestures and characters for the servo motors to operate individually.
Coordinator Code: coordinator_code
1st Milestone:
My first milestone was getting the XBee wireless modules to communicate with each other and send and receive the flex sensors values between the two XBees. Each XBee is connected to an Arduino shield which is connected to an Arduino. The Arduino is a board with a microcontroller that code can be uploaded to. The Arduino reads the input from the analog pins to send an output value to the second XBee. XBees communicate with radio waves so that they can communicate wirelessly. In order for the XBees to communicate with each other, they have to be configured to the same channel and PAN ID. A PAN ID is a personal area network identifier that allows the XBees to send and receive data with each other on the same network. Each flex sensor is hooked up to a certain analog pin, in this case A0, A1, and A2. When each flex sensor is bent, the values of the flex sensors are read and if they fit within certain parameters, they send the data to the other XBee by using a certain character. Flex sensors are variable resistors. They have a certain amount of resistance when left unbent because the ink on one side has conductive particles. When the flex sensor is bent away from the ink, the conductive particles are forced further apart from each other which increases its resistance. Using the Arduino code, the first XBee is programmed to read the values of the flex sensors from the analog pins and using a series of “if” statements, is able to determine which flex sensors are bent and the character corresponding to each gesture is sent to the other XBee. If A2 is bent, it sends the character, A, to the other XBee, if A0 is bent, it sends C, if A1 and A0 are bent, it sends B, and if A0, A1, and A2 are bent, it sends D. The other XBee is programmed to receive and read the character that the first XBee is sending to determine what signal to send to either move left, right, forward, or back.
One of the challenges I faced was configuring the XBees so that they could communicate wirelessly with each other. I had to set them to the same PAN ID which is a personal area network identifier so that they can communicate over the same network. I also had to set each of the Xbees to send and receive data by setting each MAC address. Each XBee has a different MAC address so I had to make sure that they were programmed to send and receive data to each individual mac address. Other issues I faced were sending the flex sensor values. Since the XBees can only send characters, instead of sending the full numerical value to the other XBee, it sends a specific character, A, B, C, or D to correspond to each gesture.
Coordinator Code: Character_Communication_Test_1_jul13b
Router Code: Character_Communication_Test_Router_1_jul13a
Starter Project:
For my starter project, I made a mini keyboard. The mini keyboard plays three octaves of notes determined by a potentiometer and plays a preprogrammed melody stored in the IC chip when the mini push button is pressed. The batteries produce the electrons that power the circuit. When the power switch is slid into the on position, it makes contact with the wires which complete the circuit and allow the electrons to flow into the LEDs. The LEDs are diodes, the positive and negative sides have to be positioned correctly because the electricity can only flow in one direction. The resistors reduce the flow of electrons to the LEDs so that the LEDs do not overheat. When the push button is pressed, the spring makes contact with the wires to play the preprogrammed melody. The microcontroller sends signals to the components of the circuit because it is preprogrammed with input and output functions. The speaker is a coil of metal wire wrapped around a core which vibrates when an electrical current is applied, which converts the electrical energy into sound. The capacitor sensors are metal plates separated by an electrical insulator so that when the power is on, the plate become positively charged caused by a loss of electrons while the other plate becomes negatively charged. When you touch the keys, your finger disrupts the electric field from the capacitors and the microcontroller detects this disruption which then causes the sound to be generated.
WOW What a fantastic project!!! Bryanna probably worked really hard on this!