Advertisement

Quick Links

Grove - I2C Motor Driver
Release date:
Version:
Wiki:
http://www.seeedstudio.com/wiki/Grove_-_I2C_Motor_Driver_V1.3
Bazaar:
http://www.seeedstudio.com/depot/Grove-I2C-Motor-Driver-p-907.html
9/20/2015
1.0
1

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Grove I2C Motor Driver and is the answer not in the manual?

Questions and answers

Summary of Contents for Seeed Technology Grove I2C Motor Driver

  • Page 1 Grove - I2C Motor Driver Release date: 9/20/2015 Version: Wiki: http://www.seeedstudio.com/wiki/Grove_-_I2C_Motor_Driver_V1.3 Bazaar: http://www.seeedstudio.com/depot/Grove-I2C-Motor-Driver-p-907.html...
  • Page 2 Document Revision History Revision Date Author Description Sep 21, 2015 Victor.He Create file...
  • Page 3: Table Of Contents

    Contents Document Revision History · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 2 1.
  • Page 4 Under the supervision of Seeed Technology Inc., this manual has been compiled and published which covered the latest product description and specification. The content of this manual is subject to change without notice.
  • Page 5: Introduction

    1. Introduction The Grove - I2C Motor Driver V1.3 (latest version) can directly control Stepper Motor or DC Motor. Its heart is a dual channel H-bridge driver chip(L298N)that can handle current up to 2A per channel, controlled by an Atmel ATmega8L which handles the I2C communication with for example an Arduino. Both motors can be driven simultaneously while set to a different speed and direction.
  • Page 6: Features

    2. Features  Grove Compatible  I2C Interface  Adjustable motor speed and rotation direction  Changeable slave address by hardware...
  • Page 7: Specifications

    3. Specifications Item Typical Unit Working Voltage Max Output Current per channel Maximum Total current Input/output voltage on I2C bus Communication protocol...
  • Page 8: Interface Functions

    4. Interface functions 78M05 IC: 5v voltage regulator L298 IC: dual full bridge driver Atmega8 IC: Control Motor Rotate. NOTE: Input voltage on screw terminals is regulated to 5v and connected to I2C +5v via a jumper (J4). Remove jumper if both external power via the screw terminals and power via the I2C header are used. Use jumper if 5v should be supplied to the I2C bus.
  • Page 9: Application Ideas

    5. Application ideas  Robots  Homebuilt RC cars  Case fans  High power LED illumination...
  • Page 10: Usage

    6. Usage The I2C Motor Driver can control motor which is based on the chip L298. The L298 is not just a dual motor driver, it is a dual H-bridge. An h-bridge is basically a specific setup of transistors that allow you to switch direction of current.
  • Page 11: How To Drive 2 Dc Motors

    How to drive 2 DC motors Note: The first thing to notice however, is that you need an external power source for your DC motors. The 5v pin on the Arduino cannot provide enough power to drive 2 motors, you may damage your Arduino if you do And then program your Arduino as below: #include <Wire.h>...
  • Page 12: How To Driver A Stepper Using I2C Motor Driver V1.3

    delay(1000); MotorDirectionSet(0b0101); //0b0101 Rotating in the opposite direction delay(500); In this program, Arduino first set the speed of the 2 DC motors with the MotorSpeedSetAB()command, and then set the DC motors work directions with MotorDirectionSet() command. Please refer to Function Reference for details, you can download all the demo code in the Resource.
  • Page 13 MotorDirectionSet(0b1100); delay(4); MotorDirectionSet(0b1000); delay(4); MotorDirectionSet(0b1001); delay(4); This connected 4-wire stepper will rotate; you can adjust the rotation speed or step number in your Arduino program. You can also use some other stepper libraries to control it. For all the demo code please refer to Resource.
  • Page 14 The connection between 24BYJ48 Stepper Motor and I2C Motor Driver is shown as blow: Download the Grove-I2C motor driver V1.3 demo code, and open the StepperControlMode2.ino: #include <Wire.h> #define MotorSpeedSet 0x82 #define PWMFrequenceSet 0x84 #define DirectionSet 0xaa #define MotorSetA 0xa1 #define MotorSetB 0xa5 #define Nothing...
  • Page 15 delay(5000); Serial.println("sent command to - direction, fast"); StepperMotorEnable(0, 2);// ennable the i2c motor driver a stepper. delay(5000); Serial.println("sent command to + direction,100 steps, fast"); SteperStepset(100); StepperMotorEnable(1,5); delay(3000); Serial.println("sent command to shut down the stepper"); StepperMotorUnenable(); delay(1000); Serial.println("sent command to - direction, slow, and 10 steps then stop");...
  • Page 16: Function Reference

    7. Function Reference 1. void SteperStepset(unsigned char stepnu) Description: Set the steps you want. stepnu: the Parameter can be 1~255. if 255, the stepper will rotate continuously; Usage: Serial.println("sent command to + direction,100 steps, fast"); SteperStepset(100); 2. void StepperMotorEnable(unsigned char Direction, unsigned char motorspeed) Description: Enable the IIC motor driver to drive a 4-wire stepper.
  • Page 17 Frequence: the prescale frequency of PWM 6. void MotorDirectionSet(unsigned char Direction) Description: Adjust the direction of the motors Direction:can be Forward/Reverse rotating. Usage: MotorDirectionSet(0b1010); //"0b1010" defines the output polarity, "10" means the //M+ is "positive" while the M- is "negative" // make sure M+ and M- is different polarity when driving DC motors.
  • Page 18: Version Tracker

    8. Version Tracker Revision Descriptions Release v1.0 Initial public release May 17th, 2012 v1.2 modify the I2C address set by hardware July 2nd, 2012 v1.3 modify the firmware to support off-line Stepper Feb 18th, 2013...
  • Page 19: Resources

    9. Resources Grove - I2C Motor Driver Eagle File I2C Motor DriverV13 Demo Code L298 Datasheet 78M05 Datssheet On-Chip Firmware for I2C motor driver...
  • Page 20: Support

    10. Support If you have questions or other better design ideas, you can go to our forum wish to discuss.
  • Page 21 Mouser Electronics Authorized Distributor Click to View Pricing, Inventory, Delivery & Lifecycle Information: Seeed Studio 105020001...

Table of Contents