4 Channel I2C Motor Shield v1.1

From Elecrow
Revision as of 15:19, 26 October 2021 by Admin (talk | contribs)
Jump to navigation Jump to search

Introduction

For Arduino beginners, there will always be problems when driving DC motors and servos. If you want to drive 4 motors and 2 servos, you need to build a platform to control their speed and direction of rotation. When the motor and steering gear are running, the current is large, and you will need a module to help you control the large current, such as a micro controller like Arduino.
Therefore, Elecrow has designed the driver board you need in this type of application. This module will help users solve the problem of high-current drive and control of the motor. You only need to plug it into the Arduino or Crowduino. This module is connected to the Arduino or Crowduino through the I2C bus. Start your application and you can control 4 channels through the I2C bus. Motor.
This driver board is designed based on the MOSFET H-bridge integrated circuit TB6612FNG, and its efficiency is higher than that of the transistor H-bridge driver. Compared with the L293D's average drive current of 600 mA per channel and 1.2 A pulse peak current, its output load capacity has doubled. Compared with the L298N's heat dissipation and peripheral diode freewheeling circuit, it does not require an external heat sink, and the peripheral circuit is simple. Only an external power supply filter capacitor can directly drive the motor, which is beneficial to reduce the system size. For the PWM signal, it supports frequencies up to 100 kHz, which also has greater advantages over the 5 kHz and 40 kHz of the above two chips.

Motor drive control:
a. PCA9685 outputs PWM signals to control two TB6612FNG motor drive circuits, and then control 4 channels motors respectively;
b. Motor control mode: forward/reverse/brake/stop.

Model: ARS27361T

4 Channel I2C Motor Shield v1.1-1.png

Features

  • Standard Raspberry Pi 40PIN GPIO extension header, suitable for all Raspberry Pi boards
  • Support 4-channel detection, can communicate through I2C/SMBus interface
  • Onboard 0.1Ω 1% sampling resistor, allows measuring bi-directional current up to 3.2A
  • Embedded 12-bit ADC, supports multiple successive converting, 0~26V voltage measuring range
  • The output measurement power can be directly calculated through the additional multiplication register
  • I2C control pins for connecting with other main boards easily


Specification

  • Operating voltage: 3.3V/5V
  • Control interface: I2C/SMBus
  • Sampling resistor: 0.1Ω 1%
  • Voltage range: 0~26V
  • Current range: ±3.2A
  • Resolution: 0.8mA (±3.2A range) OR 0.1mA (±400mA range)
  • Dimensions: 65mm × 30mm
  • Mounting hole size: 3.0mm

Interface Description

CurrentVoltagePower Monitor HAT for Raspberry Pi 3.jpg

The module can measure the current and voltage of four channels, which correspond to (IN1+ IN1-), (IN2+ IN2-), (IN3+ IN3-) and (IN4+ IN4-) respectively. INx+ and INx- represent the input and output of the current respectively. The module obtains the magnitude of the current flowing by measuring the differential voltage of the sampling resistor connected in series with INx+ and INx-. The module can test bidirectional current, and all input and output connections can be reversed.

Note: In addition, it should be noted that measuring different power supplies needs to be connected to the GND common ground, otherwise the bus voltage cannot be measured, only the differential voltage and current can be measured.


Usage

Use with Raspberry Pi

1. Open the I2C interface

1) Execute in the terminal:

sudo raspi-config
Select Interfacing Options -> I2C -> yes to start the i2C kernel driver

CurrentVoltagePower Monitor HAT for Raspberry Pi 2.png

Then restart the Raspberry Pi:

sudo reboot

2. When using the Raspberry Pi to demonstrate this routine, you only need to insert the module into the Raspberry Pi header, or connect it to the Raspberry Pi’s I2C interface via a Dupont cable, connect VCC to 3.3V and enter the following command to run the program.

sudo pip3 install adafruit-circuitpython-ina219
sudo apt-get install p7zip
wget http://www.waveshare.net/w/upload/6/69/Current-Power_Monitor_HAT_Code.7z
7zr x Current-Power_Monitor_HAT_Code.7z -r -o./Current-Power_Monitor_HAT
cd Current-Power_Monitor_HAT/RaspberryPi
python3 ina219.py

After the program runs, the bus voltage, sampling resistor differential voltage, input voltage, power, current and other values ​​will be output.