Standard Peripherals#

What are Standard Peripherals?#

As EVN Alpha is built on the RP2040 microcontroller (also used in the Raspberry Pi Pico), it supports many common and/or open communication protocols such as GPIO (General Purpose Input/Output), I2C, UART, SPI and more.

These standard communication protocols are how sensor boards from Adafruit, Pololu and Sparkfun can work with microcontroller boards made by others (e.g. Teensy, Raspberry Pi Pico, Arduino).

However, most sensor boards do not connect to LEGO® TECHNIC® components out of the box (although mounting solutions can be 3D-printed). Additionally, while the wide selection of hardware is very exciting, programming or even getting them to work can often be less “plug-and-play” and more involved.

While we want to encourage users to explore the large variety of possibilities out there, Standard Peripherals are our offerings for those who want something closer to a “plug-and-play” experience, coming with LEGO® TECHNIC® compatible mounts, first-party documentation and library support.

Note

While EVN Alpha supports up to 400kHz I2C, it requires some extra code to work with I2C peripherals from 3rd parties (but not too much, we promise). Look at this guide to find out how!

Port Types#

EVN Alpha has 4 types of peripheral ports:

Port Type

Number of Ports

I2C

16

Serial

2

Servo

4

Motor

4

Motor ports are used solely for LEGO® MINDSTORMS® motors or brushed DC gearmotors, so none of the Standard Peripherals plug into those.

However, unlike LEGO® MINDSTORMS® kits where all sensors use the same port, different Standard Peripherals use different kinds of ports (I2C, Serial or Servo). Refer to the table below to find out what kind of port each Peripheral uses.

Cables#

Standard Peripherals each come with a cable to connect to Alpha.

  • Peripherals which use I2C or Serial Ports have 4-Wire cables

  • Peripherals which use Servo Ports have 3-Wire cables

  • The 270 Degree Servo and Continuous Servo Peripherals come with non-removable 3-Wire cables.

At one end of the cable, all the wires will be joined into one 4-pin connector, which plugs into EVN Alpha.

The wire colours are also colour-coded to match the pin layout of the ports on EVN Alpha.

Note

As of November 2024, we no longer ship cables with keyed connectors (with a notch) due to availability issues. This means our cables are essentially 4-pin to 4 * 1-pin Dupont cables. However, we will ensure that the keyed cables that we have shipped will remain compatible with any future shell revisions.

On the other end of the cable, each wire is separated from the others. They all need to be connected to the Peripheral, but they’re not joined together because the layout of the pins differs with each Peripheral.

The library reference page for each Peripheral (linked below) contains a pin layout section to guide you on the connections.

The pins we used on the Alpha and Standard Peripherals are standard 2.54mm pitch pin headers, and the cables can be substituted with normal 2.54mm Dupont jumper wires as well!

Likewise, our cables can be used to interface with non-Standard Peripherals with 2.54mm pitch pins.

Wiring#

Generally speaking, all peripherals have a VCC pin and GND pin.

In order to supply power to these peripherals, the GND pin on the peripheral should be connected to a GND pin on the controller (EVN Alpha) and the VCC pin on the peripheral should be connected to a voltage output on the controller (depending on the peripheral, this could be a 3.3V or 5V pin).

As for the data pins, each communication protocol is wired in a different manner:

I2C#

Colour

Pin

Description

Red

3V3

3.3V Power

Black

GND

Ground

Yellow

SCL

Serial Clock

Blue

SDA

Serial Data

I2C is wired such that the SDA pin of the host (EVN Alpha) is connected to the SDA pin of a peripheral, and the same goes for the SCL pins.

Serial Wiring#

Colour

Pin

Description

Red

3V3

3.3V Power

Black

GND

Ground

Yellow

RX

Transmit

Blue

TX

Receive

Serial UART is wired such that the Transmit (TX) pin of the peripheral connects to the Receive (RX) pin of the host, and vice versa (TX of one always connects to RX of the other).

Servo Wiring#

Colour

Pin

Description

Yellow

SIG

Signal

Red

5V

5V Power

Black

GND

Ground

The Servo ports only have one Signal pin, so as long as the signal pins on both peripheral and host are connected, you’re all good.

List of Standard Peripherals#

Sensors#

Picture

Name

Port Type

Library

colour.JPG

Colour Sensor

I2C

EVNColourSensor

distance.JPG

Distance Sensor

I2C

EVNDistanceSensor

compass.JPG

Compass Sensor

I2C

EVNCompassSensor

imu.JPG

6-Axis IMU Sensor

I2C

EVNIMUSensor

gesture.JPG

Gesture Sensor

I2C

EVNGestureSensor

env.JPG

Environment Sensor

I2C

EVNEnvSensor

touch.JPG

Capacitive Touch Array

I2C

EVNTouchArray

Displays#

Picture

Name

Port Type

Library

oled.JPG

OLED Display

I2C

EVNDisplay

matrix.JPG

LED Matrix

I2C

EVNMatrixLED

sevenseg.JPG

7-Segment LED

I2C

EVNSevenSegmentLED

rgb.JPG

RGB LED

Servo

EVNRGBLED

Actuators#

Picture

Name

Port Type

Library

servo.JPG

270 Degree Servo

Servo

EVNServo

contservo.JPG

Continuous Rotation Servo

Servo

EVNContinuousServo

Others#

Picture

Name

Port Type

Library

analog.JPG

4-Channel ADC

I2C

EVNAnalogMux

bluetooth.JPG

Bluetooth Module

UART

EVNBluetooth

Note

There are more actuator software classes for the LEGO® MINDSTORMS® EV3 and NXT motors (EVNMotor, EVNDrivebase), which are of course fully compatible despite not being Standard Peripherals.