GB
  
You are currently viewing the United Kingdom version of the site.
Would you like to switch to your local site?
14 MIN READ TIME

Robot arm

Control your own custom robotic arm

Matt Holder discovers how to take a standard model, apply some custom electronics and enable it all to be computer-controlled!

GPIOZERO

Credit: https://gpiozero.readthedocs.io

OUR EXPERT

Matt Holder is an IT professional of 15 years, Linux user for over 20 years, user of plenty of home automation gear, and a selfprofessed geek.

YOU NEED

Raspberry Pi 2, 3, 4, 5

Robot arm

DuPont jumper

cables M2M,

M2F, F2F

L298N H-bridge motor controller

L298N motor controller

Multimeter

Breadboard

https:// github.com/ mattmole/ LXF308- Robot-Arm

We’re going to be mixing some old-fashioned electronics with Python programming to convert a common toy robot arm into a computercontrolled device. While you may not be able to get the exact arm to convert, the aim here is that the article will give you the knowledge to determine whether a device is suitable for converting and let you know what to change.

Part of the magic of the Raspberry Pi is its ability to easily control external electronics through a bank of pins. These pins are known as GPIO, which stands for generalpurpose input/output. The pins are digital, can be used as input or output, support different protocols and standards, and use 3.3V logic. The voltage level is important and is discussed later. The fact that the GPIO is digital means that it is not possible to read analogue voltages – the Pi can detect either 0V or 3.3V signals, and these are referred to as 0 or 1, or low or high. A technique called pulse width modulation (PWM) can be used when pins are set to output mode, and by switching the pin on and off very quickly, different voltages can be simulated. This works due to the fact that the average voltage returned by the pin is between 0V and 3.3V. This technique can be used to dim an LED or change the speed of a motor.

For his birthday, your author received a robot arm model to build and control. Being the nerd of the house, it was decided that converting this to be computer-controlled would be fun. The first thing to do is build the model by following the instructions in the box. This model has five motors and an LED. Not all motors are converted here, but the methods used are exactly the same to convert all of them. The model has a motor on the base for rotation, a shoulder, elbow and wrist joints, and a claw that can open and close. To support with finding objects to grab, an LED can also be turned on, and this is located within the claw itself. The controller is another part of the model that needs to be built and connects to the model via a ribbon cable. Each motor also connects to the top of the control board using jumper cables. This means that connecting to a motor controller board is incredibly easy as DuPont cables can be used to join between the motor controller boards, Raspberry Pi and motors.

Unlock this article and much more with
You can enjoy:
Enjoy this edition in full
Instant access to 600+ titles
Thousands of back issues
No contract or commitment
Try for 99p
SUBSCRIBE NOW
30 day trial, then just £9.99 / month. Cancel anytime. New subscribers only.


Learn more
Pocketmags Plus
Pocketmags Plus

This article is from...


View Issues
Linux Format
December 2023
VIEW IN STORE

Other Articles in this Issue


Linux Format
Linux Format
Future Publishing Limited, Quay House, The Ambury, Bath, BA1
WELCOME
MEET THE TEAM
This issue we’re grappling with Podman to handle our services and make life easier, so what technology have you found that has made things simpler?
Docking apps…
Wasn’t technology supposed to make life easier? Sometimes
REGULARS AT A GLANCE
Newsdesk
THIS ISSUE: FOSS collaboration hit by embargo AI power use rockets KDE 6 arrives on desktops Linux boosts Cyberpunk 2077
Kernel Watch
Jon Masters keeps up with all the latest happenings in the Linux kernel, so you don’t have to.
Answers
Got a burning question about open source or the kernel? Whatever your level, email it to answers@linuxformat.com upgraded to v2.0; we’re still finding bugs…
Mailserver
Still very much supported: TurboPrint for Linux. CREDIT:
HotPicks
THE BEST NEW OPEN SOURCE SOFTWARE ON THE PLANET
REVIEWS
REVIEWS Addlink A93 4TB
Shane Downing is always cheap and usually pretty cheerful!
Intel Arc A580
Often rooting for the little guy, Jarred Walton wonders what Intel’s up to.
Tails 5.18
Shunting all his traffic through the darknet, we’re not sure whether this Nate Drake is real…
SpiralLinux 12.231008
Nate Drake gets his head in a spin over this customised version of Debian, which offers easy setup and proprietary firmware.
Pisi Linux 2.3.4
Nate Drake tastes this Turkish delight, marvelling at its originality and efficiency. Just don’t expect much help if you get stuck.
ROUNDUP
Raspberry Pi 5 killers
Industrial and professional single-board computer use can be a hairy business. Tam Hanna has seen it all, though, and guides you along.
MANAGE YOUR APPS!
MANAGE YOUR APPS!
David Rutland looks at dependency hell and the benefits of containers, and gets to grips with Podman, the newest container tool.
Pi USER
CoderDojo and Code Club become global hits
The help given to young coders is reaching around the world and everyone can get involved!
Dual-Fan Heatsink
During the hot summer months, Les Pounder’s poor Raspberry Pi Zero 2W was sweating in the heat. Can this case keep it cool?
Creality Ender 3 V3 SE
A low-cost, high-speed act has swept Denise Bertacchi off her feet!
RP2040 Matrix
Les Pounder dons his trench coat and shades, journeys into The RP2040 Matrix, then realises it’s the wrong matrix and he’s now in his mid-40s.
AnkerMake M5C
It seems Denise Bertacchi is in trouble as she’s misplaced her phone…
Create a Pi Pico USB camera trigger
Les Pounder’s drawers are full of old tech. No, he’s not smuggling technology, but he is reusing it in this project!
IN DEPTH
ENTROPY ISN’T WHAT IT USED TO BE
Nate Drake provides a brief history of randomness in Linux and how the kernel uses it to keep your data safe.
TUTORIALS
Get your life organised!
Shashank Sharma knows more CLI tools than he does people, and is always looking for more. It’s why he misses deadlines. But no more!
Master printing in Linux
Unlucky Nick Peers has to untangle a cornucopia of acronyms to reveal how to get his printer working at its best and in full colour!
Customise your home WordPress site
Michael Reed provides some words to the wise and explains how to add some content to your WordPress website and customise it.
Tweak and tune your own kernel scheduler
Mats Tage Axelsson explains how Linux keeps all its plates up in the air and when it can be helpful to intervene and stop it all crashing down.
Build the ultimate Amiga PC system
Les Pounder turns a lowly 2019 Intel Celeron-based laptop into a high-end Amiga machine – 1994 Les would be so envious!
ADMINISTERIA
Artificial intelligence rules of the road
AI is great, but caution is needed to make sure that it works as expected.
AI coded Bash scripts
Use ChatGPT to make your life easier by asking it the right questions.
CDNetworks CDN Pro
A powerful, programmable CDN with a strong China presence that pleases the notoriously hard-to-please Mike Williams.
Mozilla VPN
A standalone VPN from the people behind Firefox – Mike Williams wonders what’s not to like?
WordPress vs Wix
Running a website needn’t be a technical challenge. Nik Rawlinson compares the two leading platforms that can help anyone create and manage their own pages.
CODING ACADEMY
Scan and scrape websites using Python
David Bolton shows how to safely scrape the Linux Format archives in just 70 lines of Python without incurring our wrath!
Process your smarthome sensor data
HOME ASSISTANT
Chat
X
Pocketmags Support