Monthly Archives: May 2022

New product: Motoron M3H256 Triple Motor Controller for Raspberry Pi

via Pololu Blog

Our Motoron M3H256 Triple Motor Controller for Raspberry Pi is now available! The M3H256 is a stackable I²C motor controller that can drive up to three brushed DC motors bidirectionally at voltages between 4.5 V and 48 V and continuous currents up to 2 A per channel. Unlike its M3S256 sibling, which is designed as a shield for an Arduino, the Motoron M3H256 is intended to stack on top of a Raspberry Pi (Model B+ or newer), similar to a HAT (Hardware Attached on Top). With an I²C address that can be configured uniquely for each board, a stack of Motorons let you control many motors at once without taking up lots of GPIO pins and PWM outputs from the Pi.

A robot with three omni wheels and motors controlled by a Raspberry Pi with a Motoron M3H256 Triple Motor Controller. A D24V22F5 regulator powers the Raspberry Pi.

If you decide not to plug it into a Raspberry Pi, the Motoron M3H256 can also be used in a breadboard or another custom setup with your own wiring:

An Arduino Micro on a breadboard using a Motoron M3H256 to control three motors.

Motoron M3H256 Triple Motor Controller for Raspberry Pi pinout.

The Motoron M3H256 is available in three different configurations similar to its Arduino shield counterpart: you can get one fully assembled with stackable headers and terminal blocks already soldered, a kit that lets you pick which of the included connectors to solder in yourself, or the board alone if you already have or don’t need connectors and standoffs.

And to help you get started using the Motoron with a Raspberry Pi, we have a Python library you can use to configure the M3H256 and send it commands:

import motoron

mc1 = motoron.MotoronI2C(address=17)
mc2 = motoron.MotoronI2C(address=18)

# Clear reset flags to allow Motorons to run

# Set up acceleration limits for Motoron #1
mc1.set_max_acceleration(1, 200)
mc1.set_max_acceleration(2, 200)

# Set up acceleration and deceleration limits for Motoron #2
mc2.set_max_acceleration(1, 75)
mc2.set_max_deceleration(1, 250)
mc2.set_max_acceleration(2, 80)
mc2.set_max_deceleration(2, 300)
mc2.set_max_acceleration(3, 75)
mc2.set_max_deceleration(3, 250)

# Drive the motors

mc1.set_speed(1, -100)
mc1.set_speed(2, 100)

mc2.set_speed(1, 300)
mc2.set_speed(2, 200)
mc2.set_speed(3, 50)

We’re sure there are plenty of applications where the convenience and scalability of Motorons will be useful. What kind of projects can you think of that would make good use of one (or several)?

For more information about the Motoron M3H256, see the product pages and the comprehensive user’s guide.

New product: VL53L5CX Time-of-Flight 8×8-Zone Distance Sensor Carrier

via Pololu Blog

I’m excited to announce the release of our new VL53L5CX Time-of-Flight 8×8-Zone Distance Sensor Carrier! Over the past several years, STMicroelectronics has introduced a number of FlightSense distance sensors, starting with the VL6180X, that use time-of-flight (TOF) measurements of infrared laser light to measure distances. Each new sensor has been more capable than the last (usually offering an increased range), but the VL53L5CX is more than just another incremental upgrade. What makes the VL53L5CX really special is its ability to take readings of multiple targets across a grid of multiple zones, allowing you to generate a depth map with up to 8×8 resolution and 4 m range.

A plot of a coffee cup as detected by a VL53L5CX time-of-flight 8×8-zone distance sensor.

Compared to sensors that only give a 1D measurement, the VL53L5CX does demand more from a microcontroller to support its operation as a 3D lidar. Initializing the sensor through I²C and processing its data requires a lot of RAM and program memory, so it is not practical to use the VL53L5CX with most 8-bit MCUs like the Arduino Uno. (The same was true for the VL53L3CX, which shares the VL53L5CX’s multi-target capability but does not have multi-zone capability.) We found that the Raspberry Pi Pico’s RP2040 microcontroller worked well for interfacing with the VL53L5CX, and other similarly powerful 32-bit controllers like an ESP32 should also work.

It’s fun to compare our VL53L5CX carrier with our other ST time-of-flight sensor boards because even though the boards are the same size (and pin-compatible), the VL53L5CX component itself is significantly bigger than its predecessors. We also switched from using 0603-size surface-mount resistors (0.06″ × 0.03″, or 1.5 mm × 0.8 mm) to 0402-size parts (1 mm × 0.5 mm) to help everything fit in the same form factor, and that makes for even more contrast with the large IC. As we refine our manufacturing abilities to let us work with more challenging parts like these, it’s nice to have more options for making things even more compact. (When can we try some 0201 parts?)