scieee AI-readable full text Open interactive document viewer

Design and development of an innovative drawing robot for @Bristol science Museum

Cabo Pitarch, Guillem

Abstract

[EN] Development and implementation of a vertical drawing robot or autonomous V-plotter for represent the energy generated by the roof top solar array of AT-Bristol Science museum with artistic patterns. This project has been performed as part of internship at Matt Venn Engineering and with the support of RS

Full text

BACHELOR'S DEGREE IN INDUSTRIAL ELECTRONICS AND AUTOMATION ENGINEERING|ETSID DESIGN AND DEVELOPMENT OF AN INNOVATIVE DRAWING ROBOT FOR @BRISTOL SCIENCE MUSEUM AUTHOR: GUILLEM CABO PITARCH TUTOR: DR. D. VICTOR SANTIAGO PRADERAS COTUTOR:D. MATTHEW VENN SEPTEMBER 2016 1 ABSTRACT Development and implementation of a vertical drawing robot or autonomous V-plotter for represent the energy generated by the roof top solar array of AT-Bristol Science museum with artistic patterns. This project has been performed as part of internship at Matt Venn Engineering and with the support of RS Components. RESUMEN Desarrollo e implementación de un robot de dibujo vertical o V-plotter autónomo que representa la energía generada por las placas solares del museo de ciencias AT-Bristol en patrones artísticos. Este proyecto se ha realizado bajo el convenio de prácticas con la empresa Matt Venn Engineering y con el patrocinio de RS Components. RESUM Desenvolupament i implementació de un robot de dibuix vertical o V-plotter autònom que representa l’energia generada per les plaques solars del museu de ciències At-Bristol amb patrons artístics. Aquest projecte se ha realitzat baix el conveni de pràctiques amb l’empresa Matt Venn Engineering y el patrocini de RS Components. 2 3 ACKNOWLEDGEMENTS Special appreciation to my family and Elena for believe in my and encourage me to do my best every day. I want to this opportunity to gratefully acknowledge to Matt Venn, Angel Andres Palau and the other colleges of the co-working that help me day by day to grow as engineer. Thanks to all the other people involved in this project here, in Valencia, and in Bristol. 4 5 INDEX 1. Introduction and objective __________________________________________ 10 2. Description ______________________________________________________ 11 2.a State of the art ______________________________________________________ 12 2.b Customers specification ______________________________________________ 14 2.c Project agreement ___________________________________________________ 15 2.d Sponsorship agreement ______________________________________________ 19 2.e Technical specifications _______________________________________________ 20 3. Project development ________________________________________________ 22 3.a Simulations ________________________________________________________ 23 I. Tensions ___________________________________________________________________ 23 II. Errors _____________________________________________________________________ 25 3.b Software ___________________________________________________________ 27 I. LinuxCNC/Machinekit configuration _____________________________________________ 27 II. Communications ____________________________________________________________ 29 III. Pattern generation ___________________________________________________________ 30 3.c Mechanical design ___________________________________________________ 37 I. Cabinet & frame _____________________________________________________________ 37 II. Gondola ___________________________________________________________________ 38 III. Motors setup _______________________________________________________________ 43 IV. Paper roll __________________________________________________________________ 46 V. Guide pulleys _______________________________________________________________ 48 VI. Charging Station _____________________________________________________________ 50 VII. Calibration tool ___________________________________________________________ 51 VIII. Other parts _______________________________________________________________ 52 3.d Electronics _________________________________________________________ 53 I. PSU _______________________________________________________________________ 53 II. BeagleBoneBlack ____________________________________________________________ 53 III. BBB breakout board __________________________________________________________ 55 IV. Gondola ___________________________________________________________________ 57 V. Big digits ___________________________________________________________________ 58 VI. Charging setups _____________________________________________________________ 58 4. Plans ___________________________________________________________ 62 5. Budget __________________________________________________________ 73 6. Review and future improvements ____________________________________ 76 7. Conclusions ______________________________________________________ 78 8. Bibliography _____________________________________________________ 79 APPENDIX I, QUICK SETUP USER MANUAL _______________________________________ 83 6 APPENDIX II, MATLAB CODE ______________________________________________________ 89 APPENDIX III, RESUME OF SIMULATIONS AND DESIGN PARAMETERS _____________________ 113 APPENDIX IV, MACHINEKIT CODE MODIFICATIONS ________________________________ 117 APPENDIX V, PCB SCHEMATICS _____________________________________________ 133 APPENDIX VI, PLANS OF OTHER MECHANICAL COMPONENTS __________________________ 143 13 computer and it get good results, but actually there are interesting versions running on Arduino and single-board computers. 14 2.b Customers specification The customer, At-Bristol, located at Anchor Road, Harbourside, Bristol ,BS1 5DB. Specify the following requirements: Delivery and installation:  The robot shall be installed before 21 July.  Foyer is open to public seven days a week and installation must be performed out of normal operating hours, and trying to avoid to use bulky equipment as scaffolding towers if it is possible.  The museum is interested in use as drawing surface the black wall of the foyer and use chalk or removable ink.  Warranty/technical support agreement for bigger issues and advanced maintenance shall be provided. Design requirements:  The robot will be a permanent installation that will be placed at the foyer of the museum, for that reason the machine shall be reliable and robust.  The drawing area of the robot shall be around 200 cm2. And the maximum dimensions of the robot shall be 300 cm wide by 200 cm height.  Maintenance task as clean the wall and change the batteries shall be performed as maximum once a week.  The drawings shall be done every two minutes. Safety requirements:  Even if is not allow to touch the machine the project shall consider the consequences for the machine and guaranty the safety of the public. Safety test will be defined and executed by the safety team of the museum after installation. This test can include:  Safe visitor interaction  Operation  At-Bristol Design risk assessment  At-Bristol In-situ risk assessment At-Bristol resources available:  Local maintenance team that can be trained for perform common trouble shooting and simple fixes.  Graphical representation of the data can be performed by in-house graphic team if a specific input file type is provided. 15 2.c Project agreement Parts of the agreement: This agreement concern two parts, the purchaser represented by At-Bristol with physical address Anchor Road, Harbourside, Bristol ,BS1 5DB. And the supplier Matt Venn based at Carrer de la República Argentina, 22, 46021 Valencia. Hereinafter together referred to as the Parties 1.Objective and scope  At-Bristol will purchase a customized V-plotter from now on called Energy Drawing Robot or Energy MegaDrawz from Matt Venn.  Chris Dunford, Sustainability Engagement manager will act as project manager for At- Bristol and Andy Cocco, Senior Design Engineer will have responsibility for signing off the final design of the exhibit.  This agreement regulates the rights and obligations between parties, regarding design, purchasing and installing the exhibit in At-Bristol. 2.Scope of Delivery  The Agreement includes the following Exhibits being supplied to At-Bristol Exhibit name: X0339-1 Energy robot 3.Subcontractors  The Supplier is entitled to use subcontractors been the supplier the responsible to fulfil the conditions established in this agreement. 4.Price and payments  The amount destined for the project Energy MegaDrawz with reference name X0339-1 Energy robot is GBP £3.600 included development, delivery and installation, been this the total amount provided by the museum.  Cost of on-going consumables is covered by the purchaser.  The payment will be distributed as follow: o 50% on signing of this Agreement. o 40% after shipment o 10% when the acceptance form is signed by both Parties.  Payment shall be made 60 days after receipt of invoice.  The invoice shall be marked: PO#110284 X0339-1 Energy Robot and sent by email to: chris.dun[email protected].uk & [email protected] 5.Packagin and liability  The supplier is responsible of the damages produced on the Exhibit X0339-1 Energy robot before the delivery, installation and testing. This section does not exclude the supplier from the subjection of other sections. 16 6.Procedure  The Supplier is obligated to comply with the following: o Comply the essential features of the final design specified at the end of this document. o Design, develop and produce the Exhibits, incl. documentation and O&M manual. o Report progress and quality to At-Bristol o Pack the Exhibit and prepare it for transport. o Transport the Exhibits to At-Bristol’s building o During the warranty period (12 months), repair any defects to the Exhibit reported. o Provide training in the maintenance and operation of the Exhibits to At-Bristol’s employees. 7.Reporting of faults and defects  Any faults and/or defects of the Exhibits shall be reported to the Supplier within a reasonable time after the fault and/or defect has been discovered by At-Bristol.  The Supplier shall repair the faults and/or defects within 10 days after the faults and/or defects have been reported.  Modifications or maintenance procedures not specify by the supplier can avoid the warranty. 8.Customer rights  On signing of this Agreement, At-Bristol shall have all rights to the maintenance and further development of the Exhibit. 9.Intellectual property rights  At-Bristol have all rights and ownership to trademarks, copyright, design, graphics and expression of the ‘Robot Encounters’ programme.  The Supplier shall guarantee that the Exhibit is brand new and manufactured for the purposes of At-Bristol. The Exhibit shall not be encumbered with any third-party rights, including any rights arising from copyright and related rights.  The Supplier will provide At-Bristol with a non-exclusive license, unlimited in time, for the Exhibit. The Supplier is entitled to use the Exhibit in other marketing. 10.Delivery  The Supplier shall deliver the Exhibits to At-Bristol, Anchor Road, Bristol.  All the cost derived from transportation shall be included in the contract costs.  Supplier shall provide the exhibit following the deadlines stablished in section 11. The supplier will cover any financial loss that can derivate from the delays in the project. The maximum compensation that can be required by the purchaser will be of 0,1% of the price stablished for the project in section 4, for each day of delay. 17 11.Time schedule  The supplier shall accomplish the goals stipulated in the following schedule:  Order shall be confirmed before begging of May 2016.  The specifications must be fix by the parts before May 15th 2016.  Between 15th of May and 15th of July 2016 the progress of the project must be communicated to At-Bristol twice a month.  The exhibits must be delivered, installed and tested before 21th of July 2016 12.Assisting workers  The purchaser will provide personal for oversee the power installation, perform the safety test and other task explicitly required in this agreement. 13.Safety regulations  The Working Environment Act and Regulations for Systematic Health, Safety and Environmental Activities in Businesses (HSE Regulations) applies to the location of the Exhibit. The parts shall ensure that all activity complies with these regulations. 14.Transfer of possession  The possession of the Exhibit shall be transferred with full functionalities to At-Bristol on the 22nd July 2016 in other case section 7 and 10 shall by applied and the procedure of transference will be delayed. 15. Duration  The exhibit shall be designed to have a lifespan between 3 and 5 years and the warranty period shall be equal to 12 months form transfer of the possession. Final specifications The parts have agreed the specifications of the exhibit X0339-1 Energy robot also referred as Energy MegaDrawz as follow: Delivery and installation:  The robot shall be installed before 21 July.  Foyer is open to public seven days a week and installation must be performed out of normal operating hours, and bulky equipment as scaffolding towers are not allowed.  The robot will be installed at the foyer, shall draw over a paper of one metre width.  The supplier does not guaranty full functionalities of the robot if a wired LAN connection is not provided, if this apply lack of functionalities will not be considered as breach of contract. 18  The installation of a standard BS 546 socket connected to electric circuit and placed behind the robot cabinet will be provided by the purchaser.  The drawing robot shall be floor standing but shall be securely attached to the wall. The supplier is allowed drill holes to the foyer wall when necessary.  Warranty/technical support will be provided for the first twelve months after possession is transferred.  Maintenance will be provided by the purchaser. The supplier will provide documentation for perform this tasks and at least one hour of training. Design requirements:  The robot will be a permanent installation that will be placed at the foyer of the museum, for that reason the machine shall be reliable and robust.  The drawing area of the robot shall be equal or greater to 150cm2. And the maximum dimensions of the robot shall be 300 cm wide by 200 cm height.  Maintenance task as clean the wall and change the batteries shall be performed as maximum once a week.  The drawings shall be done every two minutes.  The public front part of the cabinet shall be made of transparent acrylic, and the different electric and mechanical parts that form the system shall be visible. Safety requirements:  Even if is not allow to touch the machine the project shall consider the consequences for the machine and guaranty the safety of the public. Safety test will be defined and executed by the safety team of the museum after installation. This test can include: o Safe visitor interaction o Operation o At-Bristol Design risk assessment o At-Bristol In-situ risk assessment  The power supply shall be external, and a 30 mA Residual-current device shall be installed at the AC input by At-Bristol before final approval.  The exhibit shall be attached to the wall with M8 screws.  Aluminium extrusion for the frame shall be made with 40x40mm aluminium extrusion profiles or larger and connected to earth. This assembly shall be done with quick connectors.  The weakest point of the structure shall be able to hold a load of 750N and the height of the cabinet shall be greater than 750 mm.  Slots must be designed for avoid fingers to get stuck, this will be tested by the At-Bristol museum. 19 2.d Sponsorship agreement Figure 3 - RS Components This project caught the attention of RS Components in United Kingdom. The sponsorship agreement was stablished verbally over successive meetings. The conditions where stablished as follow: RS agrees to provide 1500 pound in material form their UK store and free shipping. Matt Venn engineering will record a series of videos documenting the development process, this videos will contain the RS logo. The head engineer of the project will write a blog post for RS that will be published after the presentation of the project. The logo of RS will appear in the description board of the robot while it is installed in At-Bristol museum. RS can record the robot and use this material without limitation. 20 2.e Technical specifications For this project we stablish some internal specifications in addition to the agreement specifications for reach the goals of the customer and guide the engineering team on the development. General Specifications  Final parts can be manufactured with 10mm acrylic, 6mm delrin, 3 and 5 mm aluminium, ABS or PLA 3D printed plastic.  Drawing speed shall be configurable and greater than 10mm/s.  Prototype of the robot shall be assembled locally for development and test.  Mechanical design shall be made with fusion 360 or Solidworks.  Pieces for laser cutter shall be exported to DXF and imported to CorelDRAW.  Pieces machined with CNC milling machine shall be exported to Fusion360. A qualified operator will generate the best tool path and machine the piece. Management • Task will be scheduled in the Trello platform. • On Mondays morning the schedule of the week will be discussed. • State of the project will be reported to AT-Bristol and RS Components twice a month. PCBs • Two sided PCBs with all the possible 1206 SMD components considering technical limitations. • Design with Ki-Cad or Eagle. • Visual and electrical inspections shall be performed before connexion with power supply or other systems. • M3 mounting holes shall be included. • Include extra pin out if is possible and alternative functions to reuse the hardware for other projects. Code  Split the code in functions for improve teamwork, maintenance and reusability.  When hardware is interfaced, create test files for check all the functions independently.  Use GitHub repositories for log the modifications. Frame • Renders of the design shall be provided to AT-Bristol before order the components. • The use of acrylic shall be reduced as much as possible. • Use standard connectors and profiles with guides for screw in. Gondola • Gondola PCB shall be smaller than 100mmx40mm. • Battery shall allow lift the actuator 303000 before discharge • Pen shall be easy to adjust without modifications of the actuator by maintenance team. • Gondola shall be tested for 200 hours before deliver. 21 Motors  The motors can be servos or steppers.  Simulation of the system shall be performed for determine their characteristics before buy the components. Paper mount  Design shall be optimized for reduce the amount of delrin necessary to build it. Acrylic cannot be used for structural parts.  Design shall allow to fit rolls between 30 and 90 mm of diameter.  -Replace the paper shall be a one-man task. String guides  Shall be designed thinking about appearance and reliability  Component shall be tested for more than 120 hours. Charging  Determine best option between inductive charge or contact charge.  Test for 200 hours 22 3. Project development This project has been developed as result of the internship at Matt Venn Engineering. Work as part of a small team has allow me to participate in almost all the parts of the process. This memory covers the main aspects of design in a general way for keep the cohesion and pays more attention to the sections where more work load was assigned to me. This section has four parts in function of their main subject. 29 Figure 8 - Axis GUI Linux CNC For add the autonomous function we add a python interface called bipod.py. That file allows to use the autonomous behaviour. This file integrates communications between parts as the gondola signal, interval between drawings, charging sequence, etcetera… II. Communications We can identify three communications systems in this robot. The first one is the communication between the BeagleBone and the developer, that as has been explained before can be done in several ways and is already implemented in the system. The second part is the communication between the gondola and the BeagleBone and the third one is between the server that receive the information obtained from the solar panels and the robot. The communication with the gondola has been made with a wireless connection using two xbee2. From the gondola an ATmega328p provide the signal of a capacitive sensor for detect if a visitor has interfered with the robot, the battery voltage. And a checksum. At the other side Linux does the checksum and if both are the same register the information for modify its behaviour if somebody touch the gondola or the battery go to low. At the same time a package is send back to the gondola for provide the position of the servo that drives the Z axis. The robot has communication with the data logger of the solar panels, a Sunny WebBox (15), through local network. The data of energy generation and status of the machine is send by Linux 30 to the CursiveData (16) server every two minutes. Energy data is transform to a graphical representation, exported to gcode and send it back to the specific folder that Machinekit. All the values are recorded in the server and displayed in a dynamic webpage powered by freeboard (17) . This online dashboard allows to monitor the input data, actual drawing, energy generation and other advanced parameters of the robot, position, errors, exceptions, temperature, etc... Figure 9 - Robot dashboard on Cursivedata server (18). III. Pattern generation LinuxCNC is designed for perform machining tasks for that reason the input files shall be written in g-code with the extensions .nc, .ngc or .gcode. The axis GUI have tools for transform pictures in JPG or PNG to this format nonetheless better and more predictable results are obtained with native gcode files. We have used several ways for generate the trajectories that we wanted to draw in each situation. General steps are design a drawing in vector format, export it to DXF and translate it to gcode, sometimes this process is not straight forward and require adjust the size, relocate the origin of coordinates and configure the program for export the gcode with the configuration of the target machine. We were interested to test the accuracy and reliability of our system for that reason we designed some complex geometrical shapes. The geometry allows to easily recognize mistakes and 31 distortions of the image and the intersection over the same points help us to check that the paper will not break due to the friction and excess of ink, moreover large files help to identify if the system have blockages or if mechanicals problems appear. We use Matlab, and several scripts where a polar function change over iterations and the output is plotted. This pattern generation files and some of the output results can be found in the virtual resources under the folder Pattern designs\Matlab. Figure 10 – Code and output of Matlab patter generation a.m. 32 Figure 11 – Set 1 of patterns generated with Matlab Once the files are saved in .SVG format they shall be scaled, reposition it according to the coordinates system that we are using in the robot and transformed to DXF. That has been made with the open source SVG graphics editor Inkscape (19). Once those tasks are performed the picture can be exported to gcode with several applications. In our case we use DXF2GCODE. Finally, this gcode can be loaded to the Machinekit. If the python interface is running the file shall be placed in the directory /tmp/gcodes, nevertheless if the axis GUI is enabled, we can search the file through any directory, preview the design, relocate it and start the drawing. 33 Figure 12 - Set 2 of patterns generated with Matlab Another way that we use for design test patterns was use Solidworks. We design 2D drawings that where saved directly to DXF. Those patterns where thought for evaluate the lifting mechanism of the gondola, the accuracy for draw straight lines and circles and the capacity for manage large files and long printing times. Some of this designs produce problems for transform it to gcode due to the large amount of segments used for draw accurate splines. For that reason, is useful avoid Text and export the designs as polylines instead of splines. 34 Figure 13 - testpat_cccc designed with Solidworks Those patterns where useful for understand the limitations of DXF2GCODE and spot some communications errors with the gondola and the BeagleBone and fix the movement in the Z axis. As experiment we develop a Matlab function that transform low resolution grey scale picture directly to gcode, the name of this function was png2gcode_4levels_horizontalfill.m and can be found in the virtual resources .Each pixel was transformed in to a set of lines in the gcode. If the pixel is black the maximum amount of lines is drawn and if its white nothing is done. 35 Figure 14 - Input image for png2gcode_4levels_horizontalfill.m Figure 15 -Trajectory generated with png2gcode_4levels_horizontalfill.m using figure 6 as input and web gcode simulatior nraynaud.github.io/webgcode/ Despite of the potential of this gcode generator we decided to stop the development for put more effort in other parts of the project and keep the source code for future projects. The last way of generate the drawings is the option used in the usual operation mode of the V- plotter. We have a stream of data that is collected by the robot. That information is delivered to the server of CursiveData, the information is transformed in to a drawing, when more energy is 36 generated the shapes become larger and more intricate. The drawing is now exported to gcode and send it to the robot. Finally, the robot checks if there is an incoming file and runs the gcode. Every petal is generated with intervals of two minutes, and only the gcode corresponding to this petal is sent every time. Figure 16 - Petals pattern generated by CursiveData sever from the solar panels energy generation of AT-Bristol museum from 22 to 28 of September. 37 3.c Mechanical design These decisions have help to increase the performance of the robot and fulfil the safety specifications, furthermore the design required to be attractive and reliable and was bounded to the limitations of machinery, costs and time. The prototypes described in this chapter have been designed for be able to manufacture them with a laser cutting machine, 3D printer and a lathe. At the same time the designs shall be doable with small changes on a CNC drilling machine for get a better finish. I. Cabinet & frame This is the largest structure of the project and was modified several times for meet the needs of supplier and provider. Cost, and appearance where fundamental but also the safety was a main topic specially with the anchor points. Figure 17 - Render of the final design approved by both parts The plans of this section are available on Appendix VI, Mechanical components. And are labelled with the initial letter F. The cabinet has a structure of 40x40mm Rexroth aluminium profiles that allow easy assembly with T-nuts and quick connectors. The front part of the cabinet has two parts; the top part is covered with 3mm thickness transparent acrylic and contain the motors setup, 4 LED displays, the BeagleBoneBlack and circuit boards and the two power supplies. The lower part is used for store the tools for maintenance as the length setter for the pen, the stick for replace the paper, grease, along with others.This part is covered with white veneered chipboard and secured with a key. 38 As was stated in the specifications the structure stands on the floor but was also secured by two M8 screws on the top part. The paper is placed in the top side of the structure with a mechanism explained in subsection IV, Other elements, the paper is feed under an acrylic plate for keep it flat over the wood surface. After that it pass through a slot and is clipped to a beam in the lower part of the cabinet with two clamps. As was stated in section 2.c Project agreement the cabinet must be able to hold 750 N on the weakest point. Those points are located at 1/4th and 3/4th of the beams on the top part of the cabinet. They were tested with a load of 80 Kg without damage. II. Gondola One of the main elements of a V plotter is the actuator or gondola, the design of this part have huge effect on the drawing quality. From Matlab simulations we saw that the number of strings does not affect the tension distribution for the motors and working area. Oscillations are strictly related with the centre of mass and moment. On the one hand, three and four strings configuration can reduce wobbling, in contrast the number of strings increase complexity and made the design less robust, allowing that somebody touch the strings while the robot is drawing. The first question that we answer was which material was better for link the motors with the gondola. Other robots have used timing belts and sprockets but they are expensive and elasticity can introduce errors. Beaded cord is cheaper and still offer good accuracy but is not designed for engineering purposes and manufacturers does not provide strength values or lifespan. Our choice has been use a string made of Ultra High Molecular Weight Polyethylene or UHMWPE (20). This material is 15 times stronger than steel that allow us to use very thin light weight cords with really low elasticity. The string that we use was 1mm Dyneema with a nylon cover for protect the core from friction, breaking strength was greater than 550N and elongation at 1kg load, that was the expected weight of the gondola, tends to zero. Figure 18 UHMWPE Dyneema SK75 / SK60 properties. Graph provided by Mooring Solutions GmbH We build a simple gondola with three attachment point to check the differences between the setups of the picture above experimentally. 45 Adding a reduction gear and use a motor with high holding torque help use to solve also another problem. When the power of the motor is disconnected as the stepper has permanent magnets we get a detent (21) torque around of the holding torque that allow a smooth descend of the gondola to a safe position instead of fall freely and crash over the cabinet. Consequently we designed the final version of our motors setup with the experience obtained from the experimental setups and the simulations for obtain a reliable mechanism that increase the holding and detent torque of the motor, allow to wrap the same amount of string with each step and provide a one-bit encoder, crucial for determine the homing sequence required in each case. a Figure 29 - Render of the final motors setup Figure 30 - Details of the motor setup, on the left hand side there is the reduction gear and on the right hand side the sliding mechanism that activate the optical sensor and the aluminium spool where the string is wraped. The final motor setup that appear in the pictures above has a plate where the motor is mounted. This piece can slide up and down of the aluminium extrusion for adjust the tension on the timing belt that connect the motor and the belt pulley. At the lower part there are two delrin parts that hold straight a rod and a spindle. On the right side of the picture over this lines there is the 46 component that interrupt the optical sensor, when the motor is on the spindle force our piece to follow a linear displacement and that is used for identify if the string is coiled or not. IV. Paper roll The robot draws on a paper that shall be advanced weekly. For make this process easier we provide a structure on the top of the robot where a roll of paper can be attached, in that way the operator can unclip the ends of the paper located on the lower part of the cabinet and pull until the paper is replaced without the need of use a ladder to reach the top of the tree meters tall robot. Figure 31 - Render of the final version of paper roll holder This part requires to be locked automatically for avoid that the visitors pull down the paper. We use a ratchet mechanism powered with the gravity. The leaver has an asymmetrical design, the centre of mass is different to the rotation axis, this produce a rotational force and make the leaver engage with the cone limiting the movement. When the operator wants to pull down the paper he only needs to hang a stick that is hidden on the lower part of the cabinet to the external part of the laver, then the cone can turn freely. 47 Figure 32 - Paper roll mounting, open position at left hand side and lock position at right hand side. The cone design allows to use paper rolls with internal diameters between 30 and 90mm, fiving to the customer the flexibility of choose between different brands of paper rolls. Figure 33 - Paper roll assembly in At-Bristol at installation day. 48 V. Guide pulleys As the motors were located at the lower part of the robot inside the top part of the cabinet, we needed to send the strings to the top part of the robot and after that redirect them to the gondola. We must design a part that guarantee that if somebody lift the gondola the string will continue in the right place without getting stuck or even worst jumping out making the gondola fall. In addition, we were interested to keep the tension in the part of the string that come from the motors to the pulley even if the other side, from pulley to the gondola, was loose. That will make easier coil the string around the spool without mistakes. In the initial setups we use two acetal Pulley of 20 mm that guide the strings, they work smoothly and does not produce distortion of the drawings but where not able to keep the tension on the motor side. That make us think about implement a piece that provide enough friction for avoid that the string become lose on the motor side if somebody lift the gondola but still let us to draw when the gondola is hanging. We started designing a MDF plate where the pulley was attached. At the side of the motor we put two M3 screws that had a flat surface at the contact point with the string. We thought that changing the angle and number of turns that the string made around the screws will increase the friction as in the climbing devices used for rappelling but the results were not clear. We continue with this problem and we try to use a Perfluoroalkoxy tube, better known as PFA, inside a MDF sandwich instead of screws. This design was more aesthetic and guaranty that the string does not jump out of the place but the results continue without be good enough and for adjust the friction was necessary to make a new piece. The last experiment that we made for design a piece that hold the tension of the string was a CNC machined piece of delrin with a zig-zag slot with several inputs and outputs, in that way we were able to adjust the friction easily choosing the number of turns made at the interior of the piece. 49 Figure 34 -Delrin tension holder with adjustable friction With that design we saw how part of the tension remain at the motor side without become undone but we also detect a distortion in the circular shapes. As we were changed several components and the position of the motors the same day we thought that the problem was with the calibration, but we ignore the problem for the moment. After few days of intensive testing we detect damage on the cover of the string. We replaced again this component with the initial pulleys and the distortion disappeared. Knowing about this vulnerability we decided to include a capacitive sensor in the gondola for stop the motion if somebody touch it and set the rest position at the top of the frame. The pulleys where enclosed inside a Delrin case that allow to attach them to the Aluminium extrusion and guaranties that the wire does not get stuck at the joints. 50 Figure 35 - Delrin enclosure for the pulleys used to redirect the string at the top part of the robot VI. Charging Station As will be explained in section 3.d the charging setup changed from an inductive charging to a regular charging, where the connections where physical. This system has a dock on the top of the robot with two arms with a limited range of movement, the robot is preconfigured to rest at the charging station making contact with the charging pads on the gondola. 51 Figure 36 - Gondola at charging position The arms of the charging station can be adjusted and the design of the gondola guaranty that the battery cannot be short-circuited. For guaranty the reliability of this mechanism we bypass the bearings with wires and Silver Conductive Grease was applied to contact surface of the charger and the pads of the gondola. VII. Calibration tool The design of the pen holder was made thinking about the maintenance. The pen change must be done once a week. Our objective was make that procedure as easy as possible and avoid changes in the robot, for that reason the pen can be removed of the structure but an extra calibration tool was required for adjust the length. If the pen is not placed properly the quality of the drawings can decrease or the tip can be always in contact regardless of the motion of the Z axis. 52 Figure 37 - Render of the calibration tool for set the length of the pen VIII. Other parts In addition to the main functional components of the robot we designed other parts that we considered not relevant enough for require a complete section on this memory and have been included on the Appendix VI or virtual resources. Some of those components were only used for the prototypes or experimental setups. 53 3.d Electronics I. PSU For the robot we used two RS pro power supplies. The first one is a 156W 1 Output, Embedded Switch Mode Power Supply (SMPS), 24V dc, 6.5A and was used for drive the motors. The second one is a 54W power supply of the same type that the first one but with to outputs of 5V,2A and 12V,6A dc. Figure 38 - Robot at installation day, BeagleBoneBlack and BBBBBB PBC on the left hand side, 24V PSU on the middle and 12V PSU on the right hand side. II. BeagleBoneBlack This is a low cost, open-hardware and open-software single-board computer with an active community of users and compatible with Ubuntu. From the hardware point of view, we have an AM335x 1GHz ARM® Cortex-A8 processor, 512MB DDR3 RAM, USB client, USB host, Ethernet, HDMI, micro-SD adapter, 92 I/O pins and two Programmable real time units (PRU). 54 Figure 39 - Picture of BeagleBoneBlack by Gareth Halfacree (22) From the 92 I/O available we only use port P9. 1st func Pin number 1st func 2nd func gnd 1 2 gnd 3.3 3 4 3.3 led:power 5v 5 6 5v butt:power 9 10 butt:stop 11 12 butt:reset gondola charge 13 14 enable pulled high/low & with led ystep 15 16 ydir xstep 17 18 xdir n/a 19 20 n/a homex 21 22 homey gpio1 23 24 xbee: rx gpio2 25 26 xbee: tx gpio3 27 28 7seg: le gpio4 29 30 7seg: sdo gpio5 31 32 7seg: clk 41 42 7seg:not_oe servo:control gnd 43 44 gnd gnd 45 46 gnd Figure 40 - Pins used at BeagleBone for the robot and functions. 61 The board pass the inspection but neither receiver or emitter provide the expected output. In the emitter wave forms shown on the oscilloscope had frequency of 15KHz instead of the 750KHz required. After debugging of the design we cannot identify the failure of the resonant circuit. The resonator of the transmitter was bypassed by an Arduino Leonardo generating an output signal of 750KHz for activate the MOSFETs and test the receiver board. The receiver passes the same electrical and visual quality test than the transmitter, but when the emitter was connected the behaviour was also different from what we expect. We run a more detailed inspection. Values and orientation of all the components was review, simulations were made with LTspiceIV and the demo circuit provided by LTC (25). The simulations help us for identify the signals and debug our circuit but this effort was unsuccessful. And we switch to a mechanical solution. Weeks after installation of the robot we identify a design mistake at the coil input of the receiver and further development is scheduled. The mechanical design was simpler from the electric point of view but harder to reach the same reliability. The dock station shall be machined from a conductive material and the design shall allow lateral adjustment and had mobile parts for contact with the gondola without force the motors if there is a problem during the homing. Our solution was build a dock with 10mm acrylic and place two aluminium arms on the top, this material was selected because was easy to machine but we concern about the quick oxidation that decrease the conductivity. We test the charging station with aluminium arms for a week with good results. Further test reveal that after longer run the pads can deteriorate reducing drastically the performance. For avoid that problem conductive silver grease (26) was placed at contact surfaces. The mechanical system has two electrodes that come from the BBBBBB PCB and are connected to the arms, the bearing that is used for joint the mobile parts is bypassed with a wire for reduce conductivity issues. Charging pads where located on the wings of the gondola. Those pins are link to the charging circuit through a crocodile connector. 62 4. Plans This section contains some of the more representative plans of this project and allow to have a good idea of the number of elements and distribution. In appendix VI, and virtual resources can be found the plans of other components, subassemblies and failed prototypes.. Matt Venn Engineering Project Author Scale Plan number Date Signature Signature Energy MegaDrawz Matthew Venn Guillem Cabo Pitarch Approval Description 7 4 6 3 5 21 8 8 8 NUMBER ID DESCRIPTION QUANTITY 1 layer0 Glue with layer1 1 2 layer1 1 3 screw_adj Glue with layer layer1 1 4 bolisoportemagnetico _v2.1 1 5 formed hex screw_am 1 6 screw_limit 1 7 pen1 1 8 ISO 7046-1 - M3 x 25 - Z --- 25N 2 1:2 14/07/2016 C.a C.a. e_pen_length_setter: Tap holes on 3 and 4 for correspondent screw size. Glue 1,2 and 3. Matt Venn Engineering Project Author Scale Plan number Date Signature Signature Energy MegaDrawz Matthew Venn Guillem Cabo Pitarch Approval Description 2 3 5 6 4 1 E_charging: Assembly on ground before installation. Tap hole for correspondents screws. Use a 10mm bearing between 5,6 and 4,6. NUMBER ID QUANTITY 1 1300x60_acrilic 1 2 supports acrilic 2 3 230x40_acrilic_top 1 4 180x60_5mm_aluminu m_arm_left 1 5 180x60_5mm_aluminu m_arm_right 1 6 110x30_5mmaluminum _door 2 1:5 CS1.a 06/07/2016 F6 Matt Venn Engineering Project Author Scale Plan number Date Signature Signature Energy MegaDrawz Matthew Venn Guillem Cabo Pitarch Approval Description 7 6 2 8 10 1 5 11 3 9 4 NUMBER ID QUANTITY 1 base_v2 1 2 bearing_connector_30 mm_v2 1 3 maker slide 100mm 1 4 soporterodamientos_v 21 5 guialeva_6mm 1 6 bolisoportemagnetico _v2 1 7 pen1 1 8 wings_bearing_55mm 2 9 slider_top_cover 1 10 bearing30_55 2 11 G5.sa 3 1:2 G5.a 04/07/2016 E_gondola_v3: Extra scews are required for piece 2. Threaded road of 5cm shall be screwed to both of 8components. Verify pushfits between 8 and 10. If it is required screw piece 5 to 4. Glue magnets on socket of piece 4. Tap holes when required. Matt Venn Engineering Project Author Scale Plan number Date Signature Signature Energy MegaDrawz Matthew Venn Guillem Cabo Pitarch Approval Description 5 4 3 1 2 6 7 NUMBER ID QUANTITY 1 m8_varilla_1000mm 1 2 soporte_liso_v2 1 3 soporte_ranuras 1 4 lateral_v4 1 5 palanca_freno 1 6 h_beam_holder 1 7 lateral_v3_izq 1 1:5 14/07/2016 P.a Epaper_roll_v3: secure components with nuts when required. Use 10mm bearing at attachment point between 5 and 4. 73 5. Budget AT-Bristol science museum initially approached us with a budget of £2000. We did some projections and responded with a request for £3000 combined with a provision for external sponsorship. The project would be undertaken if an industrial partner could be found to contribute an additional £1000. RS components agreed to sponsor the project with materials from their catalogue. It was understood that the project was underfunded, but the opportunity to have a large project in the foyer of one of the UK's largest science museums was deemed to be worth the lost money in payment for labour. For this reason, Matt Venn engineering accepted around a 3x reduction in payment. In mid July, we became concerned with the projected cost of the frame. Andy (senior engineer) at the museum had specified a minimum requirement for the strength of the frame which meant the total cost of materials (including labour) increased to £1400. The museum agreed to increase their payment to £3600, and RS agreed to increase their material budget to £1500. The project was completed on time with a small surplus of £170, which will be used for ongoing maintenance costs. Description Date Category Cost (£) Cost (€) beaglebone black 12/05/2016 Non RS materials 60,00£ 69,00 € stepper drivers drv8825 12/05/2016 Non RS materials 20,00£ 23,00 € pulleys, tap & die, optos 12/05/2016 Non RS materials 100,00£ 115,00 € dyneema string 18/05/2016 Non RS materials 20,00£ 23,00 € Arturo - pcb design 18/05/2016 Time 150,00£ 172,50 € crimp tool, optos, loctite, grub screws, emerg stop 19/05/2016 RS materials 100,00£ 115,00 € wood for full size prototype 22/05/2016 Non RS materials 50,00£ 57,50 € charger/receiver prototype pcbs 25/05/2016 Non RS materials 18,00£ 20,70 € components for charger, strip tools, end mills, ally 01/06/2016 RS materials 220,00£ 253,00 € psu, motors, bbbbbb, delrin 16/06/2016 RS materials 330,00£ 379,50 € motedis order for leadscrews, nuts & bearings 22/06/2016 Non RS materials 63,48£ 73,00 € nuts & bolts 22/06/2016 Non RS materials 73,00£ 83,95 € pcb gondola 22/06/2016 Non RS materials 21,00£ 24,15 € bbb pcb 25/06/2016 Non RS materials 60,00£ 69,00 € paper & pens 01/07/2016 Non RS materials 48,54£ 55,82 € 74 aluminium saw blade 01/07/2016 Non RS materials 28,54£ 32,82 € return flights to UK 01/07/2016 Expenses 230,00£ 264,50 € lathams order wood for frame 04/07/2016 Non RS materials 213,60£ 245,64 € plastock order plastic for frame 05/07/2016 Non RS materials 266,64£ 306,64 € gondola, wire and PCB parts 06/07/2016 RS materials 140,00£ 161,00 € Nic - frame build & installation 2 days 18/07/2016 Time 300,00£ 345,00 € Jon - installation & maintenance 1 day 18/07/2016 Time 150,00£ 172,50 € frame order 20/07/2016 RS materials 618,00£ 710,70 € Guillem - design, prototyping, build - 30 days 01/08/2016 Time 304,35£ 350,00 € Matt - project lead - 30 days 01/08/2016 Time 1.200,00£ 1.380,00 € Matt's UK expenses 01/08/2016 Expenses 150,00£ 172,50 € Table 3 - Budget components by date Financial summary Cost (£) Cost (€) Non RS materials 942,80£ 1.084,22 € RS materials 1.508,00£ 1.734,20 € Time 2.104,35£ 2.420,00 € Expenses 380,00£ 437,00 € Total without RS support 4.935,15£ 5.675,42 € Total including RS support 3.427,15£ 3.941,22 € @bristol payment 3.600,00£ 4.140,00 € Project surplus 172,85£ 198,78 € Table 4 - Financial summary 75 Figure 49 - Budget distribution by category Estimated budget for second unit Materials 2.450,80£ 2.818,42 € Time 1.354,35£ 1.557,50 € Expenses 380,00£ 437,00 € Total 4.185,15£ 4.812,92 € Figure 50 - Proposed budget for second unit of the robot 19% 30% 43% 8% Budget distribution (%) of total Non RS materials RS materials Time 82 83 APPENDIX I, QUICK SETUP USER MANUAL 84 User manual and maintenance operations Rev.27_07_2016 General operations  Power off 1. Open cabinet 2. Press silver button 3. Wait till all blue lights on the BeagleBone go out 4. Press the external power button 5. All lights inside the cabinet should be off  Power up 1. Press external power button 2. Open cabinet 3. Wait until big digits light up with current energy use 4. Press the silver button - robot will start homing 5. Be ready to press the emergency stop button if there is a problem Scheduled maintenance  Change pen o Power off the robot o Remove the pencil and the magnetic support together o Remove the pen o Place the support in the socket of the calibration tool o Place the new pen, and set the length. Tip shall make contact with the limit screw o Turn the adjustment screw until pen is centered and firmly attached o Place back the support and the assembly on the gondola  Advance paper o Open the cabinet o Remove the clips that are holding the paper o Attach the stick that is located at the interior of the cabinet to the handle of the paper roll mechanism o Pull the paper carefully towards you. o Replace the clips o Remove stick and store in the cabinet 85  Paper change o Tools:  2 x 13mm spanners  Steps  2 people  Paper release stick o Supply information on paper roll: https://www.prizmagraphics.co.uk/uncoated-plotter-paper/plotter-paper- 54quot-1372mm-x-50m-90gsm-roll o Expect to be replaced twice a year  Other tasks o Twice a year greasing the lead screws. Might be nice at the paper change. Troubleshooting  Robot is drawing in the wrong place o Shutdown and turn on the robot. If there still a problem, call Local maintenance responsible.  Robot won’t start up or shut down o Call Remote maintenance responsible.  Robot is unexpectedly off o If all the blue lights are off, but the green lights are on, disconnect main power connector located at the back side and try to start up like normal. o Otherwise contact local maintenance responsible.  Energy robot dashboard o Useful for monitoring the battery level of the gondola and other parameters. http://freeboard.cursivedata.co.uk/index.html?load=dashboard.json  Gondola LEDs o RED LED flickering shows communication with computer system. o BLUE LED light & RED LED off = Charging battery o RED LED on = Draw mode Other Resources  Educational Video o The day to day activities. http://www.youtube.com/watch?v=W1kAjR_QbOw 86  Contact details of Maintenance Support: o Jon Pillai, Local maintenance: [email protected] 07825661773 o Matthew Venn, Remote maintenance: [email protected] 01290 211 185 87 88 89 APPENDIX II, MATLAB CODE 90 tcalc.m %This funtion provide the tension of two strings fixed at points %p1(0,Ymax) and p2(xmax,ymax)holding the weigth of an object at any point %of the 2D space. %(left)Wirep1: T1,alfa %(right)Wirep2: T2,beta %introduce weigth in grams and dimensions in centimeters function [t1, t2] = tcalc(w,xmax,ymax,xpos,ypos) f=w/1000*9.80665; alfa=atan((ymax-ypos)/xpos); beta=atan((ymax-ypos)/(xmax-xpos)); t1=f/(sin(alfa)+(cos(alfa)/cos(beta))*sin(beta)); t2=t1*(cos(alfa)/cos(beta)); end tcalc.m%This funtion return two matrix of 1 cm resolution coresponding to %the tensions of two strings fixed at points %p1(0,Ymax) and p2(xmax,ymax)holding the weigth of an object at any point %of the 2D space. %leftside-> Wirep1: T1,gamma,t1values %rightside->Wirep2: T2,teta,t2values %introduce weigth in grams and dimensions in centimeters function [t1values , t2values]= tmatr(w,xmax,ymax) t1values= zeros(xmax-1,ymax-1); t2values= zeros(xmax-1,ymax-1); for i = (ymax-1):-1:1 for j=1:(xmax-1) [a,b]=tcalc(w,xmax,ymax,j,i); 91 t1values(i,j)=a; t2values(i,j)=b; end end end tpmap.m %This funtion provide a map with a resolution of 1 unit %with the maximum tensions of two strings fixed at points %p1(0,Ymax) and p2(xmax,ymax)holding the weigth of an object at any point %of the 2D space. %maximum tensions matrix is returned. %Wirep1: T1,gamma %Wirep2: T2,teta %introduce weigth in grams and dimensions in centimeters %Dependence of %http://www.mathworks.com/matlabcentral/fileexchange/24253-customizable-heat- maps/content/html/heatmap_examples.html function [tmax]= tpmap(w,xmax,ymax) tmax= zeros(ymax-1,xmax-1); %calculate values for two tensions [t1values , t2values]= tmatr(w,xmax,ymax); %get maximum and reverse yaxis for i = 1:(ymax-1) for j=1:(xmax-1) a= t1values(i,j); b=t2values(i,j); tmax(ymax-i,j)= max([a b]); 98 %center down end param1calc.m %this function return the minimum rope required for each side %the equivalent in linear length of each step and the number of turns %required for roll all the rope. %minrope,xmax,lstep, ymax in centimeters %drod and error in mm %astep in rad function [minrope,lstep,astep,nturns]= param1calc(xmax,ymax,drod,steps) %minimum amount of rope hanging from motor minrope = sqrt(xmax^2+ymax^2); %angle of a step rad astep= ((2*pi)/steps); %arc rope length. This limitate the resolution lstep=((drod/2)*astep)/10; %number of turns required for minrope nturns= (minrope*10)/(2*pi*(drod/2)); end posangles.m function [ x,y,al,be,ga] =posangles(xmax,ymax,l1,l2) %Positionxy return the exact position given the lengths of the triangle % For this procedure is used cosine theorem if (l1+l2)<base 99 display('Error input L1,L2 shall be greater than base') else a=base; b=l1; c=l2; syms alf bet gam; % a^2=b^2+c^2-2*b*c*cos(alfa); %b^2=a^2+c^2-2*a*c*cos(beta); %c^2=a^2+b^2-2*a*b*cos(gamma); res=solve([a^2==b^2+c^2-2*b*c*cos(alf),b^2==a^2+c^2- 2*a*c*cos(bet),alf+bet+gam==pi,alf>0,bet>0,gam>0], [alf,bet,gam]); al=res.alf; be=res.bet; ga=res.gam; end [x,y]=positionxy(xmax,ymax,l1,l2); end positionxy.m function [x,y] =positionxy(xmax,ymax,l1,l2) %Positionxy return the exact position given the base coordinates and %lengths of wires % For this procedure is used cosine theorem base=xmax; if (l1+l2)<base display('Error input L1,L2 shall be greater than base') else a=base; 100 b=l1; c=l2; t=0.5*sqrt((a+b-c)*(a-b+c)*(-a+b+c)*(a+b+c)); y=t/a; alfa=asin(y/l1); x=cos(alfa)*b; y=ymax-y; %Debugg plot %hold on; %plot(0,0,'d') %plot(base,0,'d') %plot(x,-y,'d') %hold off; end end posmap.m %this function provide a map of the 3d space for isosceles config %minrope,xmax, ymax in centimeters %lstep,drod and error in mm %all angles in rad function [y]= posmap(xmax,ymax,drod,steps,error) lbase=xmax/2; [minrope,lstep,astep,nturns]= param1calc(xmax,ymax,drod,steps); axis([0,xmax,0,ymax]) ql1=(0:lstep:minrope); y=zeros(1,length(ql1)); %calcular posibles alturas 101 for i=1:length(ql1) a=xmax/2; c=ql1(1,i); y(1,i)=sqrt((c^2)-(a^2)); %debido a que el origen de cordenadas se encuentra en la esquina %inferior izquierda lo trasladamos al sistema global y(1,i)=ymax-y(1,i); hold on; plot(lbase/2,y(1,i),'d') if (y(1,i)<0) break; end end hold off; end possim1.m function []= possim1(xmax,ymax,drod,steps,homer1,homer2,steperr,pos) %Introducir xmax, ymax,drod,steps %Introducir homing error %Introducir matriz de puntos %pos = [x0 x1 x2 ... xn; y0 y1 y2 ... yn] %pos= % x0 x1 x2 .... xn % y0 y1 y2 .... yn %Obtener puntos caso ideal %Obtener puntos cuantización %Obtener puntos cuantización mas homing error and step error 102 [minrope,lstep,~,~]= param1calc(xmax,ymax,drod,steps); %lengths in ideal case but quantizied l1=(0:lstep:minrope); l2=l1; %step error vector ea=steperr; eb=-steperr; steperr = (eb-ea).*rand(1,length(l1)) + ea; %homing error l1err=(homer1:lstep:minrope+homer1); l2err=(homer2:lstep:minrope+homer2); %total error l1err=l1err+steperr; l2err=l2err+steperr; %plots code hold on; xlabel('x') ylabel('y') axis([0 xmax -0.25*ymax ymax]) %blue - ideal points [~,width]=size(pos); for i=1:width ideal=plot(pos(1,i),pos(2,i),'bd'); end %quantizied position and error positions [~,width]=size(pos); for i=1:width [ la1,la2] =inverseposition(xmax,ymax,pos(1,i),pos(2,i)); 103 f= l1; val = la1; %value to find tmp = abs(f-val); [~, idx1] = min(tmp); %index of closest value l1temp = f(idx1); %closest value val = la2; %value to find tmp = abs(f-val); [~, idx2] = min(tmp); %index of closest value l2temp = f(idx2); %closest value %red - plot of quantized lengths [xtemp,ytemp]=positionxy(xmax,ymax,l1temp,l2temp); quant=plot(xtemp,ytemp,'r^'); %black - plot of quantized lengths + errors l1temp=l1err(idx1); l2temp=l2err(idx2); [xtemp,ytemp]=positionxy(xmax,ymax,l1temp,l2temp); equant=plot(xtemp,ytemp,'k*'); end legend([ideal,quant,equant],'ideal','quantized','total') hold off; end trianglexy.m function [x,y] =trianglexy(base,l1,l2) %Positionxy return the exact position given the lengths of the triangle % For this procedure is used cosine theorem % be aware when is used to simulate the robot the base is NOT located at % x=0,y=0 ! 104 if (l1+l2)<base display('Error input L1 + L2 shall be greater than base') else a=base; b=l1; c=l2; t=0.5*sqrt((a+b-c)*(a-b+c)*(-a+b+c)*(a+b+c)); y=t/a; alfa=asin(y/l1); x=cos(alfa)*b; %Debugg plot %hold on; %plot(0,0,'d') %plot(base,0,'d') %plot(x,y,'d') %holsd off; end end quadtcalc.m %This funtion provide the tension: %Of FOUR strings %two strings fixed between points %p1(0,Ymax) and p2(xmax,ymax) and center of the basquet %two strings fixed between points %center of the basket and weights at corners %both wigths are equal. The total stabilizers weigth is wstab %(left-up)Wirep1: T1,alfa 105 %(right-up)Wirep2: T2,beta %(left-down)Wirep3: T3,gamma,wstab %(right-down)Wirep4: T4,theta,wstab %introduce weigth in grams and dimensions in centimeters %revisar expresiones modelo function [t1, t2,t3,t4] = quadtcalc(wbasket,wstab,xmax,ymax,xpos,ypos) ftot=(wbasket+wstab)/1000*9.80665; fstab=wstab/1000*9.80665; alfa=atan((ymax-ypos)/xpos); beta=atan((ymax-ypos)/(xmax-xpos)); t1=ftot/(sin(alfa)+(cos(alfa)/cos(beta))*sin(beta)); t2=t1*(cos(alfa)/cos(beta)); gamma=atan(ypos/xpos); theta=atan(ypos/(xmax-xpos)); t3=(fstab/2); t4=(fstab/2); %t3=fstab/(sin(gamma)+(cos(gamma)/cos(theta))*sin(theta)); %t4=t3*(cos(theta)/cos(theta)); end quadmatr.m %This funtion return two matrix of 1 unit resolution coresponding to tensions: %Of FOUR strings %two strings fixed between points %p1(0,Ymax) and p2(xmax,ymax) and center of the basquet %two strings fixed between points %center of the basket and weights at lower corners %both wigths are equal. The total stabilizers weigth is wstab %(left-up)Wirep1: T1,alfa 106 %(right-up)Wirep2: T2,beta %(left-down)Wirep3: T3,gamma,wstab %(right-down)Wirep4: T4,theta,wstab %introduce weigth in grams and dimensions in centimeters function [t1values , t2values,t3values,t4values]= quadtmatr(w,wstab,xmax,ymax) t1values= zeros(xmax-1,ymax-1); t2values= zeros(xmax-1,ymax-1); t3values= zeros(xmax-1,ymax-1); t4values= zeros(xmax-1,ymax-1); for i = (ymax-1):-1:1 for j=1:(xmax-1) [a,b,c,d]=quadtcalc(w,wstab,xmax,ymax,j,i); t1values(i,j)=a; t2values(i,j)=b; t3values(i,j)=c; t4values(i,j)=d; end end end quadtotaltpmap.m %This funtion provide a map with a resolution of 1 unit %with the total tension of: %Of FOUR strings %two strings fixed between points %p1(0,Ymax) and p2(xmax,ymax) and center of the basquet %two strings fixed between points %center of the basket and weights at lower corners %both wigths are equal. The total stabilizers weigth is wstab 107 %(left-up)Wirep1: T1,alfa %(right-up)Wirep2: T2,beta %(left-down)Wirep3: T3,gamma,wstab %(right-down)Wirep4: T4,theta,wstab %introduce weigth in grams and dimensions in centimeters %Dependence of %http://www.mathworks.com/matlabcentral/fileexchange/24253-customizable-heat- maps/content/html/heatmap_examples.html function [tmax]= quadtotaltpmap(w,wstab,xmax,ymax) ttotal= zeros(ymax-1,xmax-1); %calculate values for tensions [t1values , t2values,t3values,t4values]= quadtmatr(w,wstab,xmax,ymax); %get maximum and reverse yaxis for i = 1:(ymax-1) for j=1:(xmax-1) a= t1values(i,j); b=t2values(i,j); c=t3values(i,j); d=t4values(i,j); ttotal(ymax-i,j)= a+b+c+d; end end %plot maximum xlab=1:1:xmax; ylab=ymax:-1:1; clf heatmap(ttotal, xlab, ylab, '%0.2f', 'Colormap', 'red',... 'Colorbar', true, 'ColorLevels', 100,'MaxColorValue',(w+wstab)/1000*9.80665*2.5); 114 115 116 117 APPENDIX IV, MACHINEKIT CODE MODIFICATIONS 118 Bipod.hal # ####################################### # # HAL file for BeagleBone + BeBoPr cape with 4 steppers # # Derived from example hm2-stepper config # # ######################################## # Launch the setup script to make sure hardware setup looks good loadusr -w ./setup.sh loadusr -W xbee.py 20 # ################################### # Core EMC/HAL Loads # ################################### # kinematics # loadrt trivkins loadrt bipodkins setp bipodkins.Bx 2140 # 2200 wide - 60 for the pulleys # motion controller, get name and thread periods from ini file # trajectory planner loadrt tp loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES tp=tp kins=bipodkins #loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD #loadrt threads name3=xbee-thread period3=50000000 # 50ms, xbee takes max 25ms # load low-level drivers #loadrt hal_bb_gpio output_pins=816,822,823,824,825,826,923,925 input_pins=807,808,809,810,817,911,913,922,921 loadrt hal_bb_gpio output_pins=914 input_pins=922,921,911 loadrt [PRUCONF](DRIVER) prucode=$(HAL_RTMOD_DIR)/[PRUCONF](PRUBIN) [PRUCONF](CONFIG) halname=hpg pru_period=4000 loadrt limit1 count=2 # ################################################ # THREADS # ################################################ addf hpg.capture-position servo-thread addf bb_gpio.read servo-thread addf motion-command-handler servo-thread addf motion-controller servo-thread addf limit1.0 servo-thread addf limit1.1 servo-thread addf hpg.update servo-thread addf bb_gpio.write servo-thread #addf xbee xbee-thread # ###################################################### # Axis-of-motion Specific Configs (not the GUI) # ###################################################### # ################ # X [0] Axis # ################ 119 # axis enable chain newsig emcmot.00.enable bit sets emcmot.00.enable FALSE net emcmot.00.enable <= axis.0.amp-enable-out net emcmot.00.enable => hpg.stepgen.00.enable # position command and feedback net emcmot.00.pos-cmd <= axis.0.motor-pos-cmd net emcmot.00.pos-cmd => hpg.stepgen.00.position-cmd net motor.00.pos-fb <= hpg.stepgen.00.position-fb net motor.00.pos-fb => axis.0.motor-pos-fb # timing parameters setp hpg.stepgen.00.dirsetup [AXIS_0]DIRSETUP setp hpg.stepgen.00.dirhold [AXIS_0]DIRHOLD setp hpg.stepgen.00.steplen [AXIS_0]STEPLEN setp hpg.stepgen.00.stepspace [AXIS_0]STEPSPACE setp hpg.stepgen.00.position-scale [AXIS_0]SCALE setp hpg.stepgen.00.maxvel [AXIS_0]STEPGEN_MAX_VEL setp hpg.stepgen.00.maxaccel [AXIS_0]STEPGEN_MAX_ACC #setp hpg.stepgen.00.step_type 0 setp hpg.stepgen.00.steppin 917 setp hpg.stepgen.00.dirpin 918 # ################ # Y [1] Axis # ################ # axis enable chain newsig emcmot.01.enable bit sets emcmot.01.enable FALSE net emcmot.01.enable <= axis.1.amp-enable-out net emcmot.01.enable => hpg.stepgen.01.enable # position command and feedback net emcmot.01.pos-cmd <= axis.1.motor-pos-cmd net emcmot.01.pos-cmd => hpg.stepgen.01.position-cmd net motor.01.pos-fb <= hpg.stepgen.01.position-fb net motor.01.pos-fb => axis.1.motor-pos-fb # timing parameters setp hpg.stepgen.01.dirsetup [AXIS_1]DIRSETUP setp hpg.stepgen.01.dirhold [AXIS_1]DIRHOLD setp hpg.stepgen.01.steplen [AXIS_1]STEPLEN setp hpg.stepgen.01.stepspace [AXIS_1]STEPSPACE setp hpg.stepgen.01.position-scale [AXIS_1]SCALE setp hpg.stepgen.01.maxvel [AXIS_1]STEPGEN_MAX_VEL setp hpg.stepgen.01.maxaccel [AXIS_1]STEPGEN_MAX_ACC #setp hpg.stepgen.01.step_type 0 setp hpg.stepgen.01.steppin 915 120 setp hpg.stepgen.01.dirpin 916 # ################ # Z [2] Axis # ################ setp xbee.scale 20 net zpos axis.2.motor-pos-cmd => xbee.pos axis.2.motor-pos-fb # ################################################## # Standard I/O - EStop, Enables, Limit Switches, Etc # ################################################## # Create estop signal chain # Drive software estop to hardware #net estop-out iocontrol.0.user-enable-out => bb_gpio.p8.out-26 #setp bb_gpio.p8.out-26.invert 1 # Monitor estop input from hardware net estop-loop bb_gpio.p9.in-11 => iocontrol.0.emc-enable-in #setp bb_gpio.p8.in-17.invert 1 # Axis enable signal (active low) net emcmot.00.enable => bb_gpio.p9.out-14 #setp bb_gpio.p9.out-14.invert 1 # ################ # Limit Switches # ################ newsig home-x bit newsig home-y bit net home-x <= bb_gpio.p9.in-21 net home-y <= bb_gpio.p9.in-22 # Uncomment if you actually have limit switches setup # You probably want to setup homing in the INI file, as well net home-x => axis.0.home-sw-in net home-y => axis.1.home-sw-in Bipod.ini [PRUCONF] DRIVER=hal_pru_generic CONFIG=pru=0 num_stepgens=3 PRUBIN=xenomai/pru_generic.bin [EMC] # Name of machine, for use with display, etc. MACHINE = Bipod # Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others #DEBUG = 0x00000003 DEBUG = 0x00000007 #DEBUG = 0 [DISPLAY] # Name of display program, e.g., tkemc 121 #DISPLAY = axis DISPLAY = ./bipod.py # Cycle time, in seconds, that display will sleep between polls CYCLE_TIME = 0.200 # Path to help file HELP_FILE = tklinucnc.txt # Initial display setting for position, RELATIVE or MACHINE POSITION_OFFSET = RELATIVE # Initial display setting for position, COMMANDED or ACTUAL POSITION_FEEDBACK = ACTUAL # Highest value that will be allowed for feed override, 1.0 = 100% MAX_FEED_OVERRIDE = 1.5 # Prefix to be used PROGRAM_PREFIX = /home/machinekit/machinekit/nc_files # Increments for the JOG section INCREMENTS = 10 1 0.1 0.01 [TASK] # Name of task controller program, e.g., milltask TASK = milltask # Cycle time, in seconds, that task controller will sleep between polls CYCLE_TIME = 0.010 [RS274NGC] # File containing interpreter variables PARAMETER_FILE = pru-stepper.var [EMCMOT] EMCMOT = motmod # Timeout for comm to emcmot, in seconds COMM_TIMEOUT = 1.0 # Interval between tries to emcmot, in seconds COMM_WAIT = 0.010 # Servo task period, in nanoseconds SERVO_PERIOD = 500000 [HAL] # The run script first uses halcmd to execute any HALFILE # files, and then to execute any individual HALCMD commands. # list of hal config files to run through halcmd # files are executed in the order in which they appear HALFILE = bipod.hal # list of halcmd commands to execute # commands are executed in the order in which they appear 122 #HALCMD = save neta [TRAJ] AXES = 3 COORDINATES = X Y Z LINEAR_UNITS = mm ANGULAR_UNITS = degree CYCLE_TIME = 0.010 DEFAULT_VELOCITY = 100.00 MAX_LINEAR_VELOCITY = 200.00 MAX_ACCELERATION = 400 # lots of joint following errors until I added this: DEFAULT_ACCELERATION = 200 [AXIS_0] TYPE = LINEAR MAX_VELOCITY = 200 MAX_ACCELERATION = 400 # Set Stepgen max 20% higher than the axis STEPGEN_MAX_VEL = 300.0 STEPGEN_MAX_ACC = 1200.0 BACKLASH = 0.000 SCALE = -25.46 MIN_LIMIT = 150.0 MAX_LIMIT = 2600.0 FERROR = 1.0 MIN_FERROR = 0.25 HOME = 1500 HOME_OFFSET = 1500 HOME_SEARCH_VEL = -50.0 HOME_LATCH_VEL = -10.0 HOME_IGNORE_LIMITS = YES HOME_USE_INDEX = NO HOME_SEQUENCE = 1 # Set to zero if you don't have physical home/limit switches # Set to the desired homing and latch velocity if you have switches # See: https://github.com/machinekit/machinekit-docs # these are in nanoseconds DIRSETUP = 2000 DIRHOLD = 2000 STEPLEN = 10000 STEPSPACE = 10000 [AXIS_1] TYPE = LINEAR MAX_VELOCITY = 200.0 MAX_ACCELERATION = 400.0 # Set Stepgen max 20% higher than the axis STEPGEN_MAX_VEL = 300.0 STEPGEN_MAX_ACC = 1200.0 BACKLASH = 0.000 # decreasing scale increases length per step SCALE = -25.46 123 MIN_LIMIT = 150.0 MAX_LIMIT = 2600.0 FERROR = 1.0 MIN_FERROR = 0.25 HOME = 1515 HOME_OFFSET = 1515 HOME_SEARCH_VEL = -50.0 HOME_LATCH_VEL = -10.0 HOME_IGNORE_LIMITS = YES HOME_USE_INDEX = NO HOME_SEQUENCE = 1 # Set to zero if you don't have physical home/limit switches # Set to the desired homing and latch velocity if you have switches # See: https://github.com/machinekit/machinekit-docs # these are in nanoseconds DIRSETUP = 2000 DIRHOLD = 2000 STEPLEN = 10000 STEPSPACE = 10000 [AXIS_2] TYPE = LINEAR MAX_VELOCITY = 100.0 MAX_ACCELERATION = 200.0 # Set Stepgen max 20% higher than the axis STEPGEN_MAX_VEL = 200.0 STEPGEN_MAX_ACC = 400.0 MIN_LIMIT = -1 MAX_LIMIT = 8.9 FERROR = 1.0 MIN_FERROR = 0.5 HOME = 8 HOME_OFFSET = 0 HOME_SEARCH_VEL = 0.0 HOME_LATCH_VEL = 0.0 HOME_SEQUENCE = 0 [EMCIO] # Name of IO controller program, e.g., io EMCIO = io # cycle time, in seconds CYCLE_TIME = 0.100 # tool table file TOOL_TABLE = tool.tbl 130 if (argc != 2 || 1 != sscanf(argv[1], "%lf", &Bx)) { fprintf(stderr, "syntax: %s Bx\n", argv[0]); return 1; } while (! feof(stdin)) { if (inverse) { printf("inv> "); } else { printf("fwd> "); } fflush(stdout); if (NULL == fgets(buffer, BUFFERLEN, stdin)) { break; } if (1 != sscanf(buffer, "%s", cmd)) { continue; } if (! strcmp(cmd, "quit")) { break; } if (! strcmp(cmd, "i")) { inverse = 1; continue; } if (! strcmp(cmd, "f")) { inverse = 0; continue; } if (! strcmp(cmd, "ff")) { if (1 != sscanf(buffer, "%*s %d", &fflags)) { printf("need forward flag\n"); } continue; } if (inverse) { /* inverse kins */ if (3 != sscanf(buffer, "%lf %lf %lf", &pos.tran.x, &pos.tran.y, &pos.tran.z)) { printf("need X Y Z\n"); continue; } if (0 != kinematicsInverse(&pos, joints, NULL, &fflags)) { printf("inverse kin error\n"); } else { printf("%f\t%f\t%f\n", joints[0], joints[1], joints[2]); if (0 != kinematicsForward(joints, &pos, &fflags, NULL)) { printf("forward kin error\n"); } else { printf("%f\t%f\t%f\n", pos.tran.x, pos.tran.y, pos.tran.z); } } } else { /* forward kins */ if (flags) { if (4 != sscanf(buffer, "%lf %lf %lf %d", &joints[0], &joints[1], &joints[2], &fflags)) { printf("need 3 strut values and flag\n"); 131 continue; } } else { if (3 != sscanf(buffer, "%lf %lf %lf", &joints[0], &joints[1], &joints[2])) { printf("need 3 strut values\n"); continue; } } if (0 != kinematicsForward(joints, &pos, &fflags, NULL)) { printf("forward kin error\n"); } else { printf("%f\t%f\t%f\n", pos.tran.x, pos.tran.y, pos.tran.z); if (0 != kinematicsInverse(&pos, joints, NULL, &fflags)) { printf("inverse kin error\n"); } else { printf("%f\t%f\t%f\n", joints[0], joints[1], joints[2]); } } } } /* end while (! feof(stdin)) */ return 0; } #endif /* MAIN */ #ifdef RTAPI #include "rtapi.h" /* RTAPI realtime OS API */ #include "rtapi_app.h" /* RTAPI realtime module decls */ #include "hal.h" static vtkins_t vtk = { .kinematicsForward = kinematicsForward, .kinematicsInverse = kinematicsInverse, .kinematicsType = kinematicsType }; MODULE_LICENSE("GPL"); static const char *name = "bipodkins"; int comp_id, vtable_id; int rtapi_app_main(void) { int res = 0; comp_id = hal_init("bipodkins"); if(comp_id < 0) return comp_id; haldata = hal_malloc(sizeof(*haldata)); if(!haldata) goto error; Bx = 1.0; if((res = hal_param_float_new("bipodkins.Bx", HAL_RW, &haldata->bx, comp_id)) < 0) goto error; vtable_id = hal_export_vtable(name, VTKINEMATICS_VERSION1, &vtk, comp_id); if (vtable_id < 0) { rtapi_print_msg(RTAPI_MSG_ERR, "%s: ERROR: hal_export_vtable(%s,%d,%p) failed: %d\n", name, name, VTKINEMATICS_VERSION1, &vtk, vtable_id ); return -ENOENT; } 132 hal_ready(comp_id); return 0; error: hal_exit(comp_id); return res; } void rtapi_app_exit(void) { hal_remove_vtable(vtable_id); hal_exit(comp_id); } #endif 133 APPENDIX V, PCB SCHEMATICS 134 135 136 137 138 139 Matt Venn Engineering Project Author Scale Plan number Date Signature Signature Energy MegaDrawz Matthew Venn Guillem Cabo Pitarch Approval Description 2:1 4,40 34,80 6 51,10 30 3 14/07/2016 Screw_adj: Manufacture with 3mm MDF, use a laser cuter with tolerances lower than 0,1mm. Verify thickness for a push fit. C3 Matt Venn Engineering Project Author Scale Plan number Date Signature Signature Energy MegaDrawz Matthew Venn Guillem Cabo Pitarch Approval Description 2:1 4,40 24 3 14/07/2016 screw_limit: Manufacture with 3mm MDF, use a laser cuter with tolerances lower than 0,1mm. C4 Matt Venn Engineering Project Author Scale Plan number Date Signature Signature Energy MegaDrawz Matthew Venn Guillem Cabo Pitarch Approval DescriptionDescription Approval Guillem Cabo Pitarch Matthew Venn Energy MegaDrawz Signature Signature Date Plan number Scale Author Project 3 133,20 51,10 29,20 2,20 10,40 1:1 14/07/2016 Layer0: Manufacture with 3mm MDF, use a laser cuter with tolerances lower than 0,1mm. Verify dimensions and thickness for a push fit. C5 Matt Venn Engineering Project Author Scale Plan number Date Signature Signature Energy MegaDrawz Matthew Venn Guillem Cabo Pitarch Approval Description 40 4 2,22 3,78 5,97 3,02 6 3 20 2:1 04/07/2016 CS0.1 20x40_anchorpoint: Manufacturewith3mmMDF,usealasercuter withtoleranceslowerthan0,1mm. Matt Venn Engineering Project Author Scale Plan number Date Signature Signature Energy MegaDrawz Matthew Venn Guillem Cabo Pitarch Approval Description 80 4 3 7 3,50 3 10 2:1 04/07/2016 CS0.2 Leaver_10x75_m4: Manufacturewith3mmMDF,usealasercuter withtoleranceslowerthan0,1mm. Matt Venn Engineering Project Author Scale Plan number Date Signature Signature Energy MegaDrawz Matthew Venn Guillem Cabo Pitarch Approval Description 1 2 E_gondolacharger_v1: Cover contact area with charging pads of 2with aluminum tape. NUMBER ID QUANTITY 1 20x40_anchorpoint 2 2 leaver_10x75_m4 2 1:1 04/07/2016 CS0.a Matt Venn Engineering Project Author Scale Plan number Date Signature Signature Energy MegaDrawz Matthew Venn Guillem Cabo Pitarch Approval Description 5 35 3 10 59,09° 50 25 8,54 2,50 5 160 06/07/2016 180x60_5mm_aluminum_arm_rigth: Use an aluminium plate of 5mm, face the top surface and machine with a CNC drilling machine. Chamfers can be added to the external edge. File the edges.Use 1mm tabs. 1:1 CS1.1 Matt Venn Engineering 110x30_3mm_aluminum_door: Laser cut from 3mm MDF or Use an aluminium plate of 3mm, face the top surface and machine with a CNC drilling machine. For aluminium piece chamfers can be added to the external edge, file the edges and use 1mm tabs. Project Author Scale Plan number Date Signature Signature Energy MegaDrawz Matthew Venn Guillem Cabo Pitarch Approval Description 1:1 3 R10 9,60 R6,75 R2,93 6,45 R1,97 4 45,22 1,59° 106,75 3 06/07/2016 CS1.2 Matt Venn Engineering Project Author Scale Plan number Date Signature Signature Energy MegaDrawz Matthew Venn Guillem Cabo Pitarch Approval Description 1:1 50 5 45° 25 7,50 7,50 10 60° 3 R10 R35 R35 14,44 158 2,50 5 06/07/2016 180x60_5mm_aluminum_arm_left: Use an aluminium plate of 5mm, face the top surface and machine with a CNC drilling machine. Chamfers can be added to the external edge. File the edges. Use 1mm tabs. CS1.3 Matt Venn Engineering Project Author Scale Plan number Date Signature Signature Energy MegaDrawz Matthew Venn Guillem Cabo Pitarch Approval Description 1:1 Description Approval Guillem Cabo Pitarch Matthew Venn Energy MegaDrawz Signature Signature Date Plan number Scale Author Project 60 1300 17,50 5 15 135 06/07/2016 1300x60_acrilic: Use a table saw for cut a piece of 10 mm acrilic and drill holes with a drilling tower. Do not remove the protector fil of the acrilic. CS1.4