ROBOTLINKING THE POWER SUPPLY LEARNING KIT TUTORIAL

Similar documents
Components List No Product Name Quantity Picture 1 Uno 1 R3 Controller Board 2 USB Cable 1 3 LCD1602 Module 1 4 Breadboard 1 5 9V 1A Power Supply 1 4

Lesson 0 Installing IDE

About SunFounder Preface SunFounder is a technology company focused on Raspberry Pi and Arduino open source community development. Committed to the pr

Prototyping & Engineering Electronics Kits Basic Kit Guide

Freeduino USB 1.0. Arduino Compatible Development Board Starter Guide. 1. Overview

Quickstart CHAPTER 1. Powering Up. Installing the Software

Arduino Micro Breadboard Laboratory Interface Processor (Micro BLIP) User Manual

University of Hull Department of Computer Science C4DI Interfacing with Arduinos

Page 1 / 14. Dear Makerspace User,

keyestudio Keyestudio MEGA 2560 R3 Board

Digital Pins and Constants

IDUINO for maker s life. User Manual. For IDUINO development Board.

Alessandra de Vitis. Arduino

Halloween Pumpkinusing. Wednesday, October 17, 12

TA0013 ARDUINO RFID UNO STARTER KIT

EEG 101L INTRODUCTION TO ENGINEERING EXPERIENCE

Arduino 101 AN INTRODUCTION TO ARDUINO BY WOMEN IN ENGINEERING FT T I NA A ND AW E S O ME ME NTO R S

GUIDE TO SP STARTER SHIELD (V3.0)

RedBoard Hookup Guide

IME-100 ECE. Lab 3. Electrical and Computer Engineering Department Kettering University. G. Tewolde, IME100-ECE,

Lab 2.2 Ohm s Law and Introduction to Arduinos

Touch Board User Guide. Introduction

HUB-ee BMD-S Arduino Proto Shield V1.0

IME-100 Interdisciplinary Design and Manufacturing

HUB-ee BMD-S Arduino Proto Shield V1.1

IDUINO for maker s life. User Manual. For IDUINO Mega2560 Board(ST1026)

Introduction to Arduino Diagrams & Code Brown County Library

How to use the Zduino LEE Module with the Trainer Board

USER MANUAL ARDUINO I/O EXPANSION SHIELD

Rover 5. Explorer kit

Discover Robotics & Programming CURRICULUM SAMPLE

Instruction Manual. Model RBA18

This is the Arduino Uno: This is the Arduino motor shield: Digital pins (0-13) Ground Rail

One Grove Base Shield board this allows you to connect various Grove units (below) to your Seeeduino board; Nine Grove Grove units, consisting of:

TA0139 USER MANUAL ARDUINO 2 WHEEL DRIVE WIRELESS BLUETOOTH ROBOT KIT

Procedure: Determine the polarity of the LED. Use the following image to help:

<Table of content> <Parts and description> <Circuit board Guide> <Pins> <Basics of Coding> <Intro to Arduino> <Intro> <Downloading Arduino IDO>

StenBOT Robot Kit. Stensat Group LLC, Copyright 2018

THE BASIC STARTER KIT TUTORIAL FOR UNO

TA0297 WEMOS D1 R2 WIFI ARDUINO DEVELOPMENT BOARD ESP8266

Arduino Programming. Arduino UNO & Innoesys Educational Shield

Driver Installation. Getting Started for Windows user (Setting up your Robot)

MegaPi Born to Motion Control

Introduction to Arduino Diagrams & Code Brown County Library

How-To #8: Work with Smart LEDs

Note. The above image and many others are courtesy of - this is a wonderful resource for designing circuits.

8051 Intermidiate Development Board. Product Manual. Contents. 1) Overview 2) Features 3) Using the board 4) Troubleshooting and getting help

Robotics Adventure Book Scouter manual STEM 1

INTRODUCTION HARDWARE

Thursday, September 15, electronic components

Bill of Materials: Turn Off the Lights Reminder PART NO

Web Site: Forums: forums.parallax.com Sales: Technical:

RoastLogger Arduino/TC4 driver installation for Windows 9/10/13 By John Hannon (JackH) at Homeroasters.org

Lab 01 Arduino 程式設計實驗. Essential Arduino Programming and Digital Signal Process

Arduino IDE The Developer Kit library The JeeLib library for RFM12 transceivers

Electronic Brick Starter Kit

CS12020 (Computer Graphics, Vision and Games) Worksheet 1

How-To #3: Make and Use a Motor Controller Shield

Number Name Description Notes Image 0101 Resistor, 100 ohm. brown-black-browngold. ¼ watt, 5% tolerance, red-red-brown-gold. brown-black-red-gold.

Raspberry-Pi Shield: Binary-Coded-Decimal Clock

Getting Started with Energia for MSP432 LaunchPad

Adafruit Metro Mini. Created by lady ada. Last updated on :12:28 PM UTC

Building your own special-purpose embedded system gadget.

Lesson 8: Digital Input, If Else

MAE106 Laboratory Exercises Lab # 1 - Laboratory tools

Sanguino TSB. Introduction: Features:

AlphaBot2 robot building kit for Arduino

Mayhew Labs. Extended ADC Shield User Manual

Schematic Diagram: R2,R3,R4,R7 are ¼ Watt; R5,R6 are 220 Ohm ½ Watt (or two 470 Ohm ¼ Watt in parallel)

Arduino IDE Friday, 26 October 2018

SeeMeCNC Guides. RAMBo Control Firmware. This guide will show you how to install the firmware on your SeeMeCNC 3D printer.

SeeMeCNC Guides. Step 5: Installing the Firmware. This guide will show you how to install the firmware on your Rostock MAX v3 3D printer.

University of Portland EE 271 Electrical Circuits Laboratory. Experiment: Arduino

Arduino 05: Digital I/O. Jeffrey A. Meunier University of Connecticut

Make your own secret locking mechanism to keep unwanted guests out of your space!

Model: K0073. Smart Robot Car Kit Quick Start Guide

Thank you for purchasing the RGB Multi-MCU base and driver board from SuperTech-IT and TheLEDCube.com

Laboratory of Sensors Engineering Sciences 9 CFU

Arduino Prof. Dr. Magdy M. Abdelhameed

QUASAR PROJECT KIT # ATMEL AVR PROGRAMMER

Elektor Uno R4 Installation & Test

9 Output Devices: Buzzers

ARDUINO MEGA 2560 REV3 Code: A000067

Adapted from a lab originally written by Simon Hastings and Bill Ashmanskas

Arduino Lesson 15. DC Motor Reversing

Background. Procedure

Welcome to Apollo. For more information, please visit the website and select Apollo. Default Code

Lesson 5: LDR Control

DIY KIT 121. ATMEL 89Cx051 PROGRAMMER

Building the RGBW LED Controller

AXE Stack 18. BASIC-Programmable Microcontroller Kit. An inexpensive introduction to microcontroller technology for all ability levels

SRI-02 Speech Recognition Interface

Module 003: Introduction to the Arduino/RedBoard

THE COMPLETE ALL IN ONE ROBOT 360 NANO BOT

Images Scientific OWI Robotic Arm Interface Kit (PC serial) Article

Scratch 2.0 Wireless Programming Guide for Vortex

Quick Start by JP Liew

Lesson 4: Animation. Goals

Tutorial 1: Software Setup

AVR Intermediate Development Board. Product Manual. Contents. 1) Overview 2) Features 3) Using the board 4) Troubleshooting and getting help

Transcription:

ROBOTLINKING THE POWER SUPPLY LEARNING KIT TUTORIAL 1

Preface About RobotLinking RobotLinking is a technology company focused on 3D Printer, Raspberry Pi and Arduino open source community development. Committed to the promotion of open source culture, we strive to bring the fun of electronics making to people all around the world and enable everyone to be a maker. Our products include learning kits, development boards, robots, sensor modules, development tools and printer machine. In addition to high quality products, RobotLinking also offers video tutorials to help your own project. If you have interest in open source or making something cool, welcome to join us! Visit www.robotlinking.com for more! About power supply learning Kit This power supply learning kit is suitable for RobotLinking Uno, RobotLinking Mega 2560, RobotLinking Duemilanove and RobotLinking Nano. All the code in this user guide is also compatible with these boards. Our RobotLinking board is fully compatible with Arduino. This kit walks you through the basics of using the RobotLinking board in a hands-on way. You'll learn through building several creative projects. The kit includes a selection of the most common and useful electronic components. Starting from the basics of electronics, to more complex projects, the kit will help you control the physical world with components. In this book, we will show you circuits with both realistic illustrations and schematic diagrams. You can go to our official website www.robotlinking.com to download related code. If you have any questions, please send an email to service@robotlinking.com. You can also leave a message and share your projects on our forum. 2

Contents Preface... 2 Components List... 4 Lesson 0 Installing IDE... 23 Lesson 1 Blink... 23 Lesson 2 Button... 30 Lesson 3 Flowing LED Lights... 34 Lesson 4 Active Buzzer... 37 Lesson 5 Passive Buzzer... 40 Lesson 6 Photoresistor... 43 Lesson 7 RGB LED... 46 Lesson 8 Servo... 49 Lesson 9 LCD1602... 51 Lesson 10 Thermistor... 54 Lesson 11 Voltmeter... 56 Lesson 12 Ultrasonic... 58 Lesson 13 Stopwatch... 61 Lesson 14 74HC595 And Segment Display... 64 Lesson 15 JOYSTICK... 69 Lesson 16 1 CHANNEL RELAY MODULE... 71 Lesson 17 DC Motors... 73 Lesson 18 DC Motors Reversing... 78 Lesson 19 Steeper Motor... 83 Lesson 20 Automatically Tracking Light Source... 88 Lesson 21 Packing... 91 Lesson 22 MPU6050... 94 Lesson 23 STEPPER MOTOR AND ULN2003... 100 3

Components List No Product Name Quantity Picture 1 RobotLinking Uno R3 Controller Board 1 2 USB Cable 1 3 LCD1602 Module 1 4 Breadboard 1 5 9V 1A Power Supply 1 4

6 Prototype Expansion Board 1 7 Ultrasonic Sensor 1 8 ULN2003 Stepper Motor Driver Board 1 9 Stepper motor 1 10 MPU 6050 1 5

11 Joystick 1 12 Relay 1 13 Remote 1 14 Servo Motor 1 15 130 Servo Motor 1 6

16 Resistor (10Ω) 10 17 Resistor (100Ω) 10 18 ] Resistor (220Ω) 10 19 Resistor (330Ω) 10 20 Resistor (1kΩ) 10 21 Resistor (2kΩ) 10 22 Resistor (5.1kΩ) 10 23 Resistor (10kΩ) 10 7

24 Resistor (100kΩ) 10 25 Resistor (1mΩ) 10 26 Ultrasonic Holder 1 27 1 digit 7-segment display 1 28 4 digit 7-segment display 1 29 Matrix display 1 8

30 BC547 5 31 BC557 5 32 Pn2222 5 33 MAX7219 1 34 L293D 1 9

35 74HC595 1 36 100UF 50V 2 37 10UF 50V 2 38 22pf ceramic capacitor 5 39 104 ceramic capacitor 5 10

40 IR receiver 1 41 Diode Rectifier (1N4007) 5 42 Photoresistor (Photocell) 2 43 Rotary Knob (Potentiometer) 2 44 RGB LED 1 11

45 Red LED 5 46 Yellow LED 5 47 White LED 5 48 Green LED 5 49 Blue LED 5 50 Active Buzzer 1 12

51 Passive Buzzer 1 52 Thermistor 1 53 Button (Small) 5 54 Pin Header 1 55 65 jumper wire 1 13

56 Female-Male cable 4 57 9v battery with DC 1 Note: After unpacking, please check that the number of components is correct and that all components are in good condition. 14

Introduction Lesson 0 Installing IDE In this lesson, you will learn how to setup your computer to use Arduino and how to set about the lessons that follow. Installing Arduino (Windows) The Arduino software that you will use to program your Arduino is available for Windows, Mac and Linux. The installation process is different for all three platforms and unfortunately there is a certain amount of manual work to install the software. There is no installer program, but rather you have to unzip a folder which gives you an Arduino folder that contains the Arduino program and a few other items. In a separate step, you must then install USB drivers, which is the only bit that is a bit fiddly. Get started by visiting the Arduino.cc website. As of April 2014 we suggest v1.05 as 1.5 is still in beta. If 1.5 is no longer in beta when you read this you can try it out! Start by downloading the the zip file for Windows. There is only one version of the software, whether you are using Windows XP through to Windows 7. 15

When the zip file has downloaded, extract the contents onto the Desktop, by right-clicking on the file and selecting 'Extract All...' from the pop-up menu. Next select your Desktop and click 'Extract'. You can move it somewhere else onto your computer later, just by moving the folder, but for now, just keep it on the Desktop. The Arduino folder contains both the Arduino program itself and also the drivers that allow the Arduino to be connected to your computer by a USB cable. Before we launch the Arduino software, you are going to install the USB drivers. Plug one end of your USB cable into the Arduino and the other into a USB socket on your computer. The power light on the LED will light up and you may get a 'Found New Hardware' message from Windows. Ignore this message and cancel any attempts that Windows makes to try and install drivers automatically for you. The most reliable method of installing the USB drivers is to use the Device Manager. This is accessed in different ways depending on your version of Windows. In Windows 7, you first have to open the Control Panel, then select the option to view Icons, and you should find the Device Manager in the list. Under the section Other Devices you should see an icon for unknown device with a little yellow warning triangle next to it. This is your Arduino. 16

Right-click on the device and select the top menu option (Update Driver Software...). You will then be prompted to either Search Automatically for updated driver software or Browse my computer for driver software. Select the option to browse and navigate to the arduino-1.0.2-windows\arduino1.0.2\drivers. 17

Click 'Next' and you may get a security warning, if so, allow the software to be installed. Once the software has been installed, you will get a confirmation message. That's it, you are now ready for action, so Skip the next section on installation on Mac and Linux and move straight on to 'Boards and Ports'. Installing Arduino (Mac and Linux) Get started by visiting the Arduino.cc website and downloading the matching IDE for your operating system. As of April 2014 we suggest v1.05 as 1.5 is still in beta. If 1.5 is no longer in beta when you read this you can try it out! 18

Save the install software to your desktop or wherever The process for installing the Arduino software on the Mac is a lot easier than on the PC. As before, the first step is to download the file. In the case of the Mac, it is a zip file. Once downloaded, double-click on the zip file, which will extract a single file called Arduino.app. This is the whole Arduino application, just drag it into your Applications Folder. 19

You can now find and launch the Arduino software in your Applications folder. As you are going to use it frequently, you may wish to right-click its icon in the dock and set it to Keep In Dock. There are many different LINUX distributions and the instructions for each distribution are a little different. The Arduino community has done a great job of putting together sets of instructions for each distribution. So follow the link below and select one of the ten or more distributions on offer. Boards and Ports You are now ready to start the Arduino Software, so whatever platform you are using, open the Arduino folder and open the Arduino application contained within it. 20

This will start the Arduino IDE, but before you can get programming, you have to tell the Arduino software which type of Arduino board you are using and also select the port it is connecting to. To tell the Arduino IDE which type of board you are using. From the 'Tools' menu, select Board and then 'Arduino Uno' or 'Leonardo' as appropriate. Also on the 'Tools' menu, you will find the 'Serial Port' option. Select this option. 21

If you are using Windows, there will probably only be one option here and it will either say COM3 or COM4. Even though there is only one option, you will still need to select it. If you are using a Mac or Linux, there will be more options there, but it will usually be the top option in the list, as this will be the device most recently plugged in. This is useful, as the name of the port may not look like it has anything to do with Arduino. It will probably be called something like /dev/tty.usbmodemxxxx or /dev/ttyusbn In the next lesson, you will start by programming your Arduino board to make its built-in LED blink. 22

Lesson 1 Blink Introduction In this lesson, you will learn how program your Uno R3 controller board to make the Arduino's built-in LED blink. Components - 1 * RobotLinking Uno board - 1 * USB cable Principle The Arduino has rows of connectors along both sides that are used to connect to electronic devices and plug-in 'shields' that allow the Arduino to do more. However, the Arduino also has a single LED that you can control from your sketches. This LED is built onto the Arduino board and is often referred to as the 'L' LED as this is how it is labelled on the board. 23

You may find that your Arduino board's 'L' LED already blinks when you connect it to a USB plug. This is because Arduino boards are generally shipped with the 'Blink' sketch preinstalled. In this lesson, we will reprogram the Arduino with our own Blink sketch and then change the rate at which it blinks. In Lesson 0, you setup your Arduino IDE and made sure that you could find the right serial port for it to connect to your Arduino board. The time has now come to put that connection to the test and program your Arduino board. The Arduino IDE includes a large collection of example sketches that you can load up and use. This includes an example sketch for making the 'L' LED blink. Load the 'Blink' sketch that you will find in the IDE's menu system under File Examples 01.Basics 24

When the sketch window opens, enlarge it so that you can see the whole of the sketch in the window. The example sketches included with the Arduino IDE are 'read-only'. That is, you can upload them to an Arduino board, but if you change them, you cannot save them as the same file. We are going to change this sketch, so, the first thing you need to do is save your own copy that you can change however you like. From the File menu on the Arduino IDE select the option 'Save As..' and then save the sketch with the name 'MyBlink'. 25

You have saved your copy of 'Blink' in your sketchbook. This means that if you ever want to find it again, you can just open it using the File Sketchbook menu option. Attach your Arduino board to your computer with the USB cable and check that the 'Board Type' and 'Serial Port' are set correctly. You may need to refer back to Lesson 0. The Arduino IDE will show you the current settings for board at the bottom of the window. 26

Click on the 'Upload' button. The second button from the left on the toolbar. If you watch the status area of the IDE, you will see a progress bar and a series of messages. At first it will say 'Compiling Sketch..'. This converts the sketch into a format suitable for uploading to the board. Next, the status will change to 'Uploading'. At this point, the LEDs on the Arduino should start to flicker as the sketch is transferred. Finally, the staus will change to 'Done'. The other message tells us that the sketch is using 1,084 bytes of the 32,256 bytes available.after the 'Compiling Sketch..' stage you could get the following error message: The clue is at the top here, it probably means that your board is not connected at all, or the drivers have not been installed (if necessary) or that the wrong serial port is selected. 27

If you get this, go back to Lesson 0 and check your installation. Once the upload has completed, the board should restart and start blinking. Open the code The first thing to note is that quite a lot of this sketch is what is called 'comments'. Comments are not actual program instructions, they are just comments about how the program works. They are there for out benefit, so that there is some explanation to accompany the sketch. Everything between /* and */ at the top of the sketch is a block comment, that explains what the sketch is for. There are also single line comments that start with // and everything up intil the end of the line counts as being a comment. The first actual line of code is: Copy Code 1. int led = 13; As the comment above explains, this is giving a name to the pin that the LED is attached to. This is 13 on most Arduinos, including the Uno and Leonardo. Next, we have the 'setup' function. Again, as the comment says, this is run when the reset button is pressed. It is also run whenever the board resets for any reason, such as power first being applied to it, or after a sketch has been uploaded. Copy Code 1. void setup() { 2. // initialize the digital pin as an output. 3. pinmode(led, OUTPUT); 4. } Every Arduino sketch must have a 'setup' function, and the part of it where you might want to add instructions of your own is between the { and the }. In this case, there is just one command there, which, as the comment states tells the Arduino board that we are going to use the LED pin as an output. It is also mandatory for a sketch to have a 'loop' function. Unlike the 'setup' function that only runs once, after a reset, the 'loop' function will, after it has finished running its commands, immediately start again. Copy Code 1. void loop() { 2. digitalwrite(led, HIGH); // turn the LED on (HIGH is the voltage level) 3. delay(1000); // wait for a second 4. digitalwrite(led, LOW); // turn the LED off by making the voltage LOW 28

5. delay(1000); // wait for a second 6. } Inside the loop function, the commands first of all turn the LED pin on (HIGH), then 'delay' for 1000 milliseconds (1 second), then turn the LED pin off and pause for another second. You are now going to make your LED blink faster.as you might have guessed, the key to this lies in changing the parameter in () for the 'delay' command. This delay period is in milliseconds, and so if you want the LED to blink twice as fast, change the value of 1000 to 500. This would then pause for half a second each delay rather than a whole second. Upload the sketch again and you should see the LED start to flash more quickly. 29