22
Engineering Design Project 2009 Haptic Device for Telepresense Robotic Arm Motion Tracking haptics‐telepresence.wikispaces.com UMAIR NIAZ VIPUL POTLURI DARYL YAMSON

EDP - Theory & Design Report

Embed Size (px)

Citation preview

Page 1: EDP - Theory & Design Report

EngineeringDesignProject2009HapticDeviceforTelepresense

RoboticArmMotionTrackinghaptics‐telepresence.wikispaces.com

UMAIRNIAZ

VIPULPOTLURI

DARYLYAMSON

Page 2: EDP - Theory & Design Report

1

Table of Contents

1.0 Theory 2

1.1 Microcontroller 2 1.1.1 Selection Criteria 2 1.1.2 Arduino Mega 2

1.2 Actuators 3

1.2.1 Selection Criteria 3 1.2.2 Servo Motor Control 4 1.2.3 Torque Calculation 6

1.3 Haptic Functions 6

1.3.1 Selection Criteria 7 1.3.2 Force Sensing Resistors 7

1.4 Communications 8

1.4.1 Selection Criteria 8 1.4.2 Zigbee Networking 8

2.0 Design 11

2.1 Complete System 11

2.2 Robotic Arms 12 2.2.1 Building Materials 12 2.2.2 Position Feedback 12 2.2.3 Noise Reduction 14

2.3 Haptic Functions 14

2.3.1 Rigidity of the Object 15 2.3.2 Weight of the Object 16

2.4 Communications 17

2.4.1 Configuration 17

2.5 Power Supply 18 2.5.1 Voltage Regulation 18 2.5.2 Minimum Power Required 20 2.5.3 Power Regulation 20

Page 3: EDP - Theory & Design Report

2

1.0 Theory 1.1 Microcontroller 1.1.1 Selection Criteria Microcontrollers come in various ranges, from low-power, small architecture to highly sophisticated high-speed processor core. The selection is therefore, dependent on the specific application. We look at the amount of memory required, number of I/O pins, communication interfaces, programming language, ADC and DAC pins, and input and output capture requirements, voltage supply, etc. Also, the MCU must be able to process data in real-time, thus it must be capable of multitasking.

Microchip Technologies Inc.1 suggested following factors while selecting the microcontroller:

Architecture 8 bit

Operating Frequency >1 KHz

Memory >15 KB

Digital Communication Peripherals Serial Communication (RS232, USB), Wireless Protocols (optional)

Capture/Compare/PWM Peripherals Ideally 10 PWM (Output Compare or DEMUX can be used as well)

Analog Input Ideally 10 (otherwise we need MUX)

Physical Size Small to Medium

Cost <$100

Programming Language C programming language

1.1.2 Arduino Mega

As stated before, for a given price we can buy the best MCU and evaluation board but we are constraint by our budget. The engineering solution is to employ as much ingenuity possible while remaining within the limited resources. After evaluation, we selected Arduino Mega MCU evaluation board because it is the least expansive of the available ones in the market and more or less fulfills our requirement with additional add-ons, i.e., ZIGBEE modules for wireless communication between the arms. It is not possible to include evaluation content for every MCU in this report for brevity. For comprehensive evaluation please visit our wiki page.

1http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2127&param=en023431

Page 4: EDP - Theory & Design Report

3

Summary of Features

Microcontroller ATmega1280 Operating Voltage 5V Input Voltage (recommended) 7-12V Input Voltage (limits) 6-20V Digital I/O Pins 54 (of which 14 provide PWM output) Analog Input Pins 16 DC Current per I/O Pin 40 mA DC Current for 3.3V Pin 50 mA Flash Memory 128 KB of which 4 KB used by bootloader SRAM 8 KB EEPROM 4 KB Clock Speed 16 MHz

1.2 Actuators

1.2.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. Two types of motors are considered in order to perform this job. • Stepper Motor: A stepper motor works with permanent magnets, 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. When these coils are turned on and off the magnetic field causes the rotor to move. As the coils are turned on and off in sequence the motor will rotate forward or reverse.

• Servo Motor: A servomotor basically operates using pulse signals from the

microcontroller. The output shaft is then controlled according to the pulse widths of the signal received by the microcontroller.

Various differences can be pointed out between both the motors, but the solid reason for bending towards a servo is due to its position feedback control. Usually a stepper motor easily serves the purpose of a servo in these kind of robotic arms, as high rotations per min (rpm) is not required. The stepper motor would probably be better than a servo for a general robotic arm, where high speed is not a priority due to its high holding torque nature and a comparatively cheaper cost. Therefore, even though a stepper motor would be a better choice for a non-industrial robotic arm, where high acceleration is not a priority, the servo motor is considered for our project as it operates similar to a stepper motor at low speeds but also provides positional feedback.

Page 5: EDP - Theory & Design Report

4

1.2.2 Servo 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.

• Red – Power (+5V) • Black - Ground • White/Yellow (depending on the servo) – Coded Signal

Servo Motor Block Diagram Servo Wires The servo consists of an output shaft. This shaft can be positioned to specific angular positions by sending the servo a coded signal. As long as the coded signal exists on the input line, the servo will maintain the angular position of the shaft. As the coded signal changes, the angular position of the shaft changes.

This coded signal is a pulse of varying length approximately every 20 msec. The length of the pulse is usually 1 or 2 milliseconds depending on the desired angle. Servo Control The signal controlling a servo can be supplied by the microcontroller in two ways:

• Pulse Width Modulation (PWM) • Timers

Page 6: EDP - Theory & Design Report

5

Usually, PWM generators are most commonly used due to less complexity in software algorithms. They usually operate by generating an accurate pulse between 0% and 100% duty cycle. But a single PWM generator would not be sufficient to control all the servos. So the microcontroller chosen is capable of providing sufficient PWM generators in order to control all the servos.

The control wire is used to communicate the angle. The angle is determined by the duration of a pulse that is applied to the control wire. This is called Pulse Coded Modulation. The servo expects to see a pulse every 20 milliseconds (.02 seconds). The length of the pulse will determine how far the motor turns. A 1.5-millisecond pulse, for example, will make the motor turn to the 90-degree position (often called the neutral position). If the pulse is shorter than 1.5 ms, then the motor will turn the shaft to closer to 0 degrees. If the pulse is longer than 1.5ms, the shaft turns closer to 180 degrees.

Pulse Variation for Servo Control The control pulse is fed to a pulse width to voltage converter. This circuit charges a capacitor at a constant rate while the pulse is high. When the pulse goes low, the charge on the capacitor is fed to the output via a suitable buffer amplifier. This essentially produces a voltage related to the length of the applied pulse. The circuit is tuned to produce a useful voltage over a 1ms to 2ms period. The output voltage is buffered and so does not decay significantly between control pulses. A sensor, usually a potentiometer, reads the current rotational position of the output shaft, 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, which compares the current position with the commanded position from the pulse width to voltage converter. In order to record the current position of the servo, all we need to do is to connect a wire to the potentiometer to read the voltage values at all positions. These readings can be sent to the ‘tracking’ arm to move accordingly.

Page 7: EDP - Theory & Design Report

6

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

1.3 Haptic Functions

The primary objective of our robotic arm project is to introduce the haptics technology into it to get the virtual ‘feel’. 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. Each one of them has their own specialty and functionality. 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. This sensor on the gripper shall detect if the robotic gripper has gripped an object, while the sensor below the arm measures the weight of the object.

Page 8: EDP - Theory & Design Report

7

1.3.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. Slip sensors also have a different functionality as it detects shear force. Furthermore, force sensors measure force or load. So we have considered choosing force-sensing resistors (or force sensors) to implement the haptic feedback. Force sensors can be generally classified in to two types: hard and thin film sensors. The former (e.g. Phidgets Force Sensors) are not suitable for robotic grippers as they are not flexible and are bigger in size. Thin film sensors on the other hand are lighter, smaller, and flexible, although some are still only optimized for human touch (e.g. Interlink Force Sensors). Taking into account all the requirements for selection, the Interlink Electronics Force Sensors, which are thin film force sensors, are best suited for our design project for gripper and weight haptics. 1.3.2 Force Sensing Resistors A force sensor is basically a resistor that changes accordingly with the force applied on it. When the force sensor has no load, its resistance is very high (>5MΩ). When a force or load is applied, the resistance decreases. This resistance is measured by connecting an ohmmeter to the two outer pins. This device is designed such that force is inversely proportional to the resistance. Conversely, force is directly proportional to conductance (1/R). In order to test the force sensor, a table must be completed to test the precision of the A201 Force Sensor. Resistances are to be measured with respect to various sample forces. Conductance is then calculated from these resistance values (G=1/R). If the device is working correctly, the plot of conductance vs. force should be linear and should show a straight line with a positive slope as seen below.

Resistance vs. Force

Page 9: EDP - Theory & Design Report

8

Selected sensor 1: Interlink Electronics 0.2” Circular Force Sensor

• Thickness: 0.012” • Length: 1.5” • Width: 0.3” • Sensing area: 0.2” diameter • Connector: 3-pin male square pin • Response time: < 5 microseconds • Force range: 0 – 25lbs

Selected sensor 2: Interlink Electronics 1.5” Square Force Sensor

• Thickness: 0.018” • Length: 3.3” • Width: 1.72” • Sensing area: 1.5” x 1.5” • Connector: 3-pin male square pin • Response time: < 5 microseconds • Force range: 0 – 25lbs

1.4 Communication

1.4.1 Selection Criteria

The initial idea for communicating between both the robotic arms was to use a common microcontroller and wire them together. But considering the applications of the project, wireless communication would definitely be a better idea. We have considered various ways of communicating wirelessly with the least amount of noise, as noise reduction is one of the most important aspects in the project. Using Radio Frequency (RF) communications between the arms for wireless control would be the cheapest available in the market. But that was not chosen due to noise considerations. Bluetooth technology would be the best for faster communication and also a wider range. Considering the cost limitations, we had to choose Zigbee networking protocol. This provides both fast communication and of reasonable cost.

1.4.2 Zigbee Networking

To accommodate wireless communication between the two robotic arms of our project, a device called XBee is needed. The XBee modules use the Zigbee networking protocol for fast peer to peer networking between the two robotic arms. It is based on the IEEE 802.15.4 standard for wireless personal area networks. The protocol is more suitable for radio frequency (RF) applications that requires low data rate but extends battery life and has secure networking. The serial port is used to move data from one module to the other. Figure 1 below shows the XBee module on the right and the XBee shield on the left. The XBee shield is essentially the XBee module’s break out board and is used to interface to the Arduino microcontroller.

Page 10: EDP - Theory & Design Report

9

XBee module and XBee shield

The XBee modules are designed for high throughput applications and with low latency. 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 Kbps • Operating frequency: 2.4 GHz • Receiver sensitivity: -92 dB • Spread Spectrum type: DSSS (Direct Sequence Spread Spectrum) Networking

topology: Point-to-point, point-to-multipoint, & peer-to-peer • Error handling: Retries & acknowledgements • Filtration options: PAN ID, Channel, and 64-bit addresses • Channel capacity:

- XBee: 16 Channels - XBee PRO: 12 Channels

• Addressing: 65,000 network addresses available for each channel The XBee modules can be set up to operate in a point-to-point, point-to-multipoint, or peer-to-peer configuration. The figure below shows a point-to-point connection, which will be implemented in our robotic arm project. In a point-to-point (peer-to-peer) connection, the two modules are forced to only communicate with each other without a Master/Slave relationship. The modules then remain synchronized and share both roles of master and slave. Digi’s peer-to-peer architecture features fast synchronization times and fast cold start times.

XBee Point-to-Point Configuration

Page 11: EDP - Theory & Design Report

10

In order for the two modules to talk to each other, they need to be configured initially. 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. Note: More specific details of the above parameters are presented on the “Design” section of the report. 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. XBee Radiation Pattern

Page 12: EDP - Theory & Design Report

11

2.0 Design 2.1 Complete System The entire functionality of the arm could clearly be understood looking at the block diagram below. The motors and the potentiometers at the input arm would be connected to the main microcontroller that will send the data wirelessly to the microcontroller at the output arm. This data will be sent to the servomotors to position accordingly. The force sensors at the output arm will then communicate back wirelessly to give the haptic feedback at the input arm.

Block Diagram for the Complete System

Page 13: EDP - Theory & Design Report

12

2.2 Robotic Arms 2.2.1 Building Materials Building both the robotic arms was quite a task for our team. Considering our experience in mechanical parts, we decided to use pre-made parts to make our custom shaped arm. Using a robotic arm kit that would be readily available in the market would be a better idea, but considering the budget limitations and our design considerations, the option was not considered. The servos at each joint were chosen appropriately taking the torque calculations (as shown in Appendix) in to consideration. The maximum weight to be lifted by the arm was approximated to be around 300g. 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

The current design of the arm can be seen in the figure beside. This arm consists of 3 Degrees of Freedom. The 4th DOF (circular motion of the arm) would be implemented soon. Further changes that include in the design are the usage of carbon fiber rods to increase length from base to elbow joint as well as elbow to wrist joint. This would increase the range of the arm to hold farther objects. 2.2.2 Position Feedback One of the main goals of our design project is 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. The initial for position feedback was to use two servos at both ends at all the joints that give the position feedback. This would ideal to upgrade the project when motors are required at both ends. But considering the cost limitations, two different approaches were used for the position feedback. Position Feedback for the Gripper The input servo would have to be modified, as shown in the figure beside that it gives the current position to the microcontroller that would be sent to the output servo. It can be seen from the figure below that two additional wires are coming out apart from the three regular wires for the servo. While one wire is grounded internally, the other is connected to the wiper (potentiometer) of the servo. The change in the servo’s shaft position would

Page 14: EDP - Theory & Design Report

13

be recorded as the change in voltage at the wiper, which will be measured by the microcontroller that is sent to the output servo to be moved accordingly. This would be a perfect way to measure the position feedback without removing the motor control at the input arm (for haptic feedback) is required. 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. The voltages were recorded to be 1.86 V when the shaft position was 180 degrees and 0.34V when the shaft position was 0 degrees. This voltage would be sent to the microcontroller as an input signal to the output servo. The max and min voltages would be mapped accordingly using the function ‘map’ in the Arduino library. When this function is used, the microcontroller sees the range 1023 as the reference voltage, which is 5V. This ratio was used to calculate the corresponding ranges for the min and max voltages of the wiper, which were ‘70’ and ‘379’ that represent 0 degrees and 180 degrees correspondingly. These values were tested out to be accurate. Position Feedback for the Other Joints Considering the cost limitations, 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. 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, making the motors useless. So the usage of potentiometers was considered, as it cuts the cost by a lot and serves the purpose very effectively. As a result, 10K pots were used at all the other joints for the position feedback. As shown in the figure, it consists of three pins. The first pin and the third pin would have to be connected to the 5V power supply and ground respectively. The middle pin is the one that gives the position feedback. The rotating knob of the potentiometer would have to be connected to the servo brackets. This way, rotating a joint would rotate the potentiometer instead that would give the change in voltage to the microcontroller. This is essentially the same concept as using the servo for position feedback. The max and min ranges were calculated similarly, which came out to be 1023 and 0 for 5V and 0V. These values were mapped and tested out to be accurate.

Page 15: EDP - Theory & Design Report

14

2.2.3 Noise Reduction The above methods were tested out successfully and were proved to be very accurate in terms of position feedback. But noise reduction was a huge issue as a lot of jittering was noticing when controlling the servos. 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. This was sort off taken care with the mechanical structure of the arm. Since we do not desire 180-degree rotation of the joints, the joints were built in such a way that the servo would have to rotate only to a max of 160 degrees. This reduced a lot of noise comparatively. Using capacitors across the power supply further decreased the noise as shown in the figure below. The above methods worked perfectly when tested with individual servos. But some noise still existed when tested after building the whole arm. This would be reduced when the circuit is actually soldered to a board instead of using a breadboard. As shown in the figure below, the wires connecting the potentiometers to the breadboard were soldered to the pots. This comparatively reduced a lot of noise.

Noise Reduction using capacitors across the Power Supply

2.3 Haptic Functionality The implementation of haptic functionality is the main goal of our design project. The two haptic functionalities that are currently being implemented in the project are 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. After the successful completion of the above haptic functions, a third functionality would be implemented as an add-on to the project. This would be the collision detection nature of the output arm giving a feedback to the input arm to control the motion during a collision.

Page 16: EDP - Theory & Design Report

15

2.3.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 detailed description of this implementation could be seen below. Input Arm This gripper consists of the modified ‘Lynxmotion Little Grip Kit’ with grooves to hold on to when manually controlling the gripper. The gripper is controlled using a Hitec HS-422HD standard servo and a 10K potentiometer. The servo is used for the haptic feedback received from the output arm (basically used for gripping), which is modified to give the position feedback to the output arm. Ideally, the driving gear would have to be removed from the servo in order to achieve free rotation of the shaft without any signal, as the gripper is controlled manually. But removing the driving gear will not produce the haptic feedback from the output arm. As a result, a very low torque servo has been chosen that can be moved ‘almost freely’ at no signal with the driving gear intact. In order to ‘feel’ the rigidity of the object held by the output gripper, a feedback will be sent to the microcontroller at the output end, which is then sent wirelessly to the microcontroller at the input end. This feedback voltage would be sent through the PWM pin of the microcontroller to the input servo. But instead of the signal going to the signal wire of the servomotor, it will be connected to the motor pins directly. This avoids the PWM signal commanding a particular position to the servo through the internal servo board. Eliminating the connection with the internal servo board would produce a torque on the motor instead, which is the exact requirement of our project. This voltage applied to the motor using a PWM, would be seen as an effective analog voltage. The pulse width is then varied with a fixed frequency to change the voltage level seen by the motor. This voltage level is proportional to the force measured by the sensor on the output arm. Applying the above logic, the input gripper would react accordingly depending on the rigidity of the object at the output end. Output Arm This gripper consists of the original ‘Lynxmotion Little Grip Kit’ with 2 Hitec HS-422HD standard servos and a 0.2” Circular Force Sensor. The servos are used for gripping and rotational movements of the gripper. 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. This detects the amount of force applied on the gripper, which is indirectly the change in resistance again. This produces a change in voltage as the force is exerted on the gripper. When the output gripper meets an obstacle (like an object to pick up), then the servo board needs to apply more voltage in order to achieve that position. This voltage would be produced internally. As a result of this, the torque applied by the output gripper is measured more directly. So, the force measured by

Page 17: EDP - Theory & Design Report

16

the force sensing resistor increases in contact with the target as the output gripper’s motor torque increases. 2.3.2 Sensing the weight of the object The weight of the object being lifted could be calculated by placing a force-sensing resistor at the bottom of the entire arm to record the weight applied by the object. This feedback would be ‘felt’ at the elbow joint of the input arm using a dc motor. The detailed description of this implementation could be seen below. Input Arm The elbow joint at the input end consists of a Brushed DC motor and a 10K potentiometer. This potentiometer is connected to the elbow joint gears. Any kind of movement in the elbow joint would cause a change in voltage, which is sent to the Arduino to control the output arm. The brushed dc motor that is connected to the elbow joint using a low profile axis will be used to produce the haptic effect. According to the corresponding force recorded at the output arm, a certain voltage will be applied to the dc motor. A small amount of force at the output arm would apply a small voltage on the dc motor rotating it a low speed. Since the dc motor has a very low holding torque, we can manually move it in the opposite direction while it is rotating at some particular speed. So the higher the speed is, the larger the opposing force it can create on the input arm. Applying the above logic, the weight of the object could be felt at the elbow joint of the input arm. The heavier the object at the output end, the larger will be the force felt at the input end. 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. A 1.5” force sensor would be placed below the arm in an appropriate location, where the whole weight of the arm is exerted. Depending on the structure of the arm base, more than one force sensor could be used to get an overall average force the arm is exerting downwards. This overall force is then calculated with no load and will act as the threshold voltage. So any external force acting on the arm (when a certain object is lifted) would cause an additional force on the force sensor, which is then measured and sent to the Arduino. This measured force is transferred to the dc motor at the elbow joint of the input arm to exert a force in the opposite direction. The force measured on the 1.5” force resistor placed at the bottom of the arm might be varying a lot at no load when arm is at different locations. In this case, the axis of the arm would have to be divided into various axes in order to produce an accurate haptic feedback.

Page 18: EDP - Theory & Design Report

17

2.4 Communication The design of our robotic arm project has been updated to accommodate wireless communications between them. Both arms then must track each other wirelessly. We considered taking the Zigbee protocol route for our project. In particular, two XBee Shields and two XBee modules were used for radio communications. Each robotic arm should then be connected to its own Arduino microcontroller, XBee shield, and XBee module. This set-up offers considerable advantages to our project. The primary advantage is that the XBee modules are bi-directional. Each module can be used to transmit and to receive signals. 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. Two of them can be set up exclusively to talk with each other and ignore all other possible causes of interference. 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, these XBee devices are completely compatible with our own Arduino microcontrollers for they were purposely designed as such. The figure above shows how the three parts (Arduino MCU, XBee shield, and XBee module) are conveniently connected with each other. 2.4.1 Configuration As discussed in the “Theory” section of the report, the XBee modules need to be configured to talk to each other. The X-CTU application is used to update the firmware of both modules. Modem must be set to XB24 and function set to XBEE 802.15.4. Below are the design parameters of each module.

First Module Second Module Channel C C PAN ID 3322 3322

Destination Address High 0 0 Destination Address Low 2 1

16-bit Source Address 1 2 End Device 0 0

End Device Association 0 0 Baud Rate 3 (9600) 3 (9600)

After the two XBees are configured successfully, the next step will be to connect them properly to the Arduino microcontroller. Each of the robotic arms is connected to a set up similar to that in Figure 4. Figure 5 below is the block diagram of our EDP project with wireless networking. The XBee modules act as a wireless bridge between the robots.

Page 19: EDP - Theory & Design Report

18

The overall design for wireless communication between the arms could be seen below.

Block Diagram for Wireless communication

2.5 Power Supply Efficient power supply is the cornerstone to the success of our robotic project. It provides the power source to all the servomotors and sensors. Just using battery will not do the job. In fact, there are some rules that need to be taken under consideration before making continuing. We need a circuit that regulates the desired voltage, supply the required amount power at all times, and allow for additional special requirements of particular application2. 2.5.1 Voltage Regulation For efficiency, optimally it would be best to use a power source slightly above the desired voltage input required. However this is rarely easy or even feasible. Different electronics require different voltages. For example, a MCU will require 5V, the servo motors perhaps 6V and a voltage amplifier perhaps both 20V and -20V.

2http://www.societyofrobots.com/schematics_powerregulation.shtml

Page 20: EDP - Theory & Design Report

19

Batteries are never at a constant voltage. A 6V battery will be at around 7V when fully charged, and can drop to 3-4V when drained. This below image shows how a typical battery voltage changes over time.

Typical Battery Life Chart

To correct for this, an IC module called a voltage regulator is used. What a voltage regulator does is take any input voltage and outputs a regulated voltage. So if the battery is at 7V, then a 5V regulator will output 5V and rest will dissipate as the unused energy/heat. Since MCU and sensors typically do not consume that much current, the wasted energy isn't that much. But for motors, this can be a huge problem. We do not want to over voltage them, but to regulate the voltage is a huge waste of energy. To correct for this, instead is switching regulator used. They act just like a voltage regulator in terms of output, but are much more efficient. Hence a voltage regulator circuit has been designed. A potentiometer has been used to regulate the amount of output voltage required.

VoltageRegulatorCircuit

Page 21: EDP - Theory & Design Report

20

2.5.2 Minimum Power Required The total power required for the servos has to be below the maximum amount the power circuit can supply. If power drops even for a fraction of a second below what the servos require, things like the MCU could reset, or sensors would give bad readings, or motors won’t work very well. The rule of thumb is: energy required by robot < energy battery can supplyTo solve this problem, we determine how much total power servos will require by experimenting, calculating equations, and looking up datasheets of the servos and other parts used: power = voltage x current 2.5.3 Power Regulation The power regulation circuit has the following additional features: Short circuit protection, regeneration, negative voltages and noise protection

Proposed Power Regulation Circuit Considering the cost limitations, a computer power supply would the cheapest and the most reliable type of power source. This power supply consists of a 12V rail that could provide 120W of power and a 5V rail that could provide 150W of power. This amount of power would be more than required for an efficient power supply for our project. But in order to use this unit, further changes had to be made.

Page 22: EDP - Theory & Design Report

21

The following components were required for the changes: • DC Toggle Switch • LED + Resistor: 10 Ohms, 10W • Power Resistor: 330 Ohms • Binding Posts • Banana Plugs • Heat Shrink Tubing

The transformed power supply could be seen in the figure below.

Transformed Power Supply In order to convert PSU to our power supply, we need to first identify which wires are 5 V, 12 V, and GND, etc. The 5 V rail can be used as it is since it already regulated to 5 V. In addition to that we proposed an additional fuse, on/off switch, LED, and a capacitor to take out any transients. The 5 V supply will provide power to MCU and sensors. On the other hand, the 12 V rail need to be regulated to around 6~6.5 V to provide power to servos. Its schematic is identical to 5 V except it has an additional switching regulator. The switching regulator is similar to regular voltage regulator but it is much more efficient. A regular voltage regulator may burn and melt due to overwhelming power requirement. This is where switching regulator comes. Before choosing the switching regulator, we found the total power consumed in worst case and it was about 93 Watts for all the motors and sensors. We used a 3 Amp Adjustable Switching Regulator from Dimension Engineering (model DE-SWADJ3). It should be ideal for our application as it provides maximum of 25 Watts and an adjustable output voltage from 3 to 13 V. Using this switching regulator with four 12 V rails should provide ample power to the servos.