Trademarks & Copyright

Similar documents
MD03-50Volt 20Amp H Bridge Motor Drive

MD04-24Volt 20Amp H Bridge Motor Drive

Serial Servo Controller

Introduction to the Arduino Kit

Carbon Dioxide (Tiny CO2) Gas Sensor. Rev TG400 User Manual

USART Digital Compass Manual

ICS3.5 Software Manual Command Refarence

EVDP610 IXDP610 Digital PWM Controller IC Evaluation Board

DMC-8 (SKU#ROB )

Ocean Controls KT-5198 Dual Bidirectional DC Motor Speed Controller

BV4112. Serial Micro stepping Motor Controller. Product specification. Dec V0.a. ByVac Page 1 of 18

ELT Sensor Data Sheet for S-300-3V

Low Power with Long Range RF Module DATASHEET Description

CMPS09 - Tilt Compensated Compass Module

CMU232 User Manual Last Revised October 21, 2002

Simple Servo USER Instructions

I2C Encoder. HW v1.2

HOMANN DESIGNS. DigiSpeed. Instruction manual. Version 1.0. Copyright 2004 Homann Designs.

Qik 2s12v10 User's Guide

Qik 2s12v10 User's Guide

Ocean Controls KT-5221 Modbus IO Module

Training Schedule. Robotic System Design using Arduino Platform

CMPS11 - Tilt Compensated Compass Module

RB-Dev-03 Devantech CMPS03 Magnetic Compass Module

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

B Robo Claw 2 Channel 25A Motor Controller Data Sheet

ZIO Python API. Tutorial. 1.1, May 2009

2F. No.25, Industry E. 9 th Rd., Science-Based Industrial Park, Hsinchu, Taiwan Application Note of OGM220, AN001 V1.8

TB6612FNG Dual Motor Driver Carrier

Programming the Dallas/Maxim DS MHz I2C Oscillator. Jeremy Clark

CDM10V programming user manual describes the COOLDIM_PRG_BOARD burner board usage, the UART protocol handling and the fusing details.

Adafruit 16-channel PWM/Servo Shield

USER S GUIDE POLOLU DRV8838 SINGLE BRUSHED DC MOTOR DRIVER CARRIER USING THE MOTOR DRIVER

Citrus Circuits Fall Workshop Series. Roborio and Sensors. Paul Ngo and Ellie Hass

I 2 C RedBot & DC Motor Servo Motor Control

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

Pololu TReX Jr Firmware Version 1.2: Configuration Parameter Documentation

I2C Demonstration Board LED Dimmers and Blinkers PCA9531 and PCA9551

ELT Sensor Data Sheet for C2H4-D3

PAK-Vb/c PWM Coprocessor Data Sheet by AWC

Adafruit 16-channel PWM/Servo Shield

TMC603EVAL MANUAL Evaluation board for the TMC603 three phase motor driver with BLDC back EMF commutation hallfx

ISO 9001 CERTIFIED. 607 NW 27th Ave Ocala, FL Phone: (352) or Fax: (352) OPERATION MANUAL

Pololu Dual G2 High-Power Motor Driver for Raspberry Pi

Junior Digital circuit experiment board. Use for the experimentation of digital circuits both TTL IC and CMOS DC supply :

ies-2309 Integrated Easy Servo

The PmodIA is an impedance analyzer built around the Analog Devices AD bit Impedance Converter Network Analyzer.

B RoboClaw 2 Channel 30A Motor Controller Data Sheet

instruction manual for Open LRS New Generation

Sten-Bot Robot Kit Stensat Group LLC, Copyright 2013

HB-25 Motor Controller (#29144)

POLOLU DUAL MC33926 MOTOR DRIVER FOR RASPBERRY PI (ASSEMBLED) USER S GUIDE

Figure 1. DMC 60 components.

SC16A SERVO CONTROLLER

LAX016 Series Logic Analyzer User Guide

User's Manual. ServoCenter 4.1. Volume 2: Protocol Reference. Yost Engineering, Inc. 630 Second Street Portsmouth, Ohio

Gertbot Rev September Gertbot. Rev 1.0, 8 September2014

Jaguar Motor Controller (Stellaris Brushed DC Motor Control Module with CAN)

EECE494: Computer Bus and SoC Interfacing. Serial Communication: RS-232. Dr. Charles Kim Electrical and Computer Engineering Howard University

Servo click. PID: MIKROE 3133 Weight: 32 g

Modern Robotics Inc. Sensor Documentation

Tarocco Closed Loop Motor Controller

High Current DC Motor Driver Manual

Touch Potentiometer Hookup Guide

LED Driver 5 click. PID: MIKROE 3297 Weight: 25 g

POLOLU MAX14870 SINGLE BRUSHED DC MOTOR DRIVER CARRIER USER S GUIDE

IP1 Datasheet PWM OUTPUT WITH SINGLE CHANNEL ADC MODULE FEATURES DESCRIPTION CONNECTOR DETAILS

Integrity Instruments

TLE5014 Programmer. About this document. Application Note

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

Embedded Radio Data Transceiver SV611

Mercury technical manual

Enhanced SmartDrive40 MDS40B

ZKit-51-RD2, 8051 Development Kit

Model: ADC-x/DIG-x. RS-232 / RS-485 Data Acquisition Digital I/O v2.2 Firmware. SuperLogics. Integrity Instruments. SuperLogics

Activity 4: Due before the lab during the week of Feb

Brushless DC Motor Controller Specification Assemblies 025F0248

Features. General Description. EV Kit Contents. EV Kit Photo

SV613 USB Interface Wireless Module SV613

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

Pololu Jrk USB Motor Controller

Debugging a Boundary-Scan I 2 C Script Test with the BusPro - I and I2C Exerciser Software: A Case Study

EE 308 Spring S12 SUBSYSTEMS: PULSE WIDTH MODULATION, A/D CONVERTER, AND SYNCHRONOUS SERIAN INTERFACE

OEM 100. User Manual. Figure 1: OEM 100 Module with HG Rectangular Antenna Board

LP3943/LP3944 as a GPIO Expander

MiniProg Users Guide and Example Projects

The NMIH-0050 H-Bridge

LaserPING Rangefinder Module (#28041)

USB-MC USB Motion Controller

µchameleon 2 User s Manual

Project Final Report: Directional Remote Control

Catalog

CoolEx User Manual 2008 XDIMAX LTD. Revision 1.0

Multiple Instrument Station Module

PCL-836 Multifunction countertimer and digital I/O add-on card for PC/XT/ AT and compatibles

INF8574 GENERAL DESCRIPTION

DS1307/DS X 8 Serial Real Time Clock

Application Note: Demonstrating CAN with nqbasic

YDLIDAR G4 DATASHEET. Doc#: 文档编码 :

About Security of the RAK DEK

Transcription:

Smart Peripheral Controller Neo DC Motor 1.2A Trademarks & Copyright AT, IBM, and PC are trademarks of International Business Machines Corp. Pentium is a registered trademark of Intel Corporation. Windows is a registered trademark of Microsoft Corporation. CodeVisionAVR is copyright by Pavel Haiduc, HP InfoTech s.r.l.

Table Of Contents 1 Introduction... 3 1.1 SPC NEO DC MOTOR 1.2A Specification... 3 1.2 Suggested System... 3 2 SPC NEO DC MOTOR 1.2A Hardware... 3 2.1 SPC NEO DC MOTOR 1.2A Component Layout... 3 2.2 Connectors and Jumpers Configurations... 4 3 SPC NEO DC MOTOR 1.2A Interface... 5 3.1 UART TTL Interface... 5 3.2 I 2 C Interface... 5 3.3 Set... 5 3.3.1 M1 Forward... 6 3.3.2 M1 Reverse... 6 3.3.3 M1 Stop... 7 3.3.4 M1 Brake... 7 3.3.5 M2 Forward... 8 3.3.6 M2 Reverse... 8 3.3.7 M2 Stop... 9 3.3.8 M2 Brake... 9 3.3.9 All Stop... 10 3.3.10 All Brake... 10 3.3.11 All Forward... 10 3.3.12 All Reverse... 11 3.3.13 Set PWM Frequency... 11 3.3.14 Set I 2 C Address... 12 3.3.15 Read I 2 C Address... 12 4 Testing Procedure... 13 5 Application and Program Example... 13 Attachment A. SPC NEO DC MOTOR 1.2A Schematics... 15 2

1. INTRODUCTION Smart Peripheral Controller / SPC NEO DC MOTOR 1.2A is a DC motor controller module which is compact, reliable, and compatible for robotic applications. This module can be used to control the direction and speed of 2 DC motors using Pulse Width Modulation (PWM) method. This module is equipped with dual full H-bridge driver, UART TTL interface, and I 2 C interface, so that it can easily be connected with other systems. 1.1. SPC NEO DC MOTOR 1.2A SPECIFICATION SPC NEO DC MOTOR 1.2A specification is as follows: The module requires 4.8 5.4 VDC power supply. The motor requires 2.5 13.5 VDC power supply. Uses a TB6612FNG motor driver IC. Each driver's maximum continuous current is 1.2 A. Available PWM frequencies are 21.68 khz, 2.71 khz (default), 338.8 Hz, and 84.7 Hz. Input/Output pins are compatible with TTL and CMOS voltage level. Equipped with UART TTL and I 2 C interface. Using I 2 C, SPC NEO DC MOTOR 1.2A can be cascaded up to 8 modules. Module uses a 16 pins 600mil DIP connector configuration which is easier to connect directly to project board or PCB matrix. 1.2. SUGGESTED SYSTEM Suggested system for SPC NEO DC MOTOR 1.2A is as follows: Hardware: PC AT Pentium IBM Compatible with USB port. DT-AVR Low Cost Series. DVD-ROM Drive and Hard disk. Software: Windows XP Operating System. CodeVisionAVR. Program CD/DVD contents: Contoh_i2c folder, contoh_uart folder, TB6612FNG.pdf, and SPC Neo DC Motor 1.2A Manual.pdf. 2. SPC NEO DC MOTOR 1.2A HARDWARES 2.1. SPC NEO DC MOTOR 1.2A COMPONENT LAYOUT 3

2.2. CONNECTORS AND JUMPERS CONFIGURATIONS INTERFACE PORT (J2) connector functions as a connector for module power supply input, UART TTL, and I 2 C interface. Pin Name 1,2 VIN Connected to power supply (4.8 5.4 Volts) 3 SCL I 2 C-bus clock input 4 SDA I 2 C-bus data input / output 5 RX TTL TTL serial level input to SPC module 6 TX TTL TTL serial level output from SPC module 7,8 PGND Ground reference for SPC module power supply MOTOR (J3) connector functions as a connector for motor power supply input and motors. Pin Name 1,2 VM Connected to motor power supply (2.5 13.5 Volts) 3 M11 1 st Output from H-Bridge M1 pair 4 M12 2 nd Output from H-Bridge M1 pair 5 M21 1 st Output from H-Bridge M2 pair 6 M22 2 nd Output from H-Bridge M2 pair 7,8 MGND Ground reference for motor power supply M11 and M12 are connected to DC motor 1, while M21 and M22 are connected to DC motor 2. SCL-SDA (J4) jumpers are used to activate pull-up resistors for SDA and SCL on I 2 C interface. Jumper SCL-SDA J4 SCL SDA Pull-up inactive (jumpers disconnected) SCL SDA Pull up active (jumpers connected) Important! If more than one module is connected to I 2 C-bus, then only one set of SCL- SDA (J4) jumpers needs to be connected. I 2 C address configuration can be done through UART TTL interface. LED M1 IND (D3) functions as DC motor 1's condition indicator. LED M2 IND (D4) functions as DC motor 2's condition indicator. 4

3. SPC NEO DC MOTOR 1.2A INTERFACE SPC NEO DC MOTOR 1.2A has UART TTL and I 2 C interfaces that can be used to receive commands or send data. 3.1. UART TTL INTERFACE UART TTL communication parameters are as follows: 38400 bps 8 data bits 1 stop bit no parity bit no flow control All commands sent through UART TTL interface begin with 1 byte data that contains <command number>, followed by (if needed) n-byte data command parameter. If the command sent is a command requesting data from the SPC NEO DC MOTOR 1.2A module, then SPC NEO DC MOTOR 1.2A will send the data via TX TTL line. Available commands and parameters can be seen in section 3.3. 3.2. I 2 C INTERFACE SPC NEO DC MOTOR 1.2A module has an I 2 C interface. In this interface, SPC NEO DC MOTOR 1.2A module acts as a slave with an address that has been determined via UART command (see section 3.3.14). I 2 C interface in SPC NEO STEPPER MOTOR 1.2A module supports bit rate up to a maximum rate of 50 khz. All commands sent through I 2 C interface begin with start condition, followed by 1 byte of SPC NEO DC MOTOR 1.2A module address. After the address is sent, the master must send 1 byte data that contains <command number>, followed by (if needed) n-byte command parameter data. After all command parameters have been sent, the command is ended with stop condition. The following is the sequence that must be done to send a command via I 2 C interface. Start + 1 1 1 0 X X X 0 + Write Address X X X X X X X X + X X X X X X X X + Parameter (if available) Stop Available commands and parameters can be seen in section 3.3. 3.3. COMMAND SET The following is a complete list of commands on UART and I 2 C interface: 5

3.3.1. M1 FORWARD Parameter Controls DC motor 1 forward rotation 0x30 <pwm level> 0-255 assigned duty cycle percentage (0 = 0% ; 255 = 100%). Description On forward condition, M11 will produce voltage proportional to the PWM value while M12 will be connected with MGND. On forward condition, M1 indicator LED will lit up green. Motor direction and PWM value will not be saved in EEPROM. When the SPC module is powered on, PWM value is 0 (zero), and the motor will be in a stop condition (M1 indicator LED will lit up orange). Example with UART interface to control the forward speed of DC motor connected to M1. If the desired duty cycle is 50% (0.5 * 255 = 128) or equal to 128 decimal and 0x80 hexadecimal: User : 0x30 0x80 i2c_write(0x30); i2c_write(0x80); // M1 Forward command // PWM value 3.3.2. M1 REVERSE Parameter Controls DC motor 1 reverse rotation 0x31 <pwm level> 0-255 assigned duty cycle percentage (0 = 0% ; 255 = 100%) Description On reverse condition, M12 will produce voltage proportional to the PWM value while M11 will be connected with MGND. On reverse condition, M1 indicator LED will lit up red. Motor direction and PWM value will not be saved in EEPROM. When the SPC module is powered on, PWM value is 0 (zero) and the motor will be in a stop condition (M1 indicator LED will lit up orange). Example with UART interface to control the reverse speed of DC motor connected to M1. If the desired duty cycle is 20% (0.25 * 255 = 64) or equal to 64 decimal and 0x40 hexadecimal: User : 0x31 0x40 6

i2c_write(0x31); i2c_write(0x40); // M1 Reverse command // PWM value 3.3.3. M1 STOP Stops DC motor 1 0x32 Parameter - Description On stop condition, M11 and M12 will be in a three state / high impedance condition. On stop condition, M1 indicator LED will lit up orange. Example with UART interface to stop DC motor connected to M1: User : 0x32 i2c_write(0x32); // M1 Stop command 3.3.4. M1 BRAKE Stops DC motor 1 quickly 0x33 Parameter - Description On brake condition, M11 and M12 will be connected to MGND. On brake condition, M1 indicator LED will lit up green and red alternately. Example with UART interface to quickly stop DC motor connected to M1: User : 0x33 i2c_write(0x33); // M1 Brake command 7

3.3.5. M2 FORWARD Parameter Controls DC motor 2 forward rotation 0x34 <pwm level> 0-255 assigned duty cycle percentage (0 = 0% ; 255 = 100%). Description On forward condition, M21 will produce voltage proportional to the PWM value while M22 will be connected with MGND. On forward condition, M2 indicator LED will lit up green. Motor direction and PWM value will not be saved in EEPROM. When the SPC module is powered on, PWM value is 0 (zero), and the motor will be in a stop condition (M2 indicator LED will lit up orange). Example with UART interface to control the forward speed of DC motor connected to M2. If the desired duty cycle is 10% (0.1 * 255 = 26) or equal to 28 decimal and 0x1A hexadecimal: User : 0x34 0x1A i2c_write(0x34); i2c_write(0x1a); // M2 Forward command // PWM value 3.3.6. M2 REVERSE Parameter Controls DC motor 2 reverse rotation 0x35 <pwm level> 0-255 assigned duty cycle percentage (0 = 0% ; 255 = 100%) Description On reverse condition, M22 will produce voltage proportional to the PWM value while M21 will be connected with MGND. On reverse condition, M2 indicator LED will lit up red. Motor direction and PWM value will not be saved in EEPROM. When the SPC module is powered on, PWM value is 0 (zero) and the motor will be in a stop condition (M2 indicator LED will lit up orange). Example with UART interface to control the reverse speed of DC motor connected to M2. If the desired duty cycle is 90% (0.9 * 255 = 230) or equal to 230 decimal and 0xE6 hexadecimal: User : 0x35 0xE6 8

i2c_write(0x35); i2c_write(0xe6); // M2 Reverse command // PWM value 3.3.7. M2 STOP Stops DC motor 2 0x36 Parameter - Description On stop condition, M21 and M22 will be in a three states / high impedance condition. On stop condition, M2 indicator LED will lit up orange. Example with UART interface to stop DC motor connected to M2: User : 0x36 i2c_write(0x36); // M2 Stop command 3.3.8. M2 BRAKE Stops DC motor 2 quickly 0x37 Parameter - Description On brake condition, M21 and M22 will be connected to MGND. On brake condition, M2 indicator LED will lit up green and red alternately. Example with UART interface to quickly stop DC motor connected to M2: User : 0x37 i2c_write(0x37); // M2 Brake command 9

3.3.9. ALL STOP Stops DC motors 1 and 2 simultaneously 0x38 Parameter - Description This command runs the M1 STOP and M2 STOP simultaneously. Example with UART interface to stop DC motors connected to M1 and M2 simultaneously: User : 0x38 i2c_write(0x38); // All Stop command 3.3.10. ALL BRAKE Stops DC motors 1 and 2 quickly and simultaneously 0x39 Parameter - Description This command runs the M1 BRAKE and M2 BRAKE simultaneously. Example with UART interface to quickly stop DC motors connected to M1 and M2 simultaneously: User : 0x39 i2c_write(0x39); // All Brake command 3.3.11. ALL FORWARD Parameter Controls DC motors 1 and 2 forward rotation simultaneously 0x3A <pwm level> 0-255 assigned duty cycle percentage (0 = 0% ; 255 = 100%) Description This command runs the M1 FORWARD and M2 FORWARD simultaneously with the same PWM value. 10

Example with UART interface to control the forward speed of DC motors connected to M1 and M2. If the desired duty cycle is 100% or equal to 255 decimal and 0xFF hexadecimal: User : 0x3A 0xFF i2c_write(0x3a); i2c_write(0xff); // All Forward command // PWM value 3.3.12. ALL REVERSE Parameter Controls DC motors 1 and 2 reverse rotation simultaneously 0x3B <pwm level> 0-255 assigned duty cycle percentage (0 = 0% ; 255 = 100%) Description This command runs the M1 REVERSE and M2 REVERSE simultaneously with the same PWM value. Example with UART interface to control the reverse speed of DC motors connected to M1 and M2. If the desired duty cycle is 75% (0.75 * 255 = 191) or equal to 191 decimal and 0xBF hexadecimal: User : 0x3B 0xBF i2c_write(0x3b); i2c_write(0xbf); // All Reverse command // PWM value 3.3.13. SET PWM FREQUENCY Parameter Sets the PWM frequency 0x40 <select> 0-3 0 means PWM frequency is = 21.68 khz 1 means PWM frequency is = 2.71 khz 2 means PWM frequency is = 338.8 Hz 3 means PWM frequency is = 84.7 Hz Description The default frequency is 2.71 khz. The selected PWM frequency will be saved in EEPROM. When the SPC module is powered on, the last saved frequency will be use as the PWM frequency. 11

Example with UART interface to set PWM frequency to 338.8 Hz: User : 0x40 0x02 i2c_write(0x40); i2c_write(0x02); // Set PWM Freq command // Selected frequency 3.3.14.SET I 2 C ADDRESS Changes I 2 C address 0x41 Parameter <0xAA> <0x55> <newaddress> Description This command can only be performed via UART communication line. SPC module will use the new I 2 C address after going through power off sequence. The allowed I 2 C address <newaddress> can be seen in the table below. If the new address given is incorrect, then the I 2 C address will not be changed (the previous address will be used). The default I 2 C address is 0xE0. I 2 C address data will be saved in EEPROM so it won't be erased when it's powered off. I 2 C Address I 2 C Write Address I 2 C Read Address 0xE0 0xE1 0xE2 0xE3 0xE4 0xE5 0xE6 0xE7 0xE8 0xE9 0xEA 0xEB 0xEC 0xED 0xEE 0xEF Example with UART interface to change the I 2 C address from 0xE0 to 0xE2: User : 0x41 0xAA 0x55 0xE2 3.3.15.READ I 2 C ADDRESS Reads the current I 2 C address 0x42 Parameter - Response <I 2 CAddress> Description This command can only be performed via UART communication line. SPC module's I 2 C address can also be seen through the number of blinks on the indicator LED when the module is 12

Example with UART interface: powered on. If the I 2 C address is 0xE0 then the indicator LED will blink green once. If the I 2 C address is 0xE2 then the indicator LED will blink green twice. If the I 2 C address is 0xE4 then the indicator LED will blink green 3 times, and so on until I 2 C address 0xEE at which the indicator LED will blink green 8 times. User : 0x42 SPC module : <I2CAddress> 4. TESTING PROCEDURE 1. Connect the 5 Volts power supply to VIN and VM SPC NEO DC MOTOR 1.2A module. 2. After the indicator LED blinks green according to I 2 C address, M1 and M2 indicator LEDs will lit up orange. 3. Send M1 Forward command with PWM value of 255 via UART TTL interface. 4. M1 indicator LED will lit up green. When the voltage between pin M11 and M12 is measured, the result will be close to the motor power supply voltage given on the VM pin. 5. Send M2 reverse command with PWM value of 255 via UART TTL interface. 6. M2 indicator LED will lit up red. When the voltage between pin M22 and M21 is measured, the result will be close to the motor power supply voltage given on the VM pin. 5. APPLICATION AND PROGRAM EXAMPLE As an application example, SPC NEO DC MOTOR 1.2A is used to run 2 DC motors with I 2 C or UART interface. DT-AVR Low Cost Micro System (LCMS) module with ATmega8535 microcontroller is used as master. VM (2.5V 13.5V ) VIN (+5 V ) M1 M2 M11 M12 M21 M22 SPC NEO DC MOTOR 1.2A (address 0xE0) SDA SCL SDA (PORTD.2) SCL (PORTD.3) DT-AVR LCMS MGND (Motor Power Supply Ground) PGND (Digital Power Supply Ground) 13

M1 M2 M11 M12 M21 M22 VM (2.5V 13.5V ) VIN (+5 V ) SPC NEO DC MOTOR 1.2A (address 0xE0) TXD RXD RX (PORTD.0) TX (PORTD.1) DT-AVR LCMS MGND (Motor Power Supply Ground) PGND (Digital Power Supply Ground) As an example program for the above application, there are two programs named contoh_i2c.c and contoh_uart.c (included in the CD/DVD) written using CodeVisionAVR 1.25.2 evaluation. In the program, DT-AVR LCMS will send "M1 Forward" and "M2 Forward" commands with PWM value of 255 for each motor to SPC module (for example, SPC's I 2 C address is 0xE0). After all of the commands are sent, DT- AVR LCMS will wait for 3000 ms. Afterward "All Brake" command will be sent to SPC followed by another 3000 ms delay. Then DT-AVR LCMS will send "M1 Reverse" and "M2 Reverse" command with PWM value of 128 for each motor to SPC module followed by another 3000 ms delay. The program ends with DT-AVR LCMS sending "All Stop" command to the SPC module. Thank you for your confidence in using our products, if there are difficulties, questions, or suggestions regarding this product please contact our technical support: support@innovativeelectronics.com 14

ATTACHMENTS A. SPC NEO DC MOTOR 1.2A Schematics 15