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.
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 |
M5StickC | GPIO0 | GPIO26 | 3.3V | GND |
---|---|---|---|---|
C Back Driver | SDA | SCL | 3.3V | GND |
/*------------------------------------------------ -------------------------------------------------- */
| 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)
/*------------------------------------------------ -------------------------------------------------- -
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.
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.
Write:
Read:
Use C BACK DRIVER to make a four-wheeled car