CONSTRUCTION GUIDE Robotic Arm. Robobox. Level II

Similar documents
CONSTRUCTION GUIDE IR Alarm. Robobox. Level I

Coding with Arduino to operate the prosthetic arm

Programming a Servo. Servo. Red Wire. Black Wire. White Wire

Mechatronics Engineering and Automation Faculty of Engineering, Ain Shams University MCT-151, Spring 2015 Lab-4: Electric Actuators

CONSTRUCTION GUIDE Capacitor, Transistor & Motorbike. Robobox. Level VII

Rodni What will yours be?

Computational Crafting with Arduino. Christopher Michaud Marist School ECEP Programs, Georgia Tech

LED + Servo 2 devices, 1 Arduino

Programming 2 Servos. Learn to connect and write code to control two servos.

Lab 06: Ohm s Law and Servo Motor Control

Parts List. Robotic Arm segments ¼ inch screws Cable XBEE module or Wifi module

100UF CAPACITOR POTENTIOMETER SERVO MOTOR MOTOR ARM. MALE HEADER PIN (3 pins) INGREDIENTS

J. La Favre Using Arduino with Raspberry Pi February 7, 2018

A servo is an electric motor that takes in a pulse width modulated signal that controls direction and speed. A servo has three leads:

Objectives: Learn what an Arduino is and what it can do Learn what an LED is and how to use it Be able to wire and program an LED to blink

FABO ACADEMY X ELECTRONIC DESIGN

StenBOT Robot Kit. Stensat Group LLC, Copyright 2018

Learning Objectives. References 10/26/11. Using servos with an Arduino. EAS 199A Fall 2011

Servo Sweep. Learn to make a regular Servo move in a sweeping motion.

Using Servos with an Arduino

Arduino Control of Tetrix Prizm Robotics. Motors and Servos Introduction to Robotics and Engineering Marist School

Lab Exercise 9: Stepper and Servo Motors

CONSTRUCTION GUIDE Light Robot. Robobox. Level VI

HAW-Arduino. Sensors and Arduino F. Schubert HAW - Arduino 1

Pulse Width Modulation and

For this exercise, you will need a partner, an Arduino kit (in the plastic tub), and a laptop with the Arduino programming environment.

Built-in soft-start feature. Up-Slope and Down-Slope. Power-Up safe start feature. Motor will only start if pulse of 1.5ms is detected.

2.017 DESIGN OF ELECTROMECHANICAL ROBOTIC SYSTEMS Fall 2009 Lab 4: Motor Control. October 5, 2009 Dr. Harrison H. Chin

EE-110 Introduction to Engineering & Laboratory Experience Saeid Rahimi, Ph.D. Labs Introduction to Arduino

Setup Download the Arduino library (link) for Processing and the Lab 12 sketches (link).

Introduction: Components used:

Internet of Things Student STEM Project Jackson High School. Lesson 3: Arduino Solar Tracker

HOW TO BUILD A CAR PARK WITH INTEL GALILEO!

Arduino Setup & Flexing the ExBow

Two Hour Robot. Lets build a Robot.

Controlling motors with Arduino and Processing

Workshops Elisava Introduction to programming and electronics (Scratch & Arduino)

Lesson4 Obstacle avoidance car

Using Transistors and Driving Motors

DC motor control using arduino

Peek-a-BOO Kit JAMECO PART NO / / Experience Level: Beginner Time Required: 1+ hour

Lab 5: Arduino Uno Microcontroller Innovation Fellows Program Bootcamp Prof. Steven S. Saliterman

Lab 2: Blinkie Lab. Objectives. Materials. Theory

Control Robotics Arm with EduCake

The Motor sketch. One Direction ON-OFF DC Motor

Attribution Thank you to Arduino and SparkFun for open source access to reference materials.

L E C T U R E R, E L E C T R I C A L A N D M I C R O E L E C T R O N I C E N G I N E E R I N G

Assembly Guide Robokits India

Figure 1. Digilent DC Motor

INA169 Breakout Board Hookup Guide

Project 27 Joystick Servo Control

Actuators. DC Motor Servo Motor Stepper Motor. Sensors

CURIE Academy, Summer 2014 Lab 2: Computer Engineering Software Perspective Sign-Off Sheet

Assembly Language. Topic 14 Motion Control. Stepper and Servo Motors

combine regular DC-motors with a gear-box and an encoder/potentiometer to form a position control loop can only assume a limited range of angular

Sten-Bot Robot Kit Stensat Group LLC, Copyright 2013

Arduino: Sensors for Fun and Non Profit

Lesson 3: Arduino. Goals

LESSONS Lesson 1. Microcontrollers and SBCs. The Big Idea: Lesson 1: Microcontrollers and SBCs. Background: What, precisely, is computer science?

THE IMPORTANCE OF PLANNING AND DRAWING IN DESIGN

Preface. If you have any TECHNICAL questions, add a topic under FORUM section on our website and we'll reply as soon as possible.

Sensors and Sensing Motors, Encoders and Motor Control

ME 2110 Controller Box Manual. Version 2.3

Roborodentia Robot: Tektronix. Sean Yap Advisor: John Seng California Polytechnic State University, San Luis Obispo June 8th, 2016

Laboratory Exercise 1 Microcontroller Board with Driver Board

Arduino Lesson 1. Blink. Created by Simon Monk

Lab 2.4 Arduinos, Resistors, and Circuits

Job Sheet 2 Servo Control

Experiment 4.B. Position Control. ECEN 2270 Electronics Design Laboratory 1

MICROCONTROLLERS BASIC INPUTS and OUTPUTS (I/O)

Robotic Arm Assembly Instructions

Computer Numeric Control

the Board of Education

TWEAK THE ARDUINO LOGO

Arduino An Introduction

Introduction. 1 of 44

Programming PIC Microchips

Arduino STEAM Academy Arduino STEM Academy Art without Engineering is dreaming. Engineering without Art is calculating. - Steven K.

RA-01 Robotic Arm & Controller Manual & User s Guide

Advanced Mechatronics 1 st Mini Project. Remote Control Car. Jose Antonio De Gracia Gómez, Amartya Barua March, 25 th 2014

Arduino and Servo Motor

Experiment #3: Micro-controlled Movement

ECE 511: FINAL PROJECT REPORT GROUP 7 MSP430 TANK

TETRIX PULSE Workshop Guide

Adafruit 16-Channel Servo Driver with Arduino

Other than physical size, the next item that all RC servo specifications indicate is speed and torque.

ABCs of Arduino. Kurt Turchan -

Arduino. AS220 Workshop. Part II Interactive Design with advanced Transducers Lutz Hamel

MOBILE ROBOT LOCALIZATION with POSITION CONTROL

Basic NC and CNC. Dr. J. Ramkumar Professor, Department of Mechanical Engineering Micro machining Lab, I.I.T. Kanpur

Arduino Workshop 01. AD32600 Physical Computing Prof. Fabian Winkler Fall 2014

6.01 Fall to provide feedback and steer the motor in the head towards a light.

MegaPoints Servo Controller

4WD Mobile Platform SKU:ROB0022

Megamark Arduino Library Documentation

Inspiring Creative Fun Ysbrydoledig Creadigol Hwyl. S4A - Scratch for Arduino Workbook

On the front of the board there are a number of components that are pretty visible right off the bat!

1. Controlling the DC Motors

Sten BOT Robot Kit 1 Stensat Group LLC, Copyright 2016

EXPERIMENT 6: Advanced I/O Programming

Transcription:

CONSTRUCTION GUIDE Robotic Arm Robobox Level II

Robotic Arm This month s robot is a robotic arm with two degrees of freedom that will teach you how to use motors. You will then be able to move the arm more precisely using the pushbuttons. 1X Support Base 2X Plug-in Arms Pièces 2X Servo Motors 2X Push Buttons 2X 10KΩ Resistors 6X Male Male cables Instructions We suggest that you follow these instructions step by step. Additional details are available on your member space on Robobox.io. Please don t hesitate to ask any question, we will answer them promptly. Good luck!

Step 3 Step 1 Step 2 Robot Arm _0_ 1NTR0DUCT10N Go to www.robobox.io/members and enter the username and password you received by email. Next go to General to download the drivers for your card if you haven t already done so. Open and execute the file. In the same folder, download the Arduino software version corresponding to your operating system. Once installed, launch it and plug in your card. Let s now check your Robobox UNO : - Go to Tools, then ports and choose your card (ex: COM4) - Be sure that in Tools/Card, Arduino Uno is selected - Now go to: File/Examples/Basics/Blink In the window that just opened click on upload. Step 4 Wait until Done Uploading shows at the bottom of the window. You should now see the LED close to the pin 13 blink. Now unplug the card and check the content of your box

Step 7 Step 6 Step 5 Robot Arm _1_ BUILD Take a cross-shaped servo horn and insert it in the support base. The two sides of the crossshaped horn are not of the same size : «S» is the Short one and «L» is the long one. Insert a second cross-shaped horn into an arm and the servos into the grippers. Finally plug the motor in the horn. You can also screw the horns into the servos to solidify the arm. You can now connect the whole arm into the base. Remove the duct tape from the bottom of the base to increase the arm s stability.

Step 10 Step 9 Step 8 Robot Arm _1_ BUILD Please note that the colors used for the connections below are arbitrary and will not impact your circuit.. You can use your own color code depending on your available wires. Signal 5V Terre Let s now connect the two servos to the breadboard. Each motor has 3 wires : a brown one, a red one and a yellow one. The brown one is connected to Ground, the red one to the current source (5V) and the yellow one drives the signal. You can use male-male wires into the servo s female pins. Now connect the servo s brown wires (GND) to the breadboard. Both wires should be on the same breadboard strip. Do the same for the red (5V) wires on a separate strip. 5V GND You can then attach a male-male wire from the breadboard ground strip into the UNO s GND pin. Connect another cable from the breaboard current strip into the UNO s 5V pin. Finally, join two male-male wires from the servo s signal cables (yellow) onto the UNO #2 and #4 pins.

Step 11 Robot Arm _2_ COD3 We will now go through the software instruction, that is to say the code that will be sent to our circuit. This code will enable us to get any behavior we want from our circuit. In order to write this code we will need to launch Arduino. You will then need to type the program in the big white window at the center of the screen. You can copy / paste the lines below but we advise you to read and understand the explanations. Have fun! #include <Servo.h> Servo myservo1; // Creates a Servo object called myservo1 Servo myservo2; // Creates a Servo object called myservo2 int servoangle = 0; // Defines a position to set our servos First, let s define the global variables that we will be using throughout our code and then let s introduce libraries. With libraries we will add another piece of code in our code. This first program has been built by other programmers and is name Servo.h. This libraries includes a set of functions that will allow us to interface easily with our Servos. In a C/C++ program, we add a library with the following code at the top of our program : #include <library.h> where library.h is our library. These files end with.h so that we now they re libraries, but they are programs nonetheless.

Robot Arm _2_ COD3 With this code we can now create servo objects. In programming, an object is a type of big variable just like the int and float we saw earlier except we can give them additional functions that we call methods. We call an object s methods with the dot :.. It cat were an object, we could use the purr method like this : cat.purr(). New objects are instantiated just like regular variables, by writing the type and giving the new instance a name. Thus, Servo myservo1 means : instantiate a Servo object that will be called myservo1. In the previous code we create two of them. Finally, we generate and additional integer called servoangle that we will use to communicate the position we want the servo to be in.

Step 12 Robot Arm _2_ COD3 void setup() { myservo1.attach(2); myservo2.attach(4); } We tell the program that a servo is attached on pin #2 and a second one on pin #4 In an Arduino program we always start by a setup() function. It is used to set the general parameters. Here we will use a method of the servo objects we created previously. This method is called attach(n) and it is used to inform our program that a servo is plugged on pin N. You see that unlike previous programs, we don t set the pins in input or output mode (pinmode(2,output);). This is already done as part of the attach() method. Methods always end with parenthesis () because we sometimes want to insert additional parameters to personalize how the method () should be executed. Here we inserted 2 and 4 but we can add a lot more.

Step 13 Robot Arm _2_ COD3 void loop() { for(servoangle = 0; servoangle <= 90; servoangle += 1) { myservo1.write(servoangle); myservo2.write(servoangle); delay(15); } for(servoangle = 90; servoangle>=0; servoangle-=1) { myservo1.write(servoangle); myservo2.write(servoangle); delay(15); } } Let s now have a look at the heart of our program : the infinite loop that will send instructions to the robotic arm. Inside this loop(){} we have two additional for loops for : for( x=0 ; x<90; x = x+1){}. These loops are constructed thusly : for( start ; end ; step ){code} By starting at x = 0 and while x < 90 we will run the program in the brackets and add 1 to x in each loop. The initial variable (x=0) will then increase by 1 every 15 milliseconds, until in reaches 90. no x = 0 Is x less than 90? yes Runs the program in the brackets x = x+1 Next step

Robot Arm _2_ COD3 Once x = 90 is reached, the conditions set in the loop (servoangle <=90) are not true anymore. We therefore jump out of the loop and enter the second one, which will run from x = 90 to x = 0. Within these loops, we will use a method from the servos :.write(n). This method tells the servo to go to position N, where N represents an angle from 0 to 90 degrees. The servomotors can be positioned from 0 to 180 degrees. We chose 90 in our code but you can change this value if needed. Congrats! You ve made it to the end! You may see that some additional elements are still unused, you will need them for the challenges below! So, we made a robot that is able to constantly move its arm, but we can t really precisely change the robot arm s position. Let s now try to use buttons to control it! The goal of this challenge is to use two buttons, one controlling each motor, to place it in the required position. You will need to define a couple of pins as inputs (pinmode(n,input); and use and if statement to condition the movement. Show your solutions to this challenge on Robobox.io/members or on twitter @Robobox_io for a chance to win a prize!

Robot Arm To start on a good note, here is a quick presentation on how to use a push button. _2_ COD3 Signal The button constantly receives a 5V signal but only transmits it through the signal when the button is pushed. When the button is not pushed, current goes directly to the GND. To avoid a short circuit (5V directly to GND), we put a 10k resistor in the circuit.. GND 1K Ohm Resistor 5V...COMPLETED

Robot Arm _3_ ELECTRONIC_CONCEPTS This is a quick introduction to motors and servo motors in our circuits : How a motor works A motor is a device that transforms electrical energy into mechanical energy. This process is made possible by electric current and electromagnetic fields. A motor is composed of a stator and a rotor. The stator is the fixed part of the motor on which two poles: North and South, are installed by means of coils of wires or magnets. The rotor is the central rotating part which will be supplied with direct current and which will be responsible for the movement of the motor. The coils a and b here have a magnetic field S and N, thus pushing the coil into an equilibrium point of the second diagram. But the brushes connected to the motor shaft are connected in such a way that when the rotor is in this position the current which passes through the poles reverses. The engine then ends up in an unstable position and moves! The movement is thus perpetuated as long as the motor is powered by current. Mechanical energy now results from this operation. Your engine can either go fast but have fairly little rotating force, or have a lot of rotating force but be quite slow. This 'rotation force' has a name, it is the couple and is measured in Newton-Meter. N a S N b S a N N S b S Step 1 Step 3 N a S b N S N S a N b S Step 2 Step 4

Robot Arm _3_ ELECTRONIC_CONCEPTS Torque and speed The relationship between torque and velocity is inversely proportional and it is possible to choose between the two thanks to the gearbox. The gearbox, by means of a set of wheels, allows to swap speed for torque, it is the same principle as a bicycle drivetrain. For a given number of rotations around its axis, a small gear will perform more turns than a large gear to which it is connected. Now, since the forces are preserved, the loss of this velocity is compensated by a greater force, a greater torque. The servomotor During your various circuit, you have probably worked with servomotors. The servos are small motors with an integrated gearbox able to rotate an axis to 180. This actuator is composed of 3 pins, two for the current and one for the signal. 180 2ms 90 1,5ms 0 1ms In most actuators, the signal sent corresponds to a pulse of between 1 and 2 ms every 20 ms. The duration of the signal corresponds to an angle between 0 and 180. Thus 1 ms will correspond to an angle of 0, 1.5 ms to 90 and 2 ms to 180. 20ms 20ms 20ms 0 1ms 90 1,5ms 180 2ms This operation can be seen in the definition of the 'servo' library of Arduino: