了解你的ROMI

驱动器惯例

ROMI的正面是树莓派USB接口, GPIO插口和万向轮所在地。

Romi Front View

在所有ROMI文档中,提到向前行驶时使用上述“前方”的定义。

Romi Forward Driving Direction

Hardware, Sensors, and GPIO

ROMI有以下几个内置硬件/外围设备:

  • 2个带编码器的齿轮减速电机

  • 1个惯性测量单元(IMU)

  • 3个led灯(绿、黄、红)

  • 3个按钮(标注A、B、C)

  • 5x configurable GPIO channels (EXT)

  • Buzzer

备注

The Buzzer is currently not supported by WPILib.

Motors, Wheels, and Encoders

ROMI上使用的电机有120:1齿轮减速,在4.5V下的空载输出速度为150 RPM。自由电流为0.13安培,失速电流为1.25安培。失速扭矩为25盎司-in (0.1765 N-m),但内置的安全离合器在较低扭矩时可能开始打滑。

车轮的直径为70mm(2.75”)。它们的轨道宽度为141毫米(5.55英寸)。

编码器直接连接到电机输出轴,每转速分辨率(CPR)有12个计数。在提供的齿轮传动比下,每轮转数为1440。

The motor PWM channels are listed in the table below.

Channel

Romi硬件组件

PWM 0

Left Motor

PWM 1

Right Motor

备注

The right motor will spin in a backward direction when positive output is applied. Thus, the corresponding motor controller needs to be inverted in robot code.

The encoder channels are listed in the table below.

Channel

Romi硬件组件

DIO 4

左编码器正交通道A

DIO 5

左编码器正交信道B

DIO 6

右编码器正交通道A

DIO 7

右编码器正交信道B

备注

注意:默认情况下,当ROMI移动时编码器开始计数。

惯性测量单元

ROMI包括意法半导体LSM6DS33惯性测量单元(IMU),其中包含一个三轴陀螺仪和一个三轴加速度计。

The accelerometer has selectable sensitivity of 2G, 4G, 8G, and 16G. The gyro has selectable sensitivity of 125 Degrees Per Second (DPS), 250 DPS, 500 DPS, 1000 DPS, and 2000 DPS.

ROMI Web UI还提供了一种方法,在使用机器人代码之前校准陀螺仪和测量它的零偏移量。

Onboard LEDs and Push Buttons

The Romi 32U4 control board has 3 push buttons and 3 LEDs onboard that are exposed as Digital IO (DIO) channels to robot code.

Romi LEDs and Buttons

DIO通道

Romi硬件组件

DIO 0

按钮A(只输入)

DIO 1

按钮B(输入),绿色LED(输出)

DIO 2

按钮C(输入),红色LED(输出)

DIO 3

黄色LED(仅输出)

Writes to DIO 0, 4, 5, 6 and 7 will result in a no-op.

Configurable GPIO Pins

The control board has 5 configurable GPIO pins (named EXT0 through EXT4) that allow a user to connect external sensors and actuators to the Romi.

Romi External GPIO Channels

All 5 pins support the following modes: Digital IO, Analog In, and PWM (with the exception of EXT 0, which only supports Digital IO and PWM). The mode of the ports can be configured with The Romi Web UI.

GPIO通道通过一个3-pin, servo style interface暴露,有接地、电源和信号的连接(接地距离单板边缘最近,信号距离单板内部最近)。

The power connections for the GPIO pins are initially left unconnected but can be hooked into the Romi’s on-board 5V supply by using a jumper to connect the 5V pin to the power bus (as seen in the image above). Additionally, if more power than the Romi can provide is needed, the user can provide their own 5V power supply and connect it directly to power bus and ground pins.

GPIO Default Configuration

The table below shows the default configuration of the GPIO pins (EXT0 through EXT4). The Romi Web UI allows the user to customize the functions of the 5 configurable GPIO pins. The UI will also provide the appropriate WPILib channel/device mappings on screen once the IO configuration is complete.

Channel

Ext Pin

DIO 8

EXT0

Analog In 0

EXT1

Analog In 1

EXT2

PWM 2

EXT3

PWM 3

EXT4