Skip to content
Get started

Grove TB6612FNG Motor Drive

The Grove TB6612FNG runs over I²C bus and has the capability to control DC and Stepper motors. At the current stage of implementation only DC motor is implemented.

# Example configuration
grove_tb6612fng:
- address: 0x14
id: test_motor
  • id (Required, ID): The id to use for this TB6612FNG component.
  • address (Optional, int): The I²C address of the driver. Defaults to 0x14.

Set the motor to spin by defining the direction and speed of the rotation.

on_...:
then:
- grove_tb6612fng.run:
channel: 1
speed: 255
direction: BACKWARD
id: test_motor

Configuration options:

  • id (Required, ID): The id to use for this TB6612FNG component.
  • channel (Required, int): The motor channel: 0 for channel A, 1 for channel B.
  • direction (Required, string): The direction of rotation: FORWARD or BACKWARD.
  • speed (Required, int): The speed, in the range from 0 to 255.

Stop providing power to the motor. This does not stop the motor from spinning, but allows the motor to spin freely. If you want to stop the motor from spinning, use the grove_tb6612fng.break action.

on_...:
then:
- grove_tb6612fng.stop:
channel: 1
id: test_motor

Set the motor channel to be on break mode which it ensure the wheel won’t spin even if forced or pushed

on_...:
then:
- grove_tb6612fng.break:
channel: 1
id: test_motor

Set the board to be on standby when is not used for a long time which reduces power consumptions and any jerking motion when stationary

on_...:
then:
- grove_tb6612fng.standby:
id: test_motor

Set the board to be awake, every esphome is restarted the default mode is set to standby to ensure the motor won’t spin accidentally

on_...:
then:
- grove_tb6612fng.no_standby:
id: test_motor

If you require connecting multiple boards at once, the address can be changed using this action. The address can be changed to a value in the range of 0x01 - 0x7f inclusive.

on_...:
then:
- grove_tb6612fng.change_address:
address: 0x15
id: test_motor