Research

Lego parts are nice but expensive, and I'm interested in not seeing this project's cost ballooning too much, so I've been researching LEGO alternatives. I currently have none of my childhood's legos. My brother picked them up years ago and they're nowhere to be found. There's a tradeoff to make here: on the one hand I want to go for affordable options of good quality, and on the other hand some companies seem to have muddy morals and I don't want to support them.

I've read this benchmark of motors from different vendors, by brickelectronic.de. I learned I love spending way too much time searching and reading benchmarks!

All that to say I'm getting CaDa motors. Just the motors though, not the controller or battery. I have a 7.2V / 3000mAh battery pack from a previous project that I'd like to use. Even though LEGO motors are meant to run on 9V, CaDa officially run on 7.4V, so we're good (benchmarks linked above show the motors' RPM are proportional to the voltage applied, so 7V seems fine and if not, I'll switch to a 9V power supply).

Battery Life

Main culprits for power consumption are:

  • rpi zero: 180mA (specs say 150mA)
  • rpi ethernet hub: 280mA
  • Cada motor L Pro: 2000mA (x2)
  • Cada motor M Pro: 1800mA

That's 5980mA, and 3000mAh/5980mA=0.47h so about half an hour of playtime at least. With a 5V2A voltage regulator like the Polulu S13V20F5 in between battery and the pi zero we should be good.

Polulu_S13V20F5.png

Control Board -> Motors

CaDa Pro motors expect between 7V and 9V so they can't be directly plugged on the rpi's GPIO outputs. A motor driver is necessary. The Brick Experiment uses 2 Polulu 2130 DRV8833 dual motor drivers (their description).

brickexperimentchannel_submarine_4_electronics_diagram.png

Here I feel more comfortable keeping each motor independent with its own regulator, and the Polulu DRV8838 does just that:

Polulu_DRV8838.png

Overview

Here's the high level plan:

wiring_overview2.png

Notes:

  • It is possible to power the rpi by supplying 5V through the GPIO header pins 2,4 and GND. The acceptable input voltage range is 5V ±5%. source
  • the dashed rectangle shows how one motor is connected to the motor driver and the pi. This would be done 2 more times, using other GPIOs on the rpi.
  • here's some doc about the motors' connectors' wiring
  • on the DRV8838, the ENABLE pin drives the motor, and PHASE sets the forward/reverse direction. SLEEP defaults to being high:

20230801_Polulu_DRV8838_input_table.png

Software control, I'll see once motors get delivered.

Edit: there.


Published

Category

The Shrimp

Tags