Editor Version ×
Standard

1.Easy to use and quick to get started

2.The process supports design scales of 300 devices or 1000 pads

3.Supports simple circuit simulation

4.For students, teachers, creators

Profession

1.Brand new interactions and interfaces

2.Smooth support for design sizes of over 5,000 devices or 10,000 pads

3.More rigorous design constraints, more standardized processes

4.For enterprises, more professional users

Ongoing

STD Xadow - Motor Driver copy

License:

Mode: Editors' pick

Cloned from Xadow - Motor Driver

  • 446
  • 0
  • 0
Update time: 2019-09-03 07:36:27
Creation time: 2019-09-03 07:36:17
Description
Introduction Xadow Motor can be used to control DC Motors. Its heart is a low-saturation two-channel bidirectional motor drive chip LB1836M, controlled by ATmega168 which handles the I2C communication with Xadow Main Board. Xadow Motor features a changeable I2C address. And it needs a separate low power to drive motors. Specification Motor Driver: LB1836M Battery Voltage: 2.5V ~ 9V Output Current per channel(Max): 300mA Communication Mode: I2C I2C Address is changeable Dimensions: 25.43mm x 20.35mm Product View ![enter image description here][1] ![enter image description here][2] Xadow Motor Black View.png ①: LB1836 IC, a low-saturation two-channel bidirectional motor driver. ②: Motors Power Supply Connection. ③,④: DC Motors Connection. ⑤,⑥: used to set the IIC address. A0 and A1 are shipped connected to H. You can change them to "L" by a little modification on the board. Find details in the Reference. ⑦: SPI Interface, used to upload firmware for Atmega168. ⑧: Microcontroller Atmega168. ⑨: used to select power supply for Atmega168 IC. In default mode, DVCC is connected to VOUT which means the power comes from Motor power supply. When DVCC is connected to 3.3V, Xadow Main Board supplies power for Atmega168. Demonstration Xadow Motor can drive two DC motors simultaneously. Based on our available library, it is more easily to make motors run. Now let's get started. Note: the library is not available for controlling stepper motor. Hardware Installation: 1) Connect DC Motors to J5,J6 interface. You can use the solder iron for soldering to make sure the connection are fixed. We configure a 3.7V lithium battery for you. So you cannot drive high - power motors using the battery. 2) Connect battery to Battery Interface of Xadow Motor. Without battery, Motors would not rotate. 3) Connect Xadow Motor to Xadow Main Board. Do not forget to install Xadow Driver. Note: when connect Xadow 3-Axis Accelerometer to Xadow Main Board, you should concern about the connection direction. The connection method is that the unfilled corner of one xadow module need to connect to the right angle of another module(see four corners of each xadow module). Upload Code: 4) Download Xadow Motor Library and install it to Arduino Library. 5) Open the code directly by the path:File -> Example ->xadow_motor->motorCtrl. /* there are four motor state you can use: -MSTOP -> stop -MFOR -> go forward -MREV -> go reverse -MHOLD -> hold the recent state **NOTE: there are four addresses you can choose, it's up to the hardware, for more information, refer to www.seeedstudio.com -MOTORADDRESS0 0x40 // A0 LOW, A1 LOW -MOTORADDRESS1 0x41 // A0 HIGH, A1 LOW -MOTORADDRESS2 0x42 // A0 LOW, A1 HIGH -MOTORADDRESS3 0x43 // A0 HIGH, A1 HIGH use this function: setMotorRun(unsigned char sMotorA, unsigned char sMotorB); you can contrl the both motor. */ #include #include "XadowMotor.h" void setup() { Serial.begin(38400); xadowMotor.begin(MOTORADDRESS3); } void loop() { Serial.print("bat vol :"); Serial.println(xadowMotor.getBatVol()); xadowMotor.setMotorRun(MFOR, MFOR); delay(2000); xadowMotor.setMotorRun(MSTOP, MSTOP); delay(500); xadowMotor.setMotorRun(MREV, MREV); delay(2000); xadowMotor.setPwrDown(); delay(1000); xadowMotor.setWakeUp(); } In this code, the function xadowMotor.begin(MOTORADDRESS3) is used to set Xadow Motor I2C Address. You need to change the parameter"MOTORADDRESS3" when you change the connection of A0 pin and A1 pin. Find details in the Reference. 6) Upload the Code. Remeber to select Seeeduino Xadow from the Tools | Board menu of the Arduino environment, and select the correct serial port Xadow Main Board is using. Now you can see your motors will run forward or backward at regular intervals. By opening the serial monitor, you can observe your battery voltage. Reference The Xadow Motor has four I2C address which is decided by A0 pin and A1 pin. A0 and A1 are connected to H inside the board as default. But you can change it. For example, use a solder iron to break the connection between H and A0, then solder up ADR0 and L, so you make the value of A0 as L. You can find the relationship of hardware I2C address and the values of A0 and A1 in the following table. I2C Address A0 and A1 inputs state the corresponding parameter in code A1 A0 0x40 L L MOTORADDRESS0 0x41 L H MOTORADDRESS1 0x42 H L MOTORADDRESS2 0x43 H H MOTORADDRESS3 [1]: /editor/20160111/5693511eb05af.png [2]: /editor/20160111/5693511eb05af.png
Design Drawing
schematic diagram
1 /
PCB
1 /
The preview image was not generated, please save it again in the editor.
ID Name Designator Quantity
1 12p FPC bottom contact J2,J1 2
2 100nF C3,C5,C7,C1,C2,C4 6
3 050028001 8MHz X1 1
4 16V_22uF C10 1
5 1uF C8,C11 2
6 HEADER-2P J6,J5 2
7 PAD-TEST-POINT VBAT 1
8 10uF thin C9 1
9 ATMEGA168PV-10MU U1 1
10 10k R1 1
11 SEEEDSTUDIO_SCH_FRAME U$1 1
12 PAD-MARK P1,P2,P3,P4,P5,P6,P7,P8 8
13 LB1836M U2 1
14 341023001 JST-SMD-2P-1.0-90D BAT 1
15 10M_1% R7 1
16 2M_1% R8 1
17 330R-1.7A L2,L1 2
18 DNP DVCC,A0,A1 3
19 RED D1 1
20 1K R2 1
21 10pF C6 1
22 DNP J4 1
23 XC6206P332MR-G U3 1
24 DNP R3 1

Unfold

Project Attachments
Empty
Project Members
Related Projects
Change a batch
Loading...
Add to album ×

Loading...

reminder ×

Do you need to add this project to the album?

服务时间

周一至周五 9:00~18:00
  • 0755 - 2382 4495
  • 153 6159 2675

服务时间

周一至周五 9:00~18:00
  • 立创EDA微信号

    easyeda

  • QQ交流群

    664186054

  • 立创EDA公众号

    lceda-cn