Electronics Simulation End Effector Networking
Table of Contents
This project, #RoboFly, demonstrates that flythroughs are no longer exclusively for digital models. Equipped with an iPhone 6, the robot broadcasts cinematic swoops around student work. With a sensor activated toggle, a public interface is created to switch between paths of movement. The live feed form the iPhone6 camera was broadcast to multiple screens.
KR 9 R600
Electronics
orbiting the models. This portion covers the use of electronics to communicate live wit the robot during our installations. To create the interaction between robot and audience members for the open house and centennial celebrations, we used switches to control the digital inputs of the robot. The first iteration was a simple switch, the second iteration a capacitive sensor that acted as the trigger. Activating the trigger would toggle the reading for digital input values which were programmed to be read in the code causing a shift between two paths that were KR 9 R600
KR 9 R600
For the first iteration we were slowed down by iterations on the switch. This resulted in using a simple mechanical switch that would open and close the circuit allowing the switching of digital inputs read by the robot. To make this work, wire was ran from an output of the robot (24 volts) through the switch then back to an input in the robotic module located under the table. As the button was pressed, the input would switch causing the program to change. More detail on this can be located in the coding section.
KR 9 R600
KR 9 R600
During the Centennial Celebration we pushed the development of the button, with a large help from Justin. The new iteration of the button used a capacitive sensor on a microcontroller board that read the signal of current running through the large copper diamond. When a hand is placed on this pad, the current changes causing the board to registed the shift in values to change its digital output and thus changing the action of the robot. To make this work, the microcontroller was connected to the robots input box located underneath
the robot’s table. The board was also developed to display which state the input was by using LED’s. The leds read the same input value from the sensor that the robot was reading, alternating between blue and green to showing which status it was in. Green showed while the button was pressed and blue while it was in its default mode.
KR 9 R600
KR 9 R600
For the first iteration we were slowed down by iterations on the switch. This resulted in using a simple mechanical switch that would open and close the circuit allowing the switching of digital inputs read by the robot. To make this work, wire was ran from an output of the robot (24 volts) through the switch then back to an input in the robotic module located under the table. As the button was pressed, the input would switch causing the program to change. More detail on this can be located in the coding section.
The board itself used two mosfets that would open and close based on the amount of current moving through the devices. The pads connected to the mostfets were connected to the copper pad that was receiving voltage. The code for the microcontroller would set a default value based on its reading of the empty pad then measure the change when someone would touch the pad allowing the controllor to sense interaction.
KR 9 R600
DEF MAINPROG() IF Z==0 THEN STARTMOTION() ELSE IF Z==1 THEN NEWERMOTION() Z=0
DEF PAN() EXT BAS (BAS_COMMAND :IN,REAL :IN ) DECL INT i DECL AXIS jpos ;******SETTINGS FOR PTP MOTION***********************
ELSE IF Z==2 THEN STOPSTARE() Z=0 ENDIF ENDIF ENDIF
;******SETTINGS FOR LIN AND ARC MOTION*************** ;******SETTINGS FOR POSITIONING CRITERIA*************
END
$BASE={X 350,Y 0,Z 100,A 0,B 0,C 0} $TOOL={X -30,Y 63,Z 200,A 0.00000,B 0,C 0.00000} $ADVANCE = 3 $APO.CDIS=10 INTERRUPT DECL 3 WHEN $IN[8]==FALSE DO STOPMOTION() Z=0 COUNTER = 0 SPEEDY = 10 jpos = {AXIS: A1 0,A2 -90,A3 90,A4 0,A5 0,A6 0} PTP jpos ;PTP {X 500.0000,Y 100.0000,Z 650.0000,A 180.0000,B 0.0000,C 180.0000} INTERRUPT ON 3 LOOP MAINPROG() ENDLOOP END
DEF STOPMOTION() BRAKE WAIT SEC 0.012 COUNTER = COUNTER +1 IF COUNTER == 3 THEN Z=2 COUNTER = 0 ELSE Z=1 ENDIF RESUME END DEF STOPSTARE() SPEEDY = 20 PTP {AXIS: A1 0,A2 -90,A3 90,A4 0,A5 0,A6 0} PTP {X 276.202043621691,Y -202.057223221599,Z 300.129133438542,A -89.7567502257004,B 0,C -180} WAIT SEC 3 COUNTER = 0 SPEEDY = 10 END
KR 9 R600
Simulation Additional Timers and Counters were used to embed more intelligence in the main program, The code uses an interrupt ie, assigning more conditions statement based on an input to based on button activity, toggle between one toolpath however this approach required and another. The main program an evaluation of multiple is essentially a series of conditional statements based on variables outside the main program pointer. The problem of the value of the global variable multiple flows of code running ‘Z’. Each time the button is simultaneously can be solved by pressed, or input 8 is true, Z is given a new value and cycles to the use of cyclical flags however these are meant to be used as another toolpath. booleans based on a reaction to inputs, instead of variables This part of the code was written explicitly, while the within the program. toolpaths themselves were output from scripts developped in grasshopper which translates points and planes into meaningful linear and point to point traverses in krl. CODE STRUCTURE
KR 9 R600
GEOMETRY SETUP The premise of the excercise was to use the robotic arm to produce a flythrough of unexpected and interesting views of an architectural model. To that end, a flight path was produced which would simultaneously travel about the object and fit within the payload of the robotic arm. The path was divided such that a smooth transition could occur between one point along the curve and another so that the geometry being fed to the robotic arm was a series of points and planes of high density. The segment of the grasshopper script above generates a flight path based on a number of
control points, and constructs planes at each point in the motion of the robotic arm. TOOLPATH SETUP Once the geometry is developed, the krl toolbox plugin is used to translate points and planes into structures of code the KRL compiler will understand ie {X Y Z A B C}. There are two components that facilitate this and a format component that will organize the geometric input into a set of strings. The plane coordinates provide X Y and Z locations and the Euler Angles component translates the plane orientation into pitch yaw and roll or A B C. The format component provides a structure
for each linear translation: LIN {X (0) Y (1) Z (2) A (3) B (4) C (5)} C_DIS WORKFLOW The panel data is copied and placed in a subroutine in the krl coding environment. Before executing the code, Kuka Sim Pro is used to test for singularities and limit switch errors. These occur if the planes from one linear translation to another change drastically, if the position of the plane is too far away or too close to the robot. Adjustments to either the flight path or the base are solutions to this problem.
The grasshopper to krl setup does not optimize to avoid singularities, in the manner that mastercam might. Therefore there is a tradeoff between more control in the way a geometry is discretized in grasshopper versus the default subdivision routines that mastercam uses but mastercam offers more tools to control how the robot moves along a toolpath. Toolpath generation in mastercam or grasshopper is therefore project dependent.
KR 9 R600
End Effector
KR 9 R600
Department Audio Visual Control Interface
Department Plazma Screen broadcast
Ipad Broadcast
USH M
Iphone 6
E
P
Public Interrupt Interface
Copper Sheet
Controller
KR 9 R600
Networking
the robot, a 3 way call through skype was initiated with 2 other devices. This allowed the realtime capture from the iphone to be broadcast simultaneously to the iPad’s skype account that was visible through the hallway, For reasons of safety, the robot was kept in a room that was only and the skype account set up visible from the public hallway on the central audio/visual communications center for the through a glass wall. With the department that broadcast it to capacitive sensor on the inside the department TV screens. of the glass, a vinyl graphic on the outside denoted where the user could engage the trigger. Issues with this included audio feedback when mute was not The trigger would cause a enabled, short battery life on the physical interrupt. iphone, broken connections, poor With the iPhone mounted onto video quality. in order to engage a public, the project required an interface and a means of broadcasting the flythroughs throughout the department.
KR 9 R600