UBC Undergraduate Research

Scalar Tan, Andy; Luk, Michael; Zhong, Sunny; Ip, Arnold Nov 28, 2011

Your browser doesn't seem to have a PDF viewer, please download the PDF to view this item.

Item Metadata


52966-Tan_Andy_et_al_PHYS_253_2011.pdf [ 3.02MB ]
JSON: 52966-1.0074459.json
JSON-LD: 52966-1.0074459-ld.json
RDF/XML (Pretty): 52966-1.0074459-rdf.xml
RDF/JSON: 52966-1.0074459-rdf.json
Turtle: 52966-1.0074459-turtle.txt
N-Triples: 52966-1.0074459-rdf-ntriples.txt
Original Record: 52966-1.0074459-source.json
Full Text

Full Text

Scalar  PHYS253 Mountain Equipment Ro-bot Competition 2011 Andy Tan, Michael Luk, Sunny Zhong, Arnold Ip  Table of Contents 1. Introduction 2. Mechanical Design 2.1 Components 2.1.1 Chassis 2.1.2 Arm 2.1.3 Little Hook 2.1.4 Big Hook and Zip-Line Hook 2.1.5 Winch 2.2 Mechanical Calculations 3. Electrical Design 3.1 Components 3.1.1 Sensors Overview 3.1.2 H-Bridge Schematic 3.1.3 Rotary Potentiometer 4. Software Design 4.1 Testing Strategy 4.2 Arm Movement 4.3 Winch Movement 4.4 Code Structure 4.5 Coding Issues 4.6 Code Flowchart 5. Project Timeline  1. Introduction The Engineering Physics Instrument Design competition for this year is to create an autonomous machine that is capable of scaling a wall. An 10 kHz IR emitter will be placed on top of the zipline to guide robots to it, while 1 kHz IR emitters will be placed elsewhere along the top of the wall to create interference. Below is an image of the wall:  The following is a description of the design of the machine known as Scalar, a single-armed system for scaling up the wall. The mechanical, electrical and software aspects of the design are presented, as well as and a timeline of major milestones of the project.  2. Mechanical Design 2.1 Components  This image shows all the components of Scalar, except for the polycarbonate spacer used to position the top servo to the same plane as the upper arm wheel.  2.1.1 Chassis Purpose:  Hosts the components of Scalar - circuit boards, TINAH board, battery, Little Hook and the base of Scalar’s arm are all fixed onto the chassis. The Little Hook maintains the position Scalar along the wall, preventing Scalar from falling.  Position:  Encloses all of the non-moving components of Scalar. Consists of 6 parts:  1. Base mount (contacts the wall)  2. Top (Little Hook/winch mounting plate)  3. Arm mounting plate  4. Battery mount  5. TINAH mount  6. Little Hook brace  Mode of operation: 1. All parts of the chassis are fixed onto the base mount for security. 2. Holds all components together and holds them in a steady position 3. As the arm moves, the chassis’ Little Hook keeps Scalar in place 4. Once the arm finds a hole and begins pulling up, the Little Hook is released, and the flat surface of the chassis ensures that Scalar remains against the wall as it proceeds up the wall 5. The Little Hook latches onto the same hole, as arm moves to find next hole Material:  Aluminum sheet metal  Dimensions: When assembled, the chassis is a rectangular box with approximate dimensions of 12.2cm x 20.5cm x 15.7cm, with a taper at the top to the arm mount. The distance from the arm mounting plate to the base mount is 8cm. Manufacture: Aluminum sheet metal was cut with the OMAX waterjet-cutter and then bent using a bender. Chassis Assembled:  2.1.2 Arm Originally, we intended our arm to be made out of carbon fibre tubes so that it could be made as long as possible without being too heavy for our servos to lift (see below left). However, the hook attachment at the end of the arm, the elbow joint between the upper and lower tubes and the connector at the base of the arm (see figures below, middle-right) would have many intricate features and the parts would have to be specially machined on the mill and lathe. It was also difficult to mount the hinge parts on to a carbon fibre tube as the tube would splinter and crack easily. Furthermore, there was no obvious way to mount the servos on the arm.  In the end, we went with a design inspired by wooden dinosaurs like the one below left.  The final arm design (above right) made extensive use of sheet aluminum fitted together similar to the way kit dinosaurs are put together. All the arm parts were designed to be made on the water jet cutter, and could each be cut in a matter of minutes. This design saved us many hours on the mill and the lathe, and allowed us to quickly and easily assemble a working prototype arm.  The above picture shows the arm parts along with an early prototype of our winch.  The above pictures shows the assembled arm. The base of it will be mounted on a Lazy Susantype bearing which will alow the entire arm to pivot about its base (see figure below left) . A third servo mounted below the base(see below right) will control the pivoting of the arm through the internal gear on the arm base.  After making the arm above, we realized that the wire between the topmost servo and the upper arm wheel tended slip off the wheels as the wheels were not in the same plane (see figures below left and middle). To fix this, we added the parts labeled with the green arrow (see bottom right figure). This jogged the servo to the side and we noticed that the wire no longer slipped off.  The above picture shows the jogged arm design after construction.  2.1.3 Little Hook Purpose:  To hold the robot in a hole when the Big Hook is looking for holes.  Description:  The Little Hook is made of 1.2 mm mild sheet steel with a QRD 1114 sensor attached to the neck of the hook. It has a length of 72.6 mm and width of 20.4 mm. Our team went through several reiterations before finding the best suitable Little Hook. Previous hooks did not come out of holes easily when an upward force is applied to it. Below is an image of the previous Little Hooks we tried on our robot. The rectangular spacing under the hook is where the QRD fits.  Image:  To the right is a SolidWorks model of the final Little Hook:  Placement:  The Little Hook is bolted on to the L-brackets on the chassis.  Function:  The Little Hook is to be hooked on a hole as the Big Hook looks for holes. When the Big Hook identified a hole and is firmly gripped on, the winch will pull the whole robot up. When this happens, the curved top-right edge of the hook will allow the Little Hook to easily escape the hole. The Little Hook will slide along the wall until it is close to the Big Hook. The QRD is then activated which allows the TINAH to acknowledge when the Little Hook is hooked onto the wall. When the Little Hook is hooked on, the winch will release and the Big Hook can release itself from the hole and start to look for a higher hole.  2.1.4 Big Hook and Zip-line hook Purpose:  Finds and hooks to holes along wall and raises Scalar up to that position along the wall. Once at the top of the wall, grabs onto the zip-line and brings Scalar down to the ground. The zip-line hook was removed in the end as the ability of the robot to climb the last section of the wall could not be calibrated due to time constraints, and focus was on climbing the lower parts of the wall as efficiently as possible.  Position: Attached to the articulating arm via a spring-loaded hinge, facing towards the wall. Mode of operation: 1. Big hook hooks onto a hole, triggering a micro-switch. 2. Scalar is winched up by a string attached to the hook, folding the arm as winching occurs. 3. The small hook on the main body latches onto same hole. 4. Big hook is released. 5. Once at the top, the arm reaches around and pulls onto the zip-line, which will bring Scalar down to the starting point. Material: 1.5mm steel sheet Dimensions: Once bent into shape, the big hook has dimensions of 26mm x 47mm x 31mm. The hook section at the top is shorter than the thickness of the wall so that we can maintain grip on the wall, while preventing the hook from getting caught inside. The small tabs at the bottom guide the small hook into the position between the two grapples. The large sheets protruding from the top are bent to wrap around the zip-line for maximum stability. Manufacture: Hook is made using the OMAX waterjet cutter, and bent into shape with pliers. Expected Design  Final Design  The above picture shows all the different hook variations that we experimented with. In the end, we chose the first little hook from the left on the third row, and the first big hook from the left on the second row. We also cut off the curved wing section on the big hook to save weight when we realized that Scalar was not likely to need the zipline hook.  2.1.5 Winch Purpose:  The mechanism which is used to pull the whole weight of the robot up.  Description:  The winch consists of two geared Barber Coleman motors attached on two custom-made motor holders facing towards each other. Two 10-teeth gears are attached to the motors and are geared with 30-teeth gears. The 30-teeth gears are epoxied onto a shaft at the center that is also held by the motor holders. This shaft acts as a spool that winds and unwinds the fishing line.  Materials:  The motor holder is made of 0.6 mm steel sheets. The gears are made of 5 mm polycarbonate sheet.  Image:  Below is a SolidWorks model of the winch.  Placement:  The winch is positioned inside the robot, right against the wall surface and the top surface. It is bolted onto the chassis with four 8-32 bolts.  Function:  The winch winds and unwinds the fishing line in correspondence to the position of the arm so that the string is always tensioned. When the arm is in the contracted position, the fishing line is completed winded onto the shaft of the winch. When it is completed stretched out, the fishing line is unwound to the length of the arm. The winch’s main function is to pull the robot up the wall when the Big Hook is in a hole higher than the robot. The micro-switch of the Big Hook sends a signal to the TINAH that signals the winch to wind in the string when the Big Hook is securely hooked into a hole. The winding will stop when a signal is sent from the QRD of the Little Hook, which informs the TINAH that it is in the hole.  2.2 Mechanical Calculations The main arm will have three servos, providing rotation of the first arm segment along the plane of the wall, rotation of the first arm segment out of the plane of the wall, and rotation of the second arm segment into the plane of the wall. The torque needed by each servo is calculated below. The torque needed to rotate the arm along the plane of the wall depends on the maximum angle of rotation desired. Assuming that the robot climbs straight up the kickers, the maximum angle of rotation needed is 90o -60.3o = 29.7o (see figure below).  The circle represents the zipline. The dimensions are obtained from the SolidWorks model of the wall.  We will base our torque calculations on a maximum angle of rotation of 40o. The following calculations are based on using a 6mm diameter aluminum tube, which has a linear density of 0.00054 kg cm-1. The carbon fibre tubes available have a third of the linear density of the aluminum rod with = 0.00018 kg cm-1. We will build a proof-of-concept with aluminum arms first, and then build our final design using carbon fibre rods. The calculations illustrate the formulae used for calculating the torque required by the servos, and have been entered into a spreadsheet that automatically recalculates the torque if any parameters are modified. The current state of the spreadsheet is also attached in this document.  3. Electrical Design 3.1 Components 3.1.1 Sensors Overview Big Hook Micro-Switch Purpose: To signal the robot that the Big Hook has hooked onto a hole or slit. Function: The switch outputs to TINAH’s digital input. When switch clicks, 5 V goes into one of TINAH’s digital input. Otherwise, ground goes into the input. Placement: Positioned such that the only time it triggers is when the big hook goes into a hole. Little Hook QRD Reflective Sensor Purpose: To signal the robot that the Little Hook has hooked onto a hole or slit. Function: The QRD outputs to TINAH’s analog input. When QRD is within 3 mm from a wall, TINAH read’s a value less than 100. Otherwise, a value greater than 400 is read. Placement: Positioned such that a low value can only be read when the Little Hook hooks on.  *Note that the 47kΩ comes from TINAH’s internal pull-up resistor.  Little Hook Micro-Switch Purpose: To signal the robot that the Little Hook has reached a hole or slit, and that the Little Hook cannot move up anymore. This is used in the case that the Little Hook QRD fails to return a low value. Function: The switch outputs to TINAH’s digital input. When switch clicks, 5 V goes into one of TINAH’s digital input. Otherwise, ground goes into the input. Placement: Positioned at the bottom of the Little Hook, very close to the chassis. The “Little Hook guides” of the Big Hook trigger this switch whenever the Big Hook gets close to the chassis.  Overview of TINAH inputs:  IR Detector Circuit An IR Detector Circuit was designed and built, but never used in the final version of the robot due to time constraints. This circuit was meant to determine the distance and angle the robot is from the zip-line. The IR detector circuit will determine:  What angle Scalar needs to climb at  Whether or not Scalar is above the height marker The IR Detector Circuit consists of:  1 OP805 Phototransistor o Detects IR signals  2 Active First Order Band Pass Filters o Takes in only 10 kHz signals  2 Different Amplifier Circuits o To have to different gain values  2 Peak Detector o One per amplifier circuit The IR signal goes through a phototransistor, and gets filtered through 2 band pass filters. This signal then goes through two different circuits, each with an amplifier with different gain values, which leads to a different TINAH analog input. IR Circuit Calculations: Band Pass Filters Resistance Capacitance Cut-off Frequency Amplifier Gain-Bandwidth Limit Maximum gain to use Max. Frequency Allowed Peak Detector Resistance Capacitance Response Time  3.3 kΩ 4.7 nF 10.26 kHz 3 MHz 100 30 kHz 1 MΩ 220 nF 0.22 s  IR Detector Circuit Diagram:  3.1.2 H-Bridge Schematic The following diagram, modified from the one provided on the PHYS 253 website, shows a single H-bridge powering two DC motors that will be used for winching Scalar up. The TINAH enable, TINAH DIR and TINAH ̅̅̅̅̅ lines refer to the motor control output signals from the TINAH board. H-Bridge circuit schematic  3.1.3 Rotary Potentiometer A rotary potentiometer is attached on to the shaft of one of the Geared Barber Coleman motor. It uses 5 V and ground from TINAH, and is connected to both TINAH’s analog and digital input. Winch positioning is done with software, utilizing the rotary potentiometer’s position. An integer variable winchPosition is used to hold the current position value of the winch. Every full turn of the rotary potentiometer will increment or decrement winchPosition by 1, depending on the motor direction. Winch positioning allows us to determine, to some level of accuracy, the distance our robot travels, and the current arm position. Rotary Potentiometer Digital Signal Purpose: To determine if a full turn of the potentiometer has occurred. This is used primarily for winch positioning. Function: An analog signal between 0 to 5 V is inputted to the digital input. Any voltage above 2.5 V gives a HI signal, otherwise LO. Rotary Potentiometer Analog Signal Purpose: Used for bringing the winch and hooks into a consistent zero position. Function: An analog signal between 0 V to 5 V is inputted to the analog input. An analog reading between 0 and 1024 is read by TINAH. Zero Position: To obtain a consistent zero position, we hook both Big Hook and Little Hook onto the same surface. We then wind up the winch at a slow speed. The analog signal from the potentiometer is constantly read. Once the winch is tightened, the potentiometer will no longer turn, causing consecutive readings of the analog signal to be close to each other. This then acts as the signal that the winch and arm are at the zero position.  4. Software Design 4.1 Testing Strategy For each sensor used in Scalar, a test function was written to ensure that the sensor worked. Test functions typically consist of reading the sensor and then displaying the output on the LED screen. Specifically, test functions were written for the QRD sensor on the passive hook, the micro-switches on the active hook and at the base of the passive hook, and the rotary encoder. In the case of the rotary encoder, the LED screen was only updated when a button on the TINAH is pushed. This ensures that the readings do not get affected by the TINAH having to update the LED screen in real-time and having to read from the encoder as well. Separate test functions were also written to manually control the winch and the arm. All the functions can be selected from a menu that is scrolled through the knob on the TINAH. This allowed us to easily access different blocks of code without having to upload new code each time we wanted to test something else.  4.2 Arm Movement The arm movements of Scalar are divided into 3 different motions: getting the active hook out of the hole, extending the arm gradually to keep pace with the extension of the winch, and moving into the fully extended position. In order to program these movements accurately, we ran the arm-control test function that allowed the arm segments to be controlled by knobs on the TINAH and also displayed on the LED the angles being written to the servos. This allowed us to experimentally determine the correct arm angles to perform the various actions, which we then stored as constants in our code.  4.3 Winch Movement As above, we manually controlled the winch speed with the knobs while displaying the speed on the LED screen. This allowed us to fine-tune the ideal motor speed for the winching up, pulling along the wall, and winch extension motion phases.  4.4 Code Structure We modularized the movement of the robot up the wall into distinct sections for greater clarity and easy debugging. The following is a code snippet for climbing up the kicker section:  One cycle of this loop relates to one arm pull of Scalar. Each function in the loop consists of servo and motor commands, appropriate delay times between commands, as well as reading micro-switch, QRD sensor and encoder values. Each function also prints out its name to the LED screen, for debugging purposes. kickerCountMax is defined appropriately so that this code snippet loops only until Scalar passes the kicker section. The logic for climbing up the slots is similar, with another loop controlled by a slotCountMax. This modular structure allowed us to reuse the same code for the holes section of the wall, except for the hole finding function armScrapeAlongWallToHole():  The holeHunt() function tells to arm to scrape the wall in the direction of the zip-line and look for the hole. If no hole is found, the arm tries again after moving a small angle towards the center.  4.5 Coding Issues We found that the encoder did not always give reliable values for the winch position. We were able to somewhat stabilize the readings by introducing a 100 microsecond delay between each encoder reading, but then found out that the encoder still gave different values for winching up and winching down. Since we ran out of time to completely diagnose the problem, we got around it by other means such as artificially resetting the winch position so that the extension and contraction loops would run for the correct number of winch revolutions. This was one of the main problems holding Scalar back from performing reliably and being able to search for holes.  4.6 Code Flowchart  5. Project Timeline May 13th Codename: Scalar Initial triple-arm concept We thought that with two arms, the robot would become unstable when one arm released its hold to look for a new hole. In this design, the left and right arms would remain hooked on while the middle arm could look for holes without affecting the balance of the robot.  Scalar May 13th  SuperPenguin May 25th  May 25th Codename: SuperPenguin Closely-spaced double arm concept Realizing that accurately controlling three arms would be difficult, we went to a two-arm design with the arms spaced closely together. This would help prevent swinging as each arm let go of its current handhold to find the next hole.  May 28th Codename: Eagle Single-arm concept We wondered if we could reduce the number of arms even further, and in a brainstorming session came up with the main operating principle of Scalar.  Origin of the Eagle codename  Main operating principle of Scalar  Eagle May 28th  June 5th Codename: Lambda-hook Hook development More details and refinements were made to the hooks to ensure they wouldn’t get trapped in holes. The Big Hook was designed to be small enough to enter holes and yet big enough so that the Little Hook could fit inside it.  Lambda-hook June 5th  Origin of the Lambda-hook codename  June 7th Codename: LambdaBot Carbon fibre arm design Based on our mechanical calculations and available torque of our servos, we needed light-weight material for our arm. This design incorporates carbon fibre tubing which has the required low density. However, working with carbon fibre proved to be difficult.  LambdaBot June 7th  LambdaBot June 11th  June 11th Codename: LambdaBot Single-tube arm and initial chassis design We reduced the number of carbon fibre tubes from four to one, and also devised a way to mount the arm on our chassis. All major components (TINAH board, battery, winch motor, servos, chassis, arm, hooks) are assembled together in SolidWorks for the first time, in preparation of the initial Design Review. June 14th Waterjet-cutting our first part: the Little Hook.  First waterjet-cut part June 14th  June 16th Codename: Scalar Arm mount, gear mount and servo mount Keeping in mind that the best tool available to us was the waterjet-cutter, we redesigned our arm to take advantage of it and create a gear, servo mount and arm mount all in one part. We were still intending to make use of the carbon fibre tubes. The upper arm was to be actuated through a carbon fibre linkage.  Scalar June 16th  Scalar June 25th  June 25th Use of sheet metal instead of carbon fibre tubes A breakthrough in design came when we were inspired by seeing a wooden dinosaur kit, and saw that it was possible to make all parts of the robot out of waterjet-cut sheet metal instead of using the carbon fibre rods. This greatly simplified construction later on and allowed us to make changes very quickly by waterjetting new parts in a matter of minutes. The mechanical linkage to move the arm was abandoned for a wire linkage between the wheel at the top servo and the wheel at the elbow joint.  July 5th Jogging of arm The wire connecting the wheel at the servo to the wheel at the elbow join was found to slip off easily, as the upper wheel and the servo wheel were not on the same plane. At the suggestion of our instructor Bernhard, we added a spacer on the servo mount and also jogged the aluminum arm to fix the problem.  Scalar July 5th  Scalar parts July 5th  July 5th to July 19th Construction and small-scale testing In this period, we constructed the first version of Scalar and tweaked some dimensions to allow a tighter fit for the parts that slotted together. We also constructed our H-bridge for the winch motor and voltage regulator circuits for our servos. The chassis was redesigned to fit within the size requirements. July 19th Testing on the wall Testing and calibration of the servo angles began. Scalar began to climb by controlling the arm and winch manually with potentiometers.  Test setup July 19th  July 25th Codename: Scalar V2 While testing continued, construction of Scalar V2 began.  Scalar V2 parts July 25th  Scalar V2 model July 25th  July 31st Scalar V2 complete. All work on testing and calibration is now done on Scalar V2. August 1st Scalar V2 autonomously climbs up the sloping ramp and the slots. After many test runs, we noticed that the fishing line would snap sometimes, and also that the line would become slack as the winch unwound. This led to tangling of the line. August 3rd A microswitch was added on the top plate of the chassis to sense if the big hook had touched it, to prevent overwinching. August 5th The 40 lb fishing line was replaced with one rated at 100 lb.  Scalar V2 July 31st  August 7th Addition of tensioner At the suggestion of Bernhard, we threaded the fishing line through a tensioner made out of stiff wire. This helped prevent the line from going slack and decreased the chances of tangling.  August 8th Competition day. Scalar takes first place!  Tensioner indicated by red arrow. August 7 th  


Citation Scheme:


Citations by CSL (citeproc-js)

Usage Statistics



Customize your widget with the following options, then copy and paste the code below into the HTML of your page to embed this item in your website.
                            <div id="ubcOpenCollectionsWidgetDisplay">
                            <script id="ubcOpenCollectionsWidget"
                            async >
IIIF logo Our image viewer uses the IIIF 2.0 standard. To load this item in other compatible viewers, use this url:


Related Items