LED + Servo 2 devices, 1 Arduino

Size: px
Start display at page:

Download "LED + Servo 2 devices, 1 Arduino"

Transcription

1 LED + Servo 2 devices, 1 Arduino Learn to connect and write code to control both a Servo and an LED at the same time. Many students who come through the lab ask if they can use both an LED and a Servo on their projects. While this is not something we typically allow in a short building time, it is something that is possible with a bit of coding and a few more wires. Arduino Breadboard (large or small, I used large) 1 LED 2 red wires 1 resistor ( ohms) 2 black wires 1 Servo (I used a full rotation Servo, but you could also use a regular Servo) 1 white wire

2 1. We ll start by connecting our wires and we ll focus on connecting the Servo first. First, connect a red wire from 5V on the Arduino to the red connection of the Servo. 2. Next, connect a black wire from GND to the black connection of the Servo.

3 3. Next, connect a white wire from Pin 9 to the white connection of the Servo (mine is yellow instead of white). 4. Now that the Servo is connected, we can focus on the LED. Connect a red wire from Pin 13 to the positive rail on the breadboard (or the red row).

4 5. Next connect a black wire from GND to the negative rail (or the black row). 6. Next, we need a resistor to make sure we don t burn out our LED. Connect the resistor from the positive rail (or the red row) to another row (I used row 17 or you could use the blue row).

5 7. Lastly, connect the LED. The long leg (positive) will go in the same row as the resistor (17 for me, maybe blue for you) and the short leg (negative) will go in the negative rail (or black row). 1. Start by opening Arduino and deleting the text to start with a blank document. Don t forget to select the right port! It may be tempting to just copy and paste the Servo code and LED Blink code into one document, and that is essentially what this looks like, but there are some details that I think it is better if we go over slowly.

6 2. Whenever we use a Servo, we need to include the Servo library. To do this, go to Sketch, Include Library, Servo. This will bring up #include <Servo.h>. 3. Next, we need to name our Servo, just like in the Servo lesson, so again I will call it myservo. Remember, you can name your Servo whatever you want, just be sure to use that name throughout your entire code. 4. We are also going to name our LED. This may be a new term for you. We ll say that the word led refers to the integer number 13. Because 13 is an integer, we call this an int.

7 5. Now that we have defined our variables, we re ready to do our setup. Because we are using 2 devices, a Servo and an LED, we need to setup both. These two lines are very similar to the setups of the Servo and LED Blink code but all in one setup since you can only have 1 setup per sketch. 6. Next we can write our loop. As I said before, it may be tempting to copy and paste the 2 codes together. If you tried that you would end up with the following: void loop() { delay(1000); //wait 1 second delay(1000); //wait 1 second myservo.write(0); //spin the big servo to the left delay(2000); myservo.write(180); //spin the big servo to the right delay(2000); } Although this will work, it will not have the desired effect on your LED and Servo. The LED will turn on, stay on for a second, then turn off, but because it runs through all the lines of code before starting over from the top, the light will stay off for 5 seconds ( ). Same thing with the Servo. It will start out not moving, then will spin to the left for 2 seconds and then to the right for 4 seconds ( ). If you want the light to blink on and off every second and the Servo to change directions every second, you will need to do both actions (for the LED and the Servo) before each delay. It should look like the code below.

8 Congratulations! You should now have an LED Blinking and a Servo spinning back and forth in unison. Feel free to change the delay or make the Servo spin slower by changing the value in myservo.write( ); (see Programming a Servo for more information). If you re having issues with your code, review all the lines of code in my example code to make sure you didn t miss something or refer to the Troubleshooting document for more help. If your LED is not working, be sure that all of your connections have been made properly and then try a different LED. If your Servo is not working, make sure that all of your wires are in the correct pins and that the red black and white wires are in the right order on the servo attachment. If that looks correct, you may want to try another Sevro.

9 I m going to give you some other combinations of blinking and spinning that I d like you to try to figure out on your own as challenge problems. The solutions are posted below, but try doing them yourself first. 1. Try to make your LED continue to blink at the same rate (on for 1 second, then off for 1 second) and have your Servo spin only one way (instead of both ways)? This would allow you to change the rate of the blinking without changing the motion of the Servo. 2. Try to make your LED Blink fast (say a delay of 100) and your Servo spin both ways for 1 second each direction? 3. Try to incorporate the LED Fade code with a Servo? You may want to start by having the Servo only spinning one way and then try to have it change directions with the rate of the fade. Note: For most of these challenges I only posted the loop since the variables and setup are the same. I also posted comments that you do not need to write into your code. Challenge 1 Solution: void loop() { myservo.write(0); //spin the big servo to the left delay(1000); //wait 1 second delay(1000); //wait 1 second } You can always change the delay to be longer or shorter. This will change the rate at which your light blinks, but because you only told your Servo to spin to the left and never gave any other directions it will continue to spin to the left no matter the value of the delay. Challenge 2 Solution: We need to have the delay for the servo be longer than the delay for the LED, but we can t treat them like separate things because the delay makes the entire program wait. So the loop should look something like this: void loop() { myservo.write(0); //spin the big servo to the left delay(100); //servo delay = 100 delay(100); //servo delay = 200 delay(100); //servo delay = 300 delay(100); //servo delay = 400 delay(100); //servo delay = 500

10 } delay(100); //servo delay = 600 delay(100); //servo delay = 700 delay(100); //servo delay = 800 delay(100); //servo delay = 900 delay(100); //servo delay = 1000 myservo.write(180); //spin the big servo to the right delay(100); //servo delay = 100 delay(100); //servo delay = 200 delay(100); //servo delay = 300 delay(100); //servo delay = 400 delay(100); //servo delay = 500 delay(100); //servo delay = 600 delay(100); //servo delay = 700 delay(100); //servo delay = 800 delay(100); //servo delay = 900 delay(100); //servo delay = 1000 If you wanted the servo to spin longer, then you would need to add more of the on/off lines in between telling it different positions. Remember that using copy (Ctrl + C) and paste (Ctrl + V) is very helpful if you are repeating lines of code over and over again. Challenge 3 Solution: I started with the LED Fade example and then added in the Servo code to make the Servo spin only one way. Making the Servo change directions is a harder task, but may be easier once you complete Servo Sweep Challenge #2 #include <Servo.h> Servo myservo; int led = 11; int brightness = 0; int fadeamount = 5; void setup() { myservo.attach(9); pinmode(led, OUTPUT); }

11 void loop() { myservo.write(0); analogwrite(led, brightness); brightness = brightness + fadeamount; if (brightness == 0 brightness == 255) { fadeamount = -fadeamount ; } delay(30); }

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

Programming a Servo. Servo. Red Wire. Black Wire. White Wire Programming a Servo Learn to connect wires and write code to program a Servo motor. If you have gone through the LED Circuit and LED Blink exercises, you are ready to move on to programming a Servo. A

More information

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

Programming 2 Servos. Learn to connect and write code to control two servos. Programming 2 Servos Learn to connect and write code to control two servos. Many students who visit the lab and learn how to use a Servo want to use 2 Servos in their project rather than just 1. This lesson

More information

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

Servo Sweep. Learn to make a regular Servo move in a sweeping motion. Servo Sweep Learn to make a regular Servo move in a sweeping motion. We have seen how to control a Servo and also how to make an LED Fade on and off. This activity will teach you how to make a regular

More information

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

Mechatronics Engineering and Automation Faculty of Engineering, Ain Shams University MCT-151, Spring 2015 Lab-4: Electric Actuators Mechatronics Engineering and Automation Faculty of Engineering, Ain Shams University MCT-151, Spring 2015 Lab-4: Electric Actuators Ahmed Okasha, Assistant Lecturer okasha1st@gmail.com Objective Have a

More information

Coding with Arduino to operate the prosthetic arm

Coding with Arduino to operate the prosthetic arm Setup Board Install FTDI Drivers This is so that your RedBoard will be able to communicate with your computer. If you have Windows 8 or above you might already have the drivers. 1. Download the FTDI driver

More information

ABCs of Arduino. Kurt Turchan -

ABCs of Arduino. Kurt Turchan - ABCs of Arduino Kurt Turchan - kurt@trailpeak.com Bio: Kurt is a web designer (java/php/ui-jquery), project manager, instructor (PHP/HTML/...), and arduino enthusiast, Kurt is founder of www.trailpeak.com

More information

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

A servo is an electric motor that takes in a pulse width modulated signal that controls direction and speed. A servo has three leads: Project 4: Arduino Servos Part 1 Description: A servo is an electric motor that takes in a pulse width modulated signal that controls direction and speed. A servo has three leads: a. Red: Current b. Black:

More information

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

100UF CAPACITOR POTENTIOMETER SERVO MOTOR MOTOR ARM. MALE HEADER PIN (3 pins) INGREDIENTS 05 POTENTIOMETER SERVO MOTOR MOTOR ARM 100UF CAPACITOR MALE HEADER PIN (3 pins) INGREDIENTS 63 MOOD CUE USE A SERVO MOTOR TO MAKE A MECHANICAL GAUGE TO POINT OUT WHAT SORT OF MOOD YOU RE IN THAT DAY Discover:

More information

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

EE-110 Introduction to Engineering & Laboratory Experience Saeid Rahimi, Ph.D. Labs Introduction to Arduino EE-110 Introduction to Engineering & Laboratory Experience Saeid Rahimi, Ph.D. Labs 10-11 Introduction to Arduino In this lab we will introduce the idea of using a microcontroller as a tool for controlling

More information

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

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 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 By the end of this session: You will know how to use an Arduino

More information

Using Servos with an Arduino

Using Servos with an Arduino Using Servos with an Arduino ME 120 Mechanical and Materials Engineering Portland State University http://web.cecs.pdx.edu/~me120 Learning Objectives Be able to identify characteristics that distinguish

More information

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

J. La Favre Using Arduino with Raspberry Pi February 7, 2018 As you have already discovered, the Raspberry Pi is a very capable digital device. Nevertheless, it does have some weaknesses. For example, it does not produce a clean pulse width modulation output (unless

More information

Pulse Width Modulation and

Pulse Width Modulation and Pulse Width Modulation and analogwrite ( ); 28 Materials needed to wire one LED. Odyssey Board 1 dowel Socket block Wire clip (optional) 1 Female to Female (F/F) wire 1 F/F resistor wire LED Note: The

More information

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

For this exercise, you will need a partner, an Arduino kit (in the plastic tub), and a laptop with the Arduino programming environment. Physics 222 Name: Exercise 6: Mr. Blinky This exercise is designed to help you wire a simple circuit based on the Arduino microprocessor, which is a particular brand of microprocessor that also includes

More information

Rodni What will yours be?

Rodni What will yours be? Rodni What will yours be? version 4 Welcome to Rodni, a modular animatronic animal of your own creation for learning how easy it is to enter the world of software programming and micro controllers. During

More information

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

Learning Objectives. References 10/26/11. Using servos with an Arduino. EAS 199A Fall 2011 Using servos with an Arduino EAS 199A Fall 2011 Learning Objectives Be able to identify characteristics that distinguish a servo and a DC motor Be able to describe the difference a conventional servo and

More information

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

Computational Crafting with Arduino. Christopher Michaud Marist School ECEP Programs, Georgia Tech Computational Crafting with Arduino Christopher Michaud Marist School ECEP Programs, Georgia Tech Introduction What do you want to learn and do today? Goals with Arduino / Computational Crafting Purpose

More information

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

Setup Download the Arduino library (link) for Processing and the Lab 12 sketches (link). Lab 12 Connecting Processing and Arduino Overview In the previous lab we have examined how to connect various sensors to the Arduino using Scratch. While Scratch enables us to make simple Arduino programs,

More information

CONSTRUCTION GUIDE Robotic Arm. Robobox. Level II

CONSTRUCTION GUIDE Robotic Arm. Robobox. Level II 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 information

Arduino and Servo Motor

Arduino and Servo Motor Arduino and Servo Motor 1. Basics of the Arduino Board and Arduino a. Arduino is a mini computer that can input and output data using the digital and analog pins b. Arduino Shield: mounts on top of Arduino

More information

The USELESS BOX. Procedure:

The USELESS BOX. Procedure: The USELESS BOX The useless box is exactly what it implies. A project that is pretty much Useless and is made for pure entertainment. You are going to go through the process of building this project from

More information

Lab 2: Blinkie Lab. Objectives. Materials. Theory

Lab 2: Blinkie Lab. Objectives. Materials. Theory Lab 2: Blinkie Lab Objectives This lab introduces the Arduino Uno as students will need to use the Arduino to control their final robot. Students will build a basic circuit on their prototyping board and

More information

Arduino: Sensors for Fun and Non Profit

Arduino: Sensors for Fun and Non Profit Arduino: Sensors for Fun and Non Profit Slides and Programs: http://pamplin.com/dms/ Nicholas Webb DMS: @NickWebb 1 Arduino: Sensors for Fun and Non Profit Slides and Programs: http://pamplin.com/dms/

More information

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

Attribution Thank you to Arduino and SparkFun for open source access to reference materials. Attribution Thank you to Arduino and SparkFun for open source access to reference materials. Contents Parts Reference... 1 Installing Arduino... 7 Unit 1: LEDs, Resistors, & Buttons... 7 1.1 Blink (Hello

More information

Lab 2.4 Arduinos, Resistors, and Circuits

Lab 2.4 Arduinos, Resistors, and Circuits Lab 2.4 Arduinos, Resistors, and Circuits Objectives: Investigate resistors in series and parallel and Kirchoff s Law through hands-on learning Get experience using an Arduino hat you need: Arduino Kit:

More information

Arduino Sensor Beginners Guide

Arduino Sensor Beginners Guide Arduino Sensor Beginners Guide So you want to learn arduino. Good for you. Arduino is an easy to use, cheap, versatile and powerful tool that can be used to make some very effective sensors. This guide

More information

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

Arduino Workshop 01. AD32600 Physical Computing Prof. Fabian Winkler Fall 2014 AD32600 Physical Computing Prof. Fabian Winkler Fall 2014 Arduino Workshop 01 This workshop provides an introductory overview of the Arduino board, basic electronic components and closes with a few basic

More information

Objective of the lesson

Objective of the lesson Arduino Lesson 5 1 Objective of the lesson Learn how to program an Arduino in S4A All of you will: Add an LED to an Arduino and get it to come on and blink Most of you will: Add an LED to an Arduino and

More information

HOW TO BUILD A CAR PARK WITH INTEL GALILEO!

HOW TO BUILD A CAR PARK WITH INTEL GALILEO! HOW TO BUILD A CAR PARK WITH INTEL GALILEO! A step by step tutorial to build, in a very simple way, a funny car park with automatic barrier and display counter with your Intel Galileo!» Recommended age

More information

Lesson 3: Arduino. Goals

Lesson 3: Arduino. Goals Introduction: This project introduces you to the wonderful world of Arduino and how to program physical devices. In this lesson you will learn how to write code and make an LED flash. Goals 1 - Get to

More information

Lesson4 Obstacle avoidance car

Lesson4 Obstacle avoidance car Lesson4 Obstacle avoidance car 1 Points of this section The joy of learning, is not just know how to control your car, but also know how to protect your car. So, make you car far away from collision. Learning

More information

Two Hour Robot. Lets build a Robot.

Two Hour Robot. Lets build a Robot. 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

More information

Assignments from last week

Assignments from last week Assignments from last week Review LED flasher kits Review protoshields Need more soldering practice (see below)? http://www.allelectronics.com/make-a-store/category/305/kits/1.html http://www.mpja.com/departments.asp?dept=61

More information

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

Parts List. Robotic Arm segments ¼ inch screws Cable XBEE module or Wifi module Robotic Arm 1 Legal Stuff Stensat Group LLC assumes no responsibility and/or liability for the use of the kit and documentation. There is a 90 day warranty for the Sten-Bot kit against component defects.

More information

Lab 06: Ohm s Law and Servo Motor Control

Lab 06: Ohm s Law and Servo Motor Control CS281: Computer Systems Lab 06: Ohm s Law and Servo Motor Control The main purpose of this lab is to build a servo motor control circuit. As with prior labs, there will be some exploratory sections designed

More information

Arduino Lesson 1. Blink. Created by Simon Monk

Arduino Lesson 1. Blink. Created by Simon Monk Arduino Lesson 1. Blink Created by Simon Monk Guide Contents Guide Contents Overview Parts Part Qty The 'L' LED Loading the 'Blink' Example Saving a Copy of 'Blink' Uploading Blink to the Board How 'Blink'

More information

FABO ACADEMY X ELECTRONIC DESIGN

FABO ACADEMY X ELECTRONIC DESIGN ELECTRONIC DESIGN MAKE A DEVICE WITH INPUT & OUTPUT The Shanghaino can be programmed to use many input and output devices (a motor, a light sensor, etc) uploading an instruction code (a program) to it

More information

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

Arduino. AS220 Workshop. Part II Interactive Design with advanced Transducers Lutz Hamel AS220 Workshop Part II Interactive Design with advanced Transducers Lutz Hamel hamel@cs.uri.edu www.cs.uri.edu/~hamel/as220 How we see the computer Image source: Considering the Body, Kate Hartman, 2008.

More information

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

HAW-Arduino. Sensors and Arduino F. Schubert HAW - Arduino 1 HAW-Arduino Sensors and Arduino 14.10.2010 F. Schubert HAW - Arduino 1 Content of the USB-Stick PDF-File of this script Arduino-software Source-codes Helpful links 14.10.2010 HAW - Arduino 2 Report for

More information

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

Arduino Control of Tetrix Prizm Robotics. Motors and Servos Introduction to Robotics and Engineering Marist School Arduino Control of Tetrix Prizm Robotics Motors and Servos Introduction to Robotics and Engineering Marist School Motor or Servo? Motor Faster revolution but less Power Tetrix 12 Volt DC motors have a

More information

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

Internet of Things Student STEM Project Jackson High School. Lesson 3: Arduino Solar Tracker Internet of Things Student STEM Project Jackson High School Lesson 3: Arduino Solar Tracker Lesson 3 Arduino Solar Tracker Time to complete Lesson 60-minute class period Learning objectives Students learn

More information

MAE106 Laboratory Exercises Lab # 1 - Laboratory tools

MAE106 Laboratory Exercises Lab # 1 - Laboratory tools MAE106 Laboratory Exercises Lab # 1 - Laboratory tools University of California, Irvine Department of Mechanical and Aerospace Engineering Goals To learn how to use the oscilloscope, function generator,

More information

Disclaimer. Arduino Hands-On 2 CS5968 / ART4455 9/1/10. ! Many of these slides are mine. ! But, some are stolen from various places on the web

Disclaimer. Arduino Hands-On 2 CS5968 / ART4455 9/1/10. ! Many of these slides are mine. ! But, some are stolen from various places on the web Arduino Hands-On 2 CS5968 / ART4455 Disclaimer! Many of these slides are mine! But, some are stolen from various places on the web! todbot.com Bionic Arduino and Spooky Arduino class notes from Tod E.Kurt!

More information

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

Peek-a-BOO Kit JAMECO PART NO / / Experience Level: Beginner Time Required: 1+ hour Peek-a-BOO Kit JAMECO PART NO. 2260076/2260084/2260092 Experience Level: Beginner Time Required: 1+ hour Make a ghost that reacts to an approaching object in the room. When idle, the ghost will keep its

More information

Arduino Setup & Flexing the ExBow

Arduino Setup & Flexing the ExBow Arduino Setup & Flexing the ExBow What is Arduino? Before we begin, We must first download the Arduino and Ardublock software. For our Set-up we will be using Arduino. Arduino is an electronics platform.

More information

MICROCONTROLLERS BASIC INPUTS and OUTPUTS (I/O)

MICROCONTROLLERS BASIC INPUTS and OUTPUTS (I/O) PH-315 Portland State University MICROCONTROLLERS BASIC INPUTS and OUTPUTS (I/O) ABSTRACT A microcontroller is an integrated circuit containing a processor and programmable read-only memory, 1 which is

More information

Project 27 Joystick Servo Control

Project 27 Joystick Servo Control Project 27 Joystick Servo Control For another simple project, let s use a joystick to control the two servos. You ll arrange the servos in such a way that you get a pan-tilt head, such as is used for CCTV

More information

1. Controlling the DC Motors

1. Controlling the DC Motors E11: Autonomous Vehicles Lab 5: Motors and Sensors By this point, you should have an assembled robot and Mudduino to power it. Let s get things moving! In this lab, you will write code to test your motors

More information

Robotic Arm Assembly Instructions

Robotic Arm Assembly Instructions Robotic Arm Assembly Instructions Last Revised: 11 January 2017 Part A: First follow the instructions: http://www.robotshop.com/media/files/zip2/rbmea-02_-_documentation_1.zip While assembling the servos:

More information

Yihao Qian Team A: Aware Teammates: Amit Agarwal Harry Golash Menghan Zhang Zihao (Theo) Zhang ILR01 Oct.14, 2016

Yihao Qian Team A: Aware Teammates: Amit Agarwal Harry Golash Menghan Zhang Zihao (Theo) Zhang ILR01 Oct.14, 2016 Yihao Qian Team A: Aware Teammates: Amit Agarwal Harry Golash Menghan Zhang Zihao (Theo) Zhang ILR01 Oct.14, 2016 Individual Progress For sensors and motors lab, I was in charge of the servo and force

More information

Lecture 4: Basic Electronics. Lecture 4 Brief Introduction to Electronics and the Arduino

Lecture 4: Basic Electronics. Lecture 4 Brief Introduction to Electronics and the Arduino Lecture 4: Basic Electronics Lecture 4 Page: 1 Brief Introduction to Electronics and the Arduino colintan@nus.edu.sg Lecture 4: Basic Electronics Page: 2 Objectives of this Lecture By the end of today

More information

Analog Feedback Servos

Analog Feedback Servos Analog Feedback Servos Created by Bill Earl Last updated on 2018-01-21 07:07:32 PM UTC Guide Contents Guide Contents About Servos and Feedback What is a Servo? Open and Closed Loops Using Feedback Reading

More information

The Motor sketch. One Direction ON-OFF DC Motor

The Motor sketch. One Direction ON-OFF DC Motor One Direction ON-OFF DC Motor The DC motor in your Arduino kit is the most basic of electric motors and is used in all types of hobby electronics. When current is passed through, it spins continuously

More information

Part (A) Using the Potentiometer and the ADC* Part (B) LEDs and Stepper Motors with Interrupts* Part (D) Breadboard PIC Running a Stepper Motor

Part (A) Using the Potentiometer and the ADC* Part (B) LEDs and Stepper Motors with Interrupts* Part (D) Breadboard PIC Running a Stepper Motor Name Name (Most parts are team so maintain only 1 sheet per team) ME430 Mechatronic Systems: Lab 5: ADC, Interrupts, Steppers, and Servos The lab team has demonstrated the following tasks: Part (A) Using

More information

Using Transistors and Driving Motors

Using Transistors and Driving Motors Chapter 4 Using Transistors and Driving Motors Parts You ll Need for This Chapter: Arduino Uno USB cable 9V battery 9V battery clip 5V L4940V5 linear regulator 22uF electrolytic capacitor.1uf electrolytic

More information

Control Robotics Arm with EduCake

Control Robotics Arm with EduCake Control Robotics Arm with EduCake 1. About Robotics Arm Robotics Arm (RobotArm) similar to the one in Figure-1, is used in broad range of industrial automation and manufacturing environment. This type

More information

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

Workshops Elisava Introduction to programming and electronics (Scratch & Arduino) Workshops Elisava 2011 Introduction to programming and electronics (Scratch & Arduino) What is programming? Make an algorithm to do something in a specific language programming. Algorithm: a procedure

More information

EET 1150 Lab 6 Ohm s Law

EET 1150 Lab 6 Ohm s Law Name EQUIPMENT and COMPONENTS Digital Multimeter Trainer with Breadboard Resistors: 220, 1 k, 1.2 k, 2.2 k, 3.3 k, 4.7 k, 6.8 k Red light-emitting diode (LED) EET 1150 Lab 6 Ohm s Law In this lab you ll

More information

PLAN DE FORMACIÓN EN LENGUAS EXTRANJERAS IN-57 Technology for ESO: Contents and Strategies

PLAN DE FORMACIÓN EN LENGUAS EXTRANJERAS IN-57 Technology for ESO: Contents and Strategies Lesson Plan: Traffic light with Arduino using code, S4A and Ardublock Course 3rd ESO Technology, Programming and Robotic David Lobo Martínez David Lobo Martínez 1 1. TOPIC Arduino is an open source hardware

More information

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

Demon Pumpkin APPROXIMATE TIME (EXCLUDING PREPARATION WORK): 1 HOUR PREREQUISITES: PART LIST: Demon Pumpkin This is a lab guide for creating your own simple animatronic pumpkin. This project encourages students and makers to innovate upon the base design to add their own personal touches. APPROXIMATE

More information

Arduino Advanced Projects

Arduino Advanced Projects Arduino Advanced Projects Created as a companion manual to the Toronto Public Library Arduino Kits. Arduino Advanced Projects Copyright 2017 Toronto Public Library. All rights reserved. Published by the

More information

Workshop 9: First steps in electronics

Workshop 9: First steps in electronics King s Maths School Robotics Club Workshop 9: First steps in electronics 1 Getting Started Make sure you have everything you need to complete this lab: Arduino for power supply breadboard black, red and

More information

Arduino Digital Out_QUICK RECAP

Arduino Digital Out_QUICK RECAP Arduino Digital Out_QUICK RECAP BLINK File> Examples>Digital>Blink int ledpin = 13; // LED connected to digital pin 13 // The setup() method runs once, when the sketch starts void setup() // initialize

More information

Project #6 Introductory Circuit Analysis

Project #6 Introductory Circuit Analysis Project #6 Introductory Circuit Analysis Names: Date: Class Session (Please check one) 11AM 1PM Group & Kit Number: Instructions: Please complete the following questions to successfully complete this project.

More information

Arduino An Introduction

Arduino An Introduction Arduino An Introduction Hardware and Programming Presented by Madu Suthanan, P. Eng., FEC. Volunteer, Former Chair (2013-14) PEO Scarborough Chapter 2 Arduino for Mechatronics 2017 This note is for those

More information

Sunday, November 4, The LadyUno Sound Unit

Sunday, November 4, The LadyUno Sound Unit The LadyUno Sound Unit Here s what we ll need for this project We start with our finished Lady Ada Wav Shield. 5V for LCD Serial Data for LCD GND for LCD 5V (coming from the BBB) is_lady_ada_busy PIN GND

More information

Basic Electronics Course Part 2

Basic Electronics Course Part 2 Basic Electronics Course Part 2 Simple Projects using basic components Including Transistors & Pots Following are instructions to complete several electronic exercises Image 7. Components used in Part

More information

Name & SID 1 : Name & SID 2:

Name & SID 1 : Name & SID 2: EE40 Final Project-1 Smart Car Name & SID 1 : Name & SID 2: Introduction The final project is to create an intelligent vehicle, better known as a robot. You will be provided with a chassis(motorized base),

More information

MICROCONTROLLERS BASIC INPUTS and OUTPUTS (I/O)

MICROCONTROLLERS BASIC INPUTS and OUTPUTS (I/O) PH-315 Portland State University MICROCONTROLLERS BASIC INPUTS and OUTPUTS (I/O) ABSTRACT A microcontroller is an integrated circuit containing a processor and programmable read-only memory, 1 which is

More information

Lets start learning how Wink s bottom sensors work. He can use these sensors to see lines and measure when the surface he is driving on has changed.

Lets start learning how Wink s bottom sensors work. He can use these sensors to see lines and measure when the surface he is driving on has changed. Lets start learning how Wink s bottom sensors work. He can use these sensors to see lines and measure when the surface he is driving on has changed. Bottom Sensor Basics... IR Light Sources Light Sensors

More information

Breadboard Primer. Experience. Objective. No previous electronics experience is required.

Breadboard Primer. Experience. Objective. No previous electronics experience is required. Breadboard Primer Experience No previous electronics experience is required. Figure 1: Breadboard drawing made using an open-source tool from fritzing.org Objective A solderless breadboard (or protoboard)

More information

CONSTRUCTION GUIDE Light Robot. Robobox. Level VI

CONSTRUCTION GUIDE Light Robot. Robobox. Level VI CONSTRUCTION GUIDE Light Robot Robobox Level VI The Light In this box dedicated to light we will discover, through 3 projects, how light can be used in our robots. First we will see how to insert headlights

More information

You'll create a lamp that turns a light on and off when you touch a piece of conductive material

You'll create a lamp that turns a light on and off when you touch a piece of conductive material TOUCHY-FEELY LAMP You'll create a lamp that turns a light on and off when you touch a piece of conductive material Discover : installing third party libraries, creating a touch sensor Time : 5 minutes

More information

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

Arduino STEAM Academy Arduino STEM Academy Art without Engineering is dreaming. Engineering without Art is calculating. - Steven K. Arduino STEAM Academy Arduino STEM Academy Art without Engineering is dreaming. Engineering without Art is calculating. - Steven K. Roberts Page 1 See Appendix A, for Licensing Attribution information

More information

Lecture 6. Interfacing Digital and Analog Devices to Arduino. Intro to Arduino

Lecture 6. Interfacing Digital and Analog Devices to Arduino. Intro to Arduino Lecture 6 Interfacing Digital and Analog Devices to Arduino. Intro to Arduino PWR IN USB (to Computer) RESET SCL\SDA (I2C Bus) POWER 5V / 3.3V / GND Analog INPUTS Digital I\O PWM(3, 5, 6, 9, 10, 11) Components

More information

// Parts of a Multimeter

// Parts of a Multimeter Using a Multimeter // Parts of a Multimeter Often you will have to use a multimeter for troubleshooting a circuit, testing components, materials or the occasional worksheet. This section will cover how

More information

TWEAK THE ARDUINO LOGO

TWEAK THE ARDUINO LOGO TWEAK THE ARDUINO LOGO Using serial communication, you'll use your Arduino to control a program on your computer Discover : serial communication with a computer program, Processing Time : 45 minutes Level

More information

INTRODUCTION to MICRO-CONTROLLERS

INTRODUCTION to MICRO-CONTROLLERS PH-315 Portland State University INTRODUCTION to MICRO-CONTROLLERS Bret Comnes and A. La Rosa 1. ABSTRACT This laboratory session pursues getting familiar with the operation of microcontrollers, namely

More information

MATERIALS TO GATHER. Electronic Parts

MATERIALS TO GATHER. Electronic Parts a blinking pattern on three LEDs. Your mission, should you choose to accept it, is to build and program a stoplight for a busy hallway in your house (see Figure 2-1). FIGURE 2-1: The completed Stoplight

More information

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

Experiment 1: Robot Moves in 3ft squared makes sound and Experiment 1: Robot Moves in 3ft squared makes sound and turns on an LED at each turn then stop where it started. Edited: 9-7-2015 Purpose: Press a button, make a sound and wait 3 seconds before starting

More information

Build a Mintronics: MintDuino

Build a Mintronics: MintDuino Build a Mintronics: MintDuino Author: Marc de Vinck Parts relevant to this project Mintronics: MintDuino (1) The MintDuino is perfect for anyone interested in learning (or teaching) the fundamentals of

More information

Check out from stockroom:! Servo! DMM (Digital Multi-meter)

Check out from stockroom:! Servo! DMM (Digital Multi-meter) Objectives 1 Teach the student to keep an engineering notebook. 2 Talk about lab practices, check-off, and grading. 3 Introduce the lab bench equipment. 4 Teach wiring techniques. 5 Show how voltmeters,

More information

Operating Mode: Serial; (PWM) passive control mode; Autonomous Mode; On/OFF Mode

Operating Mode: Serial; (PWM) passive control mode; Autonomous Mode; On/OFF Mode RB-Dfr-11 DFRobot URM V3.2 Ultrasonic Sensor URM37 V3.2 Ultrasonic Sensor uses an industrial level AVR processor as the main processing unit. It comes with a temperature correction which is very unique

More information

Sidekick Basic Kit for Arduino V2 Introduction

Sidekick Basic Kit for Arduino V2 Introduction Sidekick Basic Kit for Arduino V2 Introduction The Arduino Sidekick Basic Kit is designed to be used with your Arduino / Seeeduino / Seeeduino ADK / Maple Lilypad or any MCU board. It contains everything

More information

CPSC 226 Lab Four Spring 2018

CPSC 226 Lab Four Spring 2018 CPSC 226 Lab Four Spring 2018 Directions. This lab is a quick introduction to programming your Arduino to do some basic internal operations and arithmetic, perform character IO, read analog voltages, drive

More information

URM37 V3.2 Ultrasonic Sensor (SKU:SEN0001)

URM37 V3.2 Ultrasonic Sensor (SKU:SEN0001) URM37 V3.2 Ultrasonic Sensor (SKU:SEN0001) From Robot Wiki Contents 1 Introduction 2 Specification 2.1 Compare with other ultrasonic sensor 3 Hardware requierments 4 Tools used 5 Software 6 Working Mode

More information

INTRODUCTION to MICRO-CONTROLLERS

INTRODUCTION to MICRO-CONTROLLERS PH-315 Portland State University INTRODUCTION to MICRO-CONTROLLERS Bret Comnes, Dan Lankow, and Andres La Rosa 1. ABSTRACT A microcontroller is an integrated circuit containing a processor and programmable

More information

INTRODUCTION to MICRO-CONTROLLERS

INTRODUCTION to MICRO-CONTROLLERS PH-315 Portland State University INTRODUCTION to MICRO-CONTROLLERS Bret Comnes, Dan Lankow, and Andres La Rosa 1. ABSTRACT A microcontroller is an integrated circuit containing a processor and programmable

More information

Microcontrollers and Interfacing

Microcontrollers and Interfacing Microcontrollers and Interfacing Week 07 digital input, debouncing, interrupts and concurrency College of Information Science and Engineering Ritsumeikan University 1 this week digital input push-button

More information

WEEK. Learning Objective. Materials to Prepare LESSON

WEEK. Learning Objective. Materials to Prepare LESSON WEEK 01 Tender Tender Browsing Learning Objective Let s take a look at how making boards are used in various fields and think about our future projects. Materials to Prepare A4 sheet, color markers, camera,

More information

Understanding the Arduino to LabVIEW Interface

Understanding the Arduino to LabVIEW Interface E-122 Design II Understanding the Arduino to LabVIEW Interface Overview The Arduino microcontroller introduced in Design I will be used as a LabVIEW data acquisition (DAQ) device/controller for Experiments

More information

Blink. EE 285 Arduino 1

Blink. EE 285 Arduino 1 Blink At the end of the previous lecture slides, we loaded and ran the blink program. When the program is running, the built-in LED blinks on and off on for one second and off for one second. It is very

More information

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

Lab 5: Arduino Uno Microcontroller Innovation Fellows Program Bootcamp Prof. Steven S. Saliterman Lab 5: Arduino Uno Microcontroller Innovation Fellows Program Bootcamp Prof. Steven S. Saliterman Exercise 5-1: Familiarization with Lab Box Contents Objective: To review the items required for working

More information

DC Motor and Servo motor Control with ARM and Arduino. Created by:

DC Motor and Servo motor Control with ARM and Arduino. Created by: DC Motor and Servo motor Control with ARM and Arduino Created by: Andrew Kaler (39345) Tucker Boyd (46434) Mohammed Chowdhury (860822) Tazwar Muttaqi (901700) Mark Murdock (98071) May 4th, 2017 Objective

More information

LEDs and Sensors Part 2: Analog to Digital

LEDs and Sensors Part 2: Analog to Digital LEDs and Sensors Part 2: Analog to Digital In the last lesson, we used switches to create input for the Arduino, and, via the microcontroller, the inputs controlled our LEDs when playing Simon. In this

More information

Figure 1. Digilent DC Motor

Figure 1. Digilent DC Motor Laboratory 9 - Usage of DC- and servo-motors The current laboratory describes the usage of DC and servomotors 1. DC motors Figure 1. Digilent DC Motor Classical DC motors are converting electrical energy

More information

Part 1. Using LabVIEW to Measure Current

Part 1. Using LabVIEW to Measure Current NAME EET 2259 Lab 11 Studying Characteristic Curves with LabVIEW OBJECTIVES -Use LabVIEW to measure DC current. -Write LabVIEW programs to display the characteristic curves of resistors, diodes, and transistors

More information

Internet of Things Student STEM Project Jackson High School. Lesson 2: Arduino and LED

Internet of Things Student STEM Project Jackson High School. Lesson 2: Arduino and LED Internet of Things Student STEM Project Jackson High School Lesson 2: Arduino and LED Lesson 2: Arduino and LED Time to complete Lesson 60-minute class period Learning objectives Students learn about Arduino

More information

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

Experiment 4.B. Position Control. ECEN 2270 Electronics Design Laboratory 1 Experiment 4.B Position Control Electronics Design Laboratory 1 Procedures 4.B.1 4.B.2 4.B.3 4.B.4 Read Encoder with Arduino Position Control by Counting Encoder Pulses Demo Setup Extra Credit Electronics

More information

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

DC Motors. come in all shapes and sizes. You probably have 3-4 on you right now. the two motors in the kit DC otors come in all shapes and sizes the two motors in the kit You probably have 3-4 on you right now (cell vibrate, laptop fan, laptop dvd drive) When motors first came out, people thought we d just

More information