You are on page 1of 42

Ryerson University

Engineering Design Project 2009/2010:

Robotic Arm Motion Tracking with Haptic Feedback
FLC: Dr. Matthew Kyan

By: Umair Niaz, Vipul Potluri, Daryl Adrian L. Yamson

Certificate of Authorship
We certify that this project is our own work. The work in this project has not previously been submitted for a degree nor has it has been submitted as a part of requirements for a degree except as fully acknowledged within the text. We also certify that this report has been written by us. Any help that we have received in our project work has been acknowledged. We authorize Ryerson University to lend this report to other institutions or individuals for the purpose of scholarly research.

Umair Niaz

Vipul Potluri

Daryl Adrian L. Yamson

2

Abstract
Robotic Arm Motion Tracking with Haptic Feedback
Umair Niaz, Vipul Potluri, Daryl Adrian L. Yamson Telepresence is the idea that we can be „present‟ in a digital sense, from some remote location. Telepresent haptic interaction extends the sensation of forces/touch across a network. Extending this technology to robotic arms would be a great enhancement to user experience. It‟s a known fact that robotic arms are extremely useful in several industrial applications but the manual control of robotic arms has been found to be a bit difficult. This project aims to develop a four degree of freedom (4 DOF) robotic arm that tracks the motion of another similar 4 DOF input robotic arm wirelessly with simple haptic feedback. The position of each joint of the input arm was taken using a set of potentiometers attached to the joints. The movement in the joints would cause a change in resistance in the potentiometer, hence causing a potential drop or increase. This change in potential was then sent to the microcontroller as an analog input. This analog input was then converted to a digital output PWM signal by the microcontroller that would be sent wirelessly to the servomotors of the output arm to control the motion accordingly. The rigidity of the object could be measured by a force sensor on the gripper of the output arm, which sends a feedback to the input arm using a servo torque. This would enable the user to know how hard the object is while handling it so that the user doesn‟t grip the object too hard and end up breaking it. Another haptic functionality that was implemented in this project was to sense the weight of the object. This function was implemented by placing a force sensor below the arm to sense the weight of the object. This weight was then translated to a feedback force on the input arm that is generated by DC motors. Although this project demonstrates simple haptic functions, there is a lot of scope for complex haptics to be implemented to feel the state of the object. This project still has some issues related to noise. Even though, majority of the noise was removed from the system, the user could feel minute jitter in the joints. However, this project was able to demonstrate simple haptics that can create a base for much higher-level projects to implement haptics.

3

Acknowledgements
We extend our gratitude to our instructor Dr. Matthew Kyan for being extremely helpful in order to successfully complete this project and also for allowing us to work in his lab. We would like to thank Dr. James Smith for his lessons in instrumentation, as they were very helping while designing the hardware part. We would also like to thank for him for his suggestions regarding the Haptics implementation in our project. We are also thankful to Dr. Y.C. Chen for his lessons in robotics and control systems, as they were helpful in understanding the kinematics behind the robotic arms. We would also like to thank Dr. Gosha Zywno and Mr. Raymond Phan for helping us with our research in the initial stages of the project. Special thanks also go to Mr. Jim Koch for his suggestions in our hardware design. We would like to thank our friends and family for all the support and mainly Shiv for being our unofficial parts supplier when needed. We would also like to thank Mr. Ian Fyffe for providing us with his research report that helped us a lot for a better understanding.

4

.................1 Haptic Functionality ......... 26 ...........................................................................................................................................................................................................................................................................................................................3....................................................1 3.......................3 2..........................2 2......................................... 21 Position Feedback ......................................................................................... 12 Selection Criteria................................................................................... 19 2...............................................................................2 Actuators .... 9 2..............................1 Microcontroller ...............................1....................................................................................................2........................4.................2............... 23 Communication.........................2 1................................................................................................................................ 17 Communication.........Table of Contents Table of Figures .......................................................................................................1 2.........................................................................2 2....... 16 Selection Criteria...... 14 Torque Calculation ............1........................................3........................ 9 System Overview ................................ 21 Building Materials ............................................................... 18 Zigbee Networking ...........................2 3.... 7 1...................2 2............................................. 12 Selection Criteria...............................1 2... 8 1.............................................................................................2........................................................................ 17 Force Sensing Resistors ...................1 Robotic Arms .............................3 2.....................................................1........ 21 3........... 13 Servo Control ........... 12 2...... Design .........1 1..........................4 2.................................................................................................................2 3.............. 12 Arduino Mega .........................................................................1 3............................................................................ 18 Selection Criteria................. 13 Haptic Functions .........................................2.....3.........................................................................1 2.......................2 3.................................................................. 23 Sensing the weight of the object ...................1...........................................................................................................4..2..................................................................................................... Introduction ........................................3 Objective ..................3 3....................... 8 Applications......... 18 3............. 21 Sensing the rigidity of the object ................................................................ 25 Configuration...... Theory ................................1 2.................. 26 5 3.......................................................................................2 2........

.....1 4....................4 4...................3 4..................... Appendix C – Datasheets ...............................................................................................1 3........................ 31 Gripper Haptics .................... 35 4.................. 35 Evaluation of the Position Feedback Nature of the Robotic Arms .5..........................................2 Wireless Communication .......................................... 29 Position Feedback ...............................6 4.............4.............. 46 9..... 31 Weight Haptics........................................................................................................................................................... 35 Noise Reduction ........................................ 40 4...................................................................................................... 31 4........................ Appendix A – Torque Calculation .............6.................................................1 4...... 38 Performance Requirements............................. 28 Power Regulation ..............................................................2 4............................................................................................................5.......................................................................4 Hardware Set-up .. 49 10............................................ 41 6...................................................................................... Bibliography .... 43 8........... 29 Software .1...................................... 39 5...............................................3 3.....................................................2 4...............2 3..................5 Evaluation of Theoretical System Performance ......5 3...... Conclusion..................................................................5..................................4 3...................................................................................................... 38 Weight Sensing ............................................................... Appendix B – Servo Modification ....................................................... 37 Physical Structure of the Robotic Arms ...........1 4......................... 38 Rigidity Sensing ............ Appendix D – Code ....5............... 69 6 ..................................................................6.................. Performance and Results .................3........ 35 Evaluation of Theoretical System Speed ........................... 42 7.... 37 Haptic Functionality ..................... 32 Wireless communication ...2 3.............1 3....... 32 Power Supply ......5..........................................................................1 4......................................................... 39 Analysis of Performance ..............................5.................3................................................................................................................................................................................

.............................................................................................. Force Plot................................................................................................................................................................................................................................................................................. 14 Figure 2-2: Servo Motor Block Diagram ............................ 16 Figure 2-6: Resistance vs.................................. XBee shield and Arduino ....................... 35 Figure 4-2: Position Feedback Nature of the Base Joint ................................ 36 Figure 4-4: Position Feedback Nature of the Wrist Joint.......................................................... 29 Figure 3-12: Transformed Power Supply .................................... 28 Figure 3-9: XBee shield jumper ................................................... 33 Figure 3-14: ‘B’ Wireless Test of a Servo ................................................................................... 25 Figure 3-6: Zibgee Modules on Arduino...................................................................................... 36 Figure 4-3: Position Feedback Nature of the Elbow Joint ........................................................................ 18 Figure 2-7: XBee module and XBee Shield ................................................................................................................................................................................................................................................................................ 36 Figure 4-5: Pivot Structure to support the Output Arm .............................................................................................................................................................................................................................................................................. 22 Figure 3-3: 10K Potentiometer ........................................................................................................................................................... 11 Figure 2-1: Arduino Mega ...................................... 38 Figure 4-7: Output Arm with FSR ...................................................................................................................... 30 Figure 3-13: ‘A’ Wireless Test for a LED ....................Table of Figures Figure 1-1: System Block Diagram ................................ 23 Figure 3-5: Wires to motor contacts + position feedback ..................................................................................................................................................................... 29 Figure 3-10: Hardware connections of XBee...................... 38 7 ............................. 26 Figure 3-7: XBee parameters ............................ 33 Figure 3-16: ‘C’ Wireless Test of a Servo from a Potentiometer................... 33 Figure 3-17: ‘E’ Wireless Test of the Robotic Arms .......... 20 Figure 2-9: XBee Radiation Pattern .. 34 Figure 4-1: Output Arm controlled by Potentiometers on a breadboard ..................................................................................... 33 Figure 3-15: ‘D’ Wireless Test of a Servo from a FSR ......... 12 Figure 2-3: Servo Wires .......................................................... 14 Figure 2-4: Pulse Variation for Servo Control ................................................................................. 28 Figure 3-11: Power Regulation Circuit ....... 37 Figure 4-6: Output Arm Gripper with FSR ..................................................................... 20 Figure 3-1: Output Robotic Arm............................................................... 19 Figure 2-8: XBee Point-to-Point Configuration .............................................................................. 27 Figure 3-8: Block Diagram for Wireless Communication .................... 22 Figure 3-4: Driving Gear of the Servo ................. 21 Figure 3-2: Position Feedback for Servo ..................................................................... 15 Figure 2-5: Torque Calculation at the Joint.......................................

In 1965. Nevertheless. a multimodal synthetic environment. multimodal human-machine interfaces have been established as one of the most important fundamental components of information technology in the 21st century. Haptics interface. we will be applying haptics interface that includes humans in the loop. The above objectives had to be met with real-time movement having very minimal delays or lags. up to now no haptic system has been created that is used on a day-to-day basis. The word „Haptics‟ is derived from the Greek word „haptesthai‟ which literally means „to touch‟ [3]. In recent times. is based upon the sense of touch. envisioned the building of an “ulti-mate display”. such as Machine Haptics. the importance of sense of touch for human-computer interaction has finally been realized and it is widely believed that haptic interfaces will be a major improvement for human-system interaction. Over the course of the centuries. This is due to the fact that haptic technology is still at its infancy and most of these devices are still just expensive prototypes. although the need for highdefinition haptic systems has clearly been identified. There are many types of Haptics interface. which included force and feedback [1]. They already have decisive impacts on all areas of our professional and private life. He was one of the first researchers to realize the significance of the sense of touch. for example covering everyday communication. both arms are required to be moving very smoothly without jitters. Computer Haptics. Ideally. The idea is to make one of the robotic arms controllable by a human and the second arm follow the user‟s instructions. referred to as Human haptics. 8 . The next main goal was to successfully implement a few simple haptic functions on the robotic arms to virtually sense the state of the object like the rigidity and the weight.1. financial services. Multimedia Haptics. manufacturing. Introduction Robotics has profound cultural roots. human beings have been constantly seeking substitutes capable of mimicking human behavior and sensing various interactions with our surroundings. As the philosopher Bertrand Russell put it in [2]: “It is touch that gives out sense of “reality”…Not only our geometry and physics.1 Objective The main objective of this project is to build a robotic arm to implement simple haptic functions. especially for the enhancement of virtual worlds. The first goal of the project was to build a robotic arm that tracks the motion of a similar looking input robotic arm that is controlled manually by the user. trade. gives the illusion of touching one‟s surroundings.” Nowadays. the Computer Graphics pioneer Ivan Sutherland. therefore. The word „surroundings‟ may refer to a real physical object but in a remote location or a virtual object in a computer program. etc. health care and entertainment. In our project. but out whole conception of what exists outside us. 1.

and power sub-blocks.1. A lot of other applications could be considered that are directly related to this project. it has protective circuit for reverse. 1. this idea could be extended to various other applications that do not require robotic arms at both ends. The purpose of input robotic arm is to send position feedback to the output arm using potentiometers and letting the user experience rigidity and weight of the load at the output arm.2 Applications Robotic arms are extremely useful in several applications such as manufacturing. one for translating position feedback and other for collecting haptics feedback. there are two microcontrollers. One of the microcontrollers is programmed to collect and send position feedback and other is programmed to perform both gripper and weight haptics. It is also responsible for sending gripper and weight haptics feedback to the input arm for the user to experience. Same as input sub-block.position feedback and haptics. Haptic robotic arms with powerful force feedback could be of a huge help to product design engineers to check out complex assembly problems in a virtual reality environment. surgery. where the movement of the human arm controls the motion of the output arm. The input consists of an input robotic arm with two microcontrollers and their corresponding wireless modules. Thus. As the main goal of this project is to implement telepresence. The purpose of the output robotic arm is to follow the movement of the input arm exactly through position feedback received. The output consists of an output robotic arm. i. A haptic feedback to the applications mentioned above would definitely enhance the user experience. handling hazardous objects.e. two microcontrollers. output.3 System Overview The system can be divided into sub-blocks such as input. The power sub-block consists of a power supply suitably chosen to provide power to both input and output arm. and wireless module. 9 . gripper haptics and weight haptics. A similar idea could be extended where the output robotic arm could be controlled using the human arm directly. there are two wireless modules for each microcontroller for receiving and sending information. Mastering the manual control of robotic arms has been found to be a bit difficult. noise reduction instruments and a fuse. handling microscopic objects and very heavy objects. It has multiple ground and voltage terminals for easy access. There is a separate microcontroller for each of the functions . Wireless module is used on each microcontroller to send position feedback and receive haptics feedback.

This servo is small in size but has suitable torque for our system. One of them is used at the gripper and other is used at the elbow of the input arm. Depending on the resistance on potentiometer there will be different potential difference translating into position feedback at output arm. One at the input side is responsible for implementing haptics feedback. DC motor on servo has system of gears providing enough torque for gripper haptics and weight haptics. The force sensors at the output arm will then communicate back wirelessly to give the haptic feedback at the input arm. and gripper.5” Circular FSR – Force sensor used to sense the load at the output arm.         The entire functionality of the arm could clearly be understood looking at the block diagram below. Arduino Duemilanove – There are three of these microcontrollers.The basic overview of system is given below:   Arduino Mega – One of the microcontrollers collecting input arm feedback to be sent to the output arm through a wireless module. The motors and the potentiometers would be connected to the first microcontroller that would send the data wirelessly to the microcontroller at the output arm. Hitec HS-422HD DC Motor – This servo was modified to control its DC motor with a DC motor controller. As the load is placed in the gripper the base exerts force on sensor which is sent to the input arm for weight haptics. ATX Power Supply Unit – It is PC power supply modified for our system to fulfill power requirement of the system. This potential difference is used along with set threshold for gripper haptcs to sense rigidity of the load. ROB-09457. Interlink Electronics 0. one at the input side and two at the output side. 10 K Potentiometer – Potentiometers were used to send position of each joint from input to output arm. Arduino XBee Shield Wireless Module – It is the communication protocol module employed for our system. This data would be sent to the servomotors to position accordingly.2” Circular FSR – Force sensor responsible for sensing weight of the object is placed underneath the output arm‟s base. There is a separate pair of XBee module for robotic feedback and haptics. Hitec HS-755HB Giant Scale Servo – This particular model is used at base and elbow to support both weight of the arm and load. One of the two microcontrollers at the output side is responsible for implementing position feedback and other is responsible for collecting haptics feedback to be sent the input arm. Hitec HS-422HD Standard Heavy Duty Servo – This servo was employed at wrist. These high torque servo motors. gripper rotation. As the load is pressed hard the resistance of force sensor goes down increasing potential difference. 10 . Interlink Electronics 0.

Figure 1-1: System Block Diagram 11 .

communication interfaces.[4] suggested following factors while selecting the microcontroller: Architecture Operating Frequency Memory Digital Communication Peripherals Capture/Compare/PWM Peripherals Analog Input Physical Size Cost Programming Language 8 bit >1 KHz >15 KB Serial Communication (RS232. We look at the amount of memory required. and input and output capture requirements. ADC and DAC pins. programming language. Also. i. number of I/O pins. from low-power. for a given price we can buy the best MCU and evaluation board but we are constraint by our budget. dependent on the specific application. voltage supply. The selection is therefore.e. USB). After evaluation. Wireless Protocols (optional) Ideally 10 PWM (Output Compare or DEMUX can be used as well) Ideally 10 (otherwise we need MUX) Small to Medium <$100 C programming language 2. Theory 2. The engineering solution is to employ as much ingenuity possible while remaining within the limited resources. small architecture to highly sophisticated high-speed processor core.1 Selection Criteria Microcontrollers come in various ranges.. etc. Microchip Technologies Inc. the MCU must be able to process data in real-time.1. ZIGBEE modules for Figure 2-1: Arduino Mega 12 . thus it must be capable of multitasking. we selected Arduino Mega MCU evaluation board because it is the least expensive of the available ones in the market and more or less fulfills our requirement with additional addons.2 Arduino Mega As stated before.2.1 Microcontroller 2.1.

which are attached to the output shaft. Around the body of the motor is a series of coils that create a magnetic field that interacts with the permanent magnets.1 Selection Criteria The basic requirement for the project is to use some kind of an actuator in order to make the rotation of the arms possible. The stepper motor would probably be better than a servo for a general robotic arm. as a high rotation per min (rpm) is not required. where high speed is not a priority due to its high holding torque nature and a comparatively cheaper cost. 13 . Two types of motors are considered in order to perform this job.3V Pin Flash Memory SRAM EEPROM Clock Speed ATmega1280 5V 7-12V 6-20V 54 (of which 14 provide PWM output) 16 40 mA 50 mA 128 KB of which 4 KB used by bootloader 8 KB 4 KB 16 MHz 2. Summary of Features [4] Microcontroller Operating Voltage Input Voltage (recommended) Input Voltage (limits) Digital I/O Pins Analog Input Pins DC Current per I/O Pin DC Current for 3. The output shaft is then controlled according to the pulse widths of the signal received by the microcontroller.2. When these coils are turned on and off the magnetic field cause the rotor to move. Usually a stepper motor easily serves the purpose of a servo in these kinds of robotic arms.  Stepper Motor: A stepper motor works with permanent magnets. Servo Motor: A servomotor basically operates using pulse signals from the microcontroller. As the coils are turned on and off in sequence the motor will rotate forward or reverse.2 Actuators 2. but the solid reason for bending towards a servo is due to its position feedback control. It is not possible to include evaluation content for every MCU in this report for brevity.wireless communication between the arms.  Various differences can be pointed out between both the motors.

As the coded signal changes.  Red – Power (+5V)  Black . the servo will maintain the angular position of the shaft. The length of the pulse is usually 1 or 2 milliseconds depending on the desired angle. 14 . where high acceleration is not a priority. This coded signal is a pulse of varying length approximately every 20 msec.2. 2. the angular position of the shaft changes. As long as the coded signal exists on the input line.Ground  White/Yellow (depending on the servo) – Coded Signal Figure 2-3: Servo Motor Block Diagram [5] Figure 2-2: Servo Wires The servo consists of an output shaft.Therefore. The amount of noise interference in servomotors would also be much lesser when compared to the servomotor. the servomotor is considered for our project as it operates similar to a stepper motor at low speeds but also provides positional feedback. This shaft can be positioned to specific angular positions by sending the servo a coded signal.2 Servo Control A servo consists of several internal main parts:  The motor  Gearbox  Position Sensor  Error Amplifier  Motor Driver  Circuit to decode the requested position It can be seen in the figure below that three wires are coming out. even though a stepper motor would be a better choice for a non-industrial robotic arm.

for example. In order to record the current position of the servo.02 seconds).5 ms. which produces a voltage that is related to the absolute angle of the output shaft. The position sensor then feeds its current value into the Error Amplifier. the charge on the capacitor is fed to the output via a suitable buffer amplifier. all we need to do is to connect a wire to the potentiometer to read the voltage values at all positions. This essentially produces a voltage related to the length of the applied pulse. They usually operate by generating an accurate pulse between 0% and 100% duty cycle. The angle is determined by the duration of a pulse that is applied to the control wire. This is called Pulse Coded Modulation. So the microcontroller chosen is capable of providing sufficient PWM generators in order to control all the servos.5ms. If the pulse is longer than 1.The signal controlling a servo can be supplied by the microcontroller in two ways:   Pulse Width Modulation (PWM) Timers Usually. A sensor. But a single PWM generator would not be sufficient to control all the servos. When the pulse goes low. The control wire is used to communicate the angle. Figure 2-4: Pulse Variation for Servo Control [6] The control pulse is fed to a pulse width to voltage converter. The length of the pulse will determine how far the motor turns. The output voltage is buffered and so does not decay significantly between control pulses. the shaft turns closer to 180 degrees. usually a potentiometer. If the pulse is shorter than 1. which compares the current position with the commanded position from the pulse width to voltage converter. PWM generators are most commonly used due to less complexity in software algorithms. A 1. The circuit is tuned to produce a useful voltage over a 1ms to 2ms period. This circuit charges a capacitor at a constant rate while the pulse is high. will make the motor turn to the 90-degree position (often called the neutral position). 15 . The servo expects to see a pulse every 20 milliseconds (.5-millisecond pulse. reads the current rotational position of the output shaft. These readings can be sent to the „tracking‟ arm to move accordingly. then the motor will turn the shaft to closer to 0 degrees.

If we consider a basic light servo with 3. The gripper would need the lightest servo. The torque at each arm is then calculated considering the individual forces at each joint.2. despite the servo's best efforts. we will need different servos at each joint of the arm. If it were a 3.1 Kgcm. The servos available in the market are usually denoted in the units „oz-in‟ or „Kg-cm‟. 16 . take the torque provided by the motor.1 Figure 2-5: Torque Calculation at the Joints Kg-cm.2 Kg weight applied on the end. But when it comes to the second joint from the gripper. Worst-case scenarios are considered for all the joints during the torque calculation to make sure that arm would not jitter for weights below 300g. If gravity is not a factor (ie. it should be powerful enough to carry everything above it including the object. gripper and the weight of the material above it. Gravity pulls down against any rotational arm with a torque of mass x length of arm. of torque. It goes for the rest of the joints below. subtract the torque created by gravity. If it was a load of 3. the servo could accelerate the arm with 0. the servo could keep the arm straight. only depending on the weight of the object lifted by the arm.1Kg. It is very important to perform these calculations initially because if a higher torque is applied to the servo than it can handle. it would accelerate the mass at a rate of Torque / (mass x distance^2) rotations/second. The base servo would have to be the strongest in the entire arm. which were calculated accordingly with the torque calculations. it would move downwards with a torque of 0.3 Torque Calculation The approximate torque required at each joint had to be calculated initially to choose the best servo required for the movement of the output arm. and if the number is still greater than zero the arm will move in the direction the motor is turning. that joint would require a stronger servo compared to the one used at the gripper. while the gripper has the lightest.3 Kg weight. So. it would start jittering as it keeps trying to hold the weight when it cannot. it means that if there was a horizontally oriented weightless robot arm 1cm long and a 3. The proposed servos can be seen in the appendix section.2. So in order to achieve this.2 Kg-cm. So in our case. not lifting against gravity).

This sensor on the gripper shall detect if the robotic gripper has gripped an object.g. which are thin film force sensors. are best suited for our design project for gripper and weight haptics.3 Haptic Functions The primary objective of our robotic arm project is to introduce the haptics technology into it to get the virtual „feel‟.3.g. The former (e.2. The following are the haptic functions that we would want to achieve:   Haptic sense to feel the solidity of the gripped object Haptic sense to feel the weight of the lifted object at the elbow There are many types of sensors available that can be used to implement the haptics feedback required for this project.1 Selection Criteria The following are the requirements that need to be considered:  Measures load and force with reasonable range (in lbs)  Flexible material that can be easily attached to the gripper  Rigid material that can sense various shaped objects  Reasonable price Proximity sensors cannot be used since they detect objects at a distance. We are to find a sensor that is to be placed on the gripper of our robotic arm as well as a sensor that is to be placed below the arm. the Interlink Electronics Force Sensors. Interlink Force Sensors). Force sensors can be generally classified in to two types: hard and thin film sensors. Slip sensors also have a different functionality as it detects shear force. Taking into account all the requirements for selection. So we have considered choosing force-sensing resistors (or force sensors) to implement the haptic feedback. Thin film sensors on the other hand are lighter. Each one of them has their own specialty and functionality. while the sensor below the arm measures the weight of the object. Phidgets Force Sensors) are not suitable for robotic grippers as they are not flexible and are bigger in size. Furthermore. and flexible. force sensors measure force or load. although some are still only optimized for human touch (e. 17 . smaller. 2.

Using Radio Frequency (RF) communications between the arms for wireless control would be the cheapest available in the market. If the device is working correctly. When the force sensor has no load. force should be linear and should show a straight line with a positive slope as seen below. wireless communication would definitely be a better idea. This device is designed such that force is inversely proportional to the resistance. This provides both fast communication and has reasonable cost. This resistance is measured by connecting an ohmmeter to the two outer pins. Force Plot [7] 2.2 Force Sensing Resistors A force sensor is basically a resistor that changes accordingly with the force applied on it. Resistances are to be measured with respect to various sample forces. 18 . a table must be completed to test the precision of the A201 Force Sensor. When a force or load is applied. Conversely. its resistance is very high (>5MΩ). But that was not chosen due to noise considerations. we had to choose Zigbee networking protocol.3. We have considered various ways of communicating wirelessly with the least amount of noise.4 Communication 2.1 Selection Criteria The initial idea for communicating between both the robotic arms was to use a common microcontroller and wire them together. Bluetooth technology would be the best for faster communication and also a wider range. force is directly proportional to conductance (1/R). as noise reduction is one of the most important aspects in the project. the plot of conductance vs. the resistance decreases. In order to test the force sensor.2. But considering the applications of the project. Figure 2-6: Resistance vs.4. Considering the cost limitations. Conductance is then calculated from these resistance values (G=1/R).

The following are the important performance/networking specifications of these modules:             Power output: 1mW (+0 dBm) North American & International version Indoor/Urban range: Up to 100 ft (30 m) Outdoor/RF line-of-sight range: Up to 300 ft (90 m) RF data rate: 250 Kbps Interface data rate: Up to 115.2.2 Kbps Operating frequency: 2. & peer-to-peer Error handling: Retries & acknowledgements Filtration options: PAN ID. It is based on the IEEE 802.000 network addresses available for each channel The XBee modules can be set up to operate in a point-to-point.4 GHz Receiver sensitivity: -92 dB Spread Spectrum type: DSSS (Direct Sequence Spread Spectrum) Networking topology: Point-to-point. point-to-multipoint.4 standard for wireless personal area networks.2 Zigbee Networking To accommodate wireless communication between the two robotic arms of our project. which 19 . and 64-bit addresses Channel capacity: . a device called XBee is needed. point-to-multipoint. The serial port is used to move data from one module to the other. Figure 2-7: XBee module and XBee Shield The XBee modules are designed for high throughput applications and with low latency. or peer-to-peer configuration. The figure below shows a point-to-point connection.4. The protocol is more suitable for radio frequency (RF) applications that requires low data rate but extends battery life and has secure networking. Figure 1 below shows the XBee module on the right and the XBee shield on the left.XBee PRO: 12 Channels Addressing: 65. The XBee modules use the Zigbee networking protocol for fast peer to peer networking between the two robotic arms.XBee: 16 Channels . The XBee shield is essentially the XBee module‟s break out board and is used to interface to the Arduino microcontroller.15. Channel.

In a point-to-point (peer-to-peer) connection. they need to be configured initially. The figure below shows the radiation pattern of a chip antenna connected to an XBee module. The pattern is normalized to the peak of the dipole antenna. the two modules are forced to only communicate with each other without a Master/Slave relationship. Figure 2-9: XBee Radiation Pattern 20 . The modules then remain synchronized and share both roles of master and slave. Figure 2-8: XBee Point-to-Point Configuration In order for the two modules to talk to each other.will be implemented in our robotic arm project. The X-CTU software from Digi enables us to do this. The following are the parameters that need to be considered for operation:         Channel: Must be the same value for both modules PAN ID: Must be the same value for both modules Destination Address High: Leave as default Destination Address Low: Must be the same value as the 16-bit address of the other module My 16-bit Source Address: Must be unique on every modules End Device: Can be set as either coordinator or end device End Device Association: Determine the flexibility of an end device during association Baud Rate: The speed at which the modules will communicate and must be the same for both modules. Digi‟s peer-to-peer architecture features fast synchronization times and fast cold start times.

Using a robotic arm kit that would be readily available in the market would be a better idea.Vertical and circular motion of the arm.3.1 Robotic Arms 3. Design 3. the option was not considered. The servos at each joint were chosen appropriately taking the torque calculations (as shown in Appendix A) in to consideration. The maximum weight to be lifted by the arm was approximated to be around 300g. The initial for position feedback was to use two servos at both ends at all the 21 . The current design of the arm can be seen in the figure on the side.1. As a result. The following materials were used in order to build both the arms:  Lynxmotion Little Grip  Lynxmotion Low Profile Axis  Lynxmotion Aluminum Servo Brackets  Lynxmotion Aluminum L-Connectors  ]Hitec HS-422HD Standard Servos  Hitec HS-755HB Giant Scale Servos Figure 3-1: Output Robotic Arm A few dampeners were also used while building in order to support the physical structure of the arm. This arm consists of 4 Degrees of Freedom .1 Building Materials Building both the robotic arms was quite a task for our team. the arm turned out to be physically very stable.2 Position Feedback One of the main goals of our design project was to design both the arms such that the output arm tracks the motion of the input arm and move accordingly without any jitters in real-time. but considering the budget limitations and our design considerations. we decided to use pre-made parts to make our custom shaped arm.1. Considering our low experience with mechanical parts. 3. gripper rotation and gripping.

While one wire is grounded internally. The change in the servo‟s Figure 3-2: Position shaft position would be recorded as the change in voltage at Feedback for Servo the wiper.86 V when the shaft position was 180 degrees and 0. which will be measured by the microcontroller that is sent to the output servo to be moved accordingly. When this function is used. This voltage would be sent to the microcontroller as an input signal to the output servo.2.1. as shown in the figure beside that it gives the current position to the microcontroller that would be sent to the output servo. two different approaches were used for the position feedback. These values were tested out to be accurate.joints that give the position feedback. making the motors useless. The max and min voltages would be mapped accordingly using the function „map‟ in the Arduino library.34V when the shaft position was 0 degrees.2 Position Feedback for the Other Joints Considering the cost limitations. The voltages were recorded to be 1. which is 5V. the microcontroller sees the range 1023 as the reference voltage.The input servo would have to be modified. The driving gears between the motor and the shaft for each servo would have to be cut in case servos are used at the input arm for feedback. So the Figure 3-3: 10K Potentiometer 22 . the usage of servos for position feedback at the other joints would not be a good choice as they are meant for only position feedback and not any kind of motor control. which were „70‟ and „379‟ that represent 0 degrees and 180 degrees correspondingly. This ratio was used to calculate the corresponding ranges for the min and max voltages of the wiper. It can be seen from the figure below that two additional wires are coming out apart from the three regular wires for the servo. the other is connected to the wiper (potentiometer) of the servo. 3. 3. This would ideal to upgrade the project when motors are required at both ends.2.1. The next step after soldering the feedback and the ground wires to the servo is to find the maximum and minimum voltage recorded when the servo was rotated 180 degrees to 0 degrees. This would be a perfect way to measure the position feedback without removing the motor control at the input arm (for haptic feedback).1 Position Feedback for the Gripper and the Elbow Joint Since the motor torque was required at the gripper and elbow joints for force feedback. a servo motor had to be used for position feedback. But considering the cost limitations.

it consists of three pins. But removing the driving gear will not produce the haptic feedback from the output arm. As shown in the figure. This is essentially the same concept as using the servo for position feedback.usage of potentiometers was considered. Driving Gear Ideally. rotating a joint would rotate the potentiometer instead that would give the change in voltage to the microcontroller.2. 3. The max and min ranges were calculated similarly. which came out to be 1023 and 0 for 5V and 0V.2.2 Haptic Functionality The implementation of haptic functionality was the main goal of our design project.1 Input Arm This gripper consists of the modified „Lynxmotion Little Grip Kit‟ with grooves to hold on to when manually controlling the gripper. As a result. the driving gear would have to be removed from the servo in order to achieve free rotation of the shaft without any signal. The first pin and the third pin would have to be connected to the 5V power supply and ground respectively. The gripper is controlled using a Hitec HS422HD standard servo and a 10K potentiometer.1. as it cuts the cost by a lot and serves the purpose very effectively. The middle pin is the one that gives the position feedback. a very low torque servo has been chosen that can be moved „almost freely‟ at no signal with the driving gear intact. These values were mapped and tested out to be accurate. which is modified to give the position feedback to the output arm. Figure 3-4: Driving Gear of the Servo [8] 23 . as the gripper is controlled manually. 10K pots were used at all the other joints for the position feedback. As a result. The detailed description of this implementation could be seen below. The two haptic functionalities that were implemented in the project include sensing the rigidity of the object held by the output gripper at the input gripper and also sensing the weight of the object at the elbow joint of the input arm. The rotating knob of the potentiometer would have to be connected to the servo brackets.1 Sensing the rigidity of the object The rigidity of the object held by the output gripper could be measured using force sensors at the gripper as well as the output servomotor torque. The servo is used for the haptic feedback received from the output arm (basically used for gripping). This way. 3. 3.

This voltage would be produced internally. This was due to the fact that the servo shaft could not be moved against its torque when it is holding its position.1.2). as the gripper servo would be frozen when the output gripper holds an object. Depending on the user‟s comfort. This logic would enable the user to feel the rigidity of the object without actually applying continuous inward force to hold the object.The gripper haptics was implemented using two designs. Using this logic. the inward motion of the input arm gripper would be blocked once an object is held and a threshold force is reached at the output arm gripper. In order to solve this problem. This produces a change in voltage as the force is exerted on the gripper.2 Output Arm This gripper consists of the original „Lynxmotion Little Grip Kit‟ with 2 Hitec HS422HD standard servos and a 0. which is indirectly the change in resistance again. 3. The problem arises when the user tries to let go the gripper. The desired implementation would be selected by the user. Once the switch gets pressed. the user would have to apply force on the gripper in order to keep holding the object. a feedback voltage would be sent through the PWM pin of the microcontroller to the input servo.2. In order to improve the accuracy of the system. Using this logic. In order to enable the free motion of the input arm gripper for the user when no object is being held at the output end. 24 . the input gripper would react accordingly depending on the rigidity of the object at the output end. So. it would detach the input gripper servo again to enable free motion once again. the force measured by the force sensing resistor increases in contact with the target as the output gripper‟s motor torque increases. the position feedback of the output gripper when holding an object would be sent to the input arm gripper in order to stop at the same position. a switch was introduced in our design. the input servo would have to be detached. the torque applied by the output gripper is measured more directly. The force sensor that will be placed on the gripper will be providing the force feedback to the input arm to produce the haptic effect. The servos are used for gripping and rotational movements of the gripper. This logic was implemented in order to let the user experience real-world logic. Applying either of the above logics. the input servo would again be frozen at a corresponding position. Once the output arm holds an object. The first logic was implemented using the servo torque as discussed in the weight haptics section (Section 3.2” Circular Force Sensor. As a result of this. When the output gripper meets an obstacle (like an object to pick up).2. As the signal is received at the input arm as soon as the output arm held the object. the position of the input gripper would freeze approximately at the same position as the output gripper. This switch would be placed in a position that the user would always press it while trying to let go of the gripper. then the servo board needs to apply more voltage in order to achieve that position. a second logic was implemented that could be selected by a switch that is placed on the base of the robotic arm. where one would have to keep applying an inward force to hold the object. But once the output gripper detects an object. This detects the amount of force applied on the gripper.

a couple of wires are soldered directly on to the motor contacts. The servo that is connected to the elbow joint will be used to produce the haptic effect. Any kind of movement in the input arm would cause a change in voltage in the internal potentiometer of the servo. This measured force is transferred to the servo‟s motor at the elbow joint of the input arm to exert a force in the opposite direction. This voltage would be recorded and sent to the Arduino to Figure 3-5: Wires to motor contacts + position feedback control the output arm. The detailed description of this implementation could be seen below.2.2 Output Arm The elbow joint at the output end consists of a Hitec HS-755HB giant scale servo for the arm movements according to the position received from the input arm. 3. So the user would have to push it hard in order control the arm.3.2 Sensing the weight of the object The weight of the object being lifted could be calculated by placing a force-sensing resistor between the joints of the base and elbow to record the weight applied by the object. the weight of the object could be felt at the elbow joint of the input arm. The heavier the object at the output end. 25 . A small amount of force at the output would apply a low voltage on the servo‟s motor and hence a low torque applied by the motor in the opposite direction.2. 3. A heavier object on the output arm would produce a high opposing torque at the input arm. This force is then calculated with no load and will act as the threshold voltage. A wire was soldered on to the potentiometer of the servo in order to give position feedback. This feedback would be „felt‟ at the elbow joint of the input arm using the servo torque. Instead of using the regular servo signal wires.2. So any external force acting on the arm (when a certain object is lifted) would cause an additional force on the force sensor. a certain voltage will be applied to the servo‟s motor directly through the contacts. which is then measured and sent to the Arduino. This could be seen in the figure below. Applying the above logic.1 Input Arm The elbow joint at the input end consists of a Hitec HS422HD standard servo. According to the corresponding force recorded at the output arm.2.2. This servo was modified in various ways in order achieve the required objectives.3” force sensor would be placed in between the joints of the base and elbow. A 0. the larger will be the force felt at the input end.

the XBee modules had to be configured so that they can talk and communicate with each other. Both arms then must track each other wirelessly.1 Configuration One of the main goals of this project was to enable the wireless control. 3. There are different types of protocol that the XBee modules can function upon. two XBee Shields and two XBee modules were used for radio communications. these XBee devices are completely compatible with our own Arduino microcontrollers for they were purposely designed as such. Two of them can be set up exclusively to talk with each other and ignore all other possible causes of interference. We decided to configure the XBees into using the Peer-to-Peer networking protocol. The X-CTU software was used to update the firmware and configure the parameters of the XBee modules to enable P2P networking protocol. The figure above shows how the three parts (Arduino MCU. We considered taking the Zigbee protocol route for our project. Each module can be used to transmit and to receive signals. and XBee module) are conveniently connected with each other. The figure on the left contains the firmware and parameters of the first module. XBee shield. The P2P networking protocol enables each of the relevant modules to become both master and slave. The third advantage is that the XBee module has a built in data packet and error checking protocols to facilitate on multiple data transmissions. Lastly.3. XBee shield.3 Communication The design of our robotic arm project has been updated to accommodate wireless communications between them. To the right is the second module. This set-up offers considerable advantages to our Figure 3-6: Zibgee Modules on project.3. There is no need to have a server and a client relationship. The primary advantage is that the XBee Arduino [9] modules are bi-directional. The figures below show the interface of the X-CTU software and the parameters for a pair of XBee modules. The second advantage is that we can assign a unique address to each of the XBee modules since each unit has a unique serial number. This pair of XBee modules is in charge for the movements of the robotic arm servos. This protocol serves our project best since we only have two nodes (Two robotic arms) with equal priority. and XBee module. 26 . Initially. As discussed in the design section above the wireless control of the entire project was successfully implemented. The first and the second XBees will communicate exclusively while the third and the fourth XBees also communicate exclusively. Each robotic arm should then be connected to its own Arduino microcontroller. In particular.

Set to “0” .Set to “0” .Set to “2” .Set to “4” .Set to “D” .Set to “3” 27 .Set to “0” .Set to .Set to “C” .Set to “0” .Set to “3” Below are the parameters of the third and fourth XBee modules.Set to “3” .Set to “0” .Set to “0” .Set to “2” .Set to “0” .Set to .Set to “0” .Set to “0” .Set to “0” .Set to “D” .Set to “0” .Set to .Set to “0” . This second pair of XBee modules is in charge with the haptics feedback signal transmission.Set to “3” • Channel • PAN ID “3332” • Destination Address High • Destination Address Low • My 16-bit Source Address • End Device • End Device Association • Baud Rate .Set to “3” .Set to “4” .Figure 3-7: XBee parameters Below are the exact configurations that are being used in our project.Set to “1” . Third module parameters: Fourth module parameters: • Channel • PAN ID “3333” • Destination Address High • Destination Address Low • My 16-bit Source Address • End Device • End Device Association • Baud Rate .Set to “3” • Channel • PAN ID “3333” • Destination Address High • Destination Address Low • My 16-bit Source Address • End Device • End Device Association • Baud Rate .Set to “1” .Set to “C” . First module parameters: Second module parameters: • Channel • PAN ID “3332” • Destination Address High • Destination Address Low • My 16-bit Source Address • End Device • End Device Association • Baud Rate .Set to .

The XBee modules then need to be connected to the XBee shields. XBee shield. the first XBee module is in charge of sending potentiometer readings from the input arm to the receiving second XBee module on the output arm.3. This is to decrease the troubleshooting difficulties. Our project needs 28 . The TX and RX pins of the Arduino MCU and the XBee shield must be in line with each other as well as the ICSP pins. This procedure is also plug-and-play. and Arduino MCU is considered as a single set. the fourth XBee module is in charge of sending gripper force sensor readings. weight force sensor readings. A combination of the XBee module. This pair is responsible for wireless robotic arm movements. 3. Consequently. These modules were Figure 3-9: XBee shield jumper factory designed so that it can be plugged directly on to the shield with no additional connections and soldering necessary. These hardware connections need to be done after configuring the XBee modules and not prior. This pair is responsible for wireless haptic functionality. The XBee shield in turn connects to the Arduino MCU. and gripper position feedback readings from the output arm to the receiving third XBee module on the input arm.2 Hardware Set-up There are several connections necessary for enabling XBee wireless communication between the two robotic arms. Figure 3-8: Block Diagram for Wireless Communication As seen in the block diagram above.The overall design for wireless communication between the arms could be seen below.

Two sets are considered as the senders and the other two sets are considered to be the receivers. Figure 3-10: Hardware connections of XBee. Moving the jumper to the XBEE position will enable wireless communications as shown in the figure. 3. The sender set contains the user interface devices (Potentiometers or Force Sensors) while the receiver side contains the output devices (such as Servos).1 Power Regulation The power regulation circuit has the following additional features:     Short circuit protection Regeneration Negative voltages Noise protection Considering the cost limitations. 3. Otherwise. supply the required amount power at all times. there are some rules that need to be taken under consideration before making continuing. It provides the power source to all the servomotors and sensors.4. Just using battery will not do the job.4 Power Supply Efficient power supply is the cornerstone to the success of our robotic project. XBee shield and the Arduino MCU could be seen in the figure. XBee shield and Arduino While moving the jumper to the USB position will allow the user to upload a sketch in to the Arduino MCU. a computer power supply would the cheapest and the most reliable type of power source. In fact. The XBee shield has jumpers that need to be relocated each time a sketch is uploaded and when wireless communications are enabled. We need a circuit that regulates the desired voltage. The hardware connections between the XBee module. all wireless communications will be kept disabled and the sketch will not be uploaded. This power supply consists of a 12V rail that could provide 120W of power and a Figure 3-11: Power Regulation Circuit 29 .four sets. and allow for additional special requirements of particular application [10].

It should be ideal for our application as it provides maximum of 25 Watts and an adjustable output voltage from 3 to 13 V. The 5 V supply will provide power to MCU and sensors. The following components were required for the changes:  DC Toggle Switch  LED + Resistor: 10 Ohms. 30 .5 V to provide power to servos. This amount of power would be more than required for an efficient power supply for our project. further changes had to be made. Using this switching regulator with four 12 V rails should provide ample power to the servos. A regular voltage regulator may burn and melt due to overwhelming power requirement. on/off switch. 12 V. We used a 3 Amp Adjustable Switching Regulator from Dimension Engineering (model DE-SWADJ3).5V rail that could provide 150W of power. and a capacitor to take out any transients. Before choosing the switching regulator. This is where switching regulator comes. LED. The switching regulator is similar to regular voltage regulator but it is much more efficient. we need to first identify which wires are 5 V. Figure 3-12: Transformed Power Supply In order to convert PSU to our power supply. The 5 V rail can be used as it is since it already regulated to 5 V. we found the total power consumed in worst case and it was about 93 Watts for all the motors and sensors. and GND. 10W  Power Resistor: 330 Ohms  Binding Posts  Banana Plugs  Heat Shrink Tubing The transformed power supply could be seen in the figure below. But in order to use this unit. On the other hand. Its schematic is identical to 5 V except it has an additional switching regulator. In addition to that we proposed an additional fuse. the 12 V rail need to be regulated to around 6~6. etc.

82V at 180 deg. The digital input our case was the angle of the servo shaft. But the problem aroused when the user tried to let go the object. As the input servo is frozen and it has to be controlled manually. which was 0 to 179 degrees. the reference range for microcontroller was noted to be 0 to 1023. Once the signal is sent to the input gripper.5. 3. fromLow.1 Position Feedback The algorithm for getting the position feedback of the joints was not very complicated. The syntax for the „map ()‟ function could be seen below. the algorithm had to be extended to implement the gripper haptics.33V at 0 deg and 1. which were really helpful in terms of programming. This voltage change caused by the FSR was read as the analog input to the MCU. This mapping had to be done differently when the position feedback was received from a servo. fromHigh. toLow. it was observed to be 0. This reference voltage then had to be mapped to the corresponding voltage values of the digital input. So the values were mapped from the range of 69 to 373 for the joints that used servo for position feedback. as we had to make sure that the joints in the output arm move to the exact same position as the input arm. The algorithm was designed in such a way that the servomotor on the input arm is detached until the force sensor reads a signal higher than the preset threshold value. As the Arduino MCU takes a 10-bit analog input. This is due to the built in libraries of the Arduino. it would not be possible to move the servo manually anymore. The force sensor reading was read by the MCU‟s analog port again using the „analogRead ()‟ function. Both these signal were then used in order to produce the required feedback on the input arm.5. the position feedback of the output servo gripper was also recorded and sent to the MCU. Mapping the values had to be done carefully. toHigh) This function maps the values read from the analog input to an output that is understood by the microcontroller for digital output. map (value. Along with this signal.2 Gripper Haptics While the similar logic for position feedback was applied for gripping the object.3. The function „analogRead ()‟ reads the analog input from the input arm that was mapped using the „map ()‟ function. it is obvious that the voltage varies from 0V to 5V. The above algorithm was working fine to hold the motion of the input arm when the output arm at the same position is holding an object. We then came to a conclusion that some sort of an indication has to be sent manually to the MCU to 31 . As the potentiometer was given a 5V input. It was noticed that the voltage of the internal potentiometer does not vary between 0V and 5V. After measuring the voltage of the servo‟s internal potentiometer. the position feedback from the output gripper was used to hold the gripper at the exact same position. A certain threshold was set for the force sensor so that it detects the objects only when the gripper reaches a proper gripping position.5 Software 3.

The last 32 . The original algorithm was then modified in such a way that the MCU would produce a corresponding voltage to the servo‟s motor based on the FSR reading. One potentiometer and one servo were attached to each of the two sets of XBee-Arduino set. In order to produce the required torque. As a result. As a result. where the MCU should control the servo‟s internal motor directly.5. This lets the user feel the weight of the object being lifted by the output arm on the input arm. A motor driver chip was purchased and attached to the Arduino that could control at least two DC motors. a small algorithm was written in order to enable the H-Bridge pins on the chip. we decided to control the servo‟s internal motor similar to a DC motor.5.33V and 1. the maximum value „analogWrite ()‟ function. the algorithm worked fine and it could obstruct the user from closing in on the gripper anymore and would let the user let go of the gripper whenever desired. Therefore.4 Wireless communication The algorithm for implementing the wireless communication in our project was slightly complicated. We tried implementing this using the „analogWrite ()‟.82V). Therefore. 3.5V to be sent to servo‟s motor directly from the MCU for heavy weights. as it produced a high torque on the joint when the output arm tried to lift a heavy object and a low torque on the joint when the output arm tried to lift a lighter object. In order to do this. where the speed and direction could be controlled directly corresponding to the voltage sent from the MCU. We came up with a design.82V. This was due to the limited voltage required by the servo to rotate the servo as discussed in the previous sections of the report (0. This switch was used as an interrupt to let the MCU detach the input servo. DC motor control from the Arduino would be a bit more complicated than compared to a servo. but we were unable to produce the required voltage to generate a strong torque through the MCU using this logic.detach the servo when the user wants to let go the object. four codes were programmed for testing wireless communication. The third testing code was programmed to implement two way communications between both XBee modules. a switch was placed on the input gripper that would be pressed automatically when the user wants to let go of the gripper. This code made the XBee modules function as both sender and receiver at the same time (setup seen on figure C). 255 could map only up to 1. 3. we require around 3. a simple program was made to wirelessly change the brightness of a remote LED using a potentiometer (setup seen on figure A). As a result. we would have to build a H-Bridge circuit to control the motors.3 Weight Haptics Implementing this part of the project was a very challenging goal. The second testing code was programmed to control a single servo‟s movements wirelessly (setup seen on figure B). In order to do this. As a starter. Therefore. this algorithm worked fine.

two codes for each robotic arm. uploaded.  Robotic Arm Receive: This code receives the signals sent by the input robotic arm and designates them to the proper designated servo on the output robotic arm. All four testing codes were successfully compiled.  Haptics Send: This code reads the gripper force sensor values and the gripper position feedback of the output robotic arm and sends it to the serial port. and put in to action.  Haptics Receive: This code receives the signals sent by the output arm. The testing codes were not merely used for testing but also used for the entirety of our project. It is also responsible of the haptic algorithms to be implemented on the input robotic arm. These codes were designed to be similar to the final code. 33 .testing code was made to control a servo wirelessly using a force sensor (setup seen on figure D). Figure 3-13: ‘A’ Wireless Test for a LED Figure 3-14: ‘B’ Wireless Test of a Servo Figure 3-16: ‘C’ Wireless Test of a Servo from a Potentiometer Figure 3-15: ‘D’ Wireless Test of a Servo from a FSR Our project contains four final separate codes. A detailed explanation of the functions of each of the four codes could be seen below:  Robotic Arm Send: This code reads the potentiometer values located on the userside robotic arm and sends them to the serial port. The force sensor is similar to a potentiometer which outputs resistance values.

“2” is for the second servo. The following is the explanation on how the algorithm of sending and receiving multiple data works. which is data1 would be assigned to the first servo. We needed to make use of the single serial port of the Arduino Duemilanove to accommodate multiple signal transmissions. when the receiver detects an integer number “1” (excluding quotation marks). The actual project uses bytes to send and receive data. “1”servo1”2”servo2”3”servo3”4”servo4”5”servo5”6”servo6 where. If not done properly. These data need to be passed to the other arm and vice versa. or sent to the wrong receiver. misused. and etc. Every single data that is being sent must be assigned into its proper designated receiver. there must be an algorithm to solve this issue. The increasing number of input and output values needs to be taken into account for each robotic arm. the string given below contains two important parts: first is an integer and second is the data that is being sent.Figure 3-17: ‘E’ Wireless Test of the Robotic Arms The Arduino Duemilanove only has one serial port but our project needs nine signals to be transmitted. “3” for the third. the algorithm for sending force sensor values and gripper position feedback from the output arm to the input arm is shown below. Essentially this is how the movements of the output robotic arm is controlled wirelessly using the potentiometers on the input arm. Consequently. data may be lost. „#‟ is the servo label servo# is the value from potentiometer reading The algorithm works this way. As an example. Note: The example below uses integers to further simplify the explanation. This string is what is written into the serial port by the sender which is passed on to the receiver. the next value to the right. “#” is the label gripper_fsr is the sensor reading from gripper FSR weight_fsr is the sensor reading from weight FSR gripper_pos is the output gripper position reading 34 . “1”gripper_fsr”2”weight_fsr”3”gripper_pos” where. Likewise. In this case.

The Arduino Mega board employs ATmega1280 microcontroller operates on a 16 MHz processor rated at 16 million instructions per second [4].1 Evaluation of Theoretical System Speed In order for haptics feedback to be implemented. If the sensors and potentiometer computations are implemented in an efficient manner. Figure 4-1: Output Arm controlled by Potentiometers on a breadboard 35 . since improvements to the system may call for the additions. Performance and Results 4.4. and two servo potentiometers. 4. the construction robotic arms were divided in to various parts. We have at least two force sensors. Allowing some headroom for additional sensors is also essential. which are inputs to analog to digital (ADC) pins of the microcontroller board. Arduino XBee Shield. This means that actual rate of computation will be limited by rate of wireless transmission/receiving of servo positions and sensors values. The next step after cancelling out all the noise in the system was to build the output arm where each joint was tested individually. 4.4 GHz frequency. processing time is very important in our case. is capable of operating at 2.2 Evaluation of the Position Feedback Nature of the Robotic Arms One of the most important goals of our project is to control the motion of the output arm using the input arm that provides the required haptic feedback.1. The first step was to build the output arm that could be controlled by potentiometers that are connected through the breadboard. There are 16 ADC channels. a processing speed of at least 1MHz is required. In order to improve the accuracy of the tracking. The wireless module.1 Evaluation of Theoretical System Performance: In order to perform in real time. six potentiometers. the distance separation of two XBee modules plays roll in the rate of transmission as well. therefore. therefore we have additional six channels left for sampling. however. these computations should take a very short time. the system must be fast enough for this particular application and use little as little memory as possible (which also affects the speed of operation).

36 . Similarly the position feedback nature was implemented to other parts of the arms – base rotation. Figure 4-2: Position Feedback Nature of the Base Joint Figure 4-3: Position Feedback Nature of the Elbow Joint Figure 4-4: Position Feedback Nature of the Wrist Joint It could be seen in the figures above that the corresponding joint of the output arm is positioned at the same place as the one of the input arm. wrist rotation and gripping.The testing procedures for the main joints that support the arm could be seen in the pictures below.

As a result. Therefore. The wires were then wrapped around with aluminum foil that was grounded. Finally after observing the waveforms of the power supply harmonics in the harmonics. 37 . But noise was a huge issue as a lot of jittering was observed when controlling the servos. we came to a conclusion that it was not the power supply that was causing the noise. This reduced a lot of noise comparatively.4. It could be seen in the figure below that a pivot kind of mechanism was designed on the other side of the bracket to support the entire arm.3 Noise Reduction The above methods were tested out successfully and were proved to be very accurate in terms of position feedback. it was important to make sure that the RF noise was filtered.1F capacitors across the power supply and across the analog input signal to cancel out the noise. the noise was successfully out of the system. After this being done. using better performance potentiometers for feedback solved majority of the problem.4 Physical Structure of the Robotic Arms It was very important in our project to make sure that the robotic arms built have perfect stability in terms of the physical structure. Since we do not desire 180degree rotation of the joints. Therefore. as that should cancel out all the noise frequencies in the wires. which became more evident when attached to the arm. So we had to make sure that the other side of the bracket was supported without damaging the motion of the arm. Initially. The servo brackets that were used to build the arm were designed in such a way that the servomotor is attached to one end of the bracket but the other end was left loose. we came to a conclusion that potentiometers were the ones that were causing noise in the system. After checking the waveforms of all the servos in the oscilloscope. It was noticed that the jittering was at its peak when the shaft was nearing 180 degrees when compared to the shaft position at 0 degrees. the noise in the system reduced by a bit but it was still pretty evident. we were left with only the servos and potentiometers that could be causing noise in the system. This ensured that the output arm was stable and the weight was proportionally distributed across the arm. 4. we tried to eliminate the noise using 0. the joints were built in such a way that the servo would have to rotate only to a max of 160 degrees. which did not solve the problem. The next step was to test the wires that were used to connect the circuit to the breadboard. This was sort of taken care with the mechanical structure of the arm. But unfortunately that was not the case. But a minute jitter in the servos was still noticed. This was a challenge to us to figure out the exact origin of the noise in the system. As the wires are basically similar to RF communication. The tiny bit of noise that still persisted was eliminated when the circuit was soldered on a printed circuit board. We then tried to replace the capacitors with a larger capacitor that should definitely cancel out all the noise harmonics even though it would make the whole system slow. This caused the arm to be slightly Pivot Structure unstable in terms of physical structure as all the weight was Figure 4-5:the Output Arm to support falling on the side without any support.

The design using servo torque that is similar to the design for weight haptics was not chosen due to the fact that applying a torque on the servo would push the servo in the opposite direction. But this design was not at its best for objects with Gripper with FSR less rigidity. This was due the fact that the feedback was not sent as a torque but rather as a PWM signal to the servo.1 Rigidity Sensing Sensing the rigidity of the object was one of the simple haptic functions to be implemented in the project. This would force the user to let go the gripper and it might damage the object if the gripper slipped from the user‟s hand. As a result. This logic was successfully implemented for solid Figure 4-6: Output Arm objects.5. a safer method for rigidity sensing was chosen that works great on solid objects.5. The force-sensing resistor was attached to the gripper as shown in the figure to sense the force exerted by the object held by the gripper. 4. This sends a signal to the microcontroller that an object is being held when the force sensor reading crosses a preset threshold.5 Haptic Functionality 4. The input gripper holds its position corresponding to the output gripper position.2 Weight Sensing Weight Sensing Springs for Balance Figure 4-7: Output Arm with FSR 38 .4. This was successfully implemented as discussed in the design part of the report.

This function was also successfully implemented as discussed in the design part of the report. lag is measured by determining the elapsed time when the input robotic arm is moved and when the output robotic arm responds to the commands. There was a noticeable difference when a bit heavier object was being lifted. In reality. there is a possibility that a 39 . 4. This weight was then converted to its corresponding torque on the servo of the input arm. it was finalized that the FSR would be placed below the arm as shown in the figure for a better accuracy. the object being lifted might not be as heavy as the torque that is being produced. With regards to our project. Since our project uses wireless technology. To avoid any interference.6. medium and high in order to demonstrate the weight haptics. this may cause external interferences and noise. The corners of the base was supported by springs in order to let the whole weight of the arm fall on the force sensor.Sensing the weight of the object was the other haptic function to be implemented in the project. The servo produced a medium torque in this case that was opposing the user‟s motion. there are several steps that need to be followed. As shown in the figure. It was very critical to choose a right placement for the force sensor for this application as the force sensor should easily be able to detect the additional weight acting on the arm. it was necessary to map the objects in three weight ranges – low. there may also be internal interferences that may hinder proper data transmission. Essentially. a wide range of values were chosen to be mapped accordingly. Most especially if there are other functioning XBee modules aside from our project. there is a possibility that lags would be present.  Internal interference: Aside from external interferences. The lightest object felt almost nothing. The servo produced very high torque when tried with a heavy object. This was tested with three different weights. Since our project involves multiple data being sent and received simultaneously. As the motors being used are not capable of producing a very high torque to lift heavy objects. the force-sensing resistor was placed below the whole arm. The distance between our two robotic arms must be well under the maximum allowable range. As the accuracy level for the force sensors was very poor.  External interference: External interference may be due to other wireless routers or modems that are currently running in the proximity of the XBee modules. the XBee modules need to be configured properly and uniquely. The force acting on the arm with no load was initially noted and used as the threshold value for the FSR. Indeed.  Range: The XBee modules have a limited range.6 Wireless Communication 4. Another main reason for this was the inaccuracy of the force sensors. After experimenting at various joints of the arm.1 Performance Requirements The performance of wireless technology using Zigbee can be measured by using the following criteria:  Lag: Lag is the difference between the time a user enters a command and the time a device responds.

there is no need to worry about data losses. our two robotic arms situated right next to each other. and XBee modules from other projects. Range: The XBee range was found to be sufficient enough to be used on our project. To deal with this issue. 4.2 Analysis of Performance   Lag: After thorough testing of the wireless communication in our project.single data interferes with another and gets received by the wrong receiver.   40 . modems. Also. since our robots are situated well under the maximum range of the XBee modules. Even so. Our algorithm in sending data worked really well and indeed it eliminated the possibility of any internal interference on our robotic arms. Data were not lost or being corrupted by noise.6. a data packet algorithm is being implemented. so the XBees are more than enough to tackle the range issue. Internal interference: There were no internal interferences within our robotic arms. External interference: There were no interference from other routers. Data were not lost or being corrupted by noise. After all. the lag times are very menial and do not in any way hinder the usability of our project. some minor lags were noticed from time to time.

but it was moderately successful in terms of accuracy. most of the noise was eliminated after various experiments in order to get rid of it. As a result. Conclusion This project has been successful in terms of implementing the required objectives. If this wasn‟t the case. the force sensor chosen had very low accuracy. Various attempts were made to eliminate the noise in the system as that was one of our biggest concerns. The haptics part of the project was successfully implemented but smoothening those functions would be another future consideration. Ideally. We have demonstrated that it is possible to implement the idea of telepresence mixed with the haptics technology. As it is very important that these kinds of systems have to be noise-free. which was not solved. One of the objectives of our project was to design the input arm similar to the output arm. a much simpler design could be implemented for the input arm that is easier to control. However.5. this would be a big consideration for the future projects. Due to budget limitations. But the performance of our designs could be improved in so many ways depending on the application being used. this project could be extended to using some sort of a glove as the input arm to control the output arm. wide range of weights had to be chosen in order to demonstrate the weight haptics. Our future considerations would be ease-of-use. Another improvement that could be made to the system was to implement the gripper haptics using the servo torque design rather than the switch mechanism. We were unable to perform this due to time limitations. Therefore. this project was successful in terms of implementing all its objectives within the time frame provided to us. However. a minute bit of jitter still existed in system. 41 .

Libelium. Retrieved from http://www. vol. Brewster.10-17. Digital Nemesis. 2006). Feb.societyofrobots. In: Brewster.. Retrieved from http://www. Tekscan. R.micrchip. Heiderlberg (2001) 2.seattlerobotics. 4.libelium. 2058. Englewood Cliffs (2001) 3. Prentice Hall.1.” Instrumentation & Measurement Magazine.6.digitalnemesis.html 9. Murray-Smith.html 7. Retrieved from http://www.. (eds) Haptic HCI 2000. no.shtml 42 . Retrieved from http://www. EspanhaM.R. Springer.com/schematics_powerregulation. vol. Bibliography 1.html 8.php?cPath=22&products_id=34 10. Murray-Smith. Kevin Ross: Hacking a Servo by Kevin Ross http://www.com/tienda/catalog/product_info. 2007).A.. Seattle Robotics.junun.com/info/docs/rcservo/ 6. Mclaughlin. “The Potential of Haptics Technologies. IEEE. S.tekscan. Retrieved from http://www.org/guide/servos.com/flexiforce/flexiforce. J. LNCS. Haptics and the Design of Interactive Systems. M. (2009).org/MarkIII/Manual/kevin/servohack.: Touch in Virtual Environments. (3 September. (El Saddik. Society of Robots.com 5. Microchip. S. pp.10.A. Retrieved from http://www.: First International Workshop on Haptic HumanComputer Interaction.