Two Hour Robot. Lets build a Robot.

Similar documents
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

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

Electronic Components

Objective of the lesson

Lab 2: Blinkie Lab. Objectives. Materials. Theory

Rodni What will yours be?

FABO ACADEMY X ELECTRONIC DESIGN

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

Sten-Bot Robot Kit Stensat Group LLC, Copyright 2013

Lab 2.4 Arduinos, Resistors, and Circuits

EQ-ROBO Programming : bomb Remover Robot

Robotics using Lego Mindstorms EV3 (Intermediate)

Lab 06: Ohm s Law and Servo Motor Control

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

LED + Servo 2 devices, 1 Arduino

Arduino and Servo Motor

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

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

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

Sten BOT Robot Kit 1 Stensat Group LLC, Copyright 2016

Coding with Arduino to operate the prosthetic arm

GetTutorialized Workshops Brochure-2017

A Day in the Life CTE Enrichment Grades 3-5 mblock Programs Using the Sensors

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

Motors and Servos Part 2: DC Motors

VOICE CONTROLLED ROBOT WITH REAL TIME BARRIER DETECTION AND AVERTING

CONSTRUCTION GUIDE Robotic Arm. Robobox. Level II

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

A Day in the Life CTE Enrichment Grades 3-5 mblock Robotics - Simple Programs

Activity 2 Wave the Flag. Student Guide. Activity Overview. Robotics Jargon. Materials Needed. Building the Robot

Activity 2 Wave the Flag. Student Guide. Activity Overview. Robotics Jargon. Materials Needed. Building the Robot

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

1. Line Follower Placing the Line Follower Electrical Wiring of Line Follower Source Code Example and Testing...

the Board of Education

Demon Pumpkin APPROXIMATE TIME (EXCLUDING PREPARATION WORK): 1 HOUR PREREQUISITES: PART LIST:

OTTO THE BIPEDAL ROBOT

Content Components... 1 i. Acrylic Plates... 1 ii. Mechanical Fasteners... 3 iii. Electrical Components... 4 Introduction... 5 Getting Started... 6 Ar

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

Arduino: Sensors for Fun and Non Profit

The Motor sketch. One Direction ON-OFF DC Motor

StenBOT Robot Kit. Stensat Group LLC, Copyright 2018

1. Controlling the DC Motors

ESE141 Circuit Board Instructions

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

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

Roborodentia Final Report

How to Build the Robotics++ V2 Robot. Last Edited Nov

Studuino Icon Programming Environment Guide

Arduino Setup & Flexing the ExBow

For Experimenters and Educators

DC Motors. come in all shapes and sizes. You probably have 3-4 on you right now. the two motors in the kit

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

RC Servo Interface. Figure Bipolar amplifier connected to a large DC motor

Lesson 3: Arduino. Goals

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

MAKEBLOCK MUSIC ROBOT KIT V2.0

Some prior experience with building programs in Scratch is assumed. You can find some introductory materials here:

RoboCup Sumo Workshop. Margaux Edwards July 2018

Object Detection for Collision Avoidance in ITS

Where C= circumference, π = 3.14, and D = diameter EV3 Distance. Developed by Joanna M. Skluzacek Wisconsin 4-H 2016 Page 1

Pre-Day Questionnaire

Exam Practice Problems (3 Point Questions)

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.

The USELESS BOX. Procedure:

Lesson4 Obstacle avoidance car

Mini Hexapodinno. 18-DOF Robot

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

TeacherGeek Sumo Bot Vehicle Application Guide

MAKEVMA502 BASIC DIY KIT WITH ATMEGA2560 FOR ARDUINO USER MANUAL

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

1. ASSEMBLING THE PCB 2. FLASH THE ZIP LEDs 3. BUILDING THE WHEELS

High Speed Continuous Rotation Servo (# )

Experiment #3: Micro-controlled Movement

Available online Journal of Scientific and Engineering Research, 2018, 5(4): Research Article

Workshop 9: First steps in electronics

introduction to Digital Electronics Install the Arduino IDE on your laptop if you haven t already!

Robotic Programming. Skills Checklist

Teacher preparation takes about three hours. The time frames for individual units will vary depending on students skill level.

CONSTRUCTION GUIDE Light Robot. Robobox. Level VI

BristleBots. YOUR CHALLENGE: Use the materials provided to design your own bristlebot Rio Olympics mascot bot.

Controlling a Sprite with Ultrasound

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

Introduction: Components used:

PCB & Circuit Designing (Summer Training Program) 6 Weeks/ 45 Days PRESENTED BY

In this activity, you will program the BASIC Stamp to control the rotation of each of the Parallax pre-modified servos on the Boe-Bot.

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

Battle Crab. Build Instructions. ALPHA Version

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

Experiment 1: Robot Moves in 3ft squared makes sound and

Arduino An Introduction

acknowledgments...xv introduction...xvii 1 LEGO MINDSTORMS NXT 2.0: people, pieces, and potential getting started with the NXT 2.0 set...

INA169 Breakout Board Hookup Guide

Introduction to Arduino HW Labs

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

Written By: Joseph Schlesinger

Building an autonomous light finder robot

The Robot Builder's Shield for Arduino

Bill of Materials: Metronome Kit PART NO

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

Sunday, November 4, The LadyUno Sound Unit

Transcription:

Lets build a Robot. Our robot will use an ultrasonic sensor and servos to navigate it s way around a maze. We will be making 2 voltage circuits : A 5 Volt for our ultrasonic sensor, sound and lights powered by our Arduino. And a 6 Volt to power our servo motors, direct from a battery pack with 4 x 1.5Volt AA batteries. LED: Stands for "Light-Emitting Diode." An LED is an electronic device that emits light when an electrical current is passed through it. All LEDs are made with a maximum voltage they can connect to without being destroyed. This voltage is typically between 1.5 volts and 3.6 volts. Resistor: A resistor is an electrical component that limits or regulates the flow of electrical current in an electronic circuit. We use resistors in this case to stop too much current damaging our LED lights. Let s start wiring! 1

1 st project make a circuit to flash the lights. Our led has a positive and a negative leg, the longer leg is positive. We going to connect our led s to row E, leaving one space between the two legs. Step 1 : 1 st LED 1. Connect the positive leg to E3 and the negative leg to E1 2. Connect our 220 ohm resistor from D1 to the blue negative rail 3. Connect light to the board, run a long signal/control wire from D3 to pin 6 on the Arduino. 2 nd LED 1. Connect the positive leg to E30 and the negative leg to E28 2. Connect our 220 ohm resistor from D28 to the blue negative rail 3. Connect light to the board, run a long signal/control wire from D30 to pin 7 on the Arduino. We will now power the breadboard, run a wire from the 5V pin on the arduino through to the red positive line on the breadboard. We also need to run a ground to the board, run a long black wire from GND to the blue rail. We are now ready to code the lights, open up mblock and add the following code: 2

HIGH is Arduino for ON and LOW is Arduino for OFF. The wait allows us to see the light blink. When you are ready, upload your code to the board: 1. Under Boards, select Arduino Uno 3

2. Under connect select Serial port and then the serial port with the highest number. Click on Edit, tick Arduino mode and upload the code to Arduino. 4

Second project: Measuring distance by adding a sensor Ultrasonic: ultrasonic sensors generate high-frequency sound waves and evaluate the echo which is received back by the sensor, measuring the time interval between sending the signal andreceiving the echo to determine the distance to an object. We can then get the lights to flash based on whether the distance is close or far. Step 2 Add the ultrasonic to the breadboard along pins A14-A17 with the sensors pointing away from the board. Using Using a short wire, connect VCC(Power) from pin C14 to the red power rail on the breadboard. Using a short wire, connect GND(Ground) C17 to the blue ground rail on the breadboard. Using a long wire, connect the TRIG on C15 to pin 13 on the Arduino Using a long wire, connect the ECHO on C16 to pin 12 on the Arduino. 5

Add the code to our Mblock programming. We will need to add a variable (distance) as the value for distance as read by the ultrasonic is always changing. We will also need to create an if then loop to our program. These are the building blocks for most code, IF something then do action In this case we will set a minimum value for our distance variable, when it s too close, the light on pin 6 will flash, otherwise the light on pin 7 will flash. When you are ready upload the code using the previous instructions. 6

Project 3 Adding sound with a Piezo A Piezo is a speaker which converts the voltage passed through it to movement. The vibration of this movement becomes sound. We have added a 10kilo Ohm resistor to our piezo. Connect the black ground wire to E5 and the red power wire to E7. To complete the circuit, we connect a 10K resistor from B5 to the blue ground rail and run a long control/signal wire to pin B7 on the Arduino. 7

Adding to our code a single block, we will change the note to A2 and the beat to quarter. 8

Assembly time! Our robot should now look a bit like this. Using the really long bolts put them through the Arduino on the top layer, securing them on the bottom of the chassis with the nuts. Using blue tack, affix the breadboard to the the upper section of the chassis. 9

Add the battery pack and the 9V battery underneath the top layer but leave the wheels off for now. 10

Project 4 Agile and Mobile Servos A servo is a small gear motor that is designed for precise motion. Most Servos only have a range of 0-180 degrees, our servos have been altered so they turn all the way round (360 degrees). Let s wire up the servos. We create a new 6V circuit on the other side of the board. With the battery pack, put the screw terminal with the black wire connect to the blue ground rail at 14 and the pin connected to the red wire pushed into the positive red rail at 14. Each servo has a black ground wire, a red positive wire and a white signal/control wire. Using short wires, add in your wires to the servos, where possible connect red to red and black to black. Connect the black wires from both servos to 28 and 29 on the blue rail. Connect the red wires from both servos to 28 and 29 on the red rail. Connect the control/signal wires from the left servo to pin 9 Connect the control/signal wires from the right servo to pin 8. Finally add in a short black wire from the blue ground rail to pin GND above pin 13 on the board. Save your code to the desktop, changing the file name to your name. 11

We are now going to test our servos. Firstly, save your work to the desktop using your name as the filename. Next make a new project(don t worry, we will get back to the old project in a moment). We are just going to make a program to test the wheels. In the new project add the following code 12.

Our servos have been adapted from servos that only go 180 degrees. That s why to go one way the code is 0 and to go the other way is 180 (even though a circle is 360). Full rotation one way = 0 Full rotation the other way = 180 Stop =90. Upload the code and change it until our wheels are going forward, once we know our wheels are going forward we can then determine how to turn the robot right, left and backwards. If we determine that forward on the left servo (pin 9) is 0 and forward on the right servo(pin 8) is 180 13

Then turning right is a case of making the left servo(pin 9) go forwards (0) and set the right wheel to stop (90) To make the robot turn left, we make the right servo(pin8) go forward(180) and the left servo(pin9) to stop(90). To make it reverse, we just set the values opposite to our forward motion. Once we have worked out our forward motion, we can upload our old code and make any changes necessary. 14

The final code (before testing) If we were speaking to our robot in english we would say something like: If you don t see an obstacle: Go forward Flash the light on pin 6 Otherwise Reverse Flash the light on pin 7 Make a sound Turn We are now ready to test our robot. 15

Tidy up the wires at the back of the robot with a pipe cleaner. We will need to then hook up our 9 Volt battery to the robot, when you are ready, please let us know. If we do this part wrong, we may break our robot. What can we do to make our robot more responsive? Question: How long does it take for the robot to take its next distance measurement? Question: What happens if you change the distance variable from 20? Question: There is another way for the robot to turn without using stop (90) can you figure it out? 16

Let s Make a Line Following Robot 17

Let s Make a Sumo Bot This code will allow our robot to stay inside a sumo ring and seek out another robot. Have a go! 18