Conociendo a tu Romi

Convenciones sobre direcciones

El frente del Romi es donde se encuentran los puertos USB de la Raspberry Pi, los pines GPIO y la rueda giratoria.

Romi Front View

En toda la documentación del Romi, las referencias a conducir hacia adelante utilizan la definición de arriba de «frente».

Romi Forward Driving Direction

Hardware, Sensors, and GPIO

El Romi cuenta con los siguientes accesorios incorporados:

  • 2x motorreductores con encoders

  • 1x Unidad de Medición Inercial (IMU)

  • 3x LEDs (verde, amarillo, rojo)

  • 3x pulsadores (marcados A, B y C)

  • 5x configurable GPIO channels (EXT)

  • Buzzer

Nota

The Buzzer is currently not supported by WPILib.

Motors, Wheels, and Encoders

Los motores usados en el Romi tienen una reducción de 120:1, y una velocidad de salida sin carga de 150 RPM a 4.5V. La corriente libre que consumen es de 0.13 amperes y la corriente de motor en parada es de 1.25 amperes. El torque en parada es de 25 oz-in (0.1765 N-m) pero puede que el embrague de seguridad incorporado se resbale a torques más bajos.

Las llantas tienen un diámetro de 70mm (2.75»). Tienen un ancho de pista de 141mm (5.55»)

Los encoders están conectados directamente al eje de salida del motor y tienen 12 Cuentas Por Revolución (CPR). Con la reducción, esto da 1440 cuentas por revolución de la llanta.

The motor PWM channels are listed in the table below.

Channel

Componente de hardware del Romi

PWM 0

Left Motor

PWM 1

Right Motor

Nota

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

Componente de hardware del Romi

DIO 4

Canal A de cuadratura del encoder izquierdo

DIO 5

Canal B de cuadratura del encoder izquierdo

DIO 6

Canal A de cuadratura del encoder derecho

DIO 7

Canal B de cuadratura del encoder derecho

Nota

Por default, los encoders cuentan de manera positiva cuando el Romi se mueve hacia adelante.

Unidad de Medición Inercial

El Romi incluye una Unidad de Medición Inercial (IMU) STMicroelectronics LSM6DS33 que contiene un giroscopio de 3 ejes y un acelerómetro de 3 ejes.

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.

La interfaz de usuario web de Romi también proporciona un medio para calibrar el giroscopio y medir sus desplazamientos de cero antes de usarlo con el código del robot.

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

Canal DIO

Componente de hardware del Romi

DIO 0

Botón A (solo entrada)

DIO 1

Botón B (entrada), LED verde (salida)

DIO 2

Botón C (entrada), LED rojo (salida)

DIO 3

LED amarillo (solo salida)

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.

Los canales GPIO están expuestos a través de una interfaz de estilo servo de 3 pines, con conexiones para tierra, alimentación y señal (con la conexión a tierra más cercana al borde de la placa y la señal la más cercana al interior de la placa).

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