VTMotor - alternative firmware for the board Seeedstudio Grove - I2C Motor Driver

Updated 13.02.2013

Русская версия статьи (Russian version of the article)

seeedstudio Grove i2c motor driver

Board flashing

I have an old version of the board: v1.1. MOSI and SCK pin labels are confused at the board. If you have troubles flashing it, consider changing MOSI with SCK pins.

Add delay() is not good solution

I connect this board to my robot. It runs under Linux. I use i2c-gpio driver. I use i2cdetect for i2c bus testing.

The i2c bus hangs just after first addressing of the board. New firmware doesn't solve the problem.

At wiki, it is written "Different Arduino IDE may have difference. I use arduino-0019 and it works fine, but when i use arduino - 0022, I need to add some delay() at the end of Wire.endTransmission()."

I don't think it is a good idea to add delays to the i2cdetect or even in the i2c-gpio driver.

Therefore I have decided to write my own firmware.

Alternative firmware VTMotor

The firmware uses AVR Libc (for Linux). There are Windows version WinAVR, but I don't know wheather it is fully compatible.

VTMotor can control two motors. Pwm frequency is fixed (maybe someone will implement support of frequency change). Frequency = 200 Hz.

Cooperation

I would be grateful to receive any report from you. If you want to improve something - please send me a patch to Адрес электронной почты защищен от спам-ботов. Для просмотра адреса в вашем браузере должен быть включен Javascript..

Commands

The device address is 0x28.

Command Command code (1 byte) Argument 1 (1 byte) Argument 1 (1 byte) Comments
DRV_WHO_AM_I 0x10 - - Check existance of the device. It must return 0x47
DRV_DRV_ENABLE 0x11 - - Turn on
DRV_DRV_DISABLE 0x12 - - Turn off (Default)
DRV_SET_SPEED 0x13 Left drive speed Right drive speed Value from 0 to 100. (Default is 0)
DRV_SET_DIRECTION 0x14 Left drive direction Right drive direction 0x0 - forward (default); 0x1 - back

 

Download VTMotor firmware

Changelog:

* v1.1 Added firmware for board v1.2, which has different schematics.

Latest stable: firmware + source:

VTMotor v1.1 13.02.1012 

Unstable current version:

https://github.com/vitperov/VTMotor

Collaborators

Denis Morin

 

 

P.S. If you have found any spelling or other mistakes, please write to Адрес электронной почты защищен от спам-ботов. Для просмотра адреса в вашем браузере должен быть включен Javascript.

Добавить комментарий


Поиск