pdf-icon

C Back Driver

SKU:A100

Description

C Back Driver is a steering gear drive board compatible with M5StickC. It adopts STM32F030F4P6 control scheme, uses I2C communication interface to communicate with M5StickC, and provides 4 sets of PWM steering gear drive interfaces (the drive power of the steering gear is directly connected to the M5StickC The internal battery can drive general specifications of the steering gear, such as: SG90, etc.). This module leads the I2C bus at the top of StickC and provides an additional GPIO interface through STM32 expansion. It can be used for general logic level and ADC analog signal input reading. With the LEGO compatible hole design on the back, users can easily integrate this driver board into the LEGO building block structure, which can be used to build controllable structures such as steering gear manipulators.

Product Features

  • 4x Servo driver
  • Compatible with C/C Plus
  • Interface expansion (GPIO, I2C)

Includes

  • 1x C Back Driver
  • 2× Hexagonal screws M2*5
  • 1× HEX KEY

Application

  • Servo controller
  • Robot control

Specifications

Resources Parameter
Communication protocol I2C: 0x38
Working current 15mA
Net weight 9g
Gross weight 13.5g
Product size 23.7*49.2*21mm
Package size 136*92*22mm

Pin mapping

M5StickC GPIO0 GPIO26 3.3V GND
C Back Driver SDA SCL 3.3V GND

Schematic

Protocol

  • Protocol type I2C
  • I2C Address: 0x38
/*------------------------------------------------ -------------------------------------------------- */
| SERVO_ANGLE_REG | 0x00-0x03
| ------------------------------------------------- -----------------------------------------------
| servo_1_reg[0] 0x00 | R/W | SERVO1 Angle value(0~180)
| servo_2_reg[1] 0x01 | R/W | SERVO2 Angle value(0~180)
| servo_3_reg[2] 0x02 | R/W | SERVO3 Angle value(0~180)
| servo_4_reg[3] 0x03 | R/W | SERVO4 Angle value(0~180)
/*------------------------------------------------ -------------------------------------------------- -

/*------------------------------------------------ -------------------------------------------------- */
| SERVO_PULSE_REG | 0x10-0x17
| ------------------------------------------------- -----------------------------------------------
| servo_1_reg[0:1] 0x10-0x11 | R/W | SERVO1 PULSE value(500~2500)
| servo_2_reg[2:3] 0x12-0x13 | R/W | SERVO2 PULSE value(500~2500)
| servo_3_reg[4:5] 0x14-0x15 | R/W | SERVO3 PULSE value(500~2500)
| servo_4_reg[6:7] 0x16-0x17 | R/W | SERVO4 PULSE value(500~2500)
/*------------------------------------------------ -------------------------------------------------- -

/*------------------------------------------------ -------------------------------------------------- */
| PPORTB_ADC_REG | 0x20-0x21
| ------------------------------------------------- -----------------------------------------------
| portb_adc_reg[0:1] 0x20-0x21 | R | PPORTB ADC value(0~4095)
/*------------------------------------------------ -------------------------------------------------- -

/*------------------------------------------------ -------------------------------------------------- */
| PPORTB_OUTPUT_REG | 0x30
| ------------------------------------------------- -----------------------------------------------
| portb_output_reg[0] 0x30 | R | PPORTB Output Digital value(0/1)
/*------------------------------------------------ -------------------------------------------------- -

/*------------------------------------------------ -------------------------------------------------- */
| PPORTB_INPUT_REG | 0x31
| ------------------------------------------------- -----------------------------------------------
| portb_input_reg[0] 0x31 | R | PPORTB Input Digital value(0/1)
/*------------------------------------------------ -------------------------------------------------- -

Example

Arduino

This case uses C BACK DRIVER to realize 4-channel servo control and ADC reading. Please select the corresponding case program below according to the equipment you are using.

UIFlow

How to use Hat C Back Driver and related API instructions in the UIFlow1.0

UIFlow example

In this case, Light Unit is connected to Port.B of the C BACK DRIVER to obtain the light intensity(adc) and digital input values.

In this case, Light Unit is connected to Port.B and ColorSensorUnit to Port.A. The servo is controlled by the blue value.

UIFlow

Write:

  • set servo angle(Channel, angle)
  • set servo pulse(Channel, pulse)
  • set digital output of Port.B(value)

Read:

  • read raw adc value
  • read digital input value of Port.B

Video

Use C BACK DRIVER to make a four-wheeled car