Square D * Robotic Arm Project

advertisement
Square D: Improved Robotic Arm
and Turntable for Sensitivity
Characterization of
Occupancy Sensors
Prepared by:
Brian Auerbach, Sam Garza, Will Hedgecock,
Anne Killough, Bob Ramenofsky, John Sullivan,
and Havan Tucker
Sponsored by Square D, a brand of Schneider Electric
4/18/2008
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
Table of Contents
1
Introduction and Executive Summary .................................................................................... 5
1.1 Background ...................................................................................................................... 5
1.2 Results .............................................................................................................................. 5
2
Introduction ............................................................................................................................. 6
2.1 Team Members ................................................................................................................. 6
2.2 Project Sponsor ................................................................................................................ 7
3
System Overview and Description.......................................................................................... 8
3.1 Project Description ........................................................................................................... 8
3.2 System Requirements ....................................................................................................... 9
3.3 System Diagram ............................................................................................................. 10
3.4 Major Component Definition ......................................................................................... 10
3.5 Command and Control Assembly .................................................................................. 10
3.5.1 Interfaces ................................................................................................................. 11
3.5.2 Communication Responsibilities ............................................................................ 11
3.5.3 Personal Computer .................................................................................................. 11
3.6 Operational Concept ....................................................................................................... 13
3.6.1 Operational Diagram ............................................................................................... 13
4
Robotic Arm Assembly......................................................................................................... 14
4.1 Sub-Project Description ................................................................................................. 14
4.2 Robotic Arm System Requirements ............................................................................... 14
4.2.1 Physical Dimensions ............................................................................................... 14
4.2.2
Thermal Specifications ........................................................................................... 14
4.2.3 Movement Specifications........................................................................................ 15
4.2.4 Device Communications ......................................................................................... 15
4.3 Robotic Arm System Diagrams...................................................................................... 16
4.4 Interface Definitions ....................................................................................................... 17
4.4.1 PC to Microcontroller ............................................................................................. 17
4.4.2 Microcontroller to Stepper Motors ......................................................................... 18
4.4.3 Power Supply to Electrical Components ................................................................ 18
4.5 Operational Concept ....................................................................................................... 19
4.6 Software Overview ......................................................................................................... 19
4.7 Hardware Overview ....................................................................................................... 20
4.7.1 Microcontroller ....................................................................................................... 20
4.7.2 Thermal Management ............................................................................................. 20
4.7.3 Thermal (Heating) Element .................................................................................... 20
4.7.4 Motors ..................................................................................................................... 20
4.7.5 Robotic Arm............................................................................................................ 20
4.7.6 Power Supply .......................................................................................................... 21
4.7.7 Mounting Cart ......................................................................................................... 21
4.8 Software Detailed Design............................................................................................... 21
4.9 Hardware Detailed Design ............................................................................................. 22
4.9.1 Microcontroller ....................................................................................................... 22
4.9.2 Thermal Management ............................................................................................. 24
2
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
4.9.3 Thermal (Heating) Element .................................................................................... 24
4.9.4 Motors ..................................................................................................................... 27
4.9.5 Robotic Arm............................................................................................................ 28
4.9.6 Power Supply .......................................................................................................... 28
4.9.7 Mounting Cart ......................................................................................................... 30
5
Turntable Assembly .............................................................................................................. 31
5.1 Sub-Project Description ................................................................................................. 31
5.2 Turntable System Requirements .................................................................................... 31
5.2.1 Physical Dimensions ............................................................................................... 31
5.2.2 Rotation Specification ............................................................................................. 31
5.2.3 Interface Requirements ........................................................................................... 31
5.3 Turntable Arm System Diagrams ................................................................................... 32
5.4 Interface Definitions ....................................................................................................... 32
5.4.1 PC to Microcontroller ............................................................................................. 32
5.4.2 Microcontroller to Servo Motor .............................................................................. 33
5.4.3 Sensor to Microcontroller ....................................................................................... 33
5.5 Operational Concept ....................................................................................................... 33
5.5.1 Design Verification ................................................................................................. 33
5.6 Software Overview ......................................................................................................... 35
5.7 Hardware Overview ....................................................................................................... 36
5.8 Software Detailed Design............................................................................................... 36
5.9 Hardware Detailed Design ............................................................................................. 37
5.9.1 Microcontroller ....................................................................................................... 37
5.9.2 Servo Motor ............................................................................................................ 37
5.9.3 Sensor Compartment ............................................................................................... 37
5.9.4 Sensor Circuitry ...................................................................................................... 37
5.9.5 Power Supply .......................................................................................................... 38
5.9.6 Mounting Cart ......................................................................................................... 38
6
System Software Overview................................................................................................... 39
7
System Software Detailed Design ........................................................................................ 40
7.1 GUI Overview ................................................................................................................ 40
7.2 Robotic Arm Controls .................................................................................................... 40
7.3 Turntable Controls.......................................................................................................... 41
7.4 Automated Testing Grid ................................................................................................. 41
8
Test Procedure and Results ................................................................................................... 44
9
Conclusions ........................................................................................................................... 46
10 Recommendations for Future Work...................................................................................... 47
11 Appendices ............................................................................................................................ 48
11.1
Appendix A: Minor Motion Coverage Pattern .......................................................... 48
11.2
Appendix B: Turntable Angle Calculations .............................................................. 49
11.3
Appendix C: Data Sheets and Whitepapers ............................................................... 58
11.3.1 Anaheim 24Y504S-LW8 Stepper Motors .............................................................. 58
11.3.2 Anaheim MBC12101 Stepper Controller ............................................................... 60
11.3.3 Watlow Silicone Rubber Heaters ............................................................................ 62
11.3.4 Omega 4-Zone Multiloop Controller ...................................................................... 63
11.3.5 NetBurner MOD5272 Development Environment ................................................. 64
3
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
11.3.6 Square D Occupancy Sensor SLSPWS1277A ........................................................ 66
11.3.7 Hitec HS645MG Servo Motor ................................................................................ 68
11.4
Appendix D: Component Pricing Information .......................................................... 69
11.5
Appendix E: Figures and Tables List ........................................................................ 70
11.6
Appendix F: Project User’s Manual .......................................................................... 71
11.6.1 Introduction ............................................................................................................. 71
11.6.2 Preparing the Hardware .......................................................................................... 71
11.6.3 Preparing the Software ............................................................................................ 71
11.6.4 Operation................................................................................................................. 72
11.6.5 Troubleshooting ...................................................................................................... 74
4
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
1 Introduction and Executive Summary
1.1 Background
This year’s project is a continuation of a project that was started by last year’s senior design
team. As was shown last year, motion detection lighting controls can save users a significant
amount of money, but in order to be viable, these sensors have to be accurate and consistent.
Square D, a lighting control company, needs a way to test their motion detection lighting
controls in a consistent, repeatable, and easy-to-use fashion. This year’s Robotic Arm and
Turntable Projects revolved around creating a tool that Square D can use to test the minor motion
functionality of their motion detection sensors with a minimum of user effort while maximizing
the efficiency, consistency, and reproducibility of the results.
1.2 Results
The design of last year’s moveable robotic arm was altered and improved upon such that the arm
can now be controlled from a remote location via Ethernet (connected either directly or over an
existing Ethernet network), resulting in the ability to accurately and consistently create the minor
motions needed to test Square D's occupancy sensors. The materials used to create the improved
robotic arm were also more conducive to emitting a similar infrared radiation spectrum to that of
an actual human arm, producing more accurate results. In addition to improvements to the
robotic arm, an additional component, referred to as the turntable assembly in this project, was
designed to allow more automation in testing the occupancy sensors. In essence, the turntable
allows a configured occupancy sensor to be rotated and adjusted via a remote PC, such that the
user never has to physically move the sensor at all during testing. The only manual component
left in the test procedure is that the robotic arm must be physically set at specified distances from
the sensor-turntable unit. Reducing the amount of user intervention required significantly cuts
down on the overall time required to fully test the activation range of a single occupancy sensor,
as well as provides more accurate results by further decreasing the possibility of introducing
human error into the testing process. This robotic arm and turntable configuration complies fully
with Square D's requirements and will allow them to increase the efficiency and speed with
which they can test their sensors.
5
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
2 Introduction
2.1 Team Members
2.1.1 Brian Auerbach, Biomedical/Electrical Engineer
Brian was responsible for all research and design of the thermal elements required to make the
robotic arm emit infrared waves in a manner similar to the wave emission characteristics of a
human arm. Brian’s contributions included researching several heating element possibilities,
deciding upon the most suitable means of heating the robotic arm, and actually designing and
implementing the heating element in such a way that the arm emits the desired infrared
wavelengths uniformly.
2.1.2 Sam Garza, Computer Engineer
Sam was responsible for the microcontroller selection and the firmware programming for the
turntable project. Additionally, he was on the integration team with Will Hedgecock. This
included the design of the software, connections, and communications between the robotic arm
and turntable sub-projects.
2.1.3 Will Hedgecock, Computer Engineer
Will was responsible for the overall control and integration aspects of the robotic arm project.
This included microcontroller selection, firmware programming of the microcontroller to control
the movements and speed of the robotic arm, software programming of the graphical user
interface, connections and signaling to and from the robotic arm, and all integration between the
robotic arm and turntable projects.
2.1.4 Anne Killough, Electrical Engineer
Anne was responsible for the electronic systems of the turntable assembly. This included the
design of the motor electronics, the light detection circuit, and the power systems used for
supporting the microcontroller, motors, and light detection circuit.
2.1.5 Bob Ramenofsky, Mechanical Engineer
Bob was responsible for the mechanical design of the turntable assembly. This included deciding
upon which type of motor best suited our needs in terms of torque, power, speed, durability, and
overall controllability. He was also in charge of modeling both the turntable and robotic arm subprojects on the computer. Additionally, he led the physical assembly of the turntable project.
6
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
2.1.6 John Sullivan, Electrical Engineer
John worked on the more mechanical aspects of the project, most importantly the motors. This
included deciding upon which type of motor best suited our needs in terms of torque, power,
speed, durability, and overall controllability. In addition to working on the motors, John was
responsible for providing appropriate power sources to all aspects of the robotic arm, including
motors, microcontroller, and thermal elements.
2.1.7 Havan Tucker, Mechanical Engineer
Havan aided the robotic arm team with the mechanical aspects of the sub-project. This included
the design of the motor and the gear assembly. He also aided them in the computer modeling of
their design. In addition to these responsibilities, he also participated in the assembly of the
turntable project.
2.2 Project Sponsor
Square D: A Brand of Schneider Electric
Square D is an internationally-distributed brand of Schneider Electric, specializing in the design
and manufacturing of NEMA-type electrical control products. Square D products can be found
in residential, commercial, and industrial facilities, as well as in or on the products of other
manufacturers. Their lighting control systems can be found in some of world's most prestigious
applications including the Sydney Opera House in Australia and the Imperial War Museum in
the United Kingdom.
The key design goal of Square D’s lighting products is that lighting is maintained only when a
specialized monitoring system determines that people are actually in the room, resulting in power
savings of up to 75%. Specifically, our project sponsors from Square D are Bill Stottlemyer
(Senior Electrical/Electronics Engineer), Scott Rae, and Charles Reneau. We are also receiving
assistance from a student on last year’s Square D Robotic Arm team, Kenner Warren, who
currently works for Square D in the capacity of a Testing/Electrical Engineer.
7
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
3 System Overview and Description
3.1 Project Description
Square D’s occupancy sensors use both ultrasonic and passive infrared technology (PIR) to
detect occupancy in a room. This project is concerned with the sensitivity characterization of the
PIR aspect of these sensors.
The National Electric Manufacturers Association (NEMA) is the largest trade organization for
electrical manufacturers in the United States. In order to ensure the safety and reliability of
electrical products, they publish numerous standards that govern a variety of electrical products.
One of these standards is WD7-2000, which sets guidelines for the sensitivity of motion sensors
employing PIR technology. The standard is comprised of two portions: major motion and minor
motion. Our project is limited in scope to conformance with the minor motion portion of this
standard. The full specifications of this standard can be found at
http://www.nema.org/stds/wd7.cfm.
The testing of an IR-based motion sensor involves determining whether or not the sensor can
detect and be activated by several types of minor motion in different parts of its coverage area.
A coverage area is defined as the area in which the sensor should be able to detect motion,
comprising both horizontal and vertical fields of view. The coverage area is broken down into a
grid containing a maximum of 400 3ft by 3ft cells, which enables the tester to see precisely what
sections of the coverage area correctly detect motion and which sections have failed the motion
test. In each grid, the amount of motion that can be detected often depends on how far and at
what angle that cell is to the sensor. The amount of motion detected in a grid can be classified as
either major or minor motion. Minor motion is defined as the movement of a person sitting at an
office desk reaching for a telephone, turning pages in a book, opening a file folder, picking up a
coffee cup, or other such typical desk-oriented tasks. See Figures 3-1 and 3-2 for examples of
the coverage area.
Figure 3-1: Coverage Area, Top View
8
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
Figure 3-1 shows how the areas that are close to and in direct line of sight of the sensor can
detect minor motion, while the cells that are farther back or at the edge of the coverage area can
only detect major motion.
Figure 3-2: Coverage Area, Side View
The method that Square D Lighting Control currently uses to test for conformance to the
requirements set forth by NEMA is inefficient and tedious. The current process takes around
seven hours to complete for one single sensor testing a coverage area of 84 cells. It requires the
use of a large meeting room that is often monopolized by other meetings. Additionally, there is
no automation in the process, and testing requires the tester to make every single adjustment
manually and record all of the data by hand. Additionally, the robotic arm currently in use has
numerous functional problems and is not a good emitter of IR energy at the wavelength of
human flesh.
In order to remedy these shortcomings, a new robotic arm and turntable assembly has been
designed which greatly decreases the amount of tester intervention required to perform a full
occupational sensor grid test. The tester no longer has to situate the robotic arm with respect to
any specific angle to the sensor, since the turntable apparatus will now automatically adjust the
sensor to the required position to test a specified angle. In addition, the improved robotic arm
now emits IR energy in a uniform fashion that more closely imitates the IR spectrum emitted by
a human arm. The arm has also been modified to reduce the number of functional problems
which were noted in last year’s design.
3.2 System Requirements
The objective of this project was to make the testing process more efficient by reducing the space
required for testing and by speeding the process up. This project also attempted to automate as
much testing as possible and automatically log the data obtained from the testing process. The
project allows for the operator to test remotely (i.e. from a different room) in order to ensure that
the testing environment is not contaminated by additional IR radiation. Additionally, this project
includes a redesign of the robotic arm in order to address the aforementioned problems.
9
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
3.3 System Diagram
Figure 3-3: System Overview Block Diagram
3.4 Major Component Definition
This project was divided into three sub projects: the robotic arm assembly, the turntable
assembly, and the command and control assembly. Each group was responsible for their
respective assembly; however, the command and control assembly was a joint effort.
Coordination of this sub-project was the responsibility of Will Hedgecock and Sam Garza. In
addition to the command and control assembly, these individuals were also responsible for
setting a communications standard for the other sub-projects. The command and control
assembly will be further discussed in the following section.
3.5 Command and Control Assembly
The command and control assembly is the interface that the operator utilizes to control the
robotic arm and turntable assemblies. This assembly is also responsible for the coordination
between the project assemblies, as well as the data logging of test results. Each sub-project was
responsible for handling its own information, and the command and control assembly was
responsible for manipulating this information and sending it to the appropriate destination.
10
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
3.5.1 Interfaces
The robotic arm, turntable, and command and control assembly all communicate with each other
through an Ethernet network. This allows the operator to control the system remotely. Square
D’s facility already has an existing infrastructure for this medium, making it a logical choice.
Human
Ethernet
GP I/O
Microcontroller 1
User Interface
GP I/O
Ethernet
Microcontroller 2
Sensor
Turntable
GP I/O
Robotic Arm
Figure 3-4: System Interface Diagram
3.5.2 Communication Responsibilities
The command and control assembly is responsible for coordinating the movements of the robotic
arm and turntable assemblies. It is responsible for sending information to the robotic arm that
specifies what position the robotic arm should move to. It is also responsible for sending
information to the turntable that specifies the angle to which it should rotate.
The robotic arm assembly is responsible for receiving movement information from the command
and control assembly. It is also responsible for informing the command and control assembly
when it has completed its movements.
The turntable assembly is responsible for receiving movement information from the command
and control assembly. It is also responsible for informing the command and control assembly
when it has completed its movements. Additionally, the turntable assembly is responsible for
transmitting information regarding the current activation status of the occupancy sensor to the
command and control assembly.
3.5.3 Personal Computer
A personal computer will serve as the physical embodiment of the command and control
assembly. Specifically, there is a control GUI, running on a Windows platform, which provides
the option to either click graphical buttons with a mouse or simply input keystrokes from a
keyboard. The GUI will include controls for the direction of movement of the robotic arm
(either horizontal or vertical, denoted by buttons with arrows pointing in the corresponding
directions), and a speed control box, allowing the user to specify whether the arm should move
through a maximum of 90° of an arc in one second or some slower speed. The GUI also
11
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
includes controls for the specification of angles to which the turntable assembly will need to be
rotated. Lastly, the GUI is responsible for all data logging features. It assimilates the information
that it receives from the robotic arm and turntable assemblies and records it in numerous formats,
including text files or spreadsheets, which make it easy for a tester to interpret the results. The
PC can take the form of either a laptop or a desktop. Either will suffice so long as it is running a
version of Windows more recent than or including Windows XP and has the proper interfacing
capabilities.
12
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
3.6 Operational Concept
This section describes the operation of the overall system as a whole. The tester is defined as the
individual who is operating the system, and the test block is defined by the diagram found in
Appendix A.
The flow of information in this system is hierarchical with the command and control assembly
controlling all forms of data transmission and manipulation. To fully test an occupancy sensor
according to NEMA standards, the sensor will have to be put through a series of activation tests
at all locations in the test block. This will consist of the tester selecting a cell in the test block,
manually positioning the robotic arm at some distance from the turntable assembly which will be
specified by the control GUI, and allowing the command and control interface to take over all
other aspects of the test. More specific information about the functions of the robotic arm and
turntable assemblies in this testing procedure can be found in the subsequent sections of this
report, corresponding to the specific functionality of each of these sub-components. The
diagram in the following section may give a clearer example of the overall operational concept
of this system.
3.6.1 Operational Diagram
Choose Test
Block
Tester moves
robotic arm to
proper distance
Robotic arm
iterates through
programmed
movements
Record Data: Did
the light turn on?
UI commands
turntable to proper
coordinates
NO
Legend
Movements
complete?
YES
Automated
Action/
Decision
Decision
User Action/
Decision
Action/
Process
Figure 3-5: System Operational Diagram
13
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
4 Robotic Arm Assembly
4.1 Sub-Project Description
The goal of this sub-project was to improve upon an already existing version of a robotic arm,
used in the characterization and determination of the sensitivity parameters of occupancy sensors
developed by Square D Lighting Control. The robotic arm is used to simulate "minor motion",
which is defined as the characteristic motion exhibited by an individual seated at a desk while
performing everyday office tasks. The arm can be positioned inside the specified coverage area
for an occupancy sensor and provide a means by which to test whether or not a certain minor
motion will be acknowledged or ignored by the sensor circuitry. Using a robotic arm instead of a
human produces controlled, repeatable movements, assuring test objectivity and thereby lending
scientific credibility to the test results.
4.2 Robotic Arm System Requirements
Square D specified a minimum number of requirements which needed to be met in order for this
project to be successful. They were as follows:
4.2.1 Physical Dimensions
Arm: 18 inches long with exactly 15 inches of heated area
Cart for mounted arm: must be mounted exactly 36 inches above ground
In order to accurately represent minor motion, the arm needed to be similar in size to a human
arm. In addition, since minor motion is defined as the motion exhibited by an individual seated
at a desk, the arm should be mounted at about the same height as a person's arm would be if they
were sitting at a desk.
4.2.2 Thermal Specifications
Temperature Target: 95°F
Temperature Resolution: ≤ 2°F
Peak Wavelength Emitted: 9.4 µm
Emitted Wavelength Range: 7 to 15 µm
One of the main improvements desired in this project was a more similar infrared emission
spectrum to that of the average human arm. Last year’s robotic arm failed to emit in quite the
same range as the human arm, causing the sensor not to be activated when it otherwise should
have been. Therefore, it is necessary that the thermal element be able to be heated to a very
precise temperature, with the caveat that this temperature will cause the arm to emit in the
desired infrared wave spectrum. Also, the robotic arm should emit waves uniformly in all
directions and be safe enough to touch without risk of burn.
14
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
4.2.3 Movement Specifications
Direction of Motion: 180° both vertically and horizontally, but not simultaneously
Maximum Speed of Motion: 90° of an arc per second
The coverage area of the sensors developed by Square D Lighting Control comprises both
horizontal and vertical fields of view; therefore, in order to test the full activation range of the
sensor, the robotic arm should be able to move a full 180° in both the vertical and horizontal
directions. The arm should also be able to move through 90° of an arc in one second,
corresponding to the amount of time it takes for an individual seated at a desk to make one swift
arm movement, whether it be typing, writing, or answering a phone.
Two additional movement requirements, based on the shortcomings of last year’s project, were
that the arm should be able to be held in any position indefinitely, and that it should be able to
make fluid, controlled movements without shaking or jerking while starting and stopping. Last
year’s arm overheated if held in a position parallel to the floor for more than a few minutes,
causing it to drop to the down position and become inoperable for some amount of time. This
was unsatisfactory as the testing requirements often mandate that the arm be held in a specific
position for upwards of five minutes. In addition, the use of servo motors and an inadequate
power source caused a noted jerkiness during the starting and stopping of the arm’s movements.
This year’s arm overcomes these inadequacies to aid in more efficient testing and more accurate
test results.
4.2.4 Device Communications
PC to Microcontroller Interface: Ethernet
Microcontroller to Stepper Motors: Array-Mapped General Purpose I/O Pins
Ethernet was chosen as the communication technology between the computer and the
microcontroller based on its extensive protocol documentation and packet style of data
transmission. Since two microcontrollers were used between the robotic arm and turntable
projects, it also simplified things greatly to be able to address a packet of data to a specific
microcontroller using an IP address. Also, Square D expressed the need for running tests from a
distance of greater than 50 feet and possibly from a separate room. This could be implemented
with maximum ease for the user over an already-existing wired Local Area Network, and since
Ethernet requires no additional data manipulation to send data over wireless instead of a wired
connection, it lends itself to expansion to wireless media in the future.
Since stepper motors are controlled using direction pulses of varying frequency to determine the
number of steps to rotate, it is simple to control these pulses by simply writing them to an array
location on the microcontroller which is mapped to the correct corresponding output pin with a
stepper controller attached.
15
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
4.3 Robotic Arm System Diagrams
Figure 4-1: Component Interaction Block Diagram
Figure 4-1 shows the interactions and connections between the various components of the
robotic arm. One variable power source is used to drive the heating element, the thermal
management device, and the microcontroller. A Personal Computer (Command and Control
Assembly) running the GUI control program will send signals over Ethernet to the
microcontroller which will handle these signals by outputting the appropriate pulses to the
stepper drivers, causing the motors to rotate. The rotation of these motors, in turn, will cause the
robotic arm to move either vertically or horizontally. A PID thermal management device is used
in conjunction with an independently-controlled thermostat, to provide the appropriate power to
the heating element to reach the desired temperature. Finally, upon completion of a desired
movement by the robotic arm, the PC receives an indication from the turntable assembly as to
whether or not the sensor was activated, which it logs for later analysis.
16
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
Figure 4-2: Robotic Arm Operational Flowchart
Figure 4-2 shows the basic operations of the robotic arm. Every time a specific minor motion
needs to be tested, the previous procedure must be followed from start to finish. The robotic arm
ultimately receives all of its control input from the PC via the microcontroller, and all data
capturing takes place in the turntable assembly which then forwards the data to the PC, again via
its own microcontroller.
4.4 Interface Definitions
4.4.1 PC to Microcontroller
The PC to microcontroller interface makes use of Ethernet technology over an RJ-45 cable to
transmit command and control data and also to receive sensor data for data logging. The control
signals take the form of single ASCII characters being sent over Ethernet to control the
movements of the robotic arm. The protocol for movement control is as indicated in Table 4-1
on the following page:
17
Rev. 0.1
Vertical Up
Vertical Down
Horizontal Right
Horizontal Left
New Speed
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
ASCII Character
Decimal Value
Hexadecimal Value
U
85
55
D
68
44
R
82
52
L
76
4C
S
83
53
Table 4-1: Ethernet Protocol for Arm Movement
The “New Speed” character will be followed by another five octets containing the new speed (in
number of degrees traversed per second).
The reason for choosing the Ethernet architecture for transmission between the PC and the
microcontroller was due mainly to its ease of addressability, allowing for transmission to
multiple destinations over a single wired connection with a minimum of effort, as well as the
packet structure utilized by Ethernet, which works well for sending single, small-sized bursts of
data to a specified location. Since there are two microcontrollers interfacing with the PC, and a
single microcontroller is controlling two stepper motors as well as sending data back to the PC, it
is important to have a technology which allows for ease of addressing to avoid having to hardwire each of these interfaces using possibly several different transmission technologies and
having to perform data manipulation to allow for the data from one source to be sent to another
source with a different transmission format. Ethernet does just that; it allows for multiple types
of data to be addressed and sent to specific locations, regardless of the content of the data.
4.4.2 Microcontroller to Stepper Motors
The interface between the microcontroller and the stepper motors is one of the simpler interfaces
to understand. The microcontroller must simply use the control data received from the PC to
send a direction and a pulse signal to the stepper controller. This can be done using just three
output pins which are memory mapped to a specified location in the microcontroller’s memory.
The required output signals are simply written to a memory location which forwards them to the
appropriate pins, enabling communication with the stepper controllers. The stepper motors use
controllers that are pre-configured to handle these direction and pulse signals and output the
required voltages to the motors to make them move with the desired speed, direction, and
number of steps.
The direction signal takes the form of either a binary 1 or a binary 0. A binary 0 corresponds to a
low signal which informs the stepper controller that the motor will be rotating in a certain
direction (depends on the specific stepper controller). A binary 1 will cause the motor to rotate
in the opposite direction. The pulse signal is output on two separate pins (one for each motor)
and is what actually causes the motor to rotate. Every time there is a transition from a high to
low state of a pulse signal, the motor will rotate one “step”. The frequency of these transitions
therefore dictates the speed at which the motor rotates.
4.4.3 Power Supply to Electrical Components
All of the electrical components in this system require some sort of power source, which
ultimately stems from an AC wall outlet at 110V. These electrical components include the
18
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
microcontroller, the thermal elements, and the thermal management controller (PID). More
information can be found in Section 4.9.6: Power Supply.
4.5 Operational Concept
The robotic arm apparatus allows for the testing of infrared-based light sensors in a consistent
and straightforward fashion. The arm may be operated from a remote location, such that testing
is not disturbed by movements or infrared emissions being produced by the operator. The
operator is able to move the arm in both the vertical and horizontal directions, and can move the
arm continuously in increments of 90° for up to 180° of rotation in any direction. Movement of
the arm past 180° in either direction is not allowed.
The current method of testing already employs the use of a robotic arm, but the results produced
by this arm have proven to be unsatisfactory. Most notably, the infrared wavelength profile
emitted by this arm has shown to be incorrect with respect to the profile of an actual human arm.
The operation of the newly designed robotic arm produces an infrared profile very similar to that
of the average human arm, causing the IR-based motion sensor to behave similarly to how it
would in a real-world situation.
To begin testing, the robotic arm is first heated to a temperature of 95°F, with leeway to increase
or decrease the temperature as necessary for optimal results. Once heated, the robotic arm is
positioned in such a way as to correspond to one of the cells in the coverage area (as specified in
Appendix A: Minor Motion Coverage Pattern), and is then put through a set of motions including
a combination of both vertical and horizontal movements which test the sensitivity of the motion
sensor at the currently configured angle and distance. Upon completion of these motions, a log
of whether or not the sensor was activated may be stored in a centralized data file in a number of
formats including a text file or a spreadsheet by the command and control apparatus. The robotic
arm will continue to run through these motions for each cell in the coverage area until minor
motion in all of the cells has been completely tested and logged.
4.6 Software Overview
The software specific to the robotic arm assembly consists solely of the firmware running on the
microcontroller. This firmware is responsible for handling the Ethernet packets received by the
microcontroller, decrypting the data held in each packet, and sending the correct voltage pulses
to the stepper motor drivers to cause the robotic arm to move in the desired direction at the
desired speed. In this case, the microcontroller uses DHCP to acquire its IP address; therefore, it
is necessary to be able to learn what the IP address of the microcontroller is dynamically. As
such, the microcontroller has a utility called “IP Setup” which must be used to fetch its IP
address. More about this utility and the firmware running on the microcontroller can be found in
Section 4.8: Software Detailed Design.
19
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
4.7 Hardware Overview
4.7.1 Microcontroller
The microcontroller represents the brains of the robotic arm. This is the component which
receives command and control signals from the PC and determines what to do with these signals.
The main function of the microcontroller for the robotic arm is to communicate with the stepper
controllers to cause the arm to be set in motion, either in the vertical or horizontal direction.
4.7.2 Thermal Management
This component is necessary to heat the infrared-emitting element on the robotic arm to a
specific temperature and, perhaps more importantly, to monitor this temperature and ensure that
it remains within 2°F of the desired temperature as specified by the project requirements.
For this project, the thermal management device takes the form of a PID (proportional-integralderivative) temperature controller which uses a feedback loop to sense when the heating element
has reached the specified temperature and ensures that it will remain at this temperature by
continually receiving feedback from the element.
4.7.3 Thermal (Heating) Element
The heating element is one of the most critical components of the entire robotic arm project. If
this element were to not emit infrared light in the correct range, then the robotic arm would be
nothing more than a mechanical apparatus that can move up, down, and side to side; it was
therefore imperative that the heating element be chosen very carefully and exhibit all of the
required behaviors specified in Section 4.2.2: Thermal Specifications.
Since this is such a critical component of the robotic arm, much time and energy was put into
researching available heating elements which emit infrared radiation similar to the skin on a
human arm. Details about our research and the materials and elements used can be found in
Section 4.9: Hardware Detailed Design.
4.7.4 Motors
The robotic arm is made to move by employing the use of stepper motors. Two stepper motors
are used, one for vertical motion and one for horizontal motion. Since only one type of motion is
required at a time, at most one motor is ever active at one time. This is important because it
greatly simplifies torque and strain calculations, reduces the complexity of the code to be
executed by the microcontroller, and also reduces the total amount of power that the overall
system ever requires at one time.
4.7.5 Robotic Arm
The actual physical robotic arm was required to be specifically 18 inches long with 15 of the 18
inches being heated; in other words, there is a total of 15 inches of cylindrical, infrared-emitting
material. Since the dimensions of the arm were pre-specified, the only variable aspect of this
component was the material out of which it was to be made. It was important to take the weight
of the material into account, as heavier materials put more strain on the motors and require more
torque to allow for controlled movement of the arm, including smooth starting and stopping.
20
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
4.7.6 Power Supply
All of the electrical requirements of this system are powered using one connection to a standard
110VAC wall outlet. For a detailed outline of how all of these components, namely each of the
thermal solid state relays, the stepper motors, stepper controllers, variable AC-AC transformer,
and thermal management device, interconnect with one another please refer to Section 4.9.6:
Power Supply.
4.7.7 Mounting Cart
This cart provides the support for the robotic arm. Its only requirements were that it be easily
movable, be able to hold all of the required cables and wiring going to and from the robotic arm,
and allow for the robotic arm to be mounted exactly 36 inches above the ground.
4.8 Software Detailed Design
The firmware running on the microcontroller was written using NetBurner’s Eclipse IDE, called
NBEclipse. This development environment allows firmware to be written in the C programming
language which, upon building, compiles this C code into the appropriate machine code for the
NetBurner microcontroller.
The C code for this project was designed in a modular fashioned and makes extensive use of
timers, interrupts, and interrupt service routines to provide functionality to the robotic arm.
Specifically, the code begins by initializing the microcontroller with a dynamically-assigned (by
DHCP) IP address, over which it listens for incoming connections on port 24321. It then sets up
one of the internal timers on the microcontroller, Timer #2, to throw an interrupt every 1/500th of
a second. The reason an interrupt needs to be thrown every 1/500th of a second is due to the
number of steps required by the motors to move the arm exactly 90° of an arc in 1 second,
namely 500 steps. This is achieved by calling the function setupTimer(4, 250, (31.25 / 2)). The
important values passed to this function are the second and third parameters. The second
parameter (250) refers to the prescale value which scales the microcontroller’s clock to produce
ticks every 64µs. This value was found through the following calculation: 𝑝𝑟𝑒𝑠𝑐𝑎𝑙𝑒 =
𝑐𝑙𝑜𝑐𝑘 𝑡𝑖𝑐𝑘 𝑡𝑖𝑚𝑒
256𝑛𝑠
= 64𝜇𝑠 = 250. The third parameter (31.25 / 2) refers to the number of 64µs ticks
64𝜇𝑠
to let pass before causing an interrupt. This is an important value because this is the value which
will be required to change at run-time whenever the user changes the speed of motion of the
robotic arm. The default speed is 90°/sec which, when put into the following equation,
1⁄
𝑠𝑝𝑒𝑒𝑑
64𝜇𝑠
yields 31.25. The reason we further divide this result by two is because the stepper motors only
step on the falling edge of a pulse; so although we need to step every 31.25 interrupts, the output
voltage has to toggle at twice that speed. This equation will be used to calculate the wait time
every time the speed of motion of the robotic arm is changed. Once the new value is calculated,
the setupTimer function is once again called exactly as before, except the third parameter will
now contain the new wait time as calculated from the previous formula.
Once the IP address and timer have been set up, the microcontroller simply listens for incoming
connections and blocks on the listen() call until the command and control assembly requests a
21
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
connection. Once this happens, the microcontroller enters a loop in which it reads packets, one
at a time, off of the Ethernet interface for processing. If the first character of the received packet
is an ‘S’, the microcontroller knows that the rest of the packet will contain a new speed to which
to set the robotic arm. It applies the speed in the rest of the packet to the formula specified on
the previous page to calculate a new wait time and then resets the timer to use this new value. If,
however, the first character in the packet is either ‘U’, ‘D’, ‘L’, or ‘R’, the microcontroller sets
the output pin corresponding to the direction port on the stepper driver to HIGH (+5V) for ‘U’
(Up) or ‘R’ (Right), or LOW (0V) for ‘D’ (Down) or ‘L’ (Left).
If a motion directive packet is received (U, D, L, or R), a boolean variable is set such that the
output pin on the development board corresponding to either the vertical motor for Up or Down
commands, or the horizontal motor for Right or Left commands will toggle between LOW and
HIGH every time an interrupt is generated. Since we set the number of interrupts generated per
second to be equal to the time it takes for the arm to move through 90° of an arc, this will cause
the arm to move smoothly until the robotic arm has reached its destination. The firmware keeps
track of the location of the arm by counting the number of steps it has traversed. Since there are
500 steps in one complete motion, the output pins continue toggling until the stepper motors
have stepped 500 times, at which point, the boolean variable is cleared, causing the pin toggling
to cease. More information about the specific pins and connections used for this process can be
found in Section 4.9: Hardware Detailed Design.
4.9 Hardware Detailed Design
4.9.1 Microcontroller
The microcontroller used to control the robotic arm’s movements was a Motorola MFC5272
used in conjunction with a NetBurner MOD5272 Embedded Ethernet Core Module on a
NetBurner MOD5272 development board. From here on, this entire assembly will simply be
referred to as the NetBurner MOD5272 microcontroller, since the pinouts, voltages, and all other
specs are dictated by NetBurner. The goal of the NetBurner assembly is to make microcontroller
programming for network applications as easy and seamless as possible.
For a discussion of the detailed programming implementation used to control the robotic arm,
please refer to Section 4.8: Software Detailed Design. This section only covers the hardwarespecific features of the microcontroller.
The main features of the MOD5272 microcontroller used in controlling the robotic arm’s
movements are its Ethernet interface, internal timer system, general purpose I/O ports (GPIO
ports), and Real-time Operating System (RTOS). The MOD5272’s internal clock ticks every
16ns, which is useful in providing a consistent timing function to allow the microcontroller to
output step pulses consistently to the stepper controllers at exactly the right time. The RTOS
allows for real-time interrupts based on settings within each of its four internal timers. Using
these internal timers in conjunction with interrupt service routines and the internal clock provides
a means of measuring exactly how much time should pass before sending a pulse to the stepper
controllers.
22
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
To control the robotic arm, arbitrarily-chosen internal Timer #2 was configured to produce an
interrupt every 1/500th of a second (See Section 4.8). This was done by dividing the system
clock by 16 to produce a timer tick every 256ns. This timer tick was then prescaled by 250 to
produce an interrupt every 64µs. These 64µs interrupts are used as the basis for controlling the
output pulses to the stepper controllers, as specified in Section 4.8.
The GPIO ports provide the physical interface between microcontroller and stepper controllers.
Specifically, pins 33, 39, and 42 on Header J2 (corresponding to pins 5, 0, and 1 of Port A) are
used. Pin 33 is used to control the direction of the stepper motors, pin 39 is used to control the
motion of the horizontal stepper motor, and pin 42 controls the motion of the vertical stepper
motor.
The Ethernet core module is used not only to receive control data packets from the command and
control interface, but also to upload new code to the microcontroller and locate it over a network.
In order to communicate with the microcontroller, its IP address as assigned by DHCP must first
be discerned. This is done using a tool called “IP Setup” which ships with the NetBurner
environment and is included in the directory with the Command and Control GUI executable.
Simply run this tool and it will automatically search the network and return the IP address of the
microcontroller in an easy-to-read fashion.
Another tool, called “Auto Update” was used to upload the compiled machine code from the PC
to the microcontroller. This tool works by simply sending the compiled code over Ethernet to
the microcontroller which has the built-in capability to reprogram its 2MB of flash memory upon
receiving new firmware. The main use of the Ethernet module, however, is to receive data
packets from the command and control interface. For a detailed discussion of how the
microcontroller firmware works to move the robotic arm, please see Section 4.8: Software
Detailed Design.
One hardware modification was made to the MOD5272 development board to enable it to output
voltages steadily to the stepper controller. Originally, the board itself could only output 3.3V on
any of the GPIO pins. However, the minimum required voltage the stepper controllers need to
correctly operate consistently is 3.7V. To overcome this obstacle, we soldered a DM74LS08
Quad 2-Input AND Gate Integrated Circuit (IC) onto the board and AND’ed each of the GPIO
output signals with a 5V signal to produce the desired 5V HIGH output using TransistorTransistor-Logic (TTL).
Once this was done, the output voltage to the stepper controllers was 3.7V, exactly what was
required. In addition, the reduced direct load on the microcontroller caused the output voltage to
remain steady at 3.7V, whereas before using the AND gates, the voltage fluctuated quite a bit,
causing the stepper motors to change directions halfway through a motion. With this AND gate
modification, the stepper behavior became regular and consistent.
23
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
4.9.2 Thermal Management
To power the heating pads, a 120VAC power source was transformed using an ISE Inc. variable
transformer (P/N 291) to a voltage of 48V with total output amperage of 3A. The reason for the
stepped-down voltage is because the heating pads are operated at their extreme low end of
temperature, so inputting a full 120V into the heaters caused them to greatly overshoot their 97
degree cutoff point. By stepping down the voltage, we assure that the system will stay within the
2 degree temperature restraint set by the NEMA standard.
To control the system, an Omega 4-loop PID/Hysteresis controller (P/N CN-1504) was used, in
conjunction with 4 Watlow solid-state relays (P/N SSR-100-20A-DC1) to deal with the control
signals. For each controller, a hysteresis loop was programmed around a set point of 95 degrees,
with a dead band value of 2 to instruct the controller to turn on at 93 degrees and turn off at 97
degrees. The following graph shows the temperature result of heating and cooling the arm as a
function of time.
Figure 4-3: IR Emissions with Respect to Temperature
The heating system is completely independent from the GUI and the arm controls, as a PID
controller with a serial interface would have cost more than a thousand dollars extra. This means
that the operators of the arm will have to manually activate each heating zone, which has been
programmed to run for 180 minutes at the setpoint before needing manual reactivation.
4.9.3 Thermal (Heating) Element
Per thermal requirements, the improved robotic arm must produce a heat profile that can be
adjusted to 95 degrees Fahrenheit, with an accuracy of at least 2 degrees. However, special
consideration needs to be taken to ensure that the infrared profile being emitted by the arm
matches that of a human arm. We will first discuss this profile, and then turn our attention to the
actual implementation as used by this robotic arm project.
Human Infrared
24
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
Before the human emission spectrum can be discussed, we must first examine what infrared
radiation is and where it lies on the electromagnetic spectrum.
Figure 4-4: Infrared Range of Electromagnetic Spectrum
The figure above shows an electromagnetic spectrum with the infrared portions separated into
their components. The longest wavelength of light that can be perceived by our eyes is
approximately 760 nanometers, which also corresponds to the shortest wavelength categorized
by infrared radiation. Infrared is divided into three sections: shortwave, medium-wave, and
long-wave. Shortwave IR wavelengths range from about 760 nanometers to 2 microns.
Medium-wave IR falls in the range of 2 microns to 4 microns, and long-wave IR radiation, also
called IR-C, ranges from 4 microns all the way to 1 millimeter, marking the border between IR
and microwave radiation. Our bodies, producing temperatures at around 305-310 Kelvin,
produce an accurate blackbody curve with a peak wavelength of around 9.5 microns and a range
from 7 to 15 microns, as derived from the following formula:
Figure 4-5: Peak Emitted Wavelength Calculation of Human Skin
The following figure shows a graphical representation of the human IR emission spectrum:
Figure 4-6: Human Infrared Emission Spectrum
25
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
While last year’s model of the robotic arm used a simple heating pad to produce temperatures
equal to those of a human body, we considered using three different approaches in order to not
only match the proper temperature of a human arm, but also to match the emission spectrum that
it produces. From these three approaches, we chose to use a carbon-black-like heating element
to meet the necessary requirements.
Discussions with Dr. John Pearce at the University of Texas ultimately led to this design choice
which could be used to produce infrared emission similar to that of a human arm. The human
arm, under ideal conditions, produces a spectrum that nearly mimics that of a perfect blackbody
emitter. Dr. Pearce recommended simple black spray paint with a carbon black pigment to
produce nearly ideal blackbody emission. Carbon black is a common form of amorphous carbon
soot found in many commercial applications today, including black dyes and tires. Coating an
arm wrapped with a simple flexible heating element with a carbon-black infused adhesive
produced the necessary characteristics with a minimum of safety concerns.
Specifically, we used common electrical tape as a means by which to provide the carbon-blacklike emission spectrum. We found that electrical tape had an emissivity of 0.95, only 0.03 away
from the emissivity of a human arm at 0.98. This, coupled with the fact that our arm was made
of a molded sheet of aluminum, provided an almost perfect replication of the IR spectrum of a
human arm. Aluminum itself has an emissivity of only 0.05, meaning that the actual arm
material does not contribute much to the IR emissions of the arm assembly. The purpose of the
aluminum was simply to cause the heating pads to heat the entire arm evenly, making for a more
uniform distribution of the IR emissions. This uniform heating, along with the high emissivity of
the electrical tape, produced the desired IR spectrum nearly perfectly, as evinced by the
following picture of the human arm as compared to our robotic arm:
Figure 4-7: Comparison of Human Arm IR Spectrum to Robotic Arm
26
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
The actual heating elements were purchased from Watlow and consisted of three silicone rubber
heating pads of different sizes, pieced together to fully cover the required 15”. Each heating pad
consists of a wire-wound element within the pad which can be controlled accurately via a PID
controller, discussed in Section 4.9.2. The parts numbers for these pads are three 040100C1 pads
at dimensions of 4”x10” and one 030100C1 pad at 3”x10”, totaling 15”x10” of heated arm.
4.9.4 Motors
The main drive component of the arm consists of two Anaheim Automation 24Y504S-LW8 425
ounce-inch stepper drivers with 200 mechanical steps per revolution. The motors are rated at 4
amps continuous current, operate at 80 volts, and are connected in a bipolar configuration in
order to maximize low speed torque. Both motors run in a dual-current mode based on whether
or not they are stationary or rotating.
When the vertical motor rotates, the stepper controller operates at 6 amps in order to meet the
torque demand needed to prevent skipping. Skipping occurs when the microcontroller tells the
arm to step, but due to the torque of the arm, the step does not correctly execute. Since this is an
open loop system, it is absolutely vital that the arm not skip, hence the high current. In short, if
skipping occurs, the microcontroller will not correctly model the arm's position. Since the
horizontal stepper motor doesn't have to overcome gravity, it operates at a much lower current of
3 amps while rotating.
One second after the last step command is received from the microcontroller, the stepper
controller reduces the vertical stepper current to 3 amps and the horizontal stepper to 1.5 amps,
which is sufficient to hold the arm in place. While the vertical motor operates above its rated
current while moving (6 > 4 amps), this is not an issue due to the nature of operation of the arm,
which stays stationary much more than it moves. This means the arm stays 1 amp under the
continuous rating most of the time, and 2 amps over during the relatively infrequent 1 second
move operations. The 4 amp continuous rating is entirely based on preventing the motor from
overheating; this configuration prevents the enclosure from overheating. That being said, stepper
motors do run hot. The vertical drive motor will, under normal operation (and per the owner's
manual), remain hot to the touch. It should never be so hot that it can cause burns, but it is not
unreasonable for it to heat up to 120 degrees Fahrenheit.
At the onset of this project, we found that last year's motor design using 100 ounce inch servos
was insufficient, as the system required constant monitoring and repositioning while stationary
and overheated due to torque overload. We quickly realized that a stepper based open loop
system perfectly solved both of these problems, as steppers are designed to maintain full rated
torque without overheating and without continuous monitoring.
There are two Anaheim Automation stepper controllers used in this project, one to control the
vertical stepper and one for the horizontal stepper. Each module has three connections to the
microcontroller: clock, direction, and ground. The stepper interprets a move request by stepping
each time a high to low pulse occurs on the clock pin. The state of the direction pin (high or
low) controls which way the motor turns (high is clockwise). The stepper controller also has a
10x microstep feature that increases the total number of steps per revolution from 200 to 2000,
27
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
thus producing much smoother motor movement.
The direction and clock signals leaving the microcontroller require conditioning and isolation
before they reach the stepper controller. Due to the incompatibility between the 3.3V high
output of the microcontroller versus the 3.7V minimum high input required by the stepper
controller, both the direction and clock pins enter an AND gate buffer circuit. One leg of each
AND input is tied high, so that the 5V TTL output is the same as the highest input. This circuit
creates a buffer with a gain of about 1 volt. After passing through the buffers, the signal then
passes through an internal opto-isolator in order to prevent ground loop noise and possible
microcontroller damage. The signals then reach the stepper controller circuits and are executed.
Both controllers operate at 80 volts.
4.9.5 Robotic Arm
The robotic arm was constructed out of a single sheet of pure aluminum which was molded into
a cylinder of diameter 3”. The total length of the arm is 18” with one end comprising a clamp
which can be tightened with a screw to affix the arm to a circular shaft connector on the vertical
motor. Using such a lightweight material as aluminum resulted in an arm that only weighs
approximately 11 ounces, overcoming any potential torque problems and making in-depth torque
calculations superfluous.
Aluminum was also chosen as the material from which to form the arm due to its inherent heatconducting properties coupled with its low emissivity of only 0.05. This low emissivity value is
important because it precludes the arm from contributing to or altering the almost perfect
blackbody radiation emitted by the thermal elements masked with electrical tape. The fact that
aluminum is a great conductor of heat allows the arm to heat uniformly and thus emit the desired
IR spectrum consistently without producing any hot or cold spots on the arm which could
potentially cause some measure of error in the testing of the occupancy sensors.
4.9.6 Power Supply
The following diagrams outline, in detail, how all of the power connections in this project are
made:
Figure 4-8: Stepper System Power Connections
28
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
Figure 4-9: Heating Element Power Connections
The following diagram shows how these individual stepper and heating system power
connections work together to form an overall system power supply:
Figure 4-10: Overall System Power Connections
29
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
4.9.7 Mounting Cart
The cart on which the robotic arm is mounted is a Buhl BAV-4226C compact audio-visual cart.
This cart consists of a fixed height base on wheels with an adjustable top shelf. The robotic arm
is directly attached to this adjustable top shelf such that the base of the arm (the part that pivots)
pivots exactly 36” above the floor.
30
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
5 Turntable Assembly
5.1 Sub-Project Description
The goal of this sub-project is to improve the current testing process for the sensitivity
parameters of Square D occupancy sensors. The improvements of this testing process are based
on a foundation of decreasing the testing time and minimizing the required space for the testing
process. The turntable places the sensor in a stationary position excluding a rotating motion.
The motion under test is placed on a single axis relative to the sensor as the sensor rotates. The
testing process divides the sensor occupancy coverage pattern into a maximum of 400 cells.
Minor motion must be verified in each of the cells through the movement of the robotic arm
assembly. Rotation of the sensor will reduce the amount of movements required by the robotic
arm. The utilization of the turntable assembly will minimize the number of measurements taken,
thereby simplifying the occupancy testing procedure.
5.2 Turntable System Requirements
Square D specified requirements for the turntable assembly that would ensure success and
qualify for the NEMA testing standards. (Refer to http://www.nema.org/stds/wd7.cfm to view
the standards.)
5.2.1 Physical Dimensions
The requirements of the turntable apparatus dictate that the sensor must be 48 inches above the
floor. This height is comparable to the height at which the sensor will actually be mounted on
the wall of a room. The physical apparatus must be portable in order to ensure storability and to
accommodate a variable testing facility.
5.2.2 Rotation Specification
The turntable must be capable of rotating ±90° with a resolution of 0.5 of a degree. These
rotation specifications ensure each cell is tested to the standards of the requirements specified by
NEMA.
5.2.3 Interface Requirements
PC to Microcontroller Interface: Ethernet
Microcontroller to Motor and Sensor: General Purpose I/O Pins
As was discussed in the robotic arm interface section, Ethernet was chosen as the communication
technology between the computer and the microcontroller based on its extensive protocol
documentation and packet style of data transmission. Since two microcontrollers were used
between the robotic arm and turntable projects, it also simplified things greatly to be able to
address a packet of data to a specific microcontroller using an IP address. Also, Square D
expressed the need for running tests from a distance of greater than 50 feet and possibly from a
separate room. This could be implemented with maximum ease for the user over an already-
31
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
existing wired Local Area Network, and since Ethernet requires no additional data manipulation
to send data over wireless instead of a wired connection, it lends itself to expansion to a wireless
media in the future.
5.3 Turntable Arm System Diagrams
Power
Supply
Sensor
on
oti n
ll M tio
Ce rifica
Ve
Power
Supply
Sensor
Circuitry
Turntable Assembly
Microcontroller
Sensor Data
Motor Angle and Sensor Data
Command and
Control Signals
Servo
Motor
PC
Robotic Arm
Assembly
Figure 5-1: Turntable System Diagram
Figure 5-1 shows the interactions and connections between the various components of the
turntable assembly. Command and control signals will be sent from the user/PC. These control
signals will designate the location of the robotic arm and the angle required of the sensor. The
motor drivers will then rotate the turntable to the desired angle, wait for a response verifying
completion of robotic arm movement, and collect activation data from the sensor. This data will
then be sent back to the microcontroller which will store the appropriate detection response in
the PC and notify the robotic arm for the next movement.
5.4 Interface Definitions
5.4.1 PC to Microcontroller
The PC communicates with the microcontroller using Ethernet. This is accomplished using
standard category 5 cable.
32
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
5.4.2 Microcontroller to Servo Motor
The microcontroller controls the servo motor through its timer system. The timer system
generates the proper control signal and transmits it through port TOUT2.
5.4.3 Sensor to Microcontroller
The interface between the sensor and the microcontroller is a simple wiring design. The load
line from the sensor to the light bulb is hot when the sensor is activated. This line is also
connected to the microcontroller to signal the activation of the sensor. The interface between the
sensor and microcontroller is simply 5 volts being sent to an I/O pin on the microcontroller when
the light bulb is activated.
5.5 Operational Concept
The turntable apparatus must be able to rotate within a certain degree to ensure that the
occupancy sensor meets the requirements set forth by NEMA. The current testing procedure
allows for the positioning of the robotic arm at a certain distance away from the sensor. In
addition, the arm is placed at a certain angle from the sensor between -90˚ and +90˚ from the
centerline. Because this method is both tedious and inefficient, a new method has been
proposed. Instead of having the robotic arm move to each designated square, the proposed
system will allow for the turntable to rotate to a specific angle created by the centerline of the
sensor and the fixed centerline of the room. In order for the proposed system to be effective, the
turntable must be capable of rotating to every angle that was measured between the robotic arm
and the fixed centerline of the current system. A table of the x-direction distance, the y-direction
distance, the resultant distance, and the equivalent turntable angle can be referenced in Section
5.5.1: Design Verification.
Interface components within the turntable assembly include communication between the GUI,
turntable, and sensor. The turntable assembly will receive position information from the GUI
and then rotate the sensor to the correct angle. The turntable assembly will then respond with
verification that the rotation is complete. The turntable will be idle until it receives signals from
the command and control assembly that the robotic arm has completed a movement. At this
point, the sensor activation circuit will relay the status of the sensor light bulb to the command
and control assembly.
5.5.1 Design Verification
All distances were measured from the sensor to the center of the indicated cell. The angle values
were rounded to the nearest tenth of a degree. Since rotating the turntable to a tenth of a degree
would be very difficult to accomplish accurately, the turntable is rotated in 1˚ increments.
Angles with a tenths digit between 0.1 and 0.4 are rounded to the lower whole number while
digits between 0.5 and 0.9 are rounded to the higher whole number. This method simplifies the
design and construction of the turntable. However, there is a possibility that the turntable could
be at most 0.5˚ off from the center of the testing square where the robotic arm will be placed.
This means that the actual turntable angle will be slightly larger or smaller than the desired
33
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
angle. It is imperative that the maximum amount of skew be smaller than a certain value. As
long as this criterion is satisfied, the rest of the angle calculations are adequate. The desired
calculation of an arbitrary cell will be calculated to ensure that the resultant distances are correct.
A skew calculation will then be performed to ensure that it is below a certain maximum skew
value. These calculations will then be performed on the rest of the cells in the coverage area to
figure out the maximum skew distances. The sample calculation of the arbitrary angle is shown
below.
The arbitrary cell chosen to perform the desired angle calculation was cell 107, as numbered in
Appendix A: Minor Motion Coverage Pattern. The center of cell 107 was measured to be -10.5
feet from the sensor in the x-direction and 16.5 feet from the sensor in the y-direction. The angle
between the hypotenuse distance to the cell and the vertical axis at x = 0 may be calculated, as
well as the magnitude of the hypotenuse to the center of the cell:
(1)
(2)
According to the current system, the turntable assembly should be located 19.6 ft from the center
of cell 107 at an angle of -32.5˚ from the vertical axis. To accomplish this same configuration in
the proposed system, the robotic arm must be placed 19.6 ft from the turntable assembly. To
achieve the desired angle of -32.5˚ in the current system, the turntable must rotate +32.5˚ from
the vertical axis in the proposed system. This angle must now be rounded to +33˚ to satisfy the
1˚ increment criterion stated above. The robotic arm will not move from its position in cell 107,
therefore the arm will remain 19.6 ft from the turntable. Now, the new x-distance and y-distance
must be calculated as well as the difference between these new “skewed” values and the original
desired values. An angle of -33˚ will be used in the following calculation to remain consistent
with the current testing procedure. This calculation appears below:
(3)
(4)
(5)
(6)
The values in parts (4) and (6) of the calculations above are the differences between the desired
distances and the skewed distances. Both values are positive, which is equivalent to moving the
robotic arm closer to the top left of cell 107. Figure 4-1 shows a diagram of cell 107 from the
minor motion coverage pattern in Appendix A.
34
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
Figure 5-2: Diagram of Cell 107 from Coverage Pattern Standards
Position 1 in the diagram refers to the ideal robotic arm location, while position 2 refers to the
robotic arm location once the 1˚ increment criterion has been stipulated. The total distance
between position 1 and position 2 can be calculated using the following method:
(7)
The total distance between position 1 and position 2 was calculated to be 2.17 inches, which is
the maximum skew value that the turntable assembly must account for. This skew is a
reasonable value considering the overall distance between the robotic arm assembly and the
turntable assembly. Since the skewed values do not greatly affect the occupancy sensor’s
performance, the proposed system will be effective with the 1˚ increment turntable angle.
5.6 Software Overview
The microcontroller code maintains communication with the PC, controls the servo motor, and
keeps track of the sensor delay. The code receives commands from the GUI to command the
motor to specific angles. A signal is also constantly being sent to the PC on the status of the
sensor. Any change in the sensor status will be recorded by the PC.
35
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
5.7 Hardware Overview
The hardware in this project includes a microcontroller, a servo motor, two power supplies, and a
mounting cart. The microcontroller is the center of the turntable development. It receives
commands from the user interface, moves the sensor to the desired angle, receives notification of
the activated sensor, and sends the results back to the user interface. The microcontroller
maintains communication with the PC, controls the servo motor, and keeps track of the status of
the sensor relay.
The sensor is rotated by a small servo motor. The servo contains an internal gear head and a
built-in potentiometer for easy control. A stepper was also considered in preliminary design
concepts, but ultimately the servo provided the simpler solution. The primary downside to servo
motors is that they have no holding power and draw continuous power to resist torque loads.
However, since the motor shaft is vertical, there is no torque on the shaft when the sensor stops
moving, and a servo would therefore present no problems.
The sensor, motor, microcontroller, and power source are all mounted on a metal, adjustableheight audio/video cart. This allows users to easily transport the entire system. During testing,
locking castors hold the cart steady.
5.8 Software Detailed Design
The microcontroller code maintains communication with the PC via a 10BaseT Ethernet
network. First, an IP address is automatically assigned to the microcontroller using DHCP. The
microcontroller then initializes the TCP/IP stack and awaits connections on TCP ports 24321 and
24322. Once these connections are made, control is passed to the main OS task.
The control of the servo motor is done by using the microcontroller timer system to scale down
the clock. The microcontroller controls the servo motor with pulse width modulation. The
required signal has a period of 33 milliseconds with variable duty cycle. The duty cycle is what
actually controls the motor. This signal is generated through the timer system of the
microcontroller. The 33 millisecond period is subdivided into 62,500 time units. The timer
system increments its current count status every time the clock ticks. A timeout value is placed
in the timer system’s timeout register, and when this value matches the count value, an interrupt
occurs. When this happens, the output is toggled to switch the state of the output pin (TOUT2).
The same timer system used to control the servo motor is also used to keep track of the status of
the sensor relay. When the relay state changes, the microcontroller sends a TCP message to the
command and control assembly.
36
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
5.9 Hardware Detailed Design
5.9.1 Microcontroller
The microcontroller used in this sub-project is a NetBurner MOD5272. This microcontroller
was used because its features satisfy the design requirements. It has a 10BaseT Ethernet port to
connect to the PC. There is a 32-bit ColdFire 5272 processor with integrated Ethernet, 22 digital
I/O ports, and 4 timers. I/O ports are used to communicate with the motor and the sensor. The
timers are used to scale down the clock and control the motor. The board has power of 330 mA
at 3.3VDC.
5.9.2 Servo Motor
The motor that rotates the sensor housing is a HiTec HS-645MG servo. Servo motors have builtin position feedback, which allows for easy control of the sensor angle. This motor draws 450
mA of current and provides an ample 107 inch/ounces. This particular model is safe for
applications in most industrial settings.
5.9.3 Sensor Compartment
The key concerns for the sensor compartment were proper and secure fit, adequate strength, easy
attachment to the motor, and, of course, pleasing aesthetics. A single gang PVC switchbox
provided a durable basis for the compartment. Since the switchbox was designed to contain
devices similar to the occupancy sensor, little modification was required inside the compartment.
An ABS plastic shaft mount disc was provided with the servo motor, and was attached to the
bottom of the switchbox. A hole was placed in the rear of the compartment for wiring to exit the
box. Finally, extra tabs were trimmed from the box, and two coats of glossy black paint
provided a tidy meeting of function and style.
5.9.4 Sensor Circuitry
The circuit from the sensor sends a signal to the microcontroller when motion is detected by the
sensor. The sensor is connected to a light bulb over a normal wiring system, as if installed in a
house. It is connected to a 120V AC power source with a hot line and a ground line. The load
line of the sensor is taken to the light bulb and back to the power supply. The load line from the
sensor is also taken to the microcontroller. Figure 5-3 displays this layout.
The sensor circuit runs on 120V AC, and the microcontroller I/O pins require 5V DC. A 120
VAC -5VDC power supply is used to convert and downgrade the voltage.
37
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
Figure 5-3: Sensor Circuit Diagram
5.9.5 Power Supply
The microcontroller and the sensor both require power supplies. The sensor uses a basic 120V
AC power supply. The microcontroller uses a 5V DC, 3A power supply. There is also an
additional power supply used to covert and downgrade the 120V AC signal coming from the
sensor to the 5V DC signal needed by the microcontroller pin.
5.9.6 Mounting Cart
The mounting cart is required to place the sensor exactly 48” above the ground. It must also be
easy to move and store. The adjustments that were made to the cart involved attaching the servo
motor, light bulb, and microcontroller compartment to the top shelf. It was also necessary to
place a small stand under the servo motor to satisfy the height requirements.
38
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
6 System Software Overview
The software developed for and used in this system forms the basis of the command and control
assembly as specified in Section 3.5. It takes the form of a Graphical User Interface (GUI)
running on a Windows platform, version “XP” or later. Specifically, it consists of three main
components. The first component comprises the robotic arm controls which include manual
controls to move the arm up, down, left, or right, and to reset the arm to its resting position. It
also includes a means of setting the speed of motion of the robotic arm by allowing the user to
input the number of degrees the arm should traverse per second. The second component
comprises the turntable controls which allow the user to manually position the turntable, and
hence the occupancy sensor, at a certain angle. Finally, the third component comprises a
customizable testing grid which allows for automated testing of individual cells or of the entire
test area as a whole. The only thing required of the tester is to position the robotic arm at
specified distances away from the turntable, as indicated by the GUI.
The GUI, when connected to both the robotic arm and turntable devices, looks like the following
graphic. Note the three components as described above:
Figure 6-1: Active GUI Example
39
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
For a detailed discussion of the operation and workings of the GUI, please refer to Section 7:
System Software Detailed Design.
7 System Software Detailed Design
7.1 GUI Overview
The command and control GUI for the entire project assembly was written in C++ using
Microsoft’s .NET Framework. This language was chosen for two reasons, namely the robustness
of C++ as a versatile programming language, as well as .NET’s inherent ease of designing
aesthetically-pleasing and functional GUIs. The code was designed and compiled using
Microsoft Visual Studio 2008 and was written to run on any Windows Operating System later
than and including Windows XP.
The GUI, as pictured in the previous section, initially starts up with all controls disabled.
Although full functionality is only allowed when both the robotic arm and turntable devices are
both connected, the GUI can be used with only one device or the other connected. When this is
the case, only the controls associated with the connected device will be enabled. In order to use
the Automated Testing Grid, both devices must be connected simultaneously.
In addition, the GUI provides the option of allowing the user to input the IP addresses and port
numbers of the connected robotic arm and/or turntable devices. This functionality can be
accessed by clicking on the “Connect” menu item and selecting “Change Destination Address”.
A small dialog box will appear allowing these settings to be changed as desired. For more
information on discovering the IP address of the connected device, please refer to the User’s
Manual in Section 11.6.
The GUI also allows the tester to save a certain GUI configuration and load it again at a later
time. Reasons to do this might include partially testing a sensor and needing to finish testing at a
later date. By clicking “File->Save Configuration As…”, the tester can save the current
configuration including the position of the turntable, the position and speed of the robotic arm, as
well as the Automated Testing Grid specifications including any test results that have been
completed thus far. It is important to note that changing the destination IP address and port is a
permanent change, meaning that the changes will remain in place even if the GUI is closed and
restarted again.
7.2 Robotic Arm Controls
The robotic arm controls consist of a series of buttons allowing for manual control over the
robotic arm’s movements, as well as a button to reset the robotic arm to its resting (down-center)
position. The GUI also provides a means of changing the speed of motion of the robotic arm via
the Speed Controls box. The user can either select one of three Preset speeds or enter a speed
manually in the manual entry box below. Pressing the “Set” button sends the new desired speed
to the microcontroller, which will then use this new setting as a basis for how often to send a
pulse to the stepper motors.
40
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
Specifically, the GUI works by sending control data packets over Ethernet to the robotic arm
whenever a change or action is required. If the user presses the Up, Down, Left, or Right arrow
buttons, Ethernet packets containing the characters ‘U’, ‘D’, ‘L’, or ‘R’ respectively will be sent
to the microcontroller, which, in turn, will process these packets and perform the desired motion.
Pressing the reset button causes the arm to be lowered to its resting position by sending a
sequence of control packets which will cause the arm to move to this location from its current
position. It is important to note that in order for this functionality to be possible, the GUI has to
keep some state information about the current location of the arm. Keeping this information not
only allows the arm to be reset automatically; it also ensures that unacceptable arm movements
will not be carried out. For example, if the position state in the GUI says that the arm is in the
upmost position, then pressing the Up button again will have no effect. The GUI will simply
notice that this is not an acceptable motion and discard the button press.
7.3 Turntable Controls
The turntable controls work in exactly the same fashion as the robotic arm controls and consist of
a box to set the new desired rotation angle of the turntable as well as a button to send this new
data to the turntable assembly’s microcontroller. The acceptable values for the “Degree of
Rotation” box are -90.0 to 90.0 degrees in increments of 0.5 degrees. Thus, these are the only
values which are allowable in the manual entry box. The user can either enter the desired
rotation value manually or scroll through the available values using the Up/Down arrows to the
right of the box. It is important to note that angles entered into this box correspond to the
absolute angles to which the turntable should rotate, not relative angles. This means that
entering ‘0’ in the box will cause the turntable to rotate such that the sensor is facing directly
forward, no matter what its previous position was.
When the user clicks the “Rotate” button, an Ethernet packet will be created with an initial
character of ‘R’ followed by the desired degree of rotation. This packet is then sent to the
turntable’s microcontroller which reads the packet and performs the desired rotation.
7.4 Automated Testing Grid
The Automated Testing Grid provides a complete new functionality not found in last year’s
design. It allows the tester to test all of the possible arm motions of a specified cell
automatically without user intervention, or the tester can press the “Run Full Test” button and the
entire testing grid will be tested with a minimum of user intervention. All that is required of the
tester is to position the robotic arm assembly a set distance from the turntable assembly which
will be indicated by the GUI whenever such interventions are required.
The size of the Automated Testing Grid is set to 20 cells by 20 cells, with each cell representing
a 3’x3’ block of space. The reason for this size is that it allows a variety of testing
configurations and sizes to be input into the GUI without requiring an entire GUI rewrite or
modification. This means that the tester has the ability to choose which cells in the Testing Grid
will be enabled for testing and which will be bypassed. To perform these selections, click on
41
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
“Specify Grid”. A dialog box will appear informing that the GUI is now in Grid Specification
mode. In this mode, the tester can click on a grid cell to either enable or disable the cell. When
disabled, the cell will be grayed out, and once the GUI is put back into normal running mode, the
cell will no longer be clickable. To return to the normal running mode, simply click the “Done”
button on the “Grid Customization” dialog box.
At this point, a fully customized testing grid is available. Only those cells which were left
enabled will be able to be clicked and thus tested. In addition, when the tester clicks the “Run
Full Test” button, the disabled cells will be skipped over, testing only those cells in the grid
which were specified by the tester. Once testing is complete, the tester has the ability to export
the results in a variety of formats. The simplest format is a text file which will simply draw the
testing grid in a text file and input an ‘X’ in the cell if the sensor was not activated or an ‘O’ if it
was. If the cell was not tested, it will be left blank. To export the results as a text file, simply
click “File->Export as Text File…” which will bring up a dialog box asking for a filename and
location to which to save the file.
In addition, the tester can choose to export the results in a nicely formatted spreadsheet. This can
be done by selecting “File->Export as Spreadsheet…”. When this is done, an XML spreadsheet
will be created with the entire testing grid on it, similar to the text file. The difference, however,
is that all the disabled cells will be shaded gray to indicate that they were not part of the testing
grid, and the cells that were tested will either be shaded green or red to indicate sensor activation
success or failure, respectively. It is important to note that this functionality makes use of the
“Template.dat” file in the working directory of the GUI executable and is contingent upon this
file’s presence. If the file is removed or deleted for any reason, the spreadsheet export
functionality will no longer be available and a re-install will be necessary.
Finally, the tester can choose to export detailed results about the testing process. This is
selectable from “File->Export Detailed Results” and will create a text file which not only
indicates whether or not the sensor was activated in a certain cell, but will also indicate which
specific arm motions caused the sensor to be activated.
The Automated Testing Grid works by looking at which cell was clicked (or which cell is
currently being tested in the case of a Full Test), and it sets the turntable and robotic arm to the
correct corresponding positions using the same Ethernet packets as would be used if controlling
each of these devices manually. Once this is complete, the GUI waits for an indication that the
sensor has been deactivated. This indication will come in the form of an Ethernet packet
containing the word “Off” from the turntable’s microcontroller. At this point, the GUI will send
a packet to the robotic arm, telling it to move to its next location. Once this move is complete,
the GUI will then check the indication packets being received from the turntable. If the packets
being received contain the word “On”, the GUI knows that the sensor was successfully activated;
otherwise, it knows that the sensor remained idle. This result is then recorded in a state internal
to the GUI and the results are updated in the Automated Testing Grid panel. This process is
repeated until all movements in a given cell are tested, or until the entire testing grid has been
tested, depending on which type of test is being carried out. The following flowchart can help to
illustrate the different states of running a Full Test:
42
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
Figure 7-1: GUI Operation Flowchart
43
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
8 Test Procedure and Results
There were several steps required to test the full functionality of the entire project assembly. The
first step was to test each individual sub-project component by itself. To test the turntable
assembly, the important thing to keep in mind was that the sensor had to be able to be positioned
accurately to within 0.5° of the desired angle. Guaranteeing this degree of accuracy involved
connecting a small, rigid wire (similar to a hand on a clock) to the motor shaft and setting up the
turntable apparatus on top of a circle with every degree clearly marked. The turntable was then
instructed to move to a certain position using a small custom application, and the position to
which the turntable actually moved was measured exactly by referencing the location of the wire
hand on the degree circle underneath. The results of this test were that the turntable arm moved
to the correct position with a minimum accuracy of 0.5° every time, substantiating the design
requirements.
The robotic arm was tested in a similar fashion. A small application was written to instruct the
arm to move through all of its possible motions, and the motions were measured to ensure that
the arm traversed exactly 90° of an arc each time. Again, the results corroborated the design
expectations, with the arm moving the exact 90° for all of its possible motions.
The next, and possibly most important, step was to test integration between the robotic arm,
turntable, and PC. To do this, the command and control GUI was started and used to connect to
both remote apparatuses. Once connected, the manual controls for each device were tested.
First, the robotic arm manual controls were tested to ensure that all motions were correctly
executed and that only those motions which were supposed to be were actually allowed. Next,
the speed controls for the robotic arm were tested. This involved measuring the execution time
of the robotic arm’s movements from motion start to motion end, and ensuring that this time
corresponded to the requested time. First, the default speed of 90° per second was tested. This
resulted in the arm moving through one entire motion in exactly 1 second. Next, other manuallyentered speeds, including 30°, 45°, and 60° among other more randomly chosen angles per
second were tested. Each time, the robotic arm moved through the entire 90° arc accurately in
the amount of time specified by the speed controls on the control GUI.
The manual controls for the turntable were then tested to ensure that entering any possible degree
of rotation for the sensor would, in fact, cause the turntable to rotate to the correct angle. Once
this testing was complete, it was necessary to test the automation functions of the control GUI.
This involved first clicking on any of the cells in the Automated Testing Grid and watching the
automation process as all of the movements for the cell were tested. As expected, this resulted in
the GUI instructing the tester to position the robotic arm at some specified distance from the
turntable apparatus, followed by the turntable rotating to the correct angle for that cell. The
robotic arm then waited until the sensor was deactivated and made its first movement. If the
sensor was not activated by the movement, the robotic arm continued with its next movement.
If, however, the sensor was activated, this resulted in the arm waiting for the sensor to deactivate
before continuing with its next movement. As expected, all required movements were carried
out, and the cell on the GUI was colored the correct color, either green if the sensor was
activated or red if it was not. Numerous cells were tested to ensure that the automation process
worked for all of them.
44
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
Once individual cell testing was complete, grid specification functionality was tested. This
involved selecting certain cells to NOT be tested by the automation process. Once the grid was
customized, the cells that were disabled were indeed unable to be selected for automated testing.
The “Run Full Test” button was then clicked to ensure that the disabled cells would not be tested
and that the full test functionality was working correctly. All of the disabled cells were skipped,
and the full test was run without problem, filling in the control GUI with the correct results as to
whether the sensor in a certain cell was or was not activated by the robotic arm’s motions.
Finally, the functionality to export results in a variety of formats was tested. This involved
running enough tests so that there was an array of different results on the control GUI. These
results were then saved in each of the three possible formats under the File menu. As expected,
each file was saved and subsequently re-opened correctly, verifying the file export functionality.
After this test, all of the functionality of the project had been completely tested. In addition, all
of the small GUI control functionality was also tested to ensure that the program would not hang
or crash upon any user input. Tests were started and then cancelled before finishing, the GUI
was initialized with only one or the other device connected, all “Cancel” buttons were pushed
during testing, and power failures and link downing simulations were carried out, all with the
result that the system behaved intuitively, either shutting down gracefully and restarting or
simply disconnecting and informing the user that an error had occurred, allowing them first to
save their results for further testing.
45
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
9 Conclusions
The system requirements and project goals for this semester were appropriate for a senior design
project. The project was challenging but not overwhelming. There was a broad exposure to
many applicable engineering disciplines. The electrical engineers needed to understand the
functionality of servo motors, and the mechanical engineers needed to understand the general
process of microcontroller code. The project mimicked real-world engineering projects.
Engineering disciplines overlapped, knowledge bases were stretched, and team work was a
necessity.
The Square D project this year involved two separate teams working together. Organizing and
managing three or four group members is challenging; integrating the seven team members was
difficult. It is easy to make small assumptions while coding or designing a prototype. These
assumptions, however, can become troublesome later in the schedule when it is time to integrate.
It is important to be on the same page throughout the entire project process, despite the relative
size of the issue.
Communication is vital in project work. Whether it is communicating with your teammates
about the specifics of a project, or it is developing a presentation for your manager,
communication about the project is just as important as the engineering of the project. This year
was a successful year for the Square D team. We had a successful team experience and a quality
finished product.
46
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
10 Recommendations for Future Work
Recommendations for future work could include adding more functionality on both the robotic
arm and the turntable. The entire system could be updated to use a wireless interface between
the microcontrollers and the PC. This would limit the difficulties of requiring wires running
from the PC to the robotic arm. The robotic arm system could also be automated to move the
designated distances on the single axis of the testing room. Future work on the turntable could
include adding vertical rotation to the testing spectrum.
47
11 Appendices
11.1 Appendix A: Minor Motion Coverage Pattern
60
57
54
51
48
45
42
39
36
33
30
27
21
18
15
12
9
6
3
FEET
Y-Axis
24
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
30
27
24
21
18
15
12
3
6
9
12
15
18
21
24
27
30
9
6
3
X-Axis
11.2 Appendix B: Turntable Angle Calculations
Square Number
X Distance (ft.)
Y Distance (ft.)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
-28.5
-25.5
-22.5
-19.5
-16.5
-13.5
-10.5
-7.5
-4.5
-1.5
1.5
4.5
7.5
10.5
13.5
16.5
19.5
22.5
25.5
28.5
-28.5
-25.5
-22.5
-19.5
-16.5
-13.5
-10.5
-7.5
-4.5
-1.5
1.5
4.5
7.5
10.5
13.5
16.5
19.5
22.5
25.5
28.5
-28.5
-25.5
-22.5
-19.5
-16.5
1.5
1.5
1.5
1.5
1.5
1.5
1.5
1.5
1.5
1.5
1.5
1.5
1.5
1.5
1.5
1.5
1.5
1.5
1.5
1.5
4.5
4.5
4.5
4.5
4.5
4.5
4.5
4.5
4.5
4.5
4.5
4.5
4.5
4.5
4.5
4.5
4.5
4.5
4.5
4.5
7.5
7.5
7.5
7.5
7.5
Distance (ft.)
28.5
25.5
22.5
19.6
16.6
13.6
10.6
7.6
4.7
2.1
2.1
4.7
7.6
10.6
13.6
16.6
19.6
22.5
25.5
28.5
28.9
25.9
22.9
20.0
17.1
14.2
11.4
8.7
6.4
4.7
4.7
6.4
8.7
11.4
14.2
17.1
20.0
22.9
25.9
28.9
29.5
26.6
23.7
20.9
18.1
Turntable Angle
Adjustment (Degrees)
87.0
86.6
86.2
85.6
84.8
83.7
81.9
78.7
71.6
45.0
-45.0
-71.6
-78.7
-81.9
-83.7
-84.8
-85.6
-86.2
-86.6
-87.0
81.0
80.0
78.7
77.0
74.7
71.6
66.8
59.0
45.0
18.4
-18.4
-45.0
-59.0
-66.8
-71.6
-74.7
-77.0
-78.7
-80.0
-81.0
75.3
73.6
71.6
69.0
65.6
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
-13.5
-10.5
-7.5
-4.5
-1.5
1.5
4.5
7.5
10.5
13.5
16.5
19.5
22.5
25.5
28.5
-28.5
-25.5
-22.5
-19.5
-16.5
-13.5
-10.5
-7.5
-4.5
-1.5
1.5
4.5
7.5
10.5
13.5
16.5
19.5
22.5
25.5
28.5
-28.5
-25.5
-22.5
-19.5
-16.5
-13.5
-10.5
-7.5
-4.5
-1.5
1.5
4.5
7.5
10.5
13.5
7.5
7.5
7.5
7.5
7.5
7.5
7.5
7.5
7.5
7.5
7.5
7.5
7.5
7.5
7.5
10.5
10.5
10.5
10.5
10.5
10.5
10.5
10.5
10.5
10.5
10.5
10.5
10.5
10.5
10.5
10.5
10.5
10.5
10.5
10.5
13.5
13.5
13.5
13.5
13.5
13.5
13.5
13.5
13.5
13.5
13.5
13.5
13.5
13.5
13.5
15.4
12.9
10.6
8.7
7.6
7.6
8.7
10.6
12.9
15.4
18.1
20.9
23.7
26.6
29.5
30.4
27.6
24.8
22.1
19.6
17.1
14.8
12.9
11.4
10.6
10.6
11.4
12.9
14.8
17.1
19.6
22.1
24.8
27.6
30.4
31.5
28.9
26.2
23.7
21.3
19.1
17.1
15.4
14.2
13.6
13.6
14.2
15.4
17.1
19.1
3/9/2016
60.9
54.5
45.0
31.0
11.3
-11.3
-31.0
-45.0
-54.5
-60.9
-65.6
-69.0
-71.6
-73.6
-75.3
69.8
67.6
65.0
61.7
57.5
52.1
45.0
35.5
23.2
8.1
-8.1
-23.2
-35.5
-45.0
-52.1
-57.5
-61.7
-65.0
-67.6
-69.8
64.7
62.1
59.0
55.3
50.7
45.0
37.9
29.1
18.4
6.3
-6.3
-18.4
-29.1
-37.9
-45.0
50
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
16.5
19.5
22.5
25.5
28.5
-28.5
-25.5
-22.5
-19.5
-16.5
-13.5
-10.5
-7.5
-4.5
-1.5
1.5
4.5
7.5
10.5
13.5
16.5
19.5
22.5
25.5
28.5
-28.5
-25.5
-22.5
-19.5
-16.5
-13.5
-10.5
-7.5
-4.5
-1.5
1.5
4.5
7.5
10.5
13.5
16.5
19.5
22.5
25.5
28.5
-28.5
-25.5
-22.5
-19.5
-16.5
13.5
13.5
13.5
13.5
13.5
16.5
16.5
16.5
16.5
16.5
16.5
16.5
16.5
16.5
16.5
16.5
16.5
16.5
16.5
16.5
16.5
16.5
16.5
16.5
16.5
19.5
19.5
19.5
19.5
19.5
19.5
19.5
19.5
19.5
19.5
19.5
19.5
19.5
19.5
19.5
19.5
19.5
19.5
19.5
19.5
22.5
22.5
22.5
22.5
22.5
21.3
23.7
26.2
28.9
31.5
32.9
30.4
27.9
25.5
23.3
21.3
19.6
18.1
17.1
16.6
16.6
17.1
18.1
19.6
21.3
23.3
25.5
27.9
30.4
32.9
34.5
32.1
29.8
27.6
25.5
23.7
22.1
20.9
20.0
19.6
19.6
20.0
20.9
22.1
23.7
25.5
27.6
29.8
32.1
34.5
36.3
34.0
31.8
29.8
27.9
3/9/2016
-50.7
-55.3
-59.0
-62.1
-64.7
59.9
57.1
53.7
49.8
45.0
39.3
32.5
24.4
15.3
5.2
-5.2
-15.3
-24.4
-32.5
-39.3
-45.0
-49.8
-53.7
-57.1
-59.9
55.6
52.6
49.1
45.0
40.2
34.7
28.3
21.0
13.0
4.4
-4.4
-13.0
-21.0
-28.3
-34.7
-40.2
-45.0
-49.1
-52.6
-55.6
51.7
48.6
45.0
40.9
36.3
51
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
-13.5
-10.5
-7.5
-4.5
-1.5
1.5
4.5
7.5
10.5
13.5
16.5
19.5
22.5
25.5
28.5
-28.5
-25.5
-22.5
-19.5
-16.5
-13.5
-10.5
-7.5
-4.5
-1.5
1.5
4.5
7.5
10.5
13.5
16.5
19.5
22.5
25.5
28.5
-28.5
-25.5
-22.5
-19.5
-16.5
-13.5
-10.5
-7.5
-4.5
-1.5
1.5
4.5
7.5
10.5
13.5
22.5
22.5
22.5
22.5
22.5
22.5
22.5
22.5
22.5
22.5
22.5
22.5
22.5
22.5
22.5
25.5
25.5
25.5
25.5
25.5
25.5
25.5
25.5
25.5
25.5
25.5
25.5
25.5
25.5
25.5
25.5
25.5
25.5
25.5
25.5
28.5
28.5
28.5
28.5
28.5
28.5
28.5
28.5
28.5
28.5
28.5
28.5
28.5
28.5
28.5
26.2
24.8
23.7
22.9
22.5
22.5
22.9
23.7
24.8
26.2
27.9
29.8
31.8
34.0
36.3
38.2
36.1
34.0
32.1
30.4
28.9
27.6
26.6
25.9
25.5
25.5
25.9
26.6
27.6
28.9
30.4
32.1
34.0
36.1
38.2
40.3
38.2
36.3
34.5
32.9
31.5
30.4
29.5
28.9
28.5
28.5
28.9
29.5
30.4
31.5
3/9/2016
31.0
25.0
18.4
11.3
3.8
-3.8
-11.3
-18.4
-25.0
-31.0
-36.3
-40.9
-45.0
-48.6
-51.7
48.2
45.0
41.4
37.4
32.9
27.9
22.4
16.4
10.0
3.4
-3.4
-10.0
-16.4
-22.4
-27.9
-32.9
-37.4
-41.4
-45.0
-48.2
45.0
41.8
38.3
34.4
30.1
25.3
20.2
14.7
9.0
3.0
-3.0
-9.0
-14.7
-20.2
-25.3
52
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
16.5
19.5
22.5
25.5
28.5
-28.5
-25.5
-22.5
-19.5
-16.5
-13.5
-10.5
-7.5
-4.5
-1.5
1.5
4.5
7.5
10.5
13.5
16.5
19.5
22.5
25.5
28.5
-28.5
-25.5
-22.5
-19.5
-16.5
-13.5
-10.5
-7.5
-4.5
-1.5
1.5
4.5
7.5
10.5
13.5
16.5
19.5
22.5
25.5
28.5
-28.5
-25.5
-22.5
-19.5
-16.5
28.5
28.5
28.5
28.5
28.5
31.5
31.5
31.5
31.5
31.5
31.5
31.5
31.5
31.5
31.5
31.5
31.5
31.5
31.5
31.5
31.5
31.5
31.5
31.5
31.5
34.5
34.5
34.5
34.5
34.5
34.5
34.5
34.5
34.5
34.5
34.5
34.5
34.5
34.5
34.5
34.5
34.5
34.5
34.5
34.5
37.5
37.5
37.5
37.5
37.5
32.9
34.5
36.3
38.2
40.3
42.5
40.5
38.7
37.0
35.6
34.3
33.2
32.4
31.8
31.5
31.5
31.8
32.4
33.2
34.3
35.6
37.0
38.7
40.5
42.5
44.7
42.9
41.2
39.6
38.2
37.0
36.1
35.3
34.8
34.5
34.5
34.8
35.3
36.1
37.0
38.2
39.6
41.2
42.9
44.7
47.1
45.3
43.7
42.3
41.0
3/9/2016
-30.1
-34.4
-38.3
-41.8
-45.0
42.1
39.0
35.5
31.8
27.6
23.2
18.4
13.4
8.1
2.7
-2.7
-8.1
-13.4
-18.4
-23.2
-27.6
-31.8
-35.5
-39.0
-42.1
39.6
36.5
33.1
29.5
25.6
21.4
16.9
12.3
7.4
2.5
-2.5
-7.4
-12.3
-16.9
-21.4
-25.6
-29.5
-33.1
-36.5
-39.6
37.2
34.2
31.0
27.5
23.7
53
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
-13.5
-10.5
-7.5
-4.5
-1.5
1.5
4.5
7.5
10.5
13.5
16.5
19.5
22.5
25.5
28.5
-28.5
-25.5
-22.5
-19.5
-16.5
-13.5
-10.5
-7.5
-4.5
-1.5
1.5
4.5
7.5
10.5
13.5
16.5
19.5
22.5
25.5
28.5
-28.5
-25.5
-22.5
-19.5
-16.5
-13.5
-10.5
-7.5
-4.5
-1.5
1.5
4.5
7.5
10.5
13.5
37.5
37.5
37.5
37.5
37.5
37.5
37.5
37.5
37.5
37.5
37.5
37.5
37.5
37.5
37.5
40.5
40.5
40.5
40.5
40.5
40.5
40.5
40.5
40.5
40.5
40.5
40.5
40.5
40.5
40.5
40.5
40.5
40.5
40.5
40.5
43.5
43.5
43.5
43.5
43.5
43.5
43.5
43.5
43.5
43.5
43.5
43.5
43.5
43.5
43.5
39.9
38.9
38.2
37.8
37.5
37.5
37.8
38.2
38.9
39.9
41.0
42.3
43.7
45.3
47.1
49.5
47.9
46.3
44.9
43.7
42.7
41.8
41.2
40.7
40.5
40.5
40.7
41.2
41.8
42.7
43.7
44.9
46.3
47.9
49.5
52.0
50.4
49.0
47.7
46.5
45.5
44.7
44.1
43.7
43.5
43.5
43.7
44.1
44.7
45.5
3/9/2016
19.8
15.6
11.3
6.8
2.3
-2.3
-6.8
-11.3
-15.6
-19.8
-23.7
-27.5
-31.0
-34.2
-37.2
35.1
32.2
29.1
25.7
22.2
18.4
14.5
10.5
6.3
2.1
-2.1
-6.3
-10.5
-14.5
-18.4
-22.2
-25.7
-29.1
-32.2
-35.1
33.2
30.4
27.3
24.1
20.8
17.2
13.6
9.8
5.9
2.0
-2.0
-5.9
-9.8
-13.6
-17.2
54
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
16.5
19.5
22.5
25.5
28.5
-28.5
-25.5
-22.5
-19.5
-16.5
-13.5
-10.5
-7.5
-4.5
-1.5
1.5
4.5
7.5
10.5
13.5
16.5
19.5
22.5
25.5
28.5
-28.5
-25.5
-22.5
-19.5
-16.5
-13.5
-10.5
-7.5
-4.5
-1.5
1.5
4.5
7.5
10.5
13.5
16.5
19.5
22.5
25.5
28.5
-28.5
-25.5
-22.5
-19.5
-16.5
43.5
43.5
43.5
43.5
43.5
46.5
46.5
46.5
46.5
46.5
46.5
46.5
46.5
46.5
46.5
46.5
46.5
46.5
46.5
46.5
46.5
46.5
46.5
46.5
46.5
49.5
49.5
49.5
49.5
49.5
49.5
49.5
49.5
49.5
49.5
49.5
49.5
49.5
49.5
49.5
49.5
49.5
49.5
49.5
49.5
52.5
52.5
52.5
52.5
52.5
46.5
47.7
49.0
50.4
52.0
54.5
53.0
51.7
50.4
49.3
48.4
47.7
47.1
46.7
46.5
46.5
46.7
47.1
47.7
48.4
49.3
50.4
51.7
53.0
54.5
57.1
55.7
54.4
53.2
52.2
51.3
50.6
50.1
49.7
49.5
49.5
49.7
50.1
50.6
51.3
52.2
53.2
54.4
55.7
57.1
59.7
58.4
57.1
56.0
55.0
3/9/2016
-20.8
-24.1
-27.3
-30.4
-33.2
31.5
28.7
25.8
22.8
19.5
16.2
12.7
9.2
5.5
1.8
-1.8
-5.5
-9.2
-12.7
-16.2
-19.5
-22.8
-25.8
-28.7
-31.5
29.9
27.3
24.4
21.5
18.4
15.3
12.0
8.6
5.2
1.7
-1.7
-5.2
-8.6
-12.0
-15.3
-18.4
-21.5
-24.4
-27.3
-29.9
28.5
25.9
23.2
20.4
17.4
55
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
-13.5
-10.5
-7.5
-4.5
-1.5
1.5
4.5
7.5
10.5
13.5
16.5
19.5
22.5
25.5
28.5
-28.5
-25.5
-22.5
-19.5
-16.5
-13.5
-10.5
-7.5
-4.5
-1.5
1.5
4.5
7.5
10.5
13.5
16.5
19.5
22.5
25.5
28.5
-28.5
-25.5
-22.5
-19.5
-16.5
-13.5
-10.5
-7.5
-4.5
-1.5
1.5
4.5
7.5
10.5
13.5
52.5
52.5
52.5
52.5
52.5
52.5
52.5
52.5
52.5
52.5
52.5
52.5
52.5
52.5
52.5
55.5
55.5
55.5
55.5
55.5
55.5
55.5
55.5
55.5
55.5
55.5
55.5
55.5
55.5
55.5
55.5
55.5
55.5
55.5
55.5
58.5
58.5
58.5
58.5
58.5
58.5
58.5
58.5
58.5
58.5
58.5
58.5
58.5
58.5
58.5
54.2
53.5
53.0
52.7
52.5
52.5
52.7
53.0
53.5
54.2
55.0
56.0
57.1
58.4
59.7
62.4
61.1
59.9
58.8
57.9
57.1
56.5
56.0
55.7
55.5
55.5
55.7
56.0
56.5
57.1
57.9
58.8
59.9
61.1
62.4
65.1
63.8
62.7
61.7
60.8
60.0
59.4
59.0
58.7
58.5
58.5
58.7
59.0
59.4
60.0
3/9/2016
14.4
11.3
8.1
4.9
1.6
-1.6
-4.9
-8.1
-11.3
-14.4
-17.4
-20.4
-23.2
-25.9
-28.5
27.2
24.7
22.1
19.4
16.6
13.7
10.7
7.7
4.6
1.5
-1.5
-4.6
-7.7
-10.7
-13.7
-16.6
-19.4
-22.1
-24.7
-27.2
26.0
23.6
21.0
18.4
15.8
13.0
10.2
7.3
4.4
1.5
-1.5
-4.4
-7.3
-10.2
-13.0
56
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
396
397
398
399
400
16.5
19.5
22.5
25.5
28.5
58.5
58.5
58.5
58.5
58.5
60.8
61.7
62.7
63.8
65.1
3/9/2016
-15.8
-18.4
-21.0
-23.6
-26.0
57
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
11.3 Appendix C: Data Sheets and Whitepapers
11.3.1
Anaheim 24Y504S-LW8 Stepper Motors
58
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
59
Rev. 0.1
11.3.2
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
Anaheim MBC12101 Stepper Controller
60
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
61
Rev. 0.1
11.3.3
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
Watlow Silicone Rubber Heaters
62
Rev. 0.1
11.3.4
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
Omega 4-Zone Multiloop Controller
63
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
11.3.5
NetBurner MOD5272 Development Environment
3/9/2016
64
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
65
Rev. 0.1
11.3.6
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
Square D Occupancy Sensor SLSPWS1277A
66
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
67
Rev. 0.1
11.3.7
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
Hitec HS645MG Servo Motor
68
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
11.4 Appendix D: Component Pricing Information
Manufacturer Part Number
Anaheim
24Y504SAutomation
LW8
Anaheim
MBC12101
Automation
Anaheim
PSA80V4AAutomation
1
SSR-100Watlow
20A-DC1
Watlow
Watlow
Omega
NetBurner
Buhl
Hitec
Total
Description
Unit Price
Quantity
Total Price
Stepper Motors
$76
2
$152
$198
2
$396
$200
1
$200
$31
4
$124
$73.85
3
$221.55
$70.40
1
$70.40
$522
1
$522
$299
$126
$55
-
1
2
1
-
$299
$252
$55
$2291.95
Stepper
Controller
Stepper Power
Supply
Solid-State
Relays
4”x10” Rubber
040100C1
Heater
3”x10” Rubber
030100C1
Heater
4 Zone MultiCN1504
loop Controller
MOD5272 Microcontroller
BAV-4226C
Cart
HS645MG
Servo Motor
-
69
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
11.5 Appendix E: Figures and Tables List
Figure 3-1: Coverage Area, Top View …………………………….…………….
Figure 3-2: Coverage Area, Side View ………………………………………….
Figure 3-3: System Overview Block Diagram …………………………….…….
Figure 3-4: System Interface Diagram …………………………………….…….
Figure 3-5: System Operational Diagram ……………………………………….
Figure 4-1: Component Interaction Block Diagram …………………….……….
Figure 4-2: Robotic Arm Operational Flowchart ………………………….…….
Table 4-1: Ethernet Protocol for Arm Movement ……………………………….
Figure 4-3: IR Emissions with Respect to Temperature …………………………
Figure 4-4: Infrared Range of Electromagnetic Spectrum ………………………
Figure 4-5: Peak Emitted Wavelength Calculation of Human Skin …………….
Figure 4-6: Human Infrared Emission Spectrum ……………………….……….
Figure 4-7: Comparison of Human Arm IR Spectrum to Robotic Arm …………
Figure 4-8: Stepper System Power Connections …………………….……….….
Figure 4-9: Heating Element Power Connections ………………………….……
Figure 4-10: Overall System Power Connections ……………………………….
Figure 5-1: Turntable System Diagram ………………………………………….
Figure 5-2: Diagram of Cell 107 from Coverage Pattern Standards …………….
Figure 5-3: Sensor Circuit Diagram ……………….…………………………….
Figure 6-1: Active GUI Example ….…….…………………………………...….
Figure 7-1: GUI Operation Flowchart ……………….……….………….………
8
9
10
11
13
16
17
18
24
25
25
25
26
28
29
29
32
35
38
39
43
70
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
11.6 Appendix F: Project User’s Manual
11.6.1
Introduction
This guide will help you configure and control the Square D Robotic Arm and Turntable
Sensor Testing Assembly.
11.6.2
Preparing the Hardware
Before connecting the power or turning on either the robotic arm or the turntable, connect
two Category-5 RJ-45 cables from the Ethernet plug-on modules on each of the two
microcontrollers to two Ethernet wall jacks. Once this has been done, ensure that the
robotic arm is positioned facing downward with the vertical motor in the exact center of
the cart. In other words, the robotic arm should be positioned such that raising the arm
will cause it to face directly outward, perpendicular to the cart. Now, plug in both
assemblies and switch them on.
11.6.3
Preparing the Software
First, the IP addresses of the robotic arm and turntable assemblies must be discovered.
To do this, start the utility called “IPSetup.exe” which can be found in the Robotic Arm
GUI directory. Once the following screen appears, click “Search Again”.
The two assemblies and their corresponding IP addresses should appear in the right-most
pane. Now start the Control GUI Program entitled “Robotic Arm Control Interface.exe”.
Once initialized, go to “Connect->Change Destination Address” and enter the correct IP
addresses as found in the IP Setup utility into the following dialog box:
71
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
Click “OK” and then click the “Connect” button. You will now be connected to both the
robotic arm and turntable assemblies.
11.6.4
Operation
When connected, the GUI controls will become enabled, allowing you to click on any of
the buttons. The arrow buttons at the top left of the GUI window allow for manual
control of the robotic arm. The “Reset Arm” button will return the arm to its resting
(down-center) position from wherever it may currently be positioned.
The speed controls beneath the manual robotic arm controls allow for the speed of motion
of the robotic arm to be changed. You may either select one of the three presets (Fast,
Medium, Slow) or enter any speed manually in the manual speed entry box. Click “Set”
to send the new arm speed to the microcontroller, enabling motion at this new desired
speed. Note: If you do not press “Set”, the speed will not change.
The manual controls for the turntable are located at the very top bar of the GUI. The
desired absolute angle can be entered manually into the degrees box or can be selected by
pressing the up/down arrows on the right side of the box. Press the “Rotate” button to set
the turntable to the desired position.
The automated testing grid located on the right side of the GUI will only be enabled if
both the robotic arm and turntable are connected simultaneously. Note that it is possible
to connect only one assembly or the other, but only the controls for the connected device
will be enabled. The automated testing grid should first be customized before use. To do
this, select “Specify Grid” on the menu bar. This will cause the following dialog box to
appear, indicating that you are now in grid customization mode:
72
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
While in this mode, you will be able to select which cells should not be allowed to be
tested using the current grid specification. When a cell is disabled, it will turn gray,
indicating that it can no longer be clicked. When you have finished customizing the grid,
click the “Done” button picture above and you will be returned to normal operation
mode. (Note: Grid customization can be performed even with no devices connected.)
Once back in normal operation mode, you are free to move the arm or turntable manually
however you wish. It should be noted, however, that only certain arm motions are
allowed; therefore, if the arm seems to not be responding to a manual direction button
press, then that motion may not be allowed. Also, the turntable is only able to rotate in
the range from -90 to 90 degrees in steps of half-degrees.
The automated testing grid provides two functionalities to the user. The first
functionality is accessed by simply clicking on any of the desired cells you would like to
test. When you click a cell, the GUI will prompt you to move the robotic arm a certain
distance from the turntable assembly. Take care to ensure that the robotic arm is set at
precisely this distance and that it is perfectly aligned with the turntable, with the arm
facing the sensor directly. Once you press “Ok”, the sensor will automatically rotate to
the necessary angle, and the robotic arm will commence testing through all of its possible
motions, recording whether or not the sensor was activated for each motion. Please note
that every time the sensor is activated, the arm will wait until the light turns off again
before continuing to test this cell. Once the cell testing is complete, the cell will either
turn green or red, depending on whether any of the motions caused the sensor to be
activated or not.
The second functionality provided by the automated testing grid is the ability to run an
almost fully automated grid test. Simply press the “Run Full Test” button in the bottomright corner of the GUI to start this test. This will test every cell that has been left
enabled in the testing grid one at a time. The only user intervention required is to
manually position the robotic arm at certain distances away from the turntable as
specified by the GUI at intervals. Once the entire test is complete, the entire testing grid
should be either red or green.
The results of a test (full test, multiple cells test, or single cell test) can be exported and
viewed in a variety of formats. The simplest format is a text file which will simply print
the entire test grid into a text file and insert an ‘X’ into the cell if the sensor was not
activated, an ‘O’ if it was activated, or leave it blank if it was not tested. To access this
functionality click “File->Export as Text File…”. In addition, the results can be exported
73
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
to a spreadsheet which may be more aesthetically pleasing and easy to read. To do this,
click “File->Export as Spreadsheet…”. This will create a spreadsheet in which the
disabled cells will be colored grey, the sensor-activated cells will be colored green, the
non-activated cells will be red, and the non-tested but enabled cells will be white. The
final format for saving data is to export a text file including detailed results of each test.
Click “File->Export Detailed Results” to do this. This will create a text file that will not
only tell you if a certain cell test activated the sensor, but also tell you exactly which arm
movements within each cell activated the sensor and which did not. Note that you will
have the option of choosing where to save each of these files whenever you click the
appropriate export option.
Finally, the entire testing configuration can also be saved to be loaded again at a later
date. This may be useful in a number of cases. For one, if you have customized a testing
grid and do not want to have to re-customize this grid every time the software starts, you
can save the configuration to a file and load it every time you want to use this testing
grid. Also, if you are in the middle of a test and need to quit and continue testing later,
saving the configuration also saves any test data that you may have acquired up to this
point, allowing you to continue testing at a later date or time. To save a configuration,
simply click “File->Save Configuration As…”, and to load a configuration, click
“File->Load Configuration…”.
When you are done testing the arm and turntable, press the “Disconnect” button to return
the arm to its default position and quit the program.
11.6.5
Troubleshooting
Problem: The GUI cannot find one of my connected devices.
Solution: You have most likely entered the IP address of the device incorrectly. First,
ensure that you know the correct IP address of the device in question. To do this, start
the IPSetup.exe utility found in the GUI program directory. Your connected devices
should appear in the right panel with the corresponding IP addresses. If your device is
not appearing, refer to the next problem-solution set. Once you have ensured that you
know the correct IP address of your device, start the GUI program and once initialized,
click “Connect->Change Destination Address”. Enter the correct IP address into each of
the connected device’s corresponding boxes. Also, ensure that the port number for both
devices is 24321 (unless you have explicitly altered this value within the
microcontroller). Click OK and you should now be able to connect to the your devices.
Problem: My device is not appearing in the IPSetup.exe utility.
Solution: First, ensure that all of the microcontrollers and the PC are correctly and
securely attached to the Ethernet network infrastructure. Also, note that the devices and
the PC must be connected to the same sub-net. In other words, they must have the same
network number to be found. If all of the above conditions are true, you should try
unplugging the microcontroller in question, letting it sit for at least 5 seconds, and then
plug it back in and let it acquire an IP address. Try searching again and your device
should be found.
74
Rev. 0.1
Square D: Improved Robotic Arm and Turntable Project
3/9/2016
Problem: I get an error message when I try to export results as a spreadsheet.
Solution: The reason for this error message is that one of the required program files was
either corrupted, moved, or deleted. The program file in question is called Template.dat
and should be located in the GUI program directory. If you inadvertently moved this file,
simply move it back to the root of the program directory, and spreadsheet export
functionality will be restored. If the file was corrupted or deleted for any reason, you will
need to re-install the software.
Problem: The arm or turntable is connected, but does not respond when told to move.
Solution: There may have been an error during communications or transmission which
has caused the robotic arm’s microcontroller to enter into an unstable state. To remedy
this, simply disconnect from the microcontroller by clicking “Disconnect” and then try
reconnecting. If the arm still does not work, you may need to unplug the microcontroller
and then plug it back in to reset the firmware.
Problem: The arm does not appear to be moving to the correct positions.
Solution: The arm was not in the correct position when the microcontroller was
initialized. Disconnect from the device, unplug the microcontroller, move the robotic
arm to the correct starting position (down-center), then plug the microcontroller back in.
The stepper motors will charge and hold the arm in the correct starting position.
Reconnect to the robotic arm and begin testing.
Problem: The GUI program hangs or stops working.
Solution: Force shut down the program, unplug all devices, and start from scratch.
75
Download