100% found this document useful (1 vote)
112 views100 pages

Hs 62 Digital

Raspberry Pi projects have become more common and accessible due to the Raspberry Pi making technology more affordable and available. This issue of HackSpace magazine features different Raspberry Pi projects ranging from entertainment to practical applications. It highlights how Raspberry Pi has been influential in changing the maker world by inspiring many innovative builds.

Uploaded by

powerchute00
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
100% found this document useful (1 vote)
112 views100 pages

Hs 62 Digital

Raspberry Pi projects have become more common and accessible due to the Raspberry Pi making technology more affordable and available. This issue of HackSpace magazine features different Raspberry Pi projects ranging from entertainment to practical applications. It highlights how Raspberry Pi has been influential in changing the maker world by inspiring many innovative builds.

Uploaded by

powerchute00
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 100

2

20 2
hsmag.cc January 2023 Issue #62

RASPBERRY PI
PROJECTS DIY builds with the world’s
favourite TINY computer
RADIO CIRCUIT
CONTROL PYTHON
YOUR WITH
BUILDS PICO W

3D-
PRINT
2
DIY PROJECT
BOXES
MUSICAL
LIGHT
Issue #62 £6
Jan. 2023

SHOW
ARDUINO SPAGHETTI ROBOTS CUTLERY
WELCOME EDITORIAL
Editor
Ben Everard
[email protected]

Welcome to Features Editor


Andrew Gregory
[email protected]

HackSpace magazine Sub-Editors


David Higgs, Nicola King

DESIGN
Raspberry Pi computers have changed the landscape of Critical Media
making in many ways. They were the first widely available, criticalmedia.co.uk

cheap, small computers with accessible GPIO pins. This Head of Design
Lee Allen
meant that for a relatively small amount of money, you Designers
could embed a Linux computer in your builds, and get it to Sam Ribbits, Olivia Mitchell

control the electronics. This might seem like an ordinary Photography


Brian O’Halloran
thing now, but
CONTRIBUTORS
The fact that it seems ordinary now is a testament it wasn’t until Mike Bedford, Marc de Vinck,
Raspberry Pi Andrew Lewis, Rob Miles,
to how effective Raspberry Pi has been in making Phil King, Nicola King,
did it. It was Rosie Hattersley
the technology accessible to so many people revolutionary. The PUBLISHING
Publishing Director
fact that it seems
Russell Barnes
ordinary now is a testament to how effective Raspberry [email protected]

Pi has been in making the technology accessible to so Advertising


Charlie Milligan
many people. [email protected]

This issue, we’re celebrating this seismic shift in the DISTRIBUTION


maker world by looking at some of our favourite Raspberry Seymour Distribution Ltd
2 East Poultry Ave,
Pi projects spanning the full range of possibilities from this London EC1A 9PT
tiny board. +44 (0)207 429 4000

SUBSCRIPTIONS
BEN EVERARD Unit 6, The Enterprise Centre,
Editor [email protected] Kelvin Lane, Manor Royal,
Crawley, West Sussex, RH10 9PE
Got a comment,
question, or thought To subscribe

36
about HackSpace PAGE 01293 312189
magazine? hsmag.cc/subscribe

get in touch at Subscription queries


hsmag.cc/hello FREE PICO W [email protected]
WHEN YOU
SUBSCRIBE
GET IN TOUCH
This magazine is printed on
hackspace@ paper sourced from sustainable
raspberrypi.com forests. The printer operates an
environmental management system
h
 ackspacemag which has been assessed as
conforming to ISO 14001.
h
 ackspacemag HackSpace magazine is published
by Raspberry Pi Ltd, Maurice Wilkes
Building, St. John’s Innovation
ONLINE Park, Cowley Road, Cambridge,
CB4 0DS The publisher, editor, and
hsmag.cc contributors accept no responsibility
in respect of any omissions or
errors relating to goods, products or
services referred to or advertised.
Except where otherwise noted,
content in this magazine is licensed
under a Creative Commons
Attribution-NonCommercial-
ShareAlike 3.0 Unported (CC BY-NC-
SA 3.0). ISSN: 2515-5148.

3
Contents
94
06 SPARK 25 LENS
06 Top Projects 26 20 Amazing Raspberry Pi Projects
Special things made to delight and entertain Spectacular ideas to borrow/steal for your next build

16 Objet 3d’art 38 How I Made: Heated seating


A flexible filament device protector Keep your posterior warm this winter

18 Letters 44 Interview: Michael Carroll


Christmas PCBs and the joy of pointless making Inspiring inventions with $2 and some cardboard

20 Meet the Maker: Joseph Herscher 52 Improviser’s Toolbox


The modern Heath Robinson/Rube Goldberg Fun things to do with eating implements

56 In the workshop: LEDs


Lighting up a bicycle

20
Cover Feature Tutorial
Control many LEDs

Amazing RASPBERRY PI
PROJECTS 60 More light-emitting diodes than a
single microprocessor can handle

Awesome builds
for the world’s best 52
TINY computer

26
4
CONTENTS

96
Meet the Maker
Joseph Herscher
56
Tutorial
Custom cases
88

20 This person makes machines


that make people smile

59 FORGE 70 Protect the precious things with a 3D printer


and some M3 bolts
60 SoM LEDs
Control many, many lights

66 Tutorial Raspberry Pi Pico


Build a mood light with a Pico W 87 FIELD TEST
70 Tutorial Custom enclosures 88 Best of Breed
Keep electronics tidy with 3D printing and fabric Gaming controllers – the best technology ever

74 Tutorial Mastodon 94 Review Arduino kit


Use a Pico W to interact with the internet Solder your own classic microcontroller

80 Tutorial Radio communication


Link devices over the airwaves
96 Crowdfunding
Origami, meet LEDs
06
Some of the tools and techniques shown in HackSpace Magazine are dangerous unless used with skill, experience and appropriate personal protection equipment. While we attempt to guide the reader, ultimately you
are responsible for your own safety and understanding the limits of yourself and your equipment. HackSpace Magazine is intended for an adult audience and some projects may be dangerous for children. Raspberry
Pi Ltd does not accept responsibility for any injuries, damage to equipment, or costs incurred from projects, tutorials or suggestions in HackSpace Magazine. Laws and regulations covering many of the topics in
HackSpace Magazine are different between countries, and are always subject to change. You are responsible for understanding the requirements in your jurisdiction and ensuring that you comply with them. Some
manufacturers place limits on the use of their hardware which some projects or suggestions in HackSpace Magazine may go beyond. It is your responsibility to understand the manufacturer’s limits. HackSpace mag-
azine is published monthly by Raspberry Pi Ltd, Maurice Wilkes Building, St. John’s Innovation Park, Cowley Road, Cambridge, CB4 0DS, United Kingdom. Publishers Service Associates, 2406 Reach Road, Williamsport,
PA, 17701, is the mailing agent for copies distributed in the US. Application to mail at Periodicals prices is pending at Williamsport, PA. Postmaster please send address changes to HackSpace magazine c/o Publishers
Service Associates, 2406 Reach Road, Williamsport, PA, 17701.

5
Top Projects

REGULAR

Rota
By Architeuthis Flux hsmag.cc/Rota

T
his thing is unbelievably beautiful. What does it
do? The best answer is that we don’t care; truth is
beauty, beauty truth, nothing else matters. But if
you must insist on more information, it’s a device for
counting. The maker built the first one as a gift for a
duck hunting lodge, but since then, he’s had interest
from many more people, and has improved the design up to the
current iteration, version 3.
The device uses a few esoteric parts: at its heart is an
AVR64DD28 microcontroller; it also uses three IN-12B Nixie tubes,
an NCH8200HV Nixie power supply, and an Automatic Electric
Type 24 rotary dial. There are a range of kits with varying amounts
of components included, and they’re selling like hot cakes.

Right
Counting things
never looked
so lovely

6
SPARK

7
Top Projects

REGULAR

VFD Layer Clock


Soldering Kit
By Bolt Industries hsmag.cc/VFDClockKit

I
f, like us, you have a box of Soviet-era VFD tubes that
you bought on a whim from a man in Zaporizhzhia
Oblast, you could spend ages deciphering the pinouts,
assemble the right power supply, and work out the
logic of making data appear on the gorgeous glowing
seven-segment displays. Or, you could buy a kit such as
this one by Bolt Industries. It’s sold as a kit, and looks to us like it’s
not for beginners. Which is fine, because we’re not.
The display technology may be of the Cold War era, but you
get a choice of control options: the kit comes in a TTL (Transistor–
transistor logic) edition that uses only 7400 and 4000 series
integrated circuits, or a Raspberry Pi Pico-based version that runs
on software. That means if you’ve ever doodled around with
MicroPython on a Pico, there’s a good chance you’ll be able to get
one of these clocks running exactly how you want it.

Right
Modern brains in an
old-school display.
Marvellous stuff!

8
SPARK

9
Top Projects

REGULAR

Bulbasaur
Mini Mod
By Neil Hengist hsmag.cc/BulbasaurMiniMod

T
here are many benefits to using open-source
hardware: one is the knowledge that even if the
company you bought it from ceases production,
there will always (as long as someone is willing)
be repairs available. You can take your open-source
hardware to bits and learn how it works without
voiding the warranty, you’ll never have interoperability issues, you
know you’re buying quality rather than a branding ‘experience’…
and, if you want, you can always modify your device to look like a
Pokémon character.
That’s what Neil Hengist has done with his Prusa MINI. The
modifications are entirely aesthetic, so the operation of the
printer is unchanged. There’s no need to move switches or any
electronics, but Neil does recommend having a couple of spools of
Pistachio Green PETG on hand.

Right
Open-source
hardware is
wonderful!

10
SPARK

11
Top Projects

REGULAR

Servo Word Clock


By Moritz v. Sivers hsmag.cc/ServoWordClock

T
his word clock is different to others. Where the
traditional approach is to light up the words in order
to spell out a phrase that tells the time, this version
has all the letters lit at the same time – but not in
focus. Each letter is lit from behind by an RGB LED
mounted onto a linear actuator. To display the letter,
the actuator brings that letter into focus; to stop displaying it, it
moves the LED so that it’s not in focus.
So it’s simple in theory, but in practice,
it uses 114 servos, 320 3D-printed parts,
a custom PCB for the main electronics, a
laser-cut acrylic case, and a whole lot of
engineering precision.

Right
We now want to
see a version of this
word clock in Welsh

12
SPARK

13
Top Projects

REGULAR

LEGO
pneumatic
engine
By Nico71 hsmag.cc/PneumaticEngine

A
s countless dads around the world will tell you
on Christmas morning, LEGO Technic™ is not
just for kids. This device is a seriously grown-up
pneumatic engine, which converts a two-bar air
supply into rotation motion via a single pneumatic
cylinder and some ingenious switching techniques.
Rather than spark plugs or valves, the maker has chosen to control
the flow of air within the engine by using adjustable cams that
press on flexible rubber pipes, closing and opening the air supply
to affect the engine’s air supply and timing.
The video by Nico71 is a mesmerising watch, and he’s made full
build instructions available for a very reasonable €10.

Right
If you feel like
building your own
pneumatic engine,
you’ll need your
own compressed
air supply

14
SPARK

15
Objet 3d’art

REGULAR

Objet 3d’art
3D-printed artwork to bring more beauty into your life

I
f you’ve ever dropped and
smashed a phone that had a train
ticket on it, forcing you to pay for a
new ticket, as well as the price of a
phone repair, you’ll be well aware
of how broken tech isn’t as good as
working tech. For a standard-sized bit of kit,
you can mitigate your risk by buying a case;
if you’re working with a more unusual
shape, the best thing to do is print your own
protection, as the Ruiz brothers have done
with this 3D-printed number for the Adafruit
NeoTrellis M4.
It’s designed for flexible filaments, and
adds a bit of protection and a grip to the
NeoTrellis’s acrylic case. Like it? Get the
design files here hsmag.cc/
FlexibleFilamentBumper, and see if you
can work out how to modify proportions to
fit your fragile technology.

16
SPARK

17
Letters

REGULAR

Letters ATTENTION
ALL MAKERS!
If you have something you’d
like to get off your chest (or
even throw a word of praise
in our direction), let us know at
hsmag.cc/hello

3D DESIGN
IT’S ALIVE! Your interviewee last issue was spot on
Coding: it genuinely is a superpower. trigger something happening on with his diagnosis of 3D printing: the
I’m working on a very small project another pin. For example, when a physical product is amazing, but the
that lights up a blue LED if it’s too cold, temperature sensor reports a value in software leaves a bit to be desired.
a red LED if it’s too hot, and a white a certain range, which then triggers Downloading someone else’s design and
LED if it’s about right. As an object, it’s an animation of (for example) money printing it is great when you want to use,
useless, because everyone in the house going up in smoke. It’s a brilliant say, a Bosch battery in a Makita drill, but
has a different idea of what constitutes feeling, and one that we want to share it’s so hard for new users to design
‘too cold’ and ‘too hot’. All it does is with everyone. anything for themselves. It’s not a
give me heart palpitations as I problem that’s unique to 3D printing
visualise the money I’m spending on – every new technology is the preserve
heating. Despite that, it works, and I of an elite few at first – but it is a problem
made it, and it gives me great pleasure that is getting better.
when I think of the light bulb moment I
had when I stopped getting the Barry
programming wrong and started to get Dublin
it right.
Ben says: I remember using Photoshop 4,
Robert painstakingly repairing images scanned
Basingstoke from scratched bits of film, and being
amazed when my company upgraded to
Ben says: I agree in the strongest Photoshop 7 with its magic healing tool.
possible terms. When you unhook the That was a few years ago; nowadays a
Raspberry Pi Pico, or Arduino, or similar technology is available on every
Adafruit board from the computer and smartphone, and it’s incredibly intuitive
set it free into the world with only to use. That’s the sort of breakthrough
your code to tell it what to do, it feels that’s needed in 3D design, and it will
like you’ve created life. Controlling happen. Until then, I’m incredibly
devices from a code editor is all very thankful to everyone who puts designs
well, but the real magic comes when on to Thingiverse, Printables.com
you use the input from one pin to et al., so that I can make use of their
good work.

18
SPARK

CHRISTMAS PCBs
Mince pies, like sausage rolls, are always best when they’re
homemade. I’d never thought of homemade PCBs in quite
the same way, but I suppose, having seen your tutorial last
issue, that if I want something unique for the tree this year,
I’d better get a move on and make my own tree decoration.
And, if I don’t manage to get one put together in time, I’ll
have all the skills I need to make something decent in time
for Burns Night.

Graham
Oxford

Ben says: I never realised how much I wanted to see an


animated PCB haggis until right now. Do it. And to
everyone else reading this, the skills you learn using
EasyEDA to create a unique piece of hardware will transfer
to any national or religious holiday, not just Christmas. Let
a thousand flowers bloom.
Meet The Maker

REGULAR

Meet The Maker:


Joseph Herscher
Doing things the hard way

D
epending on which side of the HackSpace: Your first YouTube video is of a
Atlantic Ocean you live, you’re machine that squashes a Creme Egg. How did that
probably familiar with the work of come about?
either Rube Goldberg or Heath Joseph Herscher: Yeah, I made that. Gosh. It was
Robinson. These two cartoonists 2008. So, 14 years ago. And I was just inspired by
drew elaborate machines for doing these Japanese kids showing contraptions I found on
everyday tasks. Although these artists probably never YouTube in the early days of YouTube. I thought they
thought that their machines would be – or could be – were really cool, so I had to make my own.
built, there are people who have dedicated countless I’d always been making contraptions and machines
hours to building machines inspired by them. growing up – it was like a little hobby of mine as a kid,
Joseph Herscher has spent the past 14 years of his but I’d never really done it as an adult. But I felt
life building and videoing some of the most elaborate inspired, and I just started building this elaborate
machines around. The results are on YouTube contraption around my thing and it took over my life.
(hsmag.cc/JosephsMachinesYT). We caught up Every day after work, I would come home and build
Below with Joseph to find out what he’s been up to, and on it for about seven months. I, initially, just wanted
Save on heating in
this cold weather how to make our own elaborate machines. to do it to entertain my friends, but that wasn’t really
realistic because it never worked – it didn’t work the
way I thought it would. And the tea would be cold by
the time I finished it – originally it made a cup of tea
– then I just changed the ending. I filmed it 300 times
so I got one perfect run-through, and then I posted it
online and I got a million views! So I started doing
more of it, basically.

HS: What’s your process for making a machine?


JH: Usually, I start with the ending. So I have a
concept, I know the machine is going to do this task,
like water a plant or put my dessert on my plate. And
then I have to think about what the story is around
that. So, putting the dessert in what would be the
start of the machine, what’s going to trigger the
whole thing to begin and, in that context, it would
make sense that maybe having a sip of the drink
would start it, or putting the plate down, or
something like that. And then I start filling in the bits
in between based on, I don’t know, the theme of the
video, or specific objects that I’m interested in that I

20
SPARK

21
Meet The Maker

REGULAR

found that do cool things, because it’s all made out of


Above everyday objects, and I like to find unexpected ways
Why use matches
when you can use of using them. And then, I will start building and
detcord? filling in all of the gaps to create one continuous
chain reaction.

HS: You generally use everyday objects in your


builds. How do you find the things to do the
right bits?
JH: Originally, I would spend a lot of time looking for
things – now I buy everything online, because I’m so
specific in what I need, that I kind of have to order a
specific size/dimension of the object. It would be
much harder to do what I do without an online shop.
And it’ll just take longer to hunt around and find. In
New Zealand we don’t have very good online
shopping. A lot of my time [when I lived there before
moving to London] was just like walking around
shops and playing with objects in shops and trying to
see which ones work best, or what I could roll a ball
across, tinkering, kind of. And sometimes I was
ordering like ten different [things]. Like I wanted to
use a spatula, and I would have ten different spatulas.
And then [I’d] just try out all the different spatulas to
see which had the best shape for the task.
Oftentimes, it’s like I get an idea just from
accidentally dropping something and it bounces in a
Right
Looking for a job? funny way, or it flips in a way I didn’t expect, and
Joseph is recruiting. then I’ll make a record of it and use it later on in
Get in touch via
josephsmachines.com a machine.

22
SPARK

that just don’t work. Playing around with viewers’


expectations and surprising them, and you think that
[you’re] going to surprise them, but they’re just
looking at the other part of the screen, and they don’t
even see the thing that you want them to look at. So
you spent all this time building it and it didn’t work.
And for the viewer, you often don’t know those things
until you’ve posted it. That can be quite challenging
– trying to predict what the psychology of the
viewer [is].

HS: Are there any bits of advice you’d give to


HS: You said that the Creme Egg Squisher took people trying to build similar machines
300 takes to film all the way through. How many for themselves?
times do you usually have to film your machines JH: Yeah, play and experimentation. Don’t be afraid of
to get the one perfect shot? failure. Take some familiar everyday objects in your
JH: It takes between 50 and 100 takes to get a [shot]. life, and just play with them and see what they do
Yeah, so [for a shoot] often I have to eat a lot of food. that makes you smile or laugh. And once you’ve
I try to put the messy steps at the end so it’s not so found that, then you can start thinking, well, what
laborious to reset it each time for the food. The food could that connect to? How could I connect it to
elements that I have to consume a lot [of], I will put something else?
them at the end, so I’m not eating like a whole roast And then spend lots and lots and lots and lots of
chicken in every single shot. time testing it, because you think something works a


few times? Oh, that’s great. That’ll always happen. It
Below
never does what you want it to do on the day you’re Machines can
The biggest challenge is filming. So, I spend the whole week just testing a be built out of
any components
machine before I film.
making it translate to an
that you can find

audience so that they


get it

HS: What are the big challenges in creating


your machines?
JH: The biggest challenge is making it translate to an
audience so that they get it, because you could make
a really clever, cool mechanism, but people don’t
follow it and don’t understand it. And that was the
point – I’m here to entertain you, not to just make
actual machines, and I’m not selling these machines
to consumers. They’re just there to make people
smile and laugh and think differently about the world
around them.
Sometimes you have ideas, and you think that
they’re going to be really clear and easy to follow, and
then they’re not. So getting things to slow down, not
be too fast, and to be clearly visible, and fitting things
in the frame so that they’re not too small or too big.
The pacing is so important. You can’t use strings,
because if you have too many strings, it’s really hard
to follow because they move too quickly. All kinds of
things like that. Or, sometimes, I’ll have concepts I try

23
LENS
HACK MAKE BUILD
Uncover the technology that’s powering the future
CREATE

PG

38 PG
26

20
HOW I MADE:
WARMTH
FOR MAKERS

Amazing
Add heated seating to your
workbench and pretend
you’re in a Mercedes

PG RASPBERRY PI
44
INTERVIEW:
PROJECTS
The best builds based on the
MIKE CARROLL world’s favourite computer
On switches, inventiveness, and the
importance of making electronics
cheap enough to play with

PG

52 PG

56
IMPROVISER’S
TOOLBOX IN THE
Cutlery – small bits of WORKSHOP
metal, ripe for hammering, The challenge of making
bending, and welding addressable LEDs waterproof
20 amazing Raspberry Pi projects

20
FEATURE

Amazing RASPBERRY PI
PROJECTS
Armed with a
Raspberry Pi and
a few electronic
w hile a Raspberry Pi is a capable
computer, and can even be used
as a desktop PC replacement,
its GPIO (general-purpose input/
output) header is what makes it
different and truly powerful. This enables you to
components, a world hook up electronic circuits and components such as
LEDs, sensors, motors, and servos.
of adventure awaits To help inspire you to get creative when connecting
electronics to your Raspberry Pi, we’ve compiled a list
the intrepid maker of 20 of the most impressive and ingenious projects
around. Dazzling light-up devices include an interactive
model Stargate, LED cube, London Underground map,
and spinning POV (persistence of vision) display.
Moving into robotics with motors and servos, you
could make a piano-playing, metal-detecting, chess-
playing, or air hockey-playing robot. Or maybe a LEGO
Phil King submarine or even a ceiling planetarium. If you fancy
A long-time Raspberry Pi something musical, how about a synth guitar or
user and tinkerer, Phil is a glockenspiel player? Or get arty with a CNC drawing
freelance writer and editor
machine or even a social media jacket. The only limit
with a focus on technology
with a Raspberry Pi project is your own imagination.

26
LENS

LEGO
Submarine GIANT
T
he Finnish maker behind the
Brick Experiment Channel on
YouTube loves using LEGO to 4.0 Battleships
M
create working models that
address complex physical
and mathematical challenges. One of his most impressive creations yet is aker Dan Aldred has taken the concept of the classic
this working radio-controlled LEGO submarine (his fourth attempt). Battleships game and blown it right up. After previously
With the processing power of a Raspberry Pi Zero 2 W on board, recreating the board game on Raspberry Pi with a Sense
it uses a servo motor and LEGO rack and pinion system to operate HAT, he opted to go bigger by using a giant 10×10 LED
a syringe as a piston ballast; this draws in or expels water to raise matrix that he’d already created for light shows and
and lower the sub’s buoyancy level to make it rise or fall in the water. discos. Cleverly, the NeoPixel LEDs in the grid have their light diffused by
Tungsten pellets are used for ballast. An absolute pressure sensor glass jars spray-painted white.
obtains accurate depth readings, while a micro laser sensor measures An innovative method was also employed for the user to choose the
the distance to the ‘sea bed’. Positioning is aided by a PID (proportional coordinates to target torpedoes at the hidden ships in this solo version of
integral derivative) controller loop in the Python software. the game: a 1960s Bakelite telephone fitted with a Raspberry Pi. As you turn
Naturally, protecting the electronics from water damage was a key its dial to select digits, a circuit with a GPIO pin is interrupted by the relevant
consideration in the build. To this end, a fair amount of time and effort number of clicks. Each coordinate is sent in turn (using Python sockets) to
went into creating the submarine’s transparent acrylic case with tight- the LED board’s Raspberry Pi.
fitting end caps with rubber seals. The project even makes use of the telephone’s handset speaker to give
voice instructions to the user and play sound effects such as explosions.
hsmag.cc/LegoSub
hsmag.cc/Battleships

27
20 amazing Raspberry Pi projects

FEATURE

PACKAGE
Thief DETERRENT
L
ike many people, Canadian maker Ryder (of the Ryder Calm
Down YouTube channel) has experienced the problem
of packages delivered to his home being stolen by porch
pirates while he was out. Armed with a Raspberry Pi 4, a
security camera, and a few deterrent devices, he set about
solving the problem.
First of all, images from the camera connected to his Raspberry
Pi are processed by a custom machine learning model (trained using
Google Cloud AutoML) to detect if there is or isn’t a package. If one
has been taken unexpectedly, the Raspberry Pi sends signals to a relay
switch board to activate a variety of alarms to entice the thief to drop
the package. Those surprises for thieves include a sprinkler, a loud truck
horn, and a flour shower.
Naturally, since he didn’t want to trigger the alarm himself, he has
trained the system to deactivate when it recognises him in the frame.
hsmag.cc/PackageAlarm One slight issue is that the AI sometimes thinks his cats are packages!

ROBOT
ARM
E
ven a stopped clock is
right twice a day, but
maker Hendrik Ohrens
wasn’t content with
that when his timepiece
Clock
broke. Instead, he opted to build a robotic arm to physically move the
clock hands to the correct time every minute!
Having explored inverse kinematics and computer vision, Hendrik
came up with a far simpler solution. Using Python code running on
a Raspberry Pi 3B+, he trained the robot arm manually for each tiny
movement of the minute hand required for a complete rotation.
Once trained, the Raspberry Pi relays the precise positional
instructions to a connected Arduino MKR board equipped with a shield to
control the arm’s four servos.
Instructions, code, and files for the arm’s 3D-printed parts can be
found in his GitHub repo: hsmag.cc/RobotArmGit. hsmag.cc/RobotArmClock

28
LENS

LONDON
Underground
MAP DASHBOARD
W
hile many makers create Raspberry Pi projects for use in the home or
just for fun, Richard Kirby built this one to help with his work. As a test
manager for a company working on automating parts of the London
Underground (aka Tube), he needed a way to monitor the real-time status
of the train lines to instantly alert him to any problems.
Made from 5 mm plywood and printed network map, this large dashboard is ideal,
featuring 284 individually drilled holes to house multicolour NeoPixels. A Raspberry Pi Zero
2 W gathers data from the Transport for London (TfL) Open Data site to get the statuses
of the various lines, which it then converts into animations: ‘Good Service’ is represented
by fully lit LEDs for that line; ‘Minor Delays’ is rapid flashing from 50% to 100% brightness;
while ‘Severe Delays’ has slower flashing.
The map is also connected to a Bluetooth speaker for service announcements, with
hsmag.cc/TubeDashboard text-to-speech used to turn the data into spoken words.

DeMOOR
Orrery
A
fter seeing a 240-year-old orrery – a mechanical model
of the solar system – on the ceiling at the Eise Eisinga
Planetarium, Chris DeMoor was inspired to build one of
his own. Rather than copying the pendulum clock-driven
system of the original, however, he opted to use six
Raspberry Pi Zero boards.
Each controlled by a Raspberry Pi Zero, the six inner planets of the solar
system move in orbits around his ceiling in real time. Two different methods
were employed for their movement. Mars, Jupiter, and Saturn are attached
to front-wheel drive, 3D-printed cars which run on tracks on the upper,
non-visible side of the project. As their orbits would be too small for tracks,
Mercury, Venus, and Earth are mounted to dishes connected to rotating
stepper motors.
To obtain its correct position, each planet’s Raspberry Pi connects
wirelessly to a web server which plots their orbits using the jsOrrery
demoor-orrery.com
JavaScript library. The orrery planets are then moved accordingly.

29
20 amazing Raspberry Pi projects

FEATURE

PIANO-PLAYING
Robot
R
egretful that the piano in his living room was played all
too rarely, Étienne Allaire came up with the idea of a robot
that could play music. To do so, he mounted a wooden
frame with 15 solenoid switches to an electric keyboard.
Controlled by a GPIO pin on a Raspberry Pi 3B, connected
via a 16-channel relay module, each solenoid pushes down on a key to
play a note.
The system can read a MIDI file, convert it into on and off signals for
each note, and play the tune, although there is a limitation as to how fast
it can play due to the speed of the solenoid actions. A basic UI allows the
user to choose between scales, arpeggios, or melodies.
The most impressive feature, however, is the robot’s ability to read
previously unseen sheet music – using a Raspberry Pi Camera Module
– and play it. The open-source tool Audiveris uses optical character hsmag.cc/PianoRobot
recognition (OCR) to read the notes on the sheet music.

STARGATE
A
s a fan of the
Stargate‑SG1 series,
Kristian Tysse was
inspired to create his very
Model
own Raspberry Pi-based
scale model of a Stargate, complete with animated spinning wormhole. To
achieve the latter effect, he created an infinity mirror with the light from 122
LEDs reflected back and forth. The model itself was painstakingly created in
great detail, built from 3D-printed parts.
Most importantly, it includes a DHD (Dial Home Device) to dial any Milky
Way address featured in the show. Acting as a USB keyboard, its key presses
are sent to a Python program running on
Raspberry Pi, causing the Stargate’s symbol
ring to rotate accordingly and each of the
seven chevrons to light up and move inward
– done using stepper motors.
If a correct set of symbols is dialled, the
wormhole is established and audio clips
from the TV show are also played. The
Stargate can even dial other Stargates
over the internet, and receive incoming
wormholes from them. Find instructions for
making one on the website.

thestargateproject.com

30
LENS

AIR
Hockey CNC
ROBOT Drawing
W
hen students Ondřej Sláma and Dominik Jašek needed
MACHINE
M
to write their course thesis, they chose the Air Hockey
Robot they had built from scratch. Taking about a year,
the project involved creating robot movement control ade by Yannik Dolde, this seriously impressive
algorithms, computer vision, game strategy algorithms, Raspberry Pi project repurposes old CD drives as
and a user interface. motors for the X and Y axes of a CNC machine that
The game table itself was designed in Fusion 360 and built from can draw a picture. The pen is mounted in a 3D-printed
plywood, with a mesh of 920 holes creating an air cushion. The holder that moves up and down using a servo with
processing power for the robot’s optical puck recognition and AI strategy a spring-loaded metal rod to regulate the pressure on the paper.
is provided by a Raspberry Pi 4 connected to a Camera Module mounted A Raspberry Pi 3B+ with custom Python software runs a user interface
in the overhead part of the frame. and reads a standard G-code file, line by line, to send commands to an
For the mechanical aspect, the pair opted for an ‘H-bot’ design to Arduino Mega to move the motors.
move the robot’s paddle. Held in a 3D-printed housing, the paddle is
moved from side to side using a pulley and belt system with two stepper hsmag.cc/CNCDrawing

LED
motors. You can find the code used for various parts of project in their

Cube
GitHub repos (linked from the YouTube video).

hsmag.cc/AirHockeyRobot

A
n LED cube is a popular maker project, using LED matrix
panels for its sides. Inspired by other cube creators,
Sebastian Staacks originally envisaged crafting a
stationary mood light for his living room. However, his wife’s
disapproval led to him turning it into something more useful:
a parametric animation reflecting the status of his PC’s Ryzen 5 CPU.
As it’s only intended to be viewed from one angle, his ‘cube’ comprises
three 64×64 RGB LED matrix panels. These are held by a 3D-printed frame
which also contains a Raspberry Pi 2 with an Adafruit LED Matrix Bonnet. It
cost Sebastian less than €150 to make.
Making use of an OpenGL shader, the cube displays impressive glowing
effects in real time based on the CPU’s temperature and its core loads.

hsmag.cc/LEDCube

31
20 amazing Raspberry Pi projects

FEATURE

MONOME
J
oon Guillen’s unusual music box
features old and new technology
working in perfect harmony. For
input, a Monome Grid controller
Pi
is connected to a Raspberry
Pi 3 running a step sequencer program which registers the user’s
button presses on the Monome, lights them up, and sends serial
commands to an Arduino Uno.
The Arduino is connected via a ProtoShield Kit to eight servo
motors, which move hammers to play the correct glockenspiel
notes to match the pattern shown on the Monome. The
makeshift hammers are made from coffee sticks, sticky tape,
and LEGO blocks borrowed from Joon’s daughter – which shows
that you don’t need to be a master craftsperson to build an
interesting project.
Joon says that you could substitute the Arduino with
a Raspberry Pi servo/motor driver board, and the Monome
with a touchscreen or web UI.

PIXEL hsmag.cc/MonomePi

Electromechanical
DISPLAY
W
hen considering how to make a decorative display
for an office party, Gavan Fantom thought a standard
LED matrix would be too obvious and simple.
Instead, he designed and built Pixel, an ingenious
electromechanical matrix display controlled
by a Raspberry Pi and comprising no fewer than 448 3D-printed
parts. Each of the display’s 64 ‘pixels’ is turned on and off by a servo
rotating a 3D propeller-like shape to reveal its bright yellow blades
from a black casing.
While it was inspired by traditional flip-disc electromechanical
displays, its unique pixels can also be rotated to intermediate positions
to achieve greyscale-style shading and ripple effects. Each pixel
comprises seven 3D-printed parts, one servo motor, and two nails to
transmit the latter’s rotation to reveal the vanes from the casing. To
drive 64 servos from a single Raspberry Pi, three Pololu Mini Maestro 24
boards are used.
The end result is an amazing display that just has to be seen in action
hsmag.cc/PixelDisplay – check the YouTube videos in the linked blog piece.

32
LENS

DIGITAL
Zoetrope
PUITAR O
ne of the oldest animation
methods, a zoetrope is a

F
spinning drum with a set of
static images that, when seen
inding his brother’s old electric in rapid succession from a slit
guitar difficult to play, Behruz Farshi in the side, appear to be moving.
opted to transform it into a digital Fascinated by the concept since he was
instrument using a Raspberry Pi a child, maker Brian Corteil decided to make
Zero. His Puitar (pronounced ‘pit-tar’) his own zoetrope using 15 e-ink displays –
features a keypad matrix of 22 frets and six Pimoroni Badger 2040s. Brian designed the
strings. When the player presses a string onto zoetrope drum using the SolidWorks CAD
a fret, it forms an electrical connection that is program, creating outlines to be laser-cut from 3 mm and 5 mm plywood,
detected by one of Raspberry Pi’s GPIO pins and while some other parts were 3D-printed.
the appropriate note is played – which could be a A Raspberry Pi 4 is used to send screen updates to the e-ink displays
piano or any MIDI sound you like. To expand the via USB connections, while a Pico in the base controls the drum rotation
number of pins, an IO Pi Plus board is used. via a motor controller and monitors the emergency stop buttons. All the
To create the electrical matrix, Behruz drilled electronics spin around with the drum – to avoid the main central power
holes into the fretboard and soldered wires to the cable twisting, there’s a split ring in the base.
frets from below. While his prototype Puitar can’t A second Raspberry Pi 4 connected to a flatbed scanner also enables
handle polyphony, and accidentally touching animations created on a cell sheet to be scanned and uploaded to
strings together can cause it to malfunction, the zoetrope.
it’s a clever concept that could be adapted and
possibly modified into a full-on synth axe. hsmag.cc/Puitar hsmag.cc/DigitalZoetrope

DISCOVERER
Metal-Detecting ROBOT
B
uilding a robot vehicle is one of the most popular
Raspberry Pi projects, but this one is rather special and
could be useful. Maker Ingmar Stapel came up with the
idea after watching a TV show about people trying to find
gold with a sophisticated metal detector.
For the chassis, he used a plastic storage box to contain all the
electronics, adding PVC piping around the exterior to hold a dual-servo
pan-and-tilt camera – which enables the streaming of live video to a web
dashboard – along with a Gary’s Pulse-AV metal detector. A step-down
converter is used to change the detector’s 12 V output to 3.3 V for a GPIO
pin on the Raspberry Pi.
Discoverer’s four motors are driven via L298N H-bridges. As well
being remote-controlled with a range of 350 metres, the robot can be
programmed to move autonomously from one waypoint to another thanks
to the addition of a GPS receiver and a Sense HAT for the compass. hsmag.cc/Discoverer

33
20 amazing Raspberry Pi projects

FEATURE

SOCIAL MEDIA
without the
INTERNET
I
magine what a physical, real-world version of interacting
on social media might look like. That's just what interactive
artist Tuang Thongborisute (Tuang T) wanted to explore,
leading her to create this very special jacket as a
performance art project.
The blazer features numerous electronic elements – controlled by
a Raspberry Pi, aided by an Arduino – which enable people the wearer
meets to engage in six social interactions. For instance, a follow is
made by tapping a pressure-conductive resistant sheet on the right
shoulder, while unfriending involves a push of a button located on the
left side, near the heart. Adding a new friend is achieved by shaking
hands, connecting two conductive rings on the wearer’s fingers.
The jacket also has a 7-inch touchscreen for further interaction and
to show status information. In addition, three tiny cameras broadcast
the real-time interactions on a local network for performing in a closed
environment like an indoor gallery.
hsmag.cc/SocialMediaJacket

RASPBERRY
Turk
T
his amazing chess-playing robot was inspired by the
18th‑century ‘Mechanical Turk’. While the latter had a
human player concealed inside to play its moves, the
Raspberry Turk has a Raspberry Pi 3 for its brains.
Created by Joey Meyer, this open-source project is
built into a small 3×3 ft (91×91 cm) table. A box on one side houses all
the electronics, while the robotic arm is mounted on its top. The arm
is built with Actobotics components, Dynamixel servos, and some
3D-printed parts.
The arm’s motion is controlled by the rotation of two servos attached
to gears at the base of each link. Another servo controls the gripper
mechanism which uses an electromagnet to pick up pieces. Naturally,
great precision is required to move pieces on the board, so Joey built up
a dataset of the arm’s movements to aid his mathematical model.
To evaluate the positions of the pieces, a high-mounted Raspberry Pi
Camera Module captures a view of the board which is then perspective-
raspberryturk.com transformed using OpenCV. The Stockfish chess engine is used for its AI.

34
LENS

Pico
AUTOMATIC Projects

Dog Ball LAUNCHER


R
ather than buy a commercial automatic dog ball launcher,
maker Brankly opted to build one of his own, based
around a Raspberry Pi Pico microcontroller. After playing
around with different shapes, he found that a spherical
design looked the best; it was also small enough for his
3D printer to print.
When a ball is placed into the launcher's funnel, it is prevented from
falling into the launch channel by a piece of plastic that's controlled
using an SG90 servo. The ball is then detected by a sensor, prompting
Raspberry Pi Pico to get ready for launch.
To vary the distance of the ball launch each time, to make it more
fun for the dog, a motor controller is used to randomise the speed of
the motors using PWM (pulse-width modulation). Once a ball has been
launched, the motors turn off and the servo blocks the entrance again so
that the machine is ready for the next ball.

hsmag.cc/DogBallLauncher

POV
Display
'P
OV’ stands for persistence of vision, the optical
phenomenon that makes moving pictures possible in
cinema and TV, and on which this whizzy Pico project
relies to depict an image from spinning LED strips.
Created by Japan-based family team of makers
HomeMadeGarbage, it makes use of two
of the Pico’s PIO (Programmable IO) state
machines to control, in parallel, a pair of
super-bright 24-LED DotStar strips on its
rotating arm. The arm, which also holds the
Pico board, is spun at high speed by a motor
while the LED strips are blinked in carefully
controlled sync with the rotation speed to
display a static or animated image.
A wireless charging module is employed
to power the spinning arm, using a coil on
the underside of the latter and another on
top of the motor.

hsmag.cc/PicoPOVDisplay

35
SUBSCRIBE
TODAY
FOR JUST £10
Get three issues plus a
FREE Raspberry Pi Pico W
delivered to your door
(UK only)
hsmag.cc/FreePico

Subscription will continue quarterly unless cancelled


SUBSCRIPTION

2 Get 6 issues plus a £35 USA and EU

20
FREE Raspberry Pi
£40 Rest of the world

2
Pico W for just…

hsmag.cc January 2023 Issue #62

RASPBERRY PI
PROJECTS
SAVE
hsmag.cc December 2022 Issue #61 hsmag.cc November 2022 Issue #60

2
R
ULTIMATE BUILD THE

A
L E 44%
MINCE
PIES

TO C O D E
DIY builds with the world’s
favourite TINY computer
RADIO CIRCUIT
Homemade projects to connect your life

KERS
CONTROL PYTHON
R MA
Dec. 2022
Issue #61 £6

F OYOUR WITH
BUILDS PICO W

PINHOLE
CAMERA
Issue #60 £6

3D-
Nov. 2022

Inside the DSLR of


the olden days

BUILD S WITH DESIGN PRINT


2
SHADOW FLAT-PACK
LEARN TO CONTRO
L YOUR PICO
Y PIDIY
YOUR FIRST
CLOCK PROJECT
WEAVE RASPBE
RR
MUSICAL PCB BOXES
Master time with a
Raspberry Pi Pico
ROCKETRY
Build flying machines
the IKEA way

SPANNERS MUSIC 3D PRINTING


LIGHTDRAGONS TILES PLANTS KEYBOARDS LEDS
Issue #62 £6
Jan. 2023

SHOW
ARDUINO SPAGHETTI ROBOTS CUTLERY
How I Made: Winter is coming

FEATURE

HOW W
inter is coming. It’s
cold, it’s wet, and it can
be the most difficult
season to find the
literal and figurative
energy to keep making things. The cost

I
of heating is getting higher for everyone,
and a dedicated workshop can quickly turn
into a money-eating monster in the winter
months. For all of the advantages of having
a workshop, there are some pretty big
disadvantages, too. A permanent workspace
By Andrew Lewis is exactly that. It continues to exist in space
even when you’re not using it. Some tools,
consumables, and machinery can be ruined
by cold temperatures, and in winter, a
workshop becomes an extra place to heat.

MADE
In this article, you’ll find out how to heat a
workshop more effectively, and how to stay
warm yourself without relying on power-
hungry heaters.
A maker’s haven for the summer will
become a burden without proper winter
planning. It isn’t just about feeling the
cold, it’s about how the cold effects your
equipment. Inaction through ignorance
or simple failure to prepare for the winter

WINTER IS COMING
Fighting the effects of winter in your workshop
with heated chairs and insulation

38
LENS

can lead to expensive failures when the


temperature drops below freezing. To get
the best out of your workspace, you’ll need
to address both of these problems. Keeping
your equipment in working order, and
Above
keeping yourself warm while you’re working.

“HEATED SEATS
Heating the person, not
When you’re working on larger projects, the space is a common
way to increase comfort
you’re generally moving around and doing levels cost-effectively.

ARE POPULAR IN
things that will help keep you warm. Making While it won’t solve all
equipment problems,
sure that you’re wearing appropriately warm strategically placed
low-power heaters like
clothing means that you’ll be happy in your

MODERN CARS”
the one installed in
work. However, if you’re doing fine work, this chair can make a
big difference
sitting still at your workbench, you’ll start
to feel the cold very quickly. So how do
you solve this problem? You can borrow a
solution from the automotive industry and
create your own heated seat. Heated seats
are popular in modern cars, and it’s not STAYING SAFE
uncommon for people to want to retrofit When powering the heating elements from an 18 V power tool battery, you
them into older vehicles. There are plenty of will need to use a DC power converter to reduce the voltage down to 12 V. A
kits available online that feature heating pads minimum of a 5 A DC converter is recommended, given the power requirements
and controllers designed to fit into car seats. of the heating elements. The first item in your circuit after the battery should be
With a little bit of fiddling, it’s possible to add an appropriate fuse. In this case, a 5 A fuse should be plenty. Adding a thermal
fuse to each heating element is advised. A 76°C 3 A fuse like the SETFuse X0 can
one of these kits to most office chairs, and
be used to cut power if the heating element ever malfunctions and overheats.
you can power it with an electric tool battery Position the fuse in-line on the positive wire, and fix it somewhere on the
that will last between two and five hours heating. You can keep it in place with Kapton tape. If the temperature of the
(depending on how warm you want to be). element gets above 76°C, the fuse will blow, preventing a possible accident.

39
How I Made: Winter is coming

FEATURE

“REMOVE AS
MANY STAPLES AS
YOU NEED”
Right
You can see all of
the components that
come with the seat
heater here, along with
a DC power converter
that regulates the
power from a tool
battery to 12 V

WATER WOES START AT THE BOTTOM


A typical seat heater kit for a car will have
A hidden danger of a cold workshop is condensation. If the workshop and its
four heating pads, a relay, a dashboard
contents get cold enough for water to condense on them, chaos will ensue
when you try to use them. Firstly, water can condense, drip, pool, and rust switch, and a small circuit board or sealed
your machines. Secondly, water inside electronic equipment or on sensitive box that lets you control how hot the seat
items like laser cutter mirrors will lead to disaster. One way to deal with this will get. Often, these kits don’t come with
problem is to use chemical moisture traps to capture water from the air. any instructions, and you might be a bit
Another way is to employ an electronic dehumidifier. The best approach confused by the number of power wires
is to keep the temperature of the workspace stable at a temperature that’s
that are sticking out of the control box.
high enough and dry enough to prevent moisture from condensing. A heater
with a frost switch can help with this, turning on to keep the temperature
Normally, you will have two thicker red and
somewhere above freezing. It’s also possible to include a small heat source black wires, which are the main 12 V power
(such as a very low wattage incandescent bulb) to effectively heat the inside input for the heater. You’ll also have another
of some equipment and prevent condensation from forming. This can be a thin wire that controls a main power relay,
good solution for equipment with relatively large enclosures, like a laser and possibly a thin wire that will make the
cutter or an enclosed 3D printer, where you can use the machine’s heated switch light up on the dashboard when the
bed to keep the internal chamber warm. Heating an enclosure like this will
headlights are on. Because you’re probably
use power and cost some money, but it’s cheaper than having to replace
components that have been damaged by condensation. If you do find that not going to be driving your workspace
your equipment has gotten too cold, you’ll have to gradually warm it and around at night, you can safely connect these
make sure that the water inside has evaporated before you start using it. wires to the positive 12 V line and forget
about them. If you look at the switch for the
heaters, you’ll notice that there are two dials.
One dial is for the passenger seat, while the
other is for the driver’s seat. As you’ll only
be using one seat, you can use these dials to

40
LENS

HEATING THE ROOM


A well-insulated workshop (or any other building) can remain remarkably
warm without any heating. However, it’s difficult to achieve such high
levels of insulation unless the building has been built specifically with
eco-living in mind from the beginning. For most people, some level of
heating is going to be necessary. You can discount any idea of portable
gas or paraffin heating, as they produce high levels of very moist air
and fumes that make them practically useless or downright dangerous
to use in an enclosed workspace. Conventional electrical heaters are will more likely be stapled onto laminated
potentially useful, although convector heaters typically use several board, and you’ll need to disassemble the
kilowatts of electricity every hour, making them a very expensive option. chair to get access to the inside of the seat
cover. Often, you’ll need to remove the arms
and legs of the chair, and then disconnect
the seat from the back-rest if it is removable.
You should be able to see the staples once
the chair is disassembled.
control the temperature on the back and the Remove as many staples as you need to
seat of your chair separately. Simply connect get inside the seat cover, and then slide the
one pad to the passenger connector, and the heating element in between the outer cover
other pad to the driver’s side. You’ll need to of the seat and the interior foam. This seems
cut the wires from the control box, since it’s like a simple instruction, but in reality, you
designed to be fitted in a car a metre or more will probably spend 20 minutes cursing this
away from the seat, and you’ll be fitting the article, the person who wrote it, and all of
box underneath your chair about 15 cm away the ancestors of the person who designed
from the heater panels. the chair while you are trying to slide the
Fitting the heating elements inside the
office chair is the fiddly part of this particular
project. If you’re lucky, your chair’s seat Below
Removing staples is CHILLY CHALLENGES
cushions will be removable and have zips or much easier with a
Velcro strips that you can undo to get inside decent pair of pincers. It isn’t just machines and people that suffer the
They offer easy leverage
the padded parts of the chair. Unfortunately, and are less likely to effects of the cold weather. Greases and oils
the vast majority of office chairs are not accidentally grip and rip behave differently in cold weather, becoming
your chair’s fabric than more viscous and potentially becoming unusable.
designed this way. The fabric for the seat ordinary pliers
Some industrial paints can be ruined if they get too
cold, and most paint won’t brush or dry properly if
it’s below 10°C. Spray paints won’t spray properly
in cold weather, and butane gas canisters will
stop vaporising gas properly at roughly the same
temperature. The pressure in acetylene tanks
will drop as the temperature decreases, too –
so don’t be too surprised if that full tank reads
almost empty now that it’s colder. Battery power
drops off dramatically in cold weather, meaning
that you’ll need to change and charge batteries
more often on power tools, and some items like
multimeters that use disposable batteries might
start to give battery warnings or read incorrectly.
If you’re going to need temperature-sensitive
consumables, it’s probably best to bring them into
the warm for a few hours before you use them.

41
How I Made: Winter is coming

FEATURE

Right
Pulling plugs and wires
through fabric and
foam can be tricky if
you’ve never done any
upholstery work. Push
pliers through from the
outside of the foam first
to open up the hole, then
grip the plug and pull it
through to the outside.
Don’t use too much
force, as you’re likely to
bend or break the plug

Below
Screw the project box
in place under the chair
so that you can access
the switch and the
battery easily. The base
of most office chairs has
surprisingly thick wood,
but take care not to use
over-long screws

QUICK TIP
You can fix one of
the remaining seat
heating elements to
stubborn heating element flat against
the underside of a
particularly grippy upholstery foam. Worse, self-healing cutting
you need to hold the heating element in mat, and use it to
place with double-sided tape, removing the warm the mat up.
backing while it’s in position inside the chair, This will help keep
and then finally restaple the outer cover your hands (and
back into place while remembering to keep tools) warm while
you’re working.
the wires for the heating element hanging
outside the fabric.

SIMPLE BUT WARMING


All that remains is to connect your control
box to the heating elements, and stash all
of the electronics in a box under the seat.
Make sure that you position the box so that

COOL CUTTERS
One of the most temperature-sensitive machines in the workshop is a laser
cutter. The laser tube is fragile. The coolant used in lasers can freeze in
the winter, cracking the laser tube, bursting coolant pipes, and damaging
pump diaphragms. On top of this, bearing grease will stiffen in cold weather,
increasing the chance of a stepper motor stalling, and contraction and
expansion from temperature changes can throw off the alignment of lenses
and rails. Running the laser when it’s too cold can cause the tube to crack from
thermal shock.

42
LENS

PRINTER PROBLEMS
3D printers are sensitive to cold, but not necessarily in the same way
that other precision machines are. Issues with thickened bearing grease
and frame warping do exist for 3D printers, but for machines without an
enclosed chamber, the temperature of the environment can be critical for
a successful print. If the room is too cold, prints can warp and fail, and bed
adhesion might also be affected. For resin printers, the temperature of the
resin affects the cure time, and a cold resin tank can cause unexpected
failures on previously successful prints. A good solution for 3D printers
is to (if possible) build an enclosed area just large enough to house the
printers and their accessories, and then heat that area using the printer’s
bed heater or an incandescent bulb for some time before you start printing.

the dashboard switch is easily accessible


while seated, and connect a 3D-printed
battery connector that matches your power
tool batteries to a 12 V DC regulator. Connect
the battery, turn on the heaters, and warm
your heart by making comfortably.
It’s one thing to pump heat into your
workshop, but if you don’t have any
insulation, then you’re just going to be
throwing away money. Use whatever
you can to improve the insulation in your
workshop. Cover shed windows with bubble
wrap to reduce heat loss through the glass,
and use the best insulation you can get your
hands on to insulate walls and doors. Even

“COVER SHED
WINDOWS WITH
BUBBLE WRAP”
layers of cardboard will help reduce heat loss
through walls, ceilings, and floors. However,
cardboard will absorb moisture and will lose
it’s effectiveness when wet. Foil, bubble
wrap, or foam insulation is a much better
option if you can afford the extra expense.
Draught excluders and neoprene foam
tape can be very useful if your workshop is
in an outbuilding or shed where doors and
windows don’t necessarily fit as closely
into their frames as they do inside a regular
house. Plugging up those leaky seams can
go a long way towards reducing heat loss.

43
i
Mrk
Mike Carroll

INTERVIEW

HackSpace magazine meets…

Mike Carroll
Inventing for pennies

M
ike Carroll is an author,
teacher, and co-creator
of a whole system of
building electronic
circuits using commonly
found items.
He’s bringing up the next generation of
engineers in his school district just north
of Philadelphia, and if you have some
pocket change and a bit of cardboard, you
too can put together the building blocks
of an electronic engineering system.
Check out scrappycircuits.com, buy the
book, Scrappy Circuits, and be amazed by
how much you can do with some paper
clips, aluminium foil, and cardboard,
and rethink that expensive Christmas
present you were going to get your nieces
and nephews.

44
e
k ol
LENS

rr Above
Michael Carroll:
teacher, author,
wearer of jaunty
T-shirts

45
i
Mrk
Mike Carroll

INTERVIEW

So, they had to have dynamic projects


that could easily be refurbished for about
Left
No crocodile clips, $2. That led to coming up with a bunch of
no problem (as different projects.
long as you have
paperclips and
aluminium foil)
HS I see a parallel with Raspberry Pi
and Raspberry Pi Pico here: I have a
couple of Pico projects here at home that
I don’t expect to last forever, but I don’t
care because the hardware only cost
me £4.20.

MC When education is a goal, the price


point has to be low because if you’re
talking about a classroom of 20 students,
HackSpace Hi Mike! First of all, tell us a communities don’t have an easy way to whatever the item is, you’re multiplying
bit about Scrappy Circuits. hop online and purchase these items. So the cost by 20. And that dollar or two
I was trying to think about what is extra, when multiplied out, makes a huge
Mike Carroll Scrappy Circuits is an common in most communities that can burden on an educator or an education
innovative and scrappy way to learn be turned into a kit. And that was kind of system. So that was really the reason for
about electrical circuits for less than $1 the origin of Scrappy Circuits, which keeping it so inexpensive.
per person. really started when a friend of mine, Erik Another one is that you can get more
It came about because there was a Herman, invited me to come to Cornell use out of inexpensive things. I
need for it: I wrote a book previously University, where he worked. He was part remember, my dad had an expensive set
called Dewey Mac, and I sold kits to of a group at Cornell that had inherited a of binoculars when I was growing up. I
accompany the book. And that was a lot whole curriculum, and they wanted had to ask twice to take them out of
of work. And I always gave out the parts projects to go with the curriculum. where he stored them, and handle them
[list] to people so they can buy their own And they had funds for the curriculum with kid gloves. But that shouldn’t be the
kits. But you know, some communities projects for about $2 per person, every case for something like a pair of
don’t have a RadioShack nearby. Some time somebody borrowed it. binoculars – they are a tool for learning,

Below
Roll, kick or hit the ball into the V-shape made by
Below the bent clips, complete the circuit
Run the paperclip
around the wire,
avoiding metal-on-
metal contact to
make a circuit

46
e
k ol
LENS

rr
Right
A battery, clips
and a bit of
cardboard and
you’ve got a
power supply

you should be able to just grab it and and help them to get it. Also my district MC It is a lot of details. You just do the
walk through the woods and look at just launched a sixth grade class called best you can. I was a third grade teacher
everything. I learned a lot less because Intervention Lab, which are really based in this district for a long time. Fourth
they were nice, expensive ones than I on a lot of the work I’ve been doing with grade teacher, first grade teacher. So I
probably would have with a $20 pair of Scrappy Circuits and other things. So I have a lot of great relationships with
binoculars that I could throw in a bag and was a big part in putting that curriculum teachers here.
just take with me on hikes. together with the team, a big part of it. As crazy as it sounds, it works.
After that time at Cornell, my


friend Chris Connors is really the HS Can you talk us through
one who realised that Scrappy the Scrappy Circuits system?
Circuits is something that could I am a teacher. I work What is it?
live on its own, well beyond this in a district that has
project. He’s a co-creator. He knew 650 teachers, and I MC So when my friend Chris and
I like to write and he really I, we were at Cornell, they gave us
championed me to build it up, and
support them… I kind their credit card, and we filled up
blow it out, and write about it and of call myself ‘the two shopping carts worth of stuff


kind of get it out there to more details guy’ from the dollar store. For a few
teachers and beyond. days, we were in a room and we
just took everything apart, and
HS Your bio says that you’re an figured out what parts we can use.
instructional coach; that sounds like you And in launching them, a lot of my days It was a wild mess, and there wasn’t
do a lot of teaching, but you’re not a are just running around supporting those really a roadmap through it.
teacher. Is that right? classes, supporting all the teachers, We came up with the idea of starting
supporting any initiative that the district with an LED tea light, taking that apart,
MC I am a teacher. I’m a union member, is doing… I kind of call myself the and then building what we call five core
contracted as a teacher, but I don’t have a ‘details guy. bricks from that. So, the first would be
class of students. I work in a district that your battery brick: you use the three-volt
has 650 teachers, and I support them. So HS For 650 teachers, that’s a lot battery inside of the LED tea light to build
I go around, find out what people need, of details. your brick and add the binder clips to it,

47
i
Mrk
Mike Carroll

INTERVIEW

which are kind of your terminals


throughout Scrappy Circuits.
You take the LED inside the tea light
and clip it to the cardboard to build your
LED bricks. So now you have your battery
and your LED, and your binder clips are
kind of your terminals. You can get some
alligator clips, connect your battery Right
If you can get
to your LED, and then you have your hold of one, Mike
first circuit. recommends a
cheap window
Whenever I do a workshop, we start alarm as a good
item from which
with that circuit, then I ask ‘what’s to scavenge
missing right now? What’s missing from components
this circuit?’ Eventually everyone will
come up with the answer: a light switch. keyboard keys are switches, or your or it’s off, it’s on or it’s off. It’s not this
Switches are my favourite part of a remote control buttons are switches, or complicated process. It’s just two
circuit. That’s how we control electricity. your radio dials. I like going into those conductors, disconnecting and
So then we build the binder clip two genres of toggle and momentary, connecting. So, once I think students
switch and a push switch. The binder and the different ways you could do realise how simple switches can be, and
clip switch is a toggle switch; it’s just them and the different ways you can how they can be used in different ways,
two binder clips, one’s down, you flip operate them. that really unlocks a lot of creativity for
the other one down, they’re connected, The fifth brick is a dial switch; you use coming up with really cool projects in the
electricity travels through them; you the cylinder of the LED tea light and you whole Scrappy Circuits ecosystem.
flip one up, and then it’s off. The push cover about half of the lower edge in tin
switch is similar, but it has a paper clip foil so that when you turn it, it’ll bridge HS I love that quote of yours that a
that you kind of bend up so it stays in the sides, so it’s either on if it’s bridging switch is the domestication of electricity.
that bent-up position. And then, when or off if it’s not. I love that one. Because
you push it down for that moment, it’s that just shows to students how crazy MC That came from the book Sapiens, by
on. But when you release, it’s off. So you and creative you can be with switches Yuval Noah Harari. It asks why humans
have your momentary switch and your and how simple they are. are where we are, compared with
toggle switch. One of the lines I use in the book is animals. How come frogs haven’t built
Everyone knows your light switch is that a switch is like a one-step dance. It bridges? How come turtles haven’t
a switch, but they don’t realise that your really is just one movement; it’s either on landed on the moon? One of his points
was when we learned how to control fire,
that was really important. And you know,
controlling fire led to controlling
electricity. And that’s probably why
turtles haven’t been to the moon – yet.

Above
This brick completes a circuit when an aluminium
foil ball lands in the tube

48
e
k ol was just something I was really into and
enjoyed using. And then, as I got older, I
refined this interest in using common
LENS

r
items in uncommon ways. I think I was
always kind of living in the maker world
and living in the teacher world. The
maker world is really resourceful and

r
scrappy. And the teacher world kind of
needs that. And they don’t have the
funding for the $300 item, they
need to find the $3 alternative, or the
$2 alternative.
And that’s when I just devoured all of
his books, and tried to see anything that
was applicable at this elementary level
that could work in Scrappy Circuits.

HS The Dollar Store Challenge you set


have, you know, joysticks, but you look yourself at the start of the Scrappy
Above
There’s enough here to get a class of kids lighting under the hood, and it’s all wires leading Circuits project sounds like fun. What
up LEDs and learning why resistors are important
to a computer in the end. That idea really other common bargain objects would
opens up kids’ creativity. That one-step you recommend people get their hands
HS You must see thousands of kids’ dance can be a button, or it could be a on if they want to tear them down and
projects every year. What sort of things laser that triggers a little solar panel or build stuff out of them?
do they come up with? solar cell. You can really get creative
with how you’re controlling and MC If you went to the dollar store
MC A lot of the time they use Scrappy interacting with your inventions. with more than $1, I would definitely
Circuits as the guts for an art project. recommend getting a window alarm.
I really love seeing those. They’ll be HS You give credit to Forrest Mims’s The dollar store window alarms usually
drawing a picture or making clouds and Engineer’s Mini-Notebook in the Scrappy have a piezo element in them, which
a diagram or something. And they’re Circuits book. Was that a big influence you could do a million things with:
just tucking Scrappy Circuits inside for you? they amplify guitars, you can produce
and behind all the parts, so the clouds electricity with them, and they
kind of light up or the eyes light up of MC I had the RadioShack kit, you know,
their picture. where you wire things and [it] has all the
Those are the things that I really, really dials; he wrote the book for that, though I Below
The dial switch uses the plastic shell of an
love. I ran a summer camp this past didn’t know his name back then. But it LED tea light
summer, called Camp DIY Arcade. It was
fun, because we actually went to an
arcade – we held the whole thing at a
retro arcade. And we looked inside the
machines, saw how the wiring works,
talked about how the computer works,
the coding. And then, at the end of the
week, the kids actually coded their own
games, and then built their own arcade
controllers for the games.
I always love looking at switches and
circuits because they’re essentially the
same thing. Every arcade cabinet is
gonna be a little different. Like, some are
gonna have more switches, some are
gonna have rolling balls, some are gonna

49
i
Mrk
Mike Carroll

INTERVIEW

Above
Scrappy Circuits
the book owes a lot
to Sylvia Martinez,
who wrote the book
Invent to Learn with
Dr Gary Stager. Mike
wanted to keep a lot
of the book’s content
free on the internet
at scrappycircuits.
com, an idea that
Martinez supported
from day one.

produce sounds, which is what they do


in a window alarm. So there’s a bit in
the Scrappy Circuits book about using
one of those to get an LED to blink for
a moment.
And it also comes with a magnet and a
magnetic reed switch. So you’re kind of
getting like three great parts that you
could tinker with for $1.
They’re used a lot in the Scrappy
Circuits book – I think one of the first
beyond the core bricks is the buzzer
brick, which uses the window alarm as a
buzzer. I always wanted to think about
arcade games; if you’re shooting a
basketball tin foil ball into a cup, a light
lighting up is cool, but a buzzer buzzing
as well is a little bit cooler.

HS How did you initially get into


making things?

MC Very simply, I was bored. I think


boredom is always step one in this
recipe. And I was bored. I was playing

50
e
k ol Left
We can’t imagine a
LENS

r
circuit that uses a
balloon as a switch,
but we bet we know a
10-year-old who can

r
basketball outside. And I noticed that our grew up with a bunch of car friends who that white, it knows you hit the duck.
vacuum cleaner was sitting next to the would be happy spending the weekend And if it sees the black, it thinks you
trash can. And I asked my mom what taking their car engines, or whatever, didn’t hit the duck, if I remember
happened, she’s like, ‘Oh, the vacuum apart and putting them back together. I correctly. Don’t quote me on that!
cleaner broke.’ So here I am, like, looking never trusted myself to that level of
at my dad’s workshop looking at the taking things apart. HS That’s brilliant. Simple and brilliant.
vacuum cleaner, and I’m bored. I just
grabbed a Phillips head screwdriver, [and] HS What you said about switches MC It really is. Nintendo was better than
started taking it apart. reminds me of the NES game, Duck a lot of the others because they had
And I realised, very simply, that a belt Hunt. The one where you shoot the TV games like Duck Hunt. But it really is just
had just slipped. So I immediately take it with a little gun, and somehow it knows that simple, [a] genius idea that I’m sure
apart, immediately realise the belt if you’ve hit the target. some guy whose history is forgotten
slipped, immediately put the belt back came up with that really launched
on, put everything back together, really MC I read about how that works. I’m Nintendo in the US.
not using any high-level skills. And I just always curious about that stuff.
walked back in and I was like, ‘Oh, Mom, I And I’m trying to remember it, but I HS You know, there’s some kids now in
fixed the vacuum cleaner.’ She gave me think what it is is the gun itself has like a your school district who are going to
one of those ‘Sure Mike, go play little light sensor. And when you pull the come up with the next big, cool thing.
basketball’ looks, so I plug it in and I trigger, the screen actually goes black for
show her. That was kind of like having a a quick second. And there’s just white MC That’s my goal. It’s a long-term goal,
superpower of taking things apart and where the duck is. If the light sensor sees but I hope one day to fulfil it.
putting them back together and fixing
them a little bit.
And I’ve always been curious [about]
how things work. So that was kind of the
beginning of it. And then I kind of didn’t
stop taking things apart and putting
them back together in different ways.

HS But only broken things I guess:


I was never allowed to take apart
anything that was
fully functional.
Right
A push switch is
MC Yeah, I’ve just one of the
never trusted many ways humans
have domesticated
myself with that. I electricity

51
Improviser’s Toolbox: Cutlery

FEATURE

CUTLERY Fine metal, cut and bent into new shapes and then polished
up, shows off the intricate detail of the original design, making
upcycling cutlery a worthwhile pastime, finds Rosie Hattersley

U
sing the right knife, fork, and spoon resulted from the skilled shaping of prized sterling
when dining acknowledges social silver and steel when upcycling or repurposing
mores and demonstrates both unwanted items. Sterling silver is the favoured
knowledge of and adherence to material due to its non-corrosive, non-reactive
such rules. Some of us cringe when properties, with Sheffield the most famous cutlery
faced with unfamiliar place settings manufacturing centre, employing thousands until the
Rosie Hattersley and cutlery arrangements but that, of course, is sort industry was undercut by China and other overseas
of the point, putting the oiks in their place with a production centres.
@RosieHattersley visible demonstration of their struggle to understand

Rosie Hattersley writes


the codes of a certain class.
If you are happy to dispense with such social
“ The concept of
tech, craft, and life
hacks and tweets
@RosieHattersley.
niceties and rewrite the etiquette rule book, you
might very well have some fancy-schmancy cutlery
using a knife, fork,
that could be put to use in all sorts of innovative and spoon while dining
is a Georgian invention”
ways. Among the many craft and art ideas to be
found online are key rings, bracelets, candelabra,
hooks, smartphone stands, and both picture frame
components and subject matter to be framed. Needless to say, the traditional cutlery set of
Along with some ideas for such items, blogger western dinner tables has existed for a matter of
Dishfunctional Designs offers a video on how hundreds, rather than thousands, of years. Forks
to prepare flatware, aka cutlery, for a new use: are a relative newcomer to the cutlery set, whereas
hsmag.cc/CutleryPrep. knives for hunting, slicing, and dicing date back to
With craftsmanship and quality metal at their Palaeolithic times or earlier. The concept of using
heart, cutlery sets are a perennially popular wedding a knife, fork, and spoon while dining is a Georgian
gift, and it makes sense to preserve the designs invention, making it less than 400 years old.

52
LENS

ANTIQUE SPOON
PLANT MARKER
U
nusual markers and stakes lend Project Maker
themselves to all sorts of uses, and the Shrimp Salad
straightforward concept of flattening Circus
spoons in a vice, or with a metal
Project Link
press, before stamping out a message hsmag.cc/
or label is pretty sound. Since stainless steel is SpoonPlantMarker

relatively resistant to discolouration, you could create


an attractive herb patch following Shrimp Salad
Circus’ suggestion of using the upcycled spoons
to mark out which herb is which. Other ideas that
employ flattened and stamped spoon bowls include
personalised coat hooks, with the stem of the spoon Left
Stamping letters
bent upwards and nailed to a length of wood to hold a on steel is very
jacket or hat. satisfying

ULTIMATE
SURVIVAL TOOL
T
Project Maker
his survival tool, pounded from the
Funtogether dead remains of an old spoon, is a
Project Link very useful object, but its usefulness
hsmag.cc/ depends on the imagination of the
UltimateSurvivalTool
user”, explains maker funtogether, as
he elaborates on how it’s up to the user rather
than the tool to prove the upcycled spoon’s
worth. He begins by chopping off all but the bowl
end and the first inch of the stem using a hacksaw.
The stem is then bent back on itself to form an
enclosed hook. Next, the bowl is hammered flat
between two cloths, any blemishes polished out,
and its edges filed down to become sharp. String Morse code messages, as a knife or carving tool, a
the whole thing up with a shoelace or thick cord, and tool for digging up treasure, and a condenser/reflector
Right
Multi-tool or wear it around your neck, advises the maker, where it for helping start a camp-fire, while one commenter
dangerous can be pressed into service when needed. Suggested declared he could find multiple uses for such an item
necklace?
You decide uses include a sun reflector with which to send in his job as a flat roofer.

53
Improviser’s Toolbox: Cutlery

FEATURE

UPCYCLED RAM’S
HEAD SCULPTURE
E
verything that David Mcauley makes Project Maker
had its origins in another form, most David
of it intended for the cutlery drawer. Mcauley aka
The Alberta, Canada-based artist has a TheEUpcycler
fantastic gallery of sculptures, wearables,
Project Link
and vehicles which Facebook users can most hsmag.cc/TheeUpCycler
easily browse at hsmag.cc/DaveMcauley, since
his WordPress website (theeupcycler.com) is a
little shaky. TheeUpCycler’s inventive designs first
caught our eye on Instagram, particularly this ram’s
head fashioned from a combination of “heavy truck

“TheeUpCycler’s inventive
designs first caught our
eye on Instagram”
differential horns, a natural gas engine crank-shaft,
and upcycled cutlery.” While his work features plenty
of spoons, David often makes creative and playful use
of various kinds of old knives too, with owls, eagles, a Left
You just need an
peacock, and polar bear sculptures on public display, old cutlery drawer
backgrounded by stunning mountain lakeside scenery. and a welder

54
LENS

JEWELLERY
U
pcycled jewellery is perhaps an obvious Project Maker
use for unwanted sterling silver, given Gitane
the material’s popularity when making Jewellery
rings, necklaces, and more. While
Project Link
cute elephant designs created by taking hsmag.cc/Gitane
off the head and part of a tine from a fork are fairly
common online, Australian jeweller Jen, aka Gitane,
seeks out especially beautiful cutlery designs, such as
Japanese knives with intricately carved handles, and
uses her jewellery designs to showcase the original
maker’s handiwork. Examples include a brooch made
by flattening and spread-eagling the tines of a fork
which then cradles a delicate dragonfly. Attention to
detail, and an eye for how the repurposed items can
Left
enhance whatever they are paired with, ensure her Giving silver cutlery
in-person makers’ market stall quickly sells out. a new life

RECLAIMED
CUTLERY CHAIR
T
Project Maker he Reclaimed Cutlery Chair was
Osian created from more than 150 knives,
Batyka- forks, and spoons and presented
Williams as Osian’s final year product and
furniture design degree at university.
Project Link
hsmag.cc/CutleryChair Having been aghast to learn that restaurants often
discard their cutlery after less than two years of use,
Osian set about collecting their unwanted items, as
well as trawling charity shops. His aim was to get
restaurants to use unwanted cutlery sets again, albeit
in a different form. Once assembled, Osian prepared
everything for welding, first bending the fork prongs
or covering them with a spoon head so they wouldn’t
prang an unsuspecting user. He used only fairly blunt
knives, laid flat, and kept their sharp edges hidden
Right
Knives and forks away. Osian spot-welded every item over a three-
don’t sound comfy, week period, ending up with a chair sturdy enough to
but it looks like
they are take the weight of a 16-stone adult.

55
In the workshop: Bike Lights

FEATURE

IN THE
WORKSHOP:
Bike Lights
By Ben Everard Stay seen, stay safe

T
here’s a project that’s been rattling
around my brain for quite a few
years now – mount a load of LEDs
inside a bike wheel so that, as it
spins, the wheel lights up. With a bit
of mathematics, it should be possible
to turn them on and off at the right time to display an
image. This is by no means my idea. In fact, there
used to be a commercial product that did it, though, as
far as I can see, this is no longer available.
The basic idea of a persistence of vision (POV)
display is relatively simple. You just need some LEDs
that you can control, a microcontroller to control them,
and something to sense the current position of the
wheel. All of this is eminently doable. The maths to
calculate the current position of the wheel might prove
to test my rusty high school-level trigonometry, but
with enough head-scratching, I think I can do it. The
hard part of this project – and the thing that’s been
putting me off all these years – is building something
that is both safe and tough enough to survive a winter
of cycling around Bristol.
This year, I’ve bitten the bullet and decided to go for
it. The electronics is simple enough. A Pico has plenty
of processing power to do this. A Hall effect sensor
mounted on the Pico, and a magnet on the forks of the
bicycle, should let it know each time it’s performed a
rotation (which should let me calculate the speed and,
from there, extrapolate the current position).
I’ve got APA102 LEDs which are, in some ways,
similar to the classic WS2812Bs that are almost
ubiquitous with maker projects, but the APA102s have

56
LENS

both faster update speeds and faster PWM speeds,


both of which should be better for this project. I have to find a way
of mounting a power
The final piece of the puzzle is adding battery power.
I decided to use a Pimoroni LiPo SHIM for Pico. This
solders onto Pico and provides a battery input. It can
take LiPo or Li-ion. I went with a Li-ion as it seemed
like a safer option.
For waterproofing, I plan on sealing everything with
button somewhere
silicone, but that will come later. I wanted to get the
electronics working first. I soldered it all up, attached
everything to wooden battens that I then cable-tied And that’s where we are now. I’m awaiting delivery
to the spokes on my bike, and ran a simple APA102 of a Pimoroni LiPo Amigo Pro which, if I have read the
test program. spec sheet correctly, should allow me to charge the
That all worked just fine. Then it was time to battery from the USB port (if I connect 5 V in on the
prepare for waterproofing everything. The first thing Amigo Pro to VBUS on Pico, and the power out on the
needed was a way of accessing Pico’s USB port. I Amigo Pro to VSYS on Pico), and have an externally
needed this to apply power, as well as reprogram Pico. mounted power button.
Fortunately, you can get waterproof USB extension This does mean that I have to find a way of
leads. Or rather, USB leads that end with a USB port mounting a power button somewhere, and buttons
Above
that has a waterproof screw cap. The first version were something I had hoped to avoid because, while That pesky
ended in a USB Micro-A plug rather than a USB you can get waterproof buttons, they tend to be only start button
means I have to
Micro-B plug. It turns out that there are far more half waterproof. That is, they’re designed to be rethink the parts
variations on the USB standard than I’d come across! mounted on a box where the outside is exposed to
Below
Fortunately, this was a quick and cheap part to swap the elements, but the inside is dry. That, however, The walnut offcuts
out and back in. However, it wasn’t my only mistake. is next month’s problem, and I’m taking it one step should be rot-
resistant and last
LiPo SHIM for Pico has a power button. Tap it once at a time. in wet weather
to turn on, tap it again to turn off, double-tap it to
reset. For almost all projects, this is probably a good
thing. However, it’s a problem for me because that
button will be inaccessible once the device is encased
in silicone.
It might be possible to remove the button and
solder wires directly onto the pads, which could give
me another way of powering the board on and off (as
well as putting it in bootloader mode which can be
done with a double-tap of the reset button, if you
include the right library in your code). However,
the pads were tiny and I don’t think the leads will
stay soldered in place for very long. I need a
better solution.

57
Join us as we lift the lid
on video games

Visit wfmag.cc to learn more


FORGE
HACK MAKE BUILD CREATE
Improve your skills, learn something new, or just have fun
tinkering – we hope you enjoy these hand-picked projects

PG

66
ANVIL PG
60
WEB APP
Control Pico W from
SCHOOL OF
MAKING
your computer

PG

70 Start your journey to craftsmanship


with these essential skills
CUSTOM
ENCLOSURE 60 Light show
3D-print a protective case

PG
PG
74 80
PICO W RADIO
WITH COMMUNICATION
CIRCUITPYTHON Wireless communication
Join a social network made easy
Light up the room

SCHOOL OF MAKING

Light up the room


How to control large numbers of LEDs

W
ho doesn’t like a wildly and easy to use. The only difference between
unnecessary number of WS2812Bs and WS2811s is that the former have
LEDs? Actually, it turned the control IC and LED in the same package, while
out that one person in the latter have an external chip to control the
Bristol Hackspace – where LED. They both use the same protocol and can be
we’ve been testing out this used interchangeably.
Ben Everard technology – doesn’t. Matt Glasspole, we send our You can control these LEDs (which are commonly
apologies. For the rest of us, let’s dive in to how to known as NeoPixels) from almost any programming
@ben_everard
control a mind-bending quantity of dots of light in language on almost any microcontroller. If you’re
near-perfect synchronisation. looking to control a single string of LEDs that’s a
Ben's house is slowly
being taken over by 3D
When it comes to hacker-friendly colourful LEDs, smallish size (less than 100 or so), then this is a
printers. He plans to it’s almost always WS2812Bs and their cousins great choice. However, if you want more LEDs, it
solve this by printing an WS2811s. These are cheap, widely available, gets hard to manage with just one microcontroller.
extension, once he gets
enough printers. If you have lots of LEDs on a string, the refresh
rate slows down, and it’s hard to spread your
LEDs out. Sooner or later, you’ll probably reach
the inevitable conclusion – you need more than
one microcontroller.
You can just run more than one independent
microcontroller running different effects on
different LED strips. However, thanks to a few
bits of open-source software, we can also get our
microcontrollers talking to each other to create
effects that span multiple separate controllers.

BRINGING IT TOGETHER
WLED is the first piece of the puzzle. This is a
firmware for ESP32 and ESP8266 devices that is,
frankly, fantastic. You can get up and running quickly
and easily without having to compile anything or edit
strange config files.
Right First, you need an ESP device with at least one
We’re big fans of chains exposed GPIO pin, as well as power and ground.
of WS2811 LEDs.
They’re easy to use, Almost any should work. Our setup uses the ones
moderately waterproof, we had to hand, including a SparkFun smôl and
widely available, and
fairly cheap D1 mini.

60
FORGE

Left
One of our controllers
is a SparkFun smôl
ESP32. We soldered
on a connector
and wrapped it in
heat-shrink


Plug your ESP device into your computer’s USB
port, and head to install.wled.me. Here, you can Sooner or later, you’ll probably reach the
press Install to install WLED on your device. If your
inevitable conclusion – you need more than


board doesn’t show up in the Connect box (which
should pop up in your browser after you press one microcontroller
Install), you might need to unplug it and plug it back
in. If it still doesn’t show up, then you may need to
install a drive for it. Click on the No Device Found
link for more information. UNIVERSES
Each WLED instance will automatically create
The underlying protocol we’re using – DMX512 –
its own Wi-Fi hotspot to which you can connect to
comes from the days before it was common to add
manage the device. However, it’s usually easier to huge numbers of LEDs to things. Way back in 1986
connect WLED to an existing network if there is when the protocol was first used, it was for controlling
one available (this will also let you manage multiple big expensive lights. It would probably have seemed
devices at the same time). Once the web app laughable that anyone would have wanted to control
has finished installing, it’ll give you the option to more than 512 of them, so a hard limit of 512 lights per
configure Wi-Fi, so you can set this up (if you don’t universe is encoded in the protocol.
However, fast-forward to 2022 and LEDs are cheap,
do it now, you can still do it later by connecting to
widely available, and easy to use. Not only that, but it’s
the device's access point, and then configuring common to pack three of them into a single package
external Wi-Fi in there). (one each of red, green, and blue), so a single universe
Once you have all your WLED instances flashed, can contain 170 RGB LEDs. Fortunately, you can have
make sure you can connect to them all. The easiest multiple universes – each one just has its own number.
way of doing this is via the WLED mobile phone app This historical anachronism doesn’t need to
constrain us too much, since it’s mostly hidden behind
(by Aircoookie on Android and Christian Schwinne
the scenes. If you add more than 170 LEDs to a WLED
on iOS). instance, it will simply roll over to the next universe. By
Power up all your devices and now they should starting each strip at the start of a universe, it’s an easy
all appear if you scan for them in the app. This way of addressing each strip.
will give you the IP address of each of the strips.

61
Light up the room

SCHOOL OF MAKING

Using these, you can access them from a computer


Above OTHER OPTIONS or any other device on the network – the WLED
D1 Minis are cheap
ESP8266 controllers configuration is a web page hosted on that IP
that work well There are a few ways to control your LEDs. If you don’t
with WLED. We’ve like xLights, you could try the following: address, so just point your browser there.
wrapped this one in
electrical tape to give
If you don’t want to use the app, you need to find
it a bit of protection, • LedFx – This is an app that can run on either out the IP address for each strip. If you have access
but we should also smartphones or regular computers, and is mostly
remove those stray to the admin panel of your Wi-Fi router, you’ll be able
used for creating sound-reactive light shows. Install it
power leads!
on your phone or computer and it’ll use that device’s to see it there.
microphone to configure the LEDs. Effects include We’ve now got our microcontrollers set up, and
equalisers and general flashing. It’s well worth playing it’s time to add the LEDs.
with as it’s really easy to use and creates some You’ll need to solder connectors onto your
impressive effects. microcontroller. You can either do this directly by
cutting the connector off the LED strip and soldering
• PyDMXControl – Write Python scripts to control your
lights in any way you like.
this onto the pins, or you can add a connector to
your microcontroller. Unfortunately, there’s no
• Falcon Player (FPP) – We’ve not used this very much, standard for whether ‘data in’ on the strip is a pin
but as far as we can tell, it works well for playing connector or a socket connector, so you have to look
sequences and putting multiple sequences together carefully at your LEDs and see which way your strip
into longer performances. It can work with sequences is wired.
created in xLights.
Either way, you’ll need three connectors – 5 V
• WLED – You can control multiple WLED instances from power, ground, and data. By default, data is on
a single WLED instance. This basically lets you act as GPIO2 (which is often labelled D4, but check the
though all your LEDs are in one long chain. pinout of your board for details). You can use any
data pin, but not all support hardware WS2812B.

62
FORGE

Left
You don’t need to fill
in all the controller
fields. Here are the
key ones from ours

On some it has to be ‘bit-banged’, which may There are three parts to the setup: the controllers,
give worse performance. However, we’ve been the layout, and the sequencer. First, we’ll set up the
using a bit-banged strip of 50 LEDs without controllers, and as we do so, we’ll set the universe
noticeable problems. numbers in WLED.
At this point, you can power on your ESP board, For each WLED instance, you’ll need to do
and if you’ve used GPIO2, the LEDs will come on. the following:
If not, you’ll need to set the GPIO pin. Open the IP
address of the board either in a web browser or the • Set the universe number in WLED > config > sync.
WLED app, and in config > LED Settings, change The first WLED controller should be 1, the second
the GPIO number and the number of LEDs that should be 2 (or higher if you have more than 170
you have. LEDs on controller 1 – see ‘Universes’ box).
• In xLights, go to the controller, then tap or click


Ethernet to add a new networked controller. The
If you don’t want to use key things you need to add are Name, Description,
IP Address, and Start Universe.
the app, you need to find
out the IP address for


each strip

You can use this interface to set colours or select


patterns, which is a great way of controlling a single
strip of LEDs, but let’s up the stakes and control
them all from one place.
XLights is a bit pernickety to set up, but once it’s
set up, and you’ve got your head around the layout
and workflow, it’s pretty easy to use. First, you need
to download it from xlights.org. It’s also a good idea
Left
to install the QM Vamp Plugins from the download The layout
page as this gives you much more powerful options settings can be
a bit confusing.
for timing your sequences to the beat. Here’s one of ours

63
Light up the room

SCHOOL OF MAKING

Right
If you click ‘…’ in Start
Channel, you should
see this box that lets
you select the IP
and universe number

Once you’ve added each controller, it’s time to Once you’ve drawn a line on, you can fill in the
organise the layout in the Layout tab. The window details in the bottom-left box. You’ll need to enter
will be split in half with a big black rectangle on the the name and nodes per string (this is the number of
right-hand side. This is where you can draw your LEDs); in Controller, select ‘Use Start Channel’, and
LED strips. If you want, you can take a photo of then click ‘…’ in the Start Channel box. Here, select
where they are and include it here, then draw them the universe number and enter the IP address and
in place, but we preferred to leave it black and do it universe number for the controller.
as a top-down plan. Once you’ve done this for all your strips, it’s
almost time to start designing the sequence.
BUILDING A PLAN However, before we do that, you’ll need to create
You can draw each strip in place using the tools a group that they can be part of. Right-click in the
directly above the black preview window. We used


the line tool as we were using LED strips, but if
you’re using some pre-built shapes, then you can Once you’ve added each
use other tools.
controller, it’s time to
organise the layout in the


Layout tab

Models box and select ‘Add Empty Group’. You


can then right-click on the models for each line and
select ‘Add to existing group’ and then select the
one you’ve just created. Once that is done, it’s time
to create a sequence.
Click on the yellow paper icon to create a new
sequence, and you’ll get an option to create
Right a musical sequence or an animation. They’re
Getting the patterns
in time with the music both identical except that a musical sequence,
is a big challenge, but unsurprisingly, includes music. You can upload a
the VAMP plugin gives
you some options track and it will time the sequence to the music.

64
FORGE

Select whichever one you like – they both work in


very much the same way. DMX, ARTNET, SACN, Above

AND E1.31
Once everything’s set
If you’ve selected a musical sequence, you’ll now up, just drag-and-
need to select the track you want to play, then you drop your way to a
light sequence
can click through to create the blank sequence. You may see the protocol for sending LED data referred
The key difference between musical sequences to as DMX, DMX512, sACN, or E1.31. While these have
subtly different meanings, they’re usually referring to
and regular ones is that with musical ones you
the same thing. DMX512 is a system for controlling
probably want the lights to flash in time with the lighting systems such as those used on stages. The
beat, and that means working out where the beat standard specifies both the format of the data sent and
is. To do this, you’ll need to have installed the QM the physical network for wiring everything together.
Vamp plugins. You can control LEDs like this and DMX512 lighting
Go to File > Sequence Settings > Timings. Click controllers are available, as are USB to DMX adapters.
However, this is professional-level gear and usually
New and select an option from the list. We found
priced as such. As hobbyists, it’s usually easier and
that ‘Tempo And Beat Tracker: Beats’ worked quite
cheaper to send everything over a general IP network,
well here, though bear in mind that these probably such as Wi-Fi.
won’t be perfect. Architecture for Control Networks (ACN) is a
At this point, you have an empty sequence with range of protocols that run on top of IP networks for
timing blocks. You can start to add effects. These are controlling things like lighting or sound. Streaming-ACN
the colourful squares along the top. Drag and drop (sACN) is an extension to this to transport DMX512 data;
sACN is also known as e1.31.
these into your sequence wherever you like.
ArtNet is similar to sACN in that it’s a way of
You can change how an effect looks by opening transporting DMX data over an IP network (such as
the Effect Settings box – click on the cog wheel icon. Wi-Fi). There are a few differences in how it handles
Once you’ve got a few effects in place, it’s time network discovery and how data is routed to the right
to see what it looks like. Click on the light bulb to place, but for small networks, the difference is minimal.
connect to the LEDs (it will have an arrow in it when
it’s connected), then hit the play arrow and you
should see your LEDs flickering on and off. Don’t expect this to be a particularly quick process
We’ve gone through quite a lot of setup to get – especially if you’ve got a lot of LEDs – but you
here, but it’s now that the real fun begins. There’s can see what’s happening as you do it, and it’s fun.
still quite a bit of work to get a good-looking light All that’s left after you’ve done this is to drive your
show, but it’s just a case of finding the effects you friends and neighbours potty with Christmassy
like and putting them in the order you like. jingles with accompanying flashing lights.

65
Pico W IoT with Anvil: Mood lamp

TUTORIAL

Pico W IoT with


Part 01

Anvil: Mood lamp


Create a colour-changing RGB LED mood lamp controllable from a web app

W
ith built-in wireless connectivity, As usual, hold Pico W’s BOOTSEL button while
Pico W is ideal for creating Internet of connecting it to a computer via USB, then drag
Things (IoT) projects. To make it even the UF2 file to the mounted ‘RPI-RP2’ volume.
simpler, Anvil has released a Pico W IoT toolkit to Once it’s copied across, Pico W will automatically
enable you to connect easily, and securely, to web reboot and reappear as a volume called ‘Pico W’.
Phil King apps you create on the Anvil platform. There’s a
MAKER

drag-and-drop web UI builder, built-in database,


Long-time user authentication, email integration, HTTP
contributor to The
Connect to WiFi
MagPi, Phil is a
freelance writer and
APIs, and more – and it all talks to your Pico W.
By using Anvil’s special UF2 firmware image,
02 With Pico W connected to your computer,
editor with a focus you can code programs on Pico W in MicroPython open up the Thonny IDE and make sure the Python
on technology.
as normal, with a few extra lines to connect to interpreter (shown at the bottom right) is set to
@philkingeditor Anvil, then create a web app on the Anvil site ‘MicroPython (Raspberry Pi Pico)’. The main.py
which can send and receive data to/from your file on Pico W will run automatically, so you will
Pico W program. In this tutorial, we’ll be showing need to stop it by pressing the Stop icon. Open the
you how to control the colour of an RGB LED boot.py file and enter your wireless router’s SSID
using sliders in an Anvil web app. (name) and password at the top.
You’ll Need
WIFI_SSID = "<put your network name here>"
> Raspberry Pi WIFI_PASSWORD = "<put your wifi password
Pico W
Install the firmware
> Anvil account 01 To be able to link your Pico W to the Anvil
here>"

(free tier)
framework, you’ll need to use a special firmware Now when Pico W reboots, it’ll automatically
anvil.works
file. Go to magpi.cc/anviluf2 and download the connect to your wireless network.
> RGB LED latest ‘complete’ UF2 file. (If you want to avoid
> 3 × 330 Ω resistors overwriting any existing files on Pico W, use the
‘firmware-only’ version.)
> 4 × male-male
Wire up the circuit
jumper wires 03 Place your Pico W on one end of a
breadboard, as in Figure 1. Add your RGB LED at
the other end with each leg placed in a different
row. It has four legs, the longest of which should
be the ground connection – use a jumper wire to
connect that to a GND pin on Pico W.
As usual with LEDs, you should use resistors to
limit the maximum current to avoid possible LED
burnout. We’ve used three 330 Ω resistors placed
over the central dip of the breadboard to connect

Figure 1: The wiring the LED’s R (red), G (green), and B (blue) legs to
diagram for the mood jumper wires connected to GPIO pins 13, 14, and 15
lamp circuit using an
RGB LED respectively on Pico W.

66
FORGE

THE MAGPI

The Pico W
runs standard
MicroPython code
that links up to
the Anvil web app
The web app created on
Anvil features sliders to
control the colour of the This tutorial
RGB LED mood lamp is from in The
MagPi, the official
An RGB LED is wired to Raspberry Pi
Pico’s pins and its colour magazine. Each
is set by the web app issue includes a
huge variety of
projects, tutorials,
tips and tricks to
help you get the
most out of your
Raspberry Pi.
Find out more at
magpi.cc

Note: Our RGB LED’s legs were in the order R, PWM classes from the machine library so we can
GND, B, and G, but yours may differ. control our RGB LED from the GPIO pins.
Further down is a line starting UPLINK_KEY =.
This is where you will later need to paste the
uplink key for the web app you create on Anvil so
Test the circuit
04 To make sure everything is connected
your Pico W program can link to it. At the bottom
of the program is a line to connect using it.
correctly, we’ll run a simple program on Pico W.
In the Thonny IDE on your computer, make sure
the Python interpreter (shown at the bottom right)  onnect easily, and securely,
C
is set to ‘MicroPython (Raspberry Pi Pico)’.
Open a new file and add the code from the to web apps you create on
RGB_test.py listing (overleaf). Run it and the RGB
the Anvil platform
LED should turn red, green, and blue in turn. If the
colours are in the wrong order, you will need to
Top Tip
swap over the relevant jumper wires. Next, we create three variables to set the levels
of the red, green, and blue parts of the RGB LED. Autorun code
We then set up the PWM pins as in our test code.
To make your
Pico W code run
Write the code
05 Now let’s write the MicroPython code
automatically
upon bootup, save
Call the decorator
06
for our RGB LED ‘mood lamp’, as seen in the it as main.py. If
mood_lamp_sliders.py listing. The top line, In our code, we have three functions: one you already have
a main.py file, you
import anvil.pico, enables Pico W to connect to each for controlling the red, green, and blue parts
may want to save
Anvil’s servers. The second, import uasyncio as a, of the RGB LED. Before each, we add a ‘decorator’ that under another
sets up an asynchronous scheduler for running and also add async at the start of the line defining name first.
concurrent functions. We also import the Pin and the function; for instance:

67
Pico W IoT with Anvil: Mood lamp

TUTORIAL

We’ll be sending a value to it, set by a slider in the


web app, which will set the level of that colour. As
we’re using values from 0 to 255 for the slider, we
multiply it by 256 to turn it into an unsigned 16-
bit integer (0 to 65535) for the PWM level setting.

Design the web app


07 Go to anvil.works and sign up for a free
account. We want to use slider controls for
our lamp, which aren’t available as a standard
Anvil component, so we’ll open up a demo app
When run, the @anvil.pico.callable_async containing the Sliders library: go to anvil.works/
Pico W MicroPython
code will connect to async def red(slider): library/slider and click ‘Open in Anvil’.
the linked Anvil web The Sliders demo app only has two sliders and
app
This lets our connected Anvil web app know we want three, for red, green, and blue. From the
that this function is available to call from the web. right-hand Toolbox panel, drag a Slider custom
component to just above the Reset button. Now
select an existing ‘Value:’ element, press CTRL/

RGB_test.py DOWNLOAD CMD + C to copy it, and paste it under the new
THE FULL CODE: slider with CTRL/CMD + V. Copy and paste a ‘1’
component to the right of it.
> Language: MicroPython magpi.cc/github Click on each ‘Value:’ element in turn and
change the text for it (in the right-hand Properties
001. from machine import Pin, PWM panel) to ‘Red:’, ‘Green:’, and ‘Blue:’ respectively.
002. from utime import sleep Set each ‘1’ text element to ‘0’. Also, set the ‘Blue:’
003. element name to ‘label_6, and the accompanying
004. # Set PWM pins to control R, G, and B LEDs ‘0’ element name to ‘label_7’. For each slider, set
005. pwm13 = machine.PWM(machine.Pin(13)) the ‘slider_max’ value to 255.
006. pwm14 = machine.PWM(machine.Pin(14))
007. pwm15 = machine.PWM(machine.Pin(15))
008. pwm13.freq(1000)
009. pwm14.freq(1000) Enable server uplink
010. pwm15.freq(1000)
08 Click the ‘+’ button at the bottom left and
011. select Uplink, then click Enable next to Server
012. # Loop to light R, G, B LEDs in turn Uplink. This will generate a Server Uplink Key
013. while True: (ignore the client key) for the app which you
014. # Red
015. pwm13.duty_u16(65535)
016. sleep(1)
017. pwm13.duty_u16(0)
018. sleep(1)
019. # Green
020. pwm14.duty_u16(65535)
021. sleep(1)
022. pwm14.duty_u16(0)
023. sleep(1)
024. # Blue
025. pwm15.duty_u16(65535)
026. sleep(1)
027. pwm15.duty_u16(0)
028. sleep(1)
The cover from a PIR sensor makes a decent
diffuser for the light from the RGB LED

68
FORGE

should paste into line 5 of your MicroPython code


on Pico W so it can connect to it.
mood_lamp_sliders.py
> Language: MicroPython DOWNLOAD
THE FULL CODE:
Adjust web code 001. import anvil.pico
09 We need to alter the web app code so the 002. import uasyncio as a magpi.cc/github
setting for each slider is sent to the red, green, or 003. from machine import Pin, PWM
blue function in your Pico W program. Click on the 004.
Code tab and add the following lines (indented) to 005. UPLINK_KEY = "<put your Uplink key here>"
the slider1_change function: 006.
007. # We use the LED to indicate server calls and responses.
anvil.server.call_s("green",self.slider_1. 008. led = Pin("LED", Pin.OUT, value=1)
level) 009.
pass 010. # Set LED levels to zero
011. redlevel = 0
Note that slider 1 is the middle one, which we’ve 012. greenlevel = 0
assigned to green. Similarly, for slider2_change, 013. bluelevel = 0
add the following two lines (indented): 014.
015. # Set PWM pins for R, G, and B LEDs
anvil.server.call_s("red",self.slider_2. 016. pwm13 = machine.PWM(machine.Pin(13))
level) 017. pwm14 = machine.PWM(machine.Pin(14))
pass 018. pwm15 = machine.PWM(machine.Pin(15))
019. pwm13.freq(1000)
Add a similar new function for slider 3: 020. pwm14.freq(1000)
021. pwm15.freq(1000)
def slider_3_change(self, **event_args): 022.
self.label_7.text = self.slider_3.level 023. # Red LED control
anvil.server.call_s("blue",self.slider_3. 024. @anvil.pico.callable_async
level) 025. async def red(slider):
pass 026. redlevel = slider * 256
027. pwm13.duty_u16(redlevel)
Finally, add these lines to the reset_btn_click 028.
function in the web code: 029. # Green LED control
030. @anvil.pico.callable_async
self.slider_3.level = 0 031. async def green(slider):
self.label_7.text = 0 032. bluelevel = slider * 256
anvil.server.call_s("red",0) 033. pwm14.duty_u16(bluelevel)
anvil.server.call_s("green",0) 034.
anvil.server.call_s("blue",0) 035. # Blue LED control
pass 036. @anvil.pico.callable_async
037. async def blue(slider):
038. greenlevel = slider * 256
039. pwm15.duty_u16(greenlevel)
040.
Run both apps 041. # Connect the Anvil Uplink. In MicroPython, this call
10 We’re now ready to roll. First, run your will block forever.
Pico W program in Thonny. You’ll see messages 042. anvil.pico.connect(UPLINK_KEY)
in the Shell pane to show it connecting. Once it
has, run your Anvil web app. You can now move
the sliders to adjust the red, green, and blue translucent plastic cover from a PIR sensor over
components of your RGB LED to alter its shade. it, which works fairly well. You now have a web-
To make it a little more effective, you may want controlled mood lamp! Next time, we’ll be reading
to diffuse the LED’s light. We simply placed the Pico W sensor data in an Anvil web app.

69
Cases and covers with a 3D printer

TUTORIAL

Cases and covers


with a 3D printer
Make cases and covers by ‘non-sew sewing’

I
t is a truth universally acknowledged that thicker materials is hard work. And it involves sharp
someone in possession of a bit of tech will pointy needles. But the author is quite at home with
want some cases and covers for it. If only nuts and bolts and 3D printing, so he prefers to use
to hide what you’ve bought from the rest of those skills instead of spending ages trying to thread
the household. But some things don’t come a needle.
with cases or covers, especially if they are
Rob Miles things you have made from scratch. In this article, CUSTOM COVERS
we’ll explore how we can use 3D-printed components Nothing keeps sunlight and dust off your precious
@robmiles
as stiffening and connecting elements for cases devices like a cover. But they can be expensive to buy
and covers. – even assuming you can find one that fits. So, why
Rob Miles has been
playing with hardware not make your own? You can buy leatherette material
and software since NON-SEW SEWING in a variety of colours at pleasingly low prices. And it
almost before there was
Sewing is great. It is one of the many things that can be bought in a width of 1.5 metres (just under 5
hardware and software.
You can find out more the author can’t do very well. Although he is the feet), so you can make covers for large as well as
about his so-called life only person in the household who can operate the small devices. First, you cut to size, then cut out the
at robmiles.com and
follow him on Twitter at buttonhole maker on the sewing machine. But sewing corners, and with four seams down each corner, you
@robmiles

YOU’LL NEED
Leatherette (PU
leather) or cloth
for the outer covers

Felt or thin cloth


for the inner
cover

Spray adhesive

A hole punch

A sharp knife

M3 bolts 4 mm
long – dome or
countersunk Figure 1
You can use dome bolts
3D printer and for a rounder finish
filament

70
FORGE

Figure 2
The red and blue
elements were given
colours to make it
easier to see which is
which when creating
the design

Below
You can also use
felt as a liner for the
inside of the case, but
the author rather liked
the bulb material

can make a snug-fitting cover. Stitching leatherette is


not too difficult, and you can use a hole punch to make
the holes if needed. But it can be hard to make your
stitches consistent, and the corners that you make
have no rigidity. So why not print some corners of your
own and then clamp the material into them with bolts?
Figure 1 shows what we are making. The corner
support is underneath the leatherette and the bolts
screw straight into it, through the strip. The author
has found that M3 bolts will screw into 3D-printed
elements and grip tightly. A hole radius of about
1.45 mm seems to work well on an Ender-3 printer.
Figure 2 shows the designs for the clips for the
edges of the covers. They were produced using
OpenSCAD. You can find the designs on the GitHub
site for this article: hsmag.cc/covers-and-cases. You
can download the OpenSCAD application from:
openscad.org. You can create corners of different
lengths and hole spacings by changing the call to the
corner function in the program:

corner(depth=50,holeSpacing=15);

Figure 3
The holes in the plates have a larger ‘countersink’ hole at one
side. Make sure you screw the bolt into this larger hole so that
the head is slightly recessed

71
Cases and covers with a 3D printer

TUTORIAL

party fun. The top surface of


the camera exposes a PIR
sensor, a camera, an OLED
display, and a trigger button.
The bottom of the camera
contains holes for a USB
cable to power the device,
and a tripod socket to support
it. The author thought it might
benefit from a case that just
enclosed the bottom of the
camera. The case would be
lined with cloth and covered
in leatherette. It was decided
The OpenSCAD program will make the designs for to use the same ‘bolt-based’ corners as were used
your corner and the brackets. These can be exported for the cover just described, but this time, the
as an STL file to be sliced and printed. corners would be fitted to the outside of the case
Figure 3 shows how you add a corner to a cover. and be bolted into 3D-printed stiffening panels that
Bolt one side followed by the other. The bolts go made up the case body. This makes for a nice
through the cover plate, then the fabric, and finally steampunk aesthetic, although the author has
into the bracket. If you want to make something probably used more bolts than he needed to. The
super-strong, you can use longer bolts and put a nut corners would fit perfectly well with just two bolts.
on the end. Cover the corner fitting with insulating Figure 4 shows the 3D-printed components for the
tape on the inside to stop the corner support from party camera case. The stiffening material uses
damaging the edges of the thing it is covering. one-layer thick ‘connecting’ elements shown in red,
and three-layer thick yellow panels to provide the
A CASE FOR TREATMENT stiffening. The bolt holes in the panels are
The party camera was featured in HackSpace issue surrounded by extra layers to allow them to grip the
57. It takes pictures and sends them to a thermal bolts from the corners. When the case is
printer so you can make a printed record of all your constructed, the sides are folded up and the corners
bolted around the outside to hold them together.
The printable components are created by an
PAPER TEMPLATES OpenSCAD program that accepts the width, depth,
The best way to get the shape of your cover and height values and then produces the design for
(particularly if you are covering something which has the stiffening materials and the corner pieces. The
an angled top) is to make a paper template first and program will also generate a lid for the case, but
then transfer the shape onto the material you are going this is not needed for the party camera. Extra code
to use for the finished cover. Paper is useful because was added to cut holes in the end panel for the
you can always stick an extra sheet on if it turns out
Figure 4 USB connector and the tripod supports. The code
This version of the you’ve just cut the wrong part off.
case design has bolt
for this is available at the GitHub site for this article:
supports for covers hsmag.cc/covers-and-cases.
on the end panel for
the USB and tripod
holes. The cover
wasn’t added to the
finished case because
it didn’t seem to
need them

Figure 5
You can use a 1/8-
inch drill bit to cut
holes in the outer for
the corner fixing bolts.
Alternatively, you can
cut the outer cover
material to shape first
and punch holes in it
before sticking it onto
the stiffener

72
FORGE

Figure 6
The ‘holeSpacing’
variable at the top of
the program lets you
set the spacing of
the bolt fittings. The
default value is 10 mm.
The default margin
around each panel is
1 mm. The ‘margin’
variable at the top of
the program lets you
change this

CASE ASSEMBLY PANELS FROM OPENSCAD


Figure 5 shows the sequence for making a case. The The OpenSCAD software for this project contains a
lining for the case was made from a scrap of spare function that will make panels of any size and add bolt
fabric. You can also use felt as the lining material. The holes and fittings on specified edges.
cloth and the cover were stuck onto the stiffener The panel shown in Figure 6 was produced by the
using extra strong spray-on flooring adhesive, which following statement:
worked well. The outer cover was wrapped around
makePanel(100,50,[1,1,0,0]);
the edges to finish them. The case was folded so that
the raised parts of the bolt-hole reinforcements were The first two parameters specify the width and depth
on the inside. The outer cover and the liner material of the panel. The four-element array provided as the
were stuck to the stiffener, and the excess material third parameter to the call of makePanel allows you to
cut away once the glue specify which sides of the


had dried. The rectangular panel should have bolt
hole for the USB fittings in them. The first
connector was cut with a
It would take a very long two elements in the array
sharp knife, and the inner time to create panels control the sides along the
lining cloth was folded Y axis.
of similar strength just by


back to cover the hole
edges. The hole for the printing them TAKING IT FURTHER
camera tripod was made The author was very
with a hole punch and then impressed by the strength
opened up with a pen. The original plan was to print and flexibility of the material that was produced by
and fit covers over the two holes in the bottom of the gluing thin 3D-printed layers between an inner lining
case, but it turned out that with the corners fitted, it and an outer covering. The use of single-layer
was not possible to add the covers. However, the thickness ‘margins’ to provide folds when assembling
case material leaves a clean edge when cut, and so a structure also worked very well. It would take a very
the finished result was deemed tidy enough. long time to create panels of similar strength just by
The case works well. It took a few attempts to get printing them, and they would not have the flexibility
the sizes of all the components right. The outer cover of the ones that were produced here. It would be
and the inner lining added to the thickness of the interesting to alternate strips of thin and thick
edges so that the correct size of the corners could only stiffening elements to create panels that could be
be determined by printing a new iteration of the corner bent to form part of a curved case. By creating joining
and testing it. The template took around an hour to strips to link panels together, you could also create
print, with each corner taking around 20 minutes. really large cases.

73
Pico W with CircuitPython

TUTORIAL

Pico W with CircuitPython


Getting online with a microcontroller

T
he Raspberry Pi Pico W It should disappear and a new CircuitPython drive
microcontroller has just got support should pop up.
for CircuitPython. Let’s take a really If you have not used CircuitPython before,
quick look around. then there is a good ‘getting started’ guide at
For the most part, using Pico W is hsmag.cc/AdafruitCircuitP.
exactly the same as using Pico. The For our first experiment, let’s try interacting with
Ben Everard pinout is the same, and you’ll have exactly the same the social media network du jour, Mastodon. You’ll
features available. However, you also have added need a Mastodon account for this. It can be a personal
@ben_everard
network connectivity. account, or you can set one up just for your bot. In
First, you need to get the software. You can fact, there’s a Mastodon instance set up specifically for
Ben's house is slowly
being taken over by 3D download a UF2 file of CircuitPython for Pico W from bots – botsin.space. Be sure to read the rules so you
printers. He plans to hsmag.cc/PicoWCircuitP. At the time of writing, the can properly write your request if you want an account
solve this by printing an
latest version was 8.0.0-beta.4. There wasn’t yet a on that instance. If you’re looking to set up a personal
extension, once he gets
enough printers. stable version for Pico W. This should be fine for most account, you’ll need to pick an instance to join. Head to
cases, but obviously, a beta version might have bugs in joinmastodon.org to look at the options. Don’t worry
it. The stable version should be available shortly. too much, as you will be able to move your account
In order to get that onto Pico W, you need to to a different instance later if you want, and you can
Above hold down the BOOTSEL button, then plug Pico W interact with people on any instance.
The Mastodon social
network has an API into your computer (unplug it first, then plug it Once you’ve got an account, you can get an API
that’s easy to connect in). You should see a new removable drive appear, key. In your edit profile page, go to Development,
to and use from
embedded devices and you can drag and drop the UF2 file onto this. then click on New Application and give it a name, then

74
FORGE

Left
You can build an HTTP
server in under 30
lines of CircuitPython,
so it’s an easy way of
adding an interface to
your project

press Submit. You’ll get redirected to the application


list page. Click on the name of your new app, and this GETTING DATA
should take you to the details page where you’ll see
the access token for this app. You’ll need this shortly. In the first example here, we used a POST request to
Posts on Mastodon are short bits of text. Exactly send data to an external server. In the second example,
we set up a server and got data from it. You might be
how short depends on your instance, but 500
wondering if it’s possible to combine the two and use
characters is pretty common. They can also have POST requests to send data to Pico W. The answer is:
images or video attached to them, but we won’t worry yes, you can.
about that at the moment. We don’t have space to go through it all here, but Liz
Let’s look at the code to create a post on Mastodon. Clark has written a guide to this for Adafruit – you can
see it at hsmag.cc/PicoWHTTPServer.
import microcontroller
import socketpool
import wifi api/v1/statuses",
import adafruit_requests as requests headers={"Authorization" :
import ssl secrets["mastodon_access_token"]},
from secrets import secrets data={"status":"another
test post from Pico W"})
ssid = secrets["WIFI_SSID"]
print("Connecting to", ssid) As you can see, this uses the Adafruit requests
wifi.radio.connect(ssid, secrets["WIFI_PASSWORD"]) module that can be used much like Python 3’s
print("Connected to", ssid) requests module. You just need to make sure that you
copy it over the adafruit_requests folder from the
CircuitPython Library Bundle (which you can download
pool = socketpool.SocketPool(wifi.radio) from circuitpython.org).
requests = requests.Session(pool, ssl.create_ You will also need to create a secrets.py file.
default_context()) This will contain all the things that you don’t want
to be public, including your Wi-Fi password and
response = requests.post("https://botsin.space/ Mastodon key.

75
Pico W with CircuitPython

TUTORIAL

AT YOUR SERVICE
ESPHOME The second thing that we’re going to look at is setting
up a simple HTTP server. This will let you connect to
ESPHome is a platform for building and
interconnecting DIY Internet of Things devices. As
Pico W and read information about what’s going on.
the name suggests, it was originally built for ESP8266-
and ESP32-based devices. However, there’s now import microcontroller
support for Pico W. This gives you a really easy low- import socketpool
code way of linking up sensors, actuators, and other import wifi
‘thing’ devices. You can create configurations in the from temperature_html import temperature_html
YAML markup-language and deploy these to devices.
from adafruit_httpserver import HTTPServer,
Using this, you can very quickly make a network of
interconnected things using commonly available HTTPResponse
maker components and control them from the Home from secrets import secrets
Assistant smart home software.
ssid = secrets["WIFI_SSID"]
print("Connecting to", ssid)
The format should be: wifi.radio.connect(ssid, secrets["WIFI_
PASSWORD"])
secrets = {"WIFI_SSID" : "<your ssid>", print("Connected to", ssid)
"WIFI_PASSWORD" : "<your password>", print(wifi.radio.ipv4_address)
"mastodon_api_key" : "Bearer <your token>"
} pool = socketpool.SocketPool(wifi.radio)
server = HTTPServer(pool)
In most of these cases, you just need to slot in the
appropriate bit of secret information. The Mastodon @server.route("/temperature")
token is a bit different just because you need to include def base(request):
the word ‘Bearer’ before the token. return HTTPResponse(content_type="html",
Once you’ve set this up, you can save the above body=temperature_html.
code as code.py on your Pico W, and it will connect to format(temperature=microcontroller.cpu.
your Wi-Fi network, post the message to Mastodon, temperature))
Below
OK, this isn’t the and then finish. This is probably a little dull by itself, but
best-looking website,
but it gets the
you can use it to log information, send messages, or while True:
information across just generally to scream into the void. try:
server.serve_forever(str(wifi.radio.
ipv4_address))
except:
pass

There’s a slightly unusual bit of syntax in the line


@server.route("/temperature"). This is called a
decorator, and you put them before methods. They’re
not used that much in CircuitPython, but are a bit more
common in regular Python. Essentially, they are a way
of wrapping a method up in another bit of code. We
won’t go into everything you can do with decorators,
but in this case we’re using the server.route method
to register the method base with the server at the
location /temperature. This way, anyone who visits
http://<server_IP>/temperature will see the output
of this function.
We use the HTTPResponse method (that we’ve
imported from HTTPServer) to create this response.
This method takes care of most things; we just have
to tell it that we can’t return HTML and that the

76
FORGE

Left
The new support for
Pico W in ESPHome
gives access to
a huge range of
IoT hardware with
minimal coding


body of the response should be a formatted version
of temperature_html. You can use it to build up complex interfaces and
When working with web pages, we’re going to
easily get data out of your build without having


need to manipulate quite a bit of text. This isn’t a
huge problem from a processing point of view, but to physically plug in a cable
we want to be a bit careful of how we manage our
files to ensure that they’re not too messy. There are
a few ways of doing this, but we’ve stored the HTML main text of the page (and not to be confused with the
in a string in another file and so are importing that body of the HTTP request which includes the whole of
string from the file. We’re using Python’s built-in string the HTML).
formatting tools to insert data into this HTML string. <h1> is heading level 1 (i.e. the largest heading); <p>
In its simplest form, this lets us put {0} in the string is a paragraph.
somewhere, and then the format method will replace With all that in place, we just need to kick off our
this with the first parameter to format. If you want to server with server.serve_forever(str(wifi.radio.
insert more bits of text, you can add {1}, {2}, etc. to ipv4_address)). We’ve wrapped this up in a try-except
the string and use extra parameters to format to inset block in an infinite loop. This is in case there are any
these into the text. The temperature_html.py file is: problems while it’s running. HTTP servers don’t have
to be particularly complex, but there’s a lot of things
temperature_html = """ that can behave strangely in there. The network could
<html><head><title>Temperature</title></head> lose packets. The client requesting the data might send
<body><h1>Temperature</h1> a poorly formed request, or there could be a bug in our
<p>The temperature is: {0} degrees C</p> code. This will just attempt to restart the server should
</body> anything go awry. It might not last forever, but it will
</html> make it a bit more resilient.
""" There we have it. A simple HTTP server for
interacting with a Pico W. You can use it to build up
HTML is a markup language for creating web pages. complex interfaces and easily get data out of your build
We’re not going to go into it too deeply here, but very without having to physically plug in a cable – which can
simply, text is encased in tags with angled brackets. make the physical setup much easier. We’ve looked
A / tag closes the brackets. There’s a <head> section at the most basic use case here, but it can get as
with things like the title, and the body which is the complex as you like.

77
ADVERTISING FEATURE

YOUR
GIFT GUIDE
FOR 2023 THE BEST NEW PRODUCTS YOU CAN BUY
FOR CHRISTMAS AND INTO 2023

£420

G-MASTER
GB3467WQSU-B1 FLIRC SKIP 1S
Immerse yourself in the game with the curved The Skip 1s Universal Remote Control makes controlling
GB3467WQSU Red Eagle with FreeSync Premium. your entertainment center a breeze. With support for
Inspired by the curve of the human eye, the 1500R curved 3 different activities that can be activated with the click
VA panel with 165Hz refresh rate, 0.4ms MPRT, and 3440×1440 of a button, a universe of device combinations is at your
resolution guarantees superb image quality and a comfortable fingertips. Leave the simplicity to us, and we’ll leave the
and very realistic viewing experience. creativity to you.
The height-adjustable stand ensures total flexibility for your
magpi.cc/skip1s
perfect screen position. Customise the screen settings using
the predefined and custom gaming modes along with the Black
Tuner function to give you total control over the dark scenes and
make sure details are always clearly visible.

magpi.cc/gmaster
ADVERTISING FEATURE

AOC Q27G2E/BK
The AOC Q27G2E/BK offers a 27-inch VA panel with
QHD resolution, ShadowControl and super contrast ratio
of 3000:1. Enjoy the most responsive gameplay and fastest
battles with its stutter-free Adaptive Sync, 155Hz refresh rate,
1ms MPRT, and low input lag to decrease motion blur and
input-output delay. Gaming has never been so fun and intense.

CYBERPOWER PC magpi.cc/Q27G2E

A custom gaming PC from Cyberpower UK is a perfect


treat this Christmas season. With hundreds of parts to
choose from – including NVIDIA’s GeForce RTX 4080 GPUs –
its cutting-edge configurator tool lets you build your dream spec
from scratch and finish it with a custom engraved side panel.
Order your gaming PC by 12 December, or pick up a pre-
built one by 21 December, for guaranteed Christmas delivery,
free UK delivery, and an extended return warranty for all
holiday shoppers.

cyberpowersystem.co.uk £219

MINI PUPPER
£229 Mini Pupper is an AI-powered, smart, quadruped robot
designed for education. Mini Pupper makes robotics easier for
schools, home-school families, enthusiasts, and more.
Utilising ROS (Robot Operating System) and with support for
OpenCV and OpenCV’s official OAK-D-Lite 3D camera module,

AOC C27G2ZU/BK this open-source robot is powerful and super-expandable.

mangdang.store

Unleash your potential with this 240MHz, 27-inch display.


Its 240Hz refresh rate, 0.5ms response time, and low input
lag enable the AOC C27G2ZU to provide a perfectly smooth FROM
performance. With its curved design, height adjustment, and
swivel ability, the monitor can be adjusted to individual needs.
£335
It comes with FreeSync Premium and G-Sync compatibility.
The C27G2ZU/BK is on a Black Friday promotion at £189,
which may continue depending on stock, so pick one up early
if you find it on sale.

magpi.cc/C27G2ZU

* Prices may vary


Radio communication

TUTORIAL

Radio communication
Sending messages through the air using
magic (and electromagnetism)

W
ith streaming services control in your projects, and achieve a greater range
gradually replacing broadcast than you’d manage with infrared. Here, we introduce
radio and TV, it might seem radio technology, explain how you can use it legally,
that radio is yesterday’s and suggest a couple of practical ways you can learn
technology, but the reality is about the technology using a low-cost transmitter
quite different. Although the and receiver. You’ll then be perfectly placed to use
Mike Bedford word radio isn’t usually used in the same breath, so these devices together with a Raspberry Pi or Arduino
many of the technologies on which today’s world single-board computer, as we’ll go on to explain.
Despite loving all things relies depend on radio communication. Included here
digital, Mike admits to
being a bit of a Luddite,
are mobile/cellular phones, WiFi access points and INTRODUCING RADIO
vinyl records and all. the numerous devices that connect to them, cordless Radio is a form of electromagnetic energy, as
home phones, car keys, and remote control units for are infrared, visible light, ultraviolet, X-rays, and
garage doors, central heating and more. What’s more, gamma rays. What sets these different areas of the
it’s quite feasible for you to incorporate radio remote electromagnetic spectrum apart is their frequency.

80
FORGE

Of all these, radio waves have the lowest frequency, radio transmitter and, as a result, very few people
ranging from just a few Hertz through to 300 GHz. used radio transmitters. Figure 1
The radio spectrum
Because this is quite a large range, radio is split Today, we all use devices that transmit radio covers twelve orders of
into several regions, each spanning an order of waves, for example, mobile phones and WiFi- magnitude. Here, we’re
looking particularly at
magnitude. Of particular interest are the following: enabled equipment. This is allowed because 433 MHz radio, which is
LF (low frequency) includes the long-wave band, they operate in parts of the radio spectrum that in the UHF region

which is still used for have been set aside


Left
analogue broadcast for licence-free use, Radio might conjure

radio; MF (medium We all use devices that but that still doesn’t
up nostalgic images,
especially if we use
the word ‘wireless’,
frequency) includes transmit radio waves, mean there are no but while its use for
the medium-wave regulations. Specifically, broadcasting is in
band, which is also for example, mobile phones the equipment should
decline, it remains


key to many of today’s
used for analogue and WiFi-enabled equipment be low-powered, and it most important
technologies
broadcast radio; HF must have been certified
(high frequency) by its manufacturer,
includes various short-wave bands, which are used as adhering to the relevant standard. This means
for long-range, international broadcast radio; VHF that you can’t build your own transmitter for use in
(very high frequency) includes FM and DAB (digital a licence-free band, but there are ways of getting
audio broadcasting) radio; UHF (ultra high frequency) around that. Transmitter modules can be certified,
carries terrestrial TV broadcasts, mobile phones, and allowing them to be incorporated into equipment,
WiFi, and is also where the transmitter and receiver and we’ll be taking advantage of this proviso later
modules we’re investigating here operate; and SHF when we see how you can build radio control into
(super high frequency) also carries mobile phones your own projects.
and WiFi. Higher-powered equipment, as used by
We show each of these areas of the radio businesses, for example taxi companies, can only
spectrum in Figure 1, plus those regions which be used with a licence, but the equipment still has
are used for more specialist applications. As well to be appropriately certified. Of particular interest
Figure 2
as frequencies, we also show wavelengths which to electronics enthusiasts, though, is the amateur Using 433 MHz
run in the opposite direction, so as the frequency radio licence. They’re only granted to people who transmitter and
receiving modules
increases, the wavelength decreases. Although we have passed a test about radio theory, but there are with on-board
now refer to radio waves by their frequency, at one several benefits. Radio amateurs can use high power encoders and
decoders couldn’t
time the wavelength was used instead. Knowing on a wide range of frequencies, allowing them to be much simpler
about the wavelength is still important, though, since
it dictates the size of the antenna.

LEGAL CONSIDERATIONS
From the very early days of radio, governments
realised that allowing a free-for-all would result in
chaos, so legislation was introduced, regulating how
radio could be used. Until just a couple of decades
ago, therefore, a licence was required to operate any

81
Radio communication

TUTORIAL

communicate worldwide. And of particular interest, to differentiate between a radio signal (a digital 1)
Above they can experiment by building their own equipment. and no radio signal (a digital 0), so long as the signal
To get a feel for
transmitter and is flipping between 1s and 0s sufficiently frequently.
receiver modules 433 MHZ MODULES To do that, the data has to be transmitted at a
with built-in encoders
and decoders, we One of the most common licence-free bands for speed that’s faster than the AGC’s delay, but that
suggest you add four remote control applications is the 433 MHz band, alone wouldn’t be enough because long strings of
push-buttons to the
transmitter and four which is available in many countries, and is our 1s or 0s would still cause problems. So the data is
LEDs to the receiver
main theme here. Transmitter and receiver modules Manchester encoded, which means that 1s and 0s
are widely available and very cheap. 433.92 MHz are represented either by a high-level signal followed
modules are by far the most common, but other by a low-level or vice versa. As a result, there’ll be
frequencies within the 433 MHz band are available, a transition in the transmitted signal for every bit.
so ideally, buy the transmitter and receiver modules Commonly, this is achieved using an HT12E encoder
as a pair, but if not, make sure they operate on the chip on the transmitter and an HT12D decoder chip
same frequency. The transmitter has a data-in pin, on the receiver. You can buy these and add them
and applying a positive signal to that pin causes it to the transmitter and receiver modules, although
to transmit. Conversely, the receiver has a data-out an alternative solution is to buy transmitter and
pin, which provides a positive signal when a radio receiver modules with the encoding and decoding
signal is detected. This might suggest that you could chips already on-board. They’re not as common
add a push-button to the transmitter and an LED to as dumb modules, but you should be able to find
the receiver and you’d be able to illuminate the LED modules called something like PT2262 Wireless
remotely. In practice, it’s not that simple. The snag is Modules (transmitter) and PT2272 Wireless Modules
that, like most radio receivers, the receiver module (receiver) for less than £10 for the pair, for example,
has an automatic gain control (AGC) that increases from hobbycomponents.com. This company offers
the amplification as the received radio signal gets both 315 MHz and 433 MHz variants but, for use in
weaker. The upshot of this is that pretty much any the UK, get 433 MHZ modules, because the 315 MHz
signal, however weak, even including noise, will versions can’t be used legally. These modules
get amplified so much that the module generates a actually use the PT2262 encoder chip and the
signal on its data-out pin. However, the AGC doesn’t PT2272 decoder chip, which appear to be identical
act immediately, but is delayed, so it’s still possible to the HT12E and HT12D, respectively, except that

82
FORGE

Left
433 MHz modules
will work over a
few metres without
antennas, but
you need external
antennas – and
straight ones work
better than coiled
ones – to achieve a
good range


the HT12D has latched outputs, while the PT2272
is available with either latched or momentary acting With just a 6 V supply on
outputs, the version in these modules being the
the transmitter … we only
latter. A useful feature of all these chips is that the
encoder has four data inputs, and the decoder has managed to communicate


four data outputs, so you can control four different
over four metres
devices. To start, to get a feel for these modules,
you’ll probably use four push-buttons on the
transmitter and four LEDs on the receiver. Here, we
show how the modules should be wired up to do 6 V to 12 V will produce four times the transmitted
that, and you can also see how simple it is to patch power, which should double the range. The range
them up using a pair of breadboards. Note that, if could also be improved by changing the original
the modules we used are typical, the data inputs helical antennas with straight antennas made from
on the transmitter are labelled with the bit numbers stiff insulated wire. They should be a quarter of a
(D0, D1, D2, and D3), while the data outputs on the wavelength long, which is 167 mm at 433.93 MHz.
receiver are labelled with the pin numbers on the The other thing to try is using a superheterodyne
PT2272 chip (10, 11, 12, and 13), but D0 is on pin 10, receiver instead of the inferior super-regenerative
D1 is on pin 11, D2 is on pin 12, and D3 is on pin 13. design. The latter is the more common, and if the
Having patched up the modules, you can see type isn’t mentioned, it’s probably super-regenerative.
what sort of range you can achieve. With just a 6 V In the main, you’ll find that the superheterodyne
supply on the transmitter, and the helical antennas modules are shipped directly from China and have
that are fitted to the modules when you buy them, long delivery times, but we did discover
we only managed to communicate over four metres. 247geek.co.uk, which ships modules from the UK.
However – unlike the receiver module which should
not be used with more than a 5 V supply, so you ENCODING AND DECODING
should use a diode, as shown in our schematic Using the PT2262 and PT2272 modules is very
(Figure 2), to reduce the voltage if you use four convenient, but you’ll probably not learn a lot
AA cells as your supply – the transmitter can be about the encoding and decoding process, as you
used with up to 12 V. Increasing the supply from would if you were to use unencoded 433 MHz

83
Radio communication

TUTORIAL

Right
Superheterodyne
receivers (bottom
right – top right is
the paired transmitter),
aren’t as common as
the super-regenerative
receiver (bottom
left – top left is the
paired transmitter),
but they offer superior
performance

transmitter and receiver modules with separate transmit continuously. However, by keeping that pin
encoder and decoder chips. So, if you’re interested at +5 V, and only applying 0 V when it’s necessary
in the behind-the-scenes details, take a look at the to transmit, power consumption will be reduced,
schematic shown in Figure 3, which is a commonly which is important for battery-powered equipment.
shown circuit. This uses the HT12E and HT12D You could do that, for example, by generating a
chips, which are more commonly available than the low-level signal whenever one of the four push-
PT2262 and PT2272. buttons is pressed. Moving to the HT12D decoder,
Most of it should make sense with little in the you’ll notice that there’s a pin labelled VT which
way of explanation, but the chips have various is unconnected. This produces a signal whenever
features that aren’t used in the PT2262 and PT2272 a valid transmission is received and could be
modules we looked at earlier, so let’s take a look connected to an LED, for example.
at those chips. First of all, the HT12E and HT12D If your project requires 433 MHz modules to
both have inputs labelled A0 to A7, which are all be connected to a Raspberry Pi or an Arduino,
shown as connected to 0 V. These are actually the simplest solution would be to use modules
address inputs, and if facilities are provided on with on-board encoders and decoders. However,
Figure 3
This standard circuit
the transmitter to change the address, it would if you want to reduce the chip count, there’s an
shows how 433 MHz be possible to selectively transmit to up to 256 alternative to using encoder and decoder chips, that
transmitter and receiver
modules can be used different receivers, each of which would need to becomes available if your project uses a single-
with the HT12E encoder have a different 8-bit address. We also show a pin board computer. That solution is to implement the
and HT12D decoder
chips. With an SBC, labelled TE connected to 0 V on the HT12E encoder. functionality of the encoder and decoder chips in
though, the encoding This means that the chip will generate a continuous software. And the good news is that the necessary
and decoding could
be done in software stream of data so the transmitter module will functionality is available in various libraries and open-
source software projects, and guidance on using
these resources appears to be widely available.
And finally, and if you get bored with 433 MHz
modules, and have a project that needs greater data
throughput, you might be interested to know that
there are also 2.4 GHz transceiver modules – that
is a transmitter and receiver combined – which
are intended exclusively for use with single-
board computers.

84
Together we can
make a difference
Give young people the opportunity
to learn about technology

The Raspberry Pi Foundation enables young


people to realise their full potential through
the power of digital technologies, but we can’t
do this work without your help. Your support
helps us give young people the opportunities
they need in today’s world. Together we can
offer thousands more young people across
the globe the chance to learn to create with
digital technologies.
Generous donations from organisations and DONATE NOW
individuals who share our mission make our
work possible.

Donate today to make a difference: rpf.io/hackspace

OUT
NOW
T H AT M A D E

“The Computers That Made Britain is one of the best


things I’ve read this year. It’s an incredible story of
eccentrics and oddballs, geniuses and madmen, and
one that will have you pining for a future that could
have been. It’s utterly astonishing!”
- Stuart Turton, bestselling author and journalist

Buy online: wfmag.cc/ctmb


DON’T MISS THE BRAND NEW ISSUE!

SUBSCRIBE
FOR JUST

£10!
> T
 HREE!issues
of The MagPi

> F
 REE!
Raspberry Pi
Pico W

> F
 REE!
delivery
to your door

NEW
+ FREE
MO
DEL!

RASPBERRY PI
*W

PICO W*
hil
es
toc
ks
las
t

Three issues and free Pico W for £10 is a UK-only offer. Free Pico W is included with a
12-month subscription in USA, Europe and Rest of World. Not included with renewals.
Offer subject to change or withdrawal at any time.

magpi.cc/subscribe
FIELD TEST
HACK MAKE BUILD CREATE
Hacker gear poked, prodded, taken apart, and investigated

PG

94
MAKE
YOUR OWN
PG
88
UNO BEST OF
BREED
Learn to solder with Arduino

The bits you need to build


a home arcade
PG

96
CROWDFUNDING
FISHES
Paper lanterns to make at home
Arcade controllers, parts, and accessories

BEST OF BREED

ONLYTHE
BEST
Arcade controllers,
parts, and accessories
Build your own arcade

By Marc de Vinck @devinck

C
ustom arcade builds have been a
popular project for many DIY
electronic enthusiasts. Personally, I
have built over 15 different arcade
machines over the years. Yes, I
counted! From full-size cabinets to
tabletop versions, and even a few that can fit in your
pocket. It’s a fun project for beginners and advanced
builders alike. You can easily build one that does not
require any soldering from a complete kit, or you can
go all out and design a 100% custom build, including
designing your own PCBs. It’s one of those topics
that has a robust marketplace and community, making
it easy to jump in, no matter what your skill level.
In this round-up, I’ll be looking at a wide variety of
kits and components, all focused on building your
own arcade system. To make your build easier, some
are complete kits – one even includes the elusive
Raspberry Pi 4 – while there are also some basic
components and break-out boards. Something for
everyone! And, just like the custom keyboard-building
scene that has taken over the DIY community lately,
there are almost limitless accessories that allow you
to get a truly unique build.

88
FIELD TEST

Picade vs
Adafruit LED Arcade Button 1×4
PIMORONI $191 - $324 pimoroni.com ADAFRUIT $9.95 adafruit.com

I
f you want to get into retro gaming and
the idea of putting everything together and
having a polished and complete system
seems daunting, then the Picade from
Pimoroni might be a good place to start. If
you opt for the basic kit, you’ll have to source
a few parts like a Raspberry Pi, power supply, and
SD card. But, you won’t have to design, cut, and
figure out how to build the enclosure. And, in most
instances when building a retro arcade, the enclosure
is the hardest part! If you go for the new 10” deluxe Left
kit, you’ll get everything needed to build the complete Arcade machines
don’t have to be huge
desktop arcade machine, even the difficult-to-
source Raspberry Pi! And as you all know, finding a Below
Lots of buttons with
Raspberry Pi is not easy nowadays! only a few GPIO pins

S
ave pins and time with the Adafruit
LED Arcade Button 1×4. This handy
little board may look simple at first, but
it has a few interesting surprises hidden
on the back of the PCB. This board
VERDICT
allows you to add multiple illuminated Picade
arcade buttons to your next microcontroller project
A kit that includes
thanks to the on-board microcontroller programmed a Raspberry Pi 4!

10/ 10
with seesaw firmware.
Simply connect the buttons via the JST XH sockets,
and the board will not only supply 5 V power to the
button LEDs, but it will also do all the controlling via
I2C. This will save you from having to use a dedicated Adafruit LED
pin for each button or dealing with stepping up 3.3- Arcade Button
volt power. You can also connect several of these 1×4
boards together, 16 boards in total, and you won’t A simple way
need any more pins on your microcontroller. This to connect
board really does simplify adding multiple buttons to a arcade buttons.

9/ 10
custom microcontroller-based project. Head over to
the website for additional technical details about how
to use the Adafruit LED Arcade Button 1×4.

89
Arcade Controllers, Parts & Accessories

BEST OF BREED

SparkFun micro:arcade kit


for micro:bit v2.0
SPARKFUN $52.50 sparkfun.com

T
he folks over at SparkFun love
gaming. So much so, that they even Left
From microcontroller
came up with a kit for the micro:bit. to games machine
The kit features a custom-designed
carrier board that includes a classic
D-pad style layout of buttons and two VERDICT
additional A/B buttons. The kit also includes four SparkFun
classic arcade buttons, a joystick, battery pack, and a micro:arcade kit
wiring harness to hook it all up. for micro:bit v2.0
You might think this is a bit overkill for a micro:bit, There is even a
but they have done a good job of giving examples of kit for micro:bit.

8/ 10
simple games that can be made on the LED matrix of
the micro:bit. The kit does not require any soldering,
but you do have to supply your own micro:bit.

Adafruit Arcade Bonnet


for Raspberry Pi
ADAFRUIT $14.95 adafruit.com

T
Left
Add buttons to the
he Raspberry Pi is a great system for tiniest Raspberry Pi
both large and small arcade builds.
The Adafruit Arcade Bonnet for
Raspberry Pi is the perfect match for VERDICT
those smaller form factor builds. The reducing the required number of pins. It also allows for Adafruit Arcade
board is the same size as a Raspberry Pi old-school gated joysticks or analogue joystick input. Bonnet for
Zero and makes your build easy. You will have to solder And, although you do have to do a little soldering at Raspberry Pi
on the header pins and speaker connector, but once first, when it comes to assembling your arcade system Great for
you’ve done that, it’s all plug and play. in the final enclosure, having all these components small builds.

9/ 10
The Bonnet has a few extra features too. There is an plug and play via the JST connectors makes that step a
on-board 3 W digital speaker output and some circuitry lot easier. Just don’t forget to pick up some compatible
that includes an I2C-GPIO converter for all the buttons, wires that are also available at Adafruit.

90
FIELD TEST

Picade X HAT
PIMORONI $15.64 pimoroni.com

W
ant to scratch-build a no- The soft power switch allows you turn your
solder Raspberry Pi arcade Raspberry Pi on and off without the risk of
system? Then check out the corrupting the SD card. Simply tap the
Picade X from Pimoroni. With power button to start up your Raspberry
this HAT, you can easily add Pi, and when you’re done, press
buttons and joysticks to a and hold it for three
Raspberry Pi board. It features a 3 W amplifier, soft seconds to fully
power switch, and lots of female DuPont connectors shut down and
for a no-solder arcade build. Just keep in mind, you’ll power it off.
also want to pick up the matching Picade wiring loom Nice!
to make all those connections.

VERDICT
Picade X HAT
Above
A great option for Connect your arcade
Raspberry Pi- controllers to your
Raspberry Pi
based gaming.

10/ 10
HDMI 10” LCD SCREEN KIT
PIMORONI $118 pimoroni.com

Most people will simply repurpose an old TV for their casual


arcade building needs, but others will want something a little
more custom. Specifically, something that has a small bezel
and is ready for a custom cabinet. And that’s where the HDMI
10” LCD Screen Kit from Pimoroni comes into play. The kit
comes with a 1024×768 resolution display and a custom-
designed PCB for power management and breakout buttons
for easy access to the display settings. If you are going to
build a desktop arcade system, be sure to look at this kit.

91
Arcade Controllers, Parts & Accessories

BEST OF BREED

Picade Console
PIMORONI $88.50 pimoroni.com

T
he Picade Console from Pimoroni
takes all the great features of the
popular Picade X HAT, and couples Below
them with all the required buttons Arcade machine
and controller all
and joystick to make a complete in one
arcade system housed in a beautiful
and compact retro-style case. You can pick up all
the components separately, but the real value here is
in the case to house everything. It features black
powder-coated MDF panels and an acrylic top, giving
it a truly authentic look and feel.

” It features black powder-


coated MDF panels and an
acrylic top, giving it a truly


authentic look and feel

VERDICT
And for an added special touch, the instructions are Picade Console
printed on the back of a fun retro-style poster that Fun and
would make a great addition to your game room. Just compact
keep in mind that you do have to supply your own TV retro gaming.

9/ 10
and Raspberry Pi. And as of right now, Raspberry Pis
are tough to source. If you already have one,
however, this will make for a fun build!

COIN ACCEPTOR - PROGRAMMABLE 4 COIN TYPE


ADAFRUIT $39.95 adafruit.com

If you are going to go all out and build a custom arcade


system, you might as well be compensated for the good
times! With this coin acceptor from Adafruit, you can start
collecting some money to help offset the build cost. Or,
maybe just the extra money to help replace all the snacks
and drinks your friends inevitably will be taking since your
house is the coolest place in town.

92
SUBSCRIPTION

200 PAGES OF RASPBERRY PI


QuickStart guide to setting up The very best projects built by
your Raspberry Pi computer your Raspberry Pi community

Updated with Raspberry Pi Pico Discover incredible kit and


and all the latest kit tutorials for your projects

Buy online: magpi.cc/store 93


Make Your UNO Kit

REVIEW

Make Your UNO Kit


Arduino’s first soldering kit

ARDUINO € 55 arduino.cc

By Ben Everard @ben_everard

W
e’ve tested out a lot of difficult (the USB-to-serial adaptor) comes as a pre-
soldering kits over the years, soldered module. However, there is quite a lot of it.
and there’s a very diverse An experienced solderer can probably do everything
range available. Some are in an hour or so, but it could take considerably longer
simple and fun, to give people if you’re not familiar with components or the process
their first taste of soldering. of soldering.
Some are complex and designed to push your skills. For beginners, this does come with a couple of
Some are a way of getting short-run hardware without practice PCBs that you can try soldering. They’re much
the added expense of someone assembling it for you. smaller and not really needed, so it’s not a problem if
Where does the Arduino Make Your UNO Kit fit into you mess them up. If you’re a complete beginner,
all this? going through everything in this kit will build you up to
Below There’s no particularly complex soldering – it’s all a reasonable skill level. You’ll have plenty of practice
The final UNO can
be used just as any
through-hole, with no small components or parts with standard components, and probably be ready to
other Arduino UNO too close to each other. The one bit that could be try some more challenging soldering.
It is really well-documented – there’s a 3D
guide that shows how everything fits together.
However, despite all this, we did make an error,
and we’re not convinced it’s our fault! Let us
explain. The kit contains two practice PCBs, a
DIY UNO, and a synth shield. The synth shield
also has a speaker holder. All these are
contained in separate PCBs that are on two
panels. Each PCB is designed to snap out,
and that’s exactly what we did at the start
– and this matches the ‘finished’ photo on
the DIY UNO guide. However, if you snap
them all out, you can’t then fit it all together
in the cardboard case that comes with the
kit. This doesn’t stop it all working, but
means you can’t get the tidy look of the
finished product that’s shown on the
website. It’s not the end of the world, but a
bit more guidance on this at the start would
be appreciated.
The synth shield is basically six
potentiometers and an amplifier. Five of
these potentiometers connect to the
analogue inputs on the Arduino UNO, and

94
FIELD TEST

Left
You can make some
noise using the
Mozzi library

Below
All the surface-
mount components
come pre-soldered

the sixth is a volume control that also has quite a big guide is really easy to follow and shows exactly what
impact on the tone of the sound. The amplifier is goes where.
connected to a PWM-enabled pin (D9), and filtered This is also – and this is an important point – a really
through a capacitor, so you can create simple sounds good-looking PCB. The silkscreen shows the outline of
using the tone library, or more complex ones using the component combined with the schematic in a way
Mozzi (a library for creating sound on microcontrollers, we’ve not seen before (yes, we know they use the
see hsmag.cc/Mozzi for American symbol for


details). At the moment, resistor rather than the
there’s still a relatively If you have a bit of Arduino EU one, but we’re not
limited set of sketches experience already, you going to hold that against
available to play that are them). The result is
should find it reasonably


specifically designed for informative, helpful for
this shield, but you can of straightforward to get started people getting started
course program your with electronics and, to
own. Mozzi is well- our eyes, beautiful. It
documented and, if you have a bit of Arduino helps that it’s done in Arduino’s teal solder mask rather
experience already, you should find it reasonably than the traditional green.
straightforward to get started. At 55 euros, this is an expensive kit. However, it’s
The synth shield is great fun to play with. We’d the most excited we’ve been about an Arduino release
appreciate a bit more hackability – particularly adding for a while. It’s a great introduction for new people
connectors, so you can add additional hardware to coming to soldering, it’s a fun kit to play with, and
unused GPIOs. For example, buttons to trigger the you’ve got perhaps the most common microcontroller
sound generation. Arduino shields can be stackable, board available to continue your adventure however
but this shield doesn’t have stackable headers. You you wish. For your 55 euros, which is approximately
could add a proto shield underneath this to add the same in pounds and dollars at the moment, you
additional connections, or you could solder onto the can get a lot of enjoyment.
joints for the headers. Even without this, though,
there’s plenty of fun to be had with the synth shield.
You don’t have to use the synth shield. Your UNO
will act just like any other UNO, and you can use it
for almost any microcontroller project you like. By
modern standards, it’s not particularly small, powerful,
or connected, but that’s often not a problem for VERDICT
a microcontroller. A fun kit to help
There’s a lot of attention to detail in this kit that you learn to
makes it good to use. For example, the through- solder and make
holes only have copper exposed on one side of the some noise.

10/ 10
PCB, which means you can’t solder components on
the wrong side – something this author has done
on multiple other soldering kits. The 3D soldering

95
Crowdfunding now

REGULAR

CROWDFUNDING
NOW
Koi Lanterns
A new way to show off LEDs

From $29 hsmag.cc/koi Delivery: May 2023

P
aper is a fun material to work with. It’s
cheap, ubiquitous, and easy to shape. Yet it’s
something we often don’t think about for
fabrication. However, there’s a long history of
making things with paper – most notably
origami, but there are others. The Koi Lanterns by Yuumei
Art will come as laser-cut shapes that fit together without
glue or tape, to create poseable fish models.
Paper and LEDs work really well together. Here at
HackSpace mag, we’re big fans of using thin paper as
diffusion material, but these Koi will use thicker card and
let the light shine through the gaps. The texture on the
surface of paper makes for a very soft light that illuminates
gently. These kits come with LEDs, but it looks like a great
place to flex your maker muscles with some colour-
changing options. A gentle flow through the spectrum of
colours could look wonderful.
The build looks quite involved. There are a lot of small
parts that need to slot together gently, and it would be
Right
easy to accidentally crumple and fold. Although we’ve not We absolutely love
had a chance to try this out, it looks like assembling it could the effect of
LEDs shining
be quite a meditative process. through paper

96
BUYER
BEWARE !
When backing a crowdfunding
campaign, you are not purchasing
a finished product, but supporting
a project working on something
new. There is a very real chance
that the product will never ship
and you’ll lose your money. It’s
a great way to support projects
you like and get some cheap
hardware in the process, but if
you use it purely as a chance to
snag cheap stuff, you may find
that you get burned.

97
#63 ON SALE
19 JANUARY

ALSO
LEDS
SOLDERING
3D PRINTING
CIRCUITPYTHON
AND MUCH MORE

DON’T MISS OUT

hsmag.cc/subscribe
PiKVM Manage your servers or
workstations remotely

A cost-effective solution for data-centers,


IT departments or remote machines!

PiKVM HAT
for DIY and custom projects Pre-Assembled version

Real-time clock with rechargeable super capacitor OLED Display Bootable virtual CD-ROM
& flash drive Serial console Open-source API & integration Open-source software

Available at the main Raspberry Pi resellers

Reseller suggestions and inquiries:


[email protected]

You might also like