DFRduino Romeo All in one Controller V1.1(SKU:DFR0004)

Similar documents
FABO ACADEMY X ELECTRONIC DESIGN

Arduino Microcontroller Processing for Everyone!: Third Edition / Steven F. Barrett

Training Schedule. Robotic System Design using Arduino Platform

The Motor sketch. One Direction ON-OFF DC Motor

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

Sten-Bot Robot Kit Stensat Group LLC, Copyright 2013

Introduction to the Arduino Kit

CPE Senior Project Final Report: Roborodentia Team Street Sweeper

THE INPUTS ON THE ARDUINO READ VOLTAGE. ALL INPUTS NEED TO BE THOUGHT OF IN TERMS OF VOLTAGE DIFFERENTIALS.

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

The Robot Builder's Shield for Arduino

Module: Arduino as Signal Generator

Touch Potentiometer Hookup Guide

The µbotino Microcontroller Board

APDS-9960 RGB and Gesture Sensor Hookup Guide

Application Note AN 102: Arduino I2C Interface to K 30 Sensor

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

Veyron Servo Driver (24 Channel) (SKU:DRI0029)

INSTANT ROBOT SHIELD (AXE408)

Lab 2: Blinkie Lab. Objectives. Materials. Theory

Arduino DC Motor Control Tutorial L298N PWM H-Bridge

EARTH PEOPLE TECHNOLOGY. EPT-200TMP-TS-U2 Temperature Sensor Docking Board User Manual

TWEAK THE ARDUINO LOGO

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

1Getting Started SIK BINDER //3

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

INA169 Breakout Board Hookup Guide

Figure 1. Digilent DC Motor

3.3V regulator. JA H-bridge. Doc: page 1 of 7

Basics before Migtrating to Arduino

Servomotor Control with Arduino Integrated Development Environment. Application Notes. Bingyang Wu Mar 27, Introduction

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

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

Arduino Lesson 1. Blink. Created by Simon Monk

CPSC 226 Lab Four Spring 2018

Adafruit 16-Channel Servo Driver with Arduino

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

Pulse Width Modulation and

Gravity: 12-Bit I2C DAC Module SKU: DFR0552

High Current DC Motor Driver Manual

MICROCONTROLLERS BASIC INPUTS and OUTPUTS (I/O)

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

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

Enhanced SmartDrive40 MDS40B

Tarocco Closed Loop Motor Controller

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

Adafruit 16-channel PWM/Servo Shield

DASL 120 Introduction to Microcontrollers

Arduino An Introduction

DEVKIT-S12ZVC QUICK START GUIDE (QSG)

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

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

Arduino Advanced Projects

Adafruit 16-channel PWM/Servo Shield

Coding with Arduino to operate the prosthetic arm

URM37 V3.2 Ultrasonic Sensor (SKU:SEN0001)

MICROCONTROLLERS BASIC INPUTS and OUTPUTS (I/O)

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

HC-SR501 Passive Infrared (PIR) Motion Sensor

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

Adafruit 16-Channel Servo Driver with Arduino

ZX Distance and Gesture Sensor Hookup Guide

4WD Mobile Platform SKU:ROB0022

Lesson 3: Arduino. Goals

Welcome to Arduino Day 2016

Intelligent Systems Design in a Non Engineering Curriculum. Embedded Systems Without Major Hardware Engineering

Arduino Uno Pinout Book

USER MANUAL SERIAL IR SENSOR ARRAY5

MAE106 Laboratory Exercises Lab # 1 - Laboratory tools

Application Note. Communication between arduino and IMU Software capturing the data

Rodni What will yours be?

Montgomery Village Arduino Meetup Dec 10, 2016

Interface MEMS 3-Axis Accelerometer to Microcontroller

1. Introduction to Analog I/O

Sunday, November 4, The LadyUno Sound Unit

1. Controlling the DC Motors

BEYOND TOYS. Wireless sensor extension pack. Tom Frissen s

WifiBotics. An Arduino Based Robotics Workshop

Pi Servo Hat Hookup Guide

CMU232 User Manual Last Revised October 21, 2002

PCAN-MicroMod Evaluation Test and Development Environment for the PCAN-MicroMod. User Manual. Document version ( )

ArduCAM USB Camera Shield

EGG 101L INTRODUCTION TO ENGINEERING EXPERIENCE

HAND GESTURE CONTROLLED ROBOT USING ARDUINO

HB-25 Motor Controller (#29144)

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

Arduino

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

Application Note AN 157: Arduino UART Interface to TelAire T6613 CO2 Sensor

Arduino and Servo Motor

MAKEVMA502 BASIC DIY KIT WITH ATMEGA2560 FOR ARDUINO USER MANUAL

Assignments from last week

Arduino Setup & Flexing the ExBow

ISSN: [Singh* et al., 6(6): June, 2017] Impact Factor: 4.116

02 Digital Input and Output

Controlling DC Brush Motor using MD10B or MD30B. Version 1.2. Aug Cytron Technologies Sdn. Bhd.

Megamark Arduino Library Documentation

SC16A SERVO CONTROLLER

B RoboClaw 2 Channel 30A Motor Controller Data Sheet

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

Transcription:

DFRduino Romeo All in one Controller V1.1(SKU:DFR0004) DFRduino RoMeo V1.1 Contents 1 Introduction 2 Specification 3 DFRduino RoMeo Pinout 4 Before you start 4.1 Applying Power 4.2 Software 5 Romeo Configuration 5.1 Servo Power Select Jumper 5.2 Motor Control Pin Jumper 6 Tutorial 6.1 Button Press 6.2 Example use of Button 1-5 7 Dual DC Motor Speed Control 7.1 Hardware Setting 7.2 Pin Allocation 7.3 PWM Control Mode 7.4 PLL Control Mode

Introduction RoMeo is an All-in-One microcontroller especially designed for robotics application. Benefit from Arduino open source platform, it is supported by thousands of open source codes, and can be easily expanded with most Arduino Shields. The integrated 2 way DC motor driver and wireless socket gives a much easier way to start your robotic project. Note: A. Please read this manual carefully before applying power on the device. B. Do not use this device for military or medical purpose as they are not des igned to. Specification Atmega 168/328 14 Channels Digital I/O 6 PWM Channels (Pin11,Pin10,Pin9,Pin6,Pin5,Pin3) 8 Channels 10-bit Analog I/O USB interface Auto sensing/switching power input ICSP header for direct program download Serial Interface TTL Level Support AREF Support Male and Female Pin Header Integrated sockets for APC220 RF Module and DF-Bluetooth Module Five I2C Interface Pin Sets Two way Motor Drive with 2A maximum current 5 key inputs DC Supply:USB Powered or External 7V~12V DC DC Output:5V /3.3V DC and External Power Output Dimension:90x80mm DFRduino RoMeo Pinout Fig1: Romeo Pin Out

The picture above shows all of the I/O lines and Connectors on the Romeo, which includes: One Regulated Motor Power Input Terminal (6v to12v) One Unregulated Servo Power Input Terminal (you supply regulated 4v to 7.2v) One Servo input power selection jumper One Serial Interface Module Header for APC220/Bluetooth Module Two DC Motor Terminals Handles motor current draw up to 2A, each terminal One I2C/TWI Port SDA, SCL, 5V, GND One Analog Port with 8 analog inputs Analog input 7 will be occupied when connecting "A7" jumper One General Purpose I/O Port with 13 I/O lines 4,5,6,7 can be used to control motors One Reset Button Jumper bank to Enable/Disable Motor Control Before you start Applying Power This is one of the most important steps in getting the Romeo up and communicating with your host controller. You MUST make sure that you apply power to the Power Terminal using the correct polarity. Reverse Polarity will damage the Romeo. We are not responsible for such damage, nor do we warranty against such damage. Make sure you take time to apply power correctly. Otherwise, it could get costly for you! Power from USB: Simply plug USB cable, and the Romeo is able to work. Please notice that the USB can only supply 500 ma current. It should be able to meet the most requirements for LED lit application. However it is not enough to power DC motors or servo. Power from Motor Power Input: Simply connect the ground wire from your supply to the screw terminal labeled GND, and then connect the positive wire from your supply to the screw terminal labeled VIN". NOTE: Maximum supply voltage cannot exceed 14V DC. Software RoMeo can be programmed by Arduino IDE 0022 and above. It can be downloaded at Arduino.cc, Please select Arduino UNO as the hardware. Romeo Configuration Servo Power Select Jumper As most servos draw more current than the USB power source can supply. A separate servo power terminal is provided to power the servo individually. This option can be Enabled/Disabled by the Servo Power Select Jumper. When the Servo Power Select Jumper is applied, the servo is powered by internal 5V. When the Servo Power Select Jumper is not applied, the servo is powered by external power source.

The Romeo V1.0 uses an automatic switcher for the power source selection. When the external power source has been applied, the servo will be automatically powered by the external power instead of USB power. Motor Control Pin Jumper Applying the Motor Control Pin Jumpers will allocate Pin 5,6,7,8 for motor control. Removing the jumpers will release the above Pins, and the motor controller will be disabled. Tutorial Button Press RoMeo has 5 build in buttons S1-S5 (Figure 2). S1-S5 use analog input 7, "Button Pin Map" Pin Function Analog Pin 7 Button S1-S5 Fig2: Romeo Buttons Example use of Button 1 5 char msgs[5][15] = "Right Key OK ", "Up Key OK ", "Down Key OK ", "Left Key OK ", "Select Key OK" ;

char start_msg[15] = "Start loop "; int adc_key_val[5] = 30, 150, 360, 535, 760 ; int NUM_KEYS = 5; int adc_key_in; int key=-1; int oldkey=-1; void setup() pinmode(13, OUTPUT); //we'll use the debug LED to output a heartbeat Serial.begin(9600); /* Print that we made it here */ Serial.println(start_msg); void loop() adc_key_in = analogread(7); // read the value from the sensor digitalwrite(13, HIGH); /* get the key */ key = get_key(adc_key_in); // convert into key press if (key!= oldkey) // if keypress is detected delay(50); // wait for debounce time adc_key_in = analogread(7); // read the value from the sensor key = get_key(adc_key_in); // convert into key press if (key!= oldkey) oldkey = key; if (key >=0) Serial.println(adc_key_in, DEC); Serial.println(msgs[key]);

digitalwrite(13, LOW); // Convert ADC value to key number int get_key(unsigned int input) int k; for (k = 0; k < NUM_KEYS; k++) if (input < adc_key_val[k]) return k; if (k >= NUM_KEYS) k = -1; return k; // No valid key pressed Dual DC Motor Speed Control Hardware Setting Connect four motor wires to Motor Terminal. And apply power through motor power terminal (Figure 4). Fig3: Romeo Motor Connection Diagram

Pin Allocation "PWM Mode" Pin Function Digital 4 Digital 5 Digital 6 Digital 7 Motor 1 Direction control Motor 1 PWM control Motor 2 PWM control Motor 2 Direction control "PLL Mode" Pin Function Digital 4 Digital 5 Digital 6 Digital 7 Motor 1 Enable control Motor 1 Direction control Motor 2 Direction control Motor 2 Enable control PWM Control Mode Fig4: PWM Motor Control Pin Allocation

The PWM DC motor control is implemented by manipulating two digital IO pins and two PWM pins. As illustrated in the diagram above (Figure 5), Pin 4,7 (7,8 for old Romeo version) are motor direction control pins, Pin 5,6 (6,9 for old Romeo version) are motor speed control pins. For previous Romeo board, the pins used to control the motor is Pin 7,8 (Direction), Pin 6,9 (Speed). You can find the information at the right side of the Motor Control Pin Jumpers. Sample Code: //Standard PWM DC control int E1 = 5; int E2 = 6; int M1 = 4; int M2 = 7; //M1 Speed Control //M2 Speed Control ///For previous Romeo, please use these pins. //int E1 = 6; //int E2 = 9; //int M1 = 7; //int M2 = 8; //M1 Speed Control //M2 Speed Control void stop(void) //Stop digitalwrite(e1,low); digitalwrite(e2,low); void advance(char a,char b) //Move forward analogwrite (E1,a); //PWM Speed Control digitalwrite(m1,high); analogwrite (E2,b); digitalwrite(m2,high); void back_off (char a,char b) //Move backward

analogwrite (E1,a); digitalwrite(m1,low); analogwrite (E2,b); digitalwrite(m2,low); void turn_l (char a,char b) analogwrite (E1,a); digitalwrite(m1,low); analogwrite (E2,b); digitalwrite(m2,high); void turn_r (char a,char b) analogwrite (E1,a); digitalwrite(m1,high); analogwrite (E2,b); digitalwrite(m2,low); //Turn Left //Turn Right void setup(void) int i; for(i=4;i<=7;i++) pinmode(i, OUTPUT); Serial.begin(19200); //Set Baud Rate Serial.println("Run keyboard control"); void loop(void) if(serial.available()) char val = Serial.read();

if(val!= -1) switch(val) case 'w'://move Forward advance (255,255); //move forward in max speed case 's'://move Backward back_off (255,255); //move back in max speed case 'a'://turn Left turn_l (100,100); case 'd'://turn Right turn_r (100,100); case 'z': Serial.println("Hello"); case 'x': stop(); else stop(); PLL Control Mode The Romeo also supports PLLPhase locked loop control mode.

Fig5: PLL Motor Control Pin Allocation Configuration Sample Code: //Standard DLL Speed control int E1 = 4; int E2 = 7; int M1 = 5; int M2 = 6; //M1 Speed Control //M2 Speed Control ///For previous Romeo, please use these pins. //int E1 = 6; //int E2 = 9; //M1 Speed Control //M2 Speed Control //int M1 = 7; //int M2 = 8; //When m1p/m2p is 127, it stops the motor //when m1p/m2p is 255, it gives the maximum speed for one direction //When m1p/m2p is 0, it gives the maximum speed for reverse direction void DriveMotorP(byte m1p, byte m2p)//drive Motor Power Mode

digitalwrite(e1, HIGH); analogwrite(m1, (m1p)); digitalwrite(e2, HIGH); analogwrite(m2, (m2p)); void setup(void) int i; for(i=6;i<=9;i++) pinmode(i, OUTPUT); Serial.begin(19200); //Set Baud Rate void loop(void) if(serial.available()) char val = Serial.read(); if(val!=-1) switch(val) case 'w'://move Forward DriveMotorP(0xff,0xff); // Max speed case 'x'://move Backward DriveMotorP(0x00,0x00); ; // Max speed

case 's'://stop DriveMotorP(0x7f,0x7f); Powered By DFRobot 2008-2017