====== RB5 External Device Usage ====== **Author:** Email: \\ **Date:** Last modified on <02/07/23> \\ **Keywords:** RB5 manipulator, RB5 Programming, collaborative robot \\ {{ youtube>UM-zWlZEces?medium }} The video above depicts the goal of this tutorial The RB5 already have collision detection and gravity compensation mode built in that allows it to work collaboratively with human. However, it doesn't have any Force/Torque sensor. I added the F/T sensor and implement compliance control algorithm and tested it. This tutorial introduce how to connect External sensor on RB5 controller and how to get the external sensor data from RB5 controller to PC and how to use that data for control RB5. ===== Prerequisites ===== Before starting this tutorial, the author assumes you either: * Understand basic robotics knowledge In previous tutorials, we learned how to control RB5 with external script control. In this tutorial, we will learn how to connect an external sensor to the RB5 to import sensor data and to control the RB5 based on the sensor data. The rest of this tutorial is presented as follows: * Hardware * Connecting ROBOTIQ Sensor to RB5 * Get the sensor data from RB5 controller using script code * Control the RB5 based on sensor data * Final Words ==== Hardware ==== To complete this tutorial, you'll need the following items (shown in the image below from left to right) * Robotiq FT sensor * Robotiq FT sensor adaptor * Robotiq FT sensor extension code * RS-485 to usb device * RB5 GPIO connector {{:bskim:rb5_tutorial:robotiq.png?600| }} ===== Connecting Robotiq sensor ===== Before connecting sensor, we need to make adaptor to attach the sensor to RB5 end flange. we can design our adaptor refer to FT sensor and RB5 flange's dimmension {{:bskim:rb5_tutorial:rb5-850_tool_flange-2d.pdf|rb5-850_tool_flange-2d}} {{:bskim:rb5_tutorial:3.3_rb5_850.zip|rb5_850 dimmension}} {{:bskim:rb5_tutorial:ft300_coupler.png|}} after we make adaptor, we need to wire sensor extension code and RS-485toUSB and RB5 GPIO connector. this is information of FT sensor, we can wire it refer the document.(sometime wire colours are different with the manual, please make sure which wire is what, using multi-meter.) {{:bskim:rb5_tutorial:ft_sensor_instruction_manual_pdf_20181218.pdf|ROBOTIQ_FT300_manual}} this is the example {{:bskim:rb5_tutorial:robotiq_wire.png?400|}} after that, we connect RS485toUSB with RB5 USB port(on the front pannel) and turn on the RB5. After connecting the device, set the external F/T sensor to Robotiq F/T300 in Setup > Interface through the Ui program. {{:bskim:rb5_tutorial:ft_connect.png?600|}} also set boot up I/O port No.0 to High in Setup > I/O2 > Boot-up Output, this make the No.0 Output port voltage 24V when you boot RB5 to supply power for the sensor. {{:bskim:rb5_tutorial:io-setting.png?600|}} After completing the setting, reboot the system. If the hardware wiring and software settings are well done, you can check the sensor value at the bottom of the Make page. {{:bskim:rb5_tutorial:guisensordata.png?600|}} {{ youtube>_or4fP79u_A?large }} ==== Exercise ==== * Design and make your own FT sensor Adaptor using CAD program. * Connect the FT sensor to RB5 and demonstrate the measurement of the FT sensor data in the GUI ====== Get the sensor data from RB5 controller using script code ===== In previous tutorials, we learned [[rb5_advanced_programming#External Connection|how to request and receive data from RB5 controllers]] over TCP/IP communication. If you look at the data below, you can see a more detailed reqdata structure, which includes data from external FT sensors from 488 bytes of Shared_data. {{:bskim:rb5_tutorial:reqdata_structure_4.3.1_eng.pdf|}} {{:bskim:rb5_tutorial:reqft.png?400|}} ==== Exercise ==== * Demonstrate to get FT sensor data using script command on your Laptop, using python, C++ or something. * Change and printout the FT sensor's coordinate system based on the global coordinate system using a rotation matrix. ====== Final Words ====== For questions, clarifications, etc, Email: