0% found this document useful (0 votes)
29 views116 pages

HackSpace - 07.2022

Uploaded by

AlbertARG
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views116 pages

HackSpace - 07.2022

Uploaded by

AlbertARG
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 116

hsmag.

cc July 2022 Issue #56

ttle,
Like the space shu
but smaller
Jul. 2022
Issue #56 £6

kly
Sending data quic

3D PRINTING POLYHEDRA SUBLIMATION FIREFLIES


WELCOME EDITORIAL
Editor
Ben Everard
[email protected]

Welcome to Features Editor


Andrew Gregory

HackSpace magazine
[email protected]

Sub-Editors
David Higgs, Nicola King

DESIGN
Almost all of us have daydreamed about turning one of our Critical Media
projects into a product and selling it. The truth is that there’s criticalmedia.co.uk

Head of Design
a lot more to making something that sells than just a good Lee Allen
idea. It takes a good idea and a lot of hard work to productise Designers
it. This means making sure that it can be manufactured, Sam Ribbits, Olivia Mitchell,
Ty Logan
tested, and properly packaged. And doing all that in a way Photography
that lets you hit a price point that people will pay. Brian O’Halloran

This might sound CONTRIBUTORS


Jo Hinchliffe, Marc de Vinck,
The truth is that there’s a lot more to making exhausting, but you are Andrew Lewis, Mike Bedford,
Nicola King, Rosie Hattersley,
not alone. Generations
something that sells than just a good idea. Phil King, Rob Miles, Marc Scott
of makers before you PUBLISHING
It takes a good idea and a lot of hard work have managed to sell Publishing Director

to productise it
Russell Barnes
the things they’ve [email protected]

made. In this issue, Advertising


Charlie Milligan
YGũTGVCRRKPIKPVQVJKUYKUFQOVQƓPFQWVYJCV[QWPGGFVQ [email protected]

know about selling your wares.


DISTRIBUTION
If you’re less commercially minded, we’ve also got Seymour Distribution Ltd
some great content for you, whether you’re looking to 2 East Poultry Ave,
London EC1A 9PT
make colourful PCBs, update your laser cutter, or rocket +44 (0)207 429 4000

towards space. SUBSCRIPTIONS


Unit 6, The Enterprise Centre,
BEN EVERARD Kelvin Lane, Manor Royal,
Got a comment,
Crawley, West Sussex, RH10 9PE
Editor [email protected]
question, or thought To subscribe
about HackSpace 01293 312189
magazine?
hsmag.cc/subscribe

42
get in touch at Subscription queries
PAGE
hsmag.cc/hello [email protected]

GET IN TOUCH
FREE PICO
WHEN YOU This magazine is printed on
hackspace@
raspberrypi.com
SUBSCRIBE paper sourced from sustainable
forests. The printer operates an
environmental management system
hackspacemag which has been assessed as
conforming to ISO 14001.
hackspacemag 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 102
06 SPARK 31 LENS
06 Top Projects 32 Create a product
Wonderful world, beautiful projects Go from prototype to world domination. It’s easy!

18 Objet 3d’art 44 How I Made: Tag jousts


Give this idea a big hand… Design and 3D-print a game

20 Meet the Maker: Ryan Downes 50 Interview: Alex Glow


Zen and the art of bicycle wheel construction How to make electronics without feeling like a jerk

26 Letters 58 Improviser’s Toolbox Concrete


Sympathy for a broken 3D print The perfect outdoor build medium for this summer

28 Kickstarting 62 In the workshop


Build a supercomputer from Arm boards Adding colour with sublimation printing

Cover Feature Tutorial


Build a swing-wing
rocket glider

94 The ideal build for kids who


played with Transformers

Turn your one-off project


into something that people
will want to buy

32
4
CONTENTS

In the workshop
Sublimation printing

18 112
Interview
Alex Glow

62 Liven up your PCBs’ boring


old solder mask
78

67 FORGE 50 Make better stuff, in a more


sustainable way – here’s how

68 SoM NeoPixels
Use dithering to control the brightness of LEDs

74 SoM -PYLÅ`
Mimic an insect’s mating call with Raspberry Pi Pico 88
78 SoM Raspberry Pi
Read sensors on a Sense HAT with CDP Studio 101 FIELD TEST
82 Tutorial Polyhedrons 102 Best of Breed
Use maths and 2D paper to make 3D shapes Musical diversions for makers

88 Tutorial Laser cutter – beyond the K40 110 Review Phyx Space Shuttle soldering kit
We love the smell of burning wood in the morning Your very own PCB Space Shuttle Discovery

94 Tutorial Swing-wing rocket glider 112 Review Prusa SL1S SPEED


Stick a rocket on a balsa wood glider – to the stars! All the detail of resin printing, with none of the hassle

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 and Canada. 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

Enigma display
By Hack Modular hsmag.cc/EnigmaLamp

T
his beautiful build looks like it’s come from
the bridge of a WW2 U-boat, but it’s actually a
completely new build. It’s also a Eurorack module,
albeit one that doesn’t make any sound. It’s a voltage-
controlled character display, which means that when
you plug it into your extensive modular synth setup
and start playing the keyboard, different characters will light
up when you play different notes. That’s it! A brilliant, beautiful
adornment, and an exploration of computing history.

Right
Each character
is assigned a
different semitone

6
SPARK

7
Top Projects

REGULAR

8
SPARK

BCD Watch
(binary to decimal)
By vishalsoniindia hsmag.cc/BinaryWatch

W
e love the aesthetic of surface-mount LEDs
on a bare PCB, so we were fascinated when
we found this watch. Even more so when
we realised it uses binary-coded decimal –
a system of counting that we’re unfamiliar
with. The watch is available to buy on Tindie,
or you can download the design files from the author’s GitHub
page and make your own.

Left
This is open
hardware, so you can
build your own BCD
watch if you want
to learn more

9
Top Projects

REGULAR

Solar robot
By Jack Spiggle hsmag.cc/RobotHeadInAJar

W
e’ve featured the work of Jack Spiggle,
aka NanoRobotGeek, a couple of times in
past issues. And we’re very proud to be able
to say that he’ll be writing a How I Made for
our next issue, unveiling some of the thought
processes behind this free-form, solar-powered
kinetic sculpture. Like a lot of his work, this uses solar power stored
in capacitors, which triggers an action when a certain amount of
charge is reached. And like all of his work, it’s absolutely beautiful.

Right
Brass is tricky to
solder, but the
ÄUPZOLK^VYRPZZV
pleasing to behold

10
SPARK

11
Top Projects

REGULAR

Welding helmet
By Andrew Lewis lewis-workshop.com

H
ere’s another preview from the next issue: an
enhanced welding helmet by Andrew Lewis.
While it’s possible to spend loads of money on
a top-of-the-range welding helmet, for most
weekend welders, it’s just not worth it. If you
spend more time grinding off messy welds than
you do actually welding, there’s no way you’re going to spend
money on luxuries like a fan – but you might follow Andrew’s
example and enhance a lower-end model. Look out for step-by-
step instructions in issue 57.

Right
Look the part
while you’re
sticking hot bits
of metal together

12
SPARK

13
Top Projects

REGULAR

Loopie lamp
By CodersCafeTech hsmag.cc/LoopieLamp

T
he most frustrating thing in woodworking is things
that are supposed to be square but aren’t square.
Give us a nice right angle any day.
Our mass-produced world likes order, tessellation,
and right angles. For ease of design, construction, and
transportation, right angles make sense. So why has
the maker of this WS2812B RGB LED-powered lamp chosen the way
of the loop for this design?
Refreshingly, the answer is that it’s better for the user. Rounded
shapes are more common in nature, and so the theory is that they’re
easier on the eye and the brain. The circle also represents eternity,
as it has no beginning and no end. Either way, this is an impressive
build, achieved with simple tools, simple electronics, and a few bits
of MDF.

Right
The light transitions
are powered by a
Digispark ATtiny85-
based board

14
SPARK

15
Top Projects

REGULAR

Magna Doodle Clock


By MrRoboto19 hsmag.cc/MagnaDoodleClock

I
f you’re sick of getting information from glowing
screens, this project is for you. This brilliant clock draws
the time on a Magna Doodle, then wipes the digits that
have changed, and draws the time again, over and over. It’s
powered by an Arduino Nano, three stepper motors, and
various other electronics – we want one for the office. Every
hour it’ll change to a random font stored on an SD card – the maker
advises using fonts that don’t overlap, as the machine needs to be
able to wipe off the digits when the time updates.

Right
Classic magnetic
fun updated for
the maker age

16
SPARK

17
Objet 3d’art

REGULAR

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

T
here’s a phenomenon called
the ‘uncanny valley’ wherein
something that’s almost – but
not quite – human unsettles us
far more than something that’s
totally alien. That’s what we thought when
we saw this set of 3D-printed finger
extensions by Instructables user Dragonator.
The creator says that, “The basic idea of
the finger extensions is that it takes the
movement of your finger, and extends it to
several more joints.” That much is obvious
looking at it, but it’s still weird. If you want
to make a set of these for yourself, you’ll
need a 3D printer (preferably with some
1.75 mm filament), a couple of drill bits,
wire… and that’s about it. Get making now
and you’ll have the guts of a superb
Halloween costume.

hsmag.cc/3DPrintedFingers

18
SPARK

19
Meet The Maker

REGULAR

Meet The Maker:


Ryan Downes
Zen and the art of building wheels

P
edal bicycles are one of the most
personal machines. They are one of
the few machines that are still widely
used that are powered by the operator.
You don’t just provide the instructions for
where it should go, you provide the
power to send it there – this creates an intimate
connection between rider and machine.
We spoke with Ryan Downes of RyanBuildsWheels
about what it takes to turn lifeless bits of metal into
machines that bring joy, and how he learned the dark
art – or is it science – of wheel building. Here’s what
he had to say.
“I picked up a cheapish bike at university just to get
to and from uni readily – I could get a few more
minutes of lie-in in the mornings.

” You don’t just provide the instructions for


where it should go, you provide the power


to send it there

“I’d got a few quid for my birthday from family.


Enough for a not particularly great bike from Halfords.
I went to pick it up but wasn’t aware that bicycles
come in boxes and need assembling. I was ready to
ride my bike away.
“It was deep winter and I lived ten miles outside of
Worcester, and of course, [Halfords] were like, ‘It’s in
Right a box; it needs assembling. Can you come back
Ryan builds wheels by tomorrow, or at least later on today?’ I was like, ‘No. I
hand in his workshop
in St Werburgh’s just spent what little money I had

20
SPARK

21
Meet The Maker

REGULAR

“I became obsessed with riding it, and changing


things around on it. The wheels got buckled once – I
was already invested in the politics of DIY. I didn’t
want to go to a bike shop; I didn’t think there were
any good bike shops [where I lived]. I had a look into
how you make wheels straight, got the tools, and
set to work. That was great fun.
“After this, I came to Bristol. I was getting more
and more into bikes. I was volunteering at an
excellent place called The Bristol Bike Project, which
essentially fixes up old bikes that are donated to
them. I really cut my teeth there.
“I thought I was an academic, and to an extent, I
still am. I enjoy certain types of study – but I realised
that what makes me most happy is tinkering. Using
my hands and brain and making stuff happen –
and understanding how stuff works. I wanted to
get into bikes, and thought I wanted to be a bike
mechanic. I was working as a courier here and there.
on a bus over here, and it’s snowing – just give me I had worked as a courier in Brisbane for a while
the bike’. whilst also volunteering for a couple of projects
“I took it home and found it came with a tool-kit. I [in Australia].
thought, ‘I think I can do this; I’m fairly practical’. I “I managed to talk my way into a little punky shop
had to go and buy a few more tools, and I had to go here in Bristol, up in Clifton. It was – in the worst
and buy The Complete Idiot’s Guide to Bike sense of the word – a hacky shop. I won’t name
Maintenance and Repair and do some research, but I it, but back in the day, we were pretty slack, those
built it. of us that worked there. We’d go out for pints at
“The freedom that that machine gave me just lunchtime and go back to the workshop and be like,
blew my mind. All of a sudden, it wasn’t just to save ‘what was I doing?’.
ten minutes getting to university in the morning; it
was ‘I can go into town on this’, ‘I can ride over to GETTING BUSY
mates’ places’, and, ‘I don’t have to get taxis’. It was “That was only a part-time gig. I found myself in a
unreal. As luck would have it, another friend on the situation where I really needed a full time job. I’d
open mic scene had just recovered from 15 years of been squatting and doing other things outside of
extremely hefty social anxiety, and he’d just started that, so I could work part-time and do the things I
coming out into the world again. He’d had this really wanted to do. But the situation forced my hand, and
nice ten-speed racing bike built 15 years ago, but I had to work full time. With enthusiasm, I talked my
decided he didn’t want it anymore. He was massive way into a bike shop that was probably one of the
as well – he was six-foot-four. busiest and most commercial shops. I already
“He asked one mate if he wanted it, and he rode thought I was a top dog because I’d worked in a
that around for a bit and decided it wasn’t for him. city-centre shop, but as soon as I started working in
That person then asked me if I wanted it – I think I this shop that was much busier and required you to
paid about 50 quid for it. really be on it, I realised how little I knew.
“All of a sudden, my little Halfords-bike-mind was “I wanted to be really good. One of my favourite
blown. Even though I had to have the saddle all the books is Zen and the Art of Motorcycle Maintenance
way down, I was like, ‘Man, these things are fast! by Robert M Pirsig. You should read it should you so
These things are fun!’. I thought, I guess how far desire – it’s very much my bible. I wanted to
I’ll ride. approach the task in hand with ‘Quality’ – Pirsig talks
“I found myself riding into the Welsh Borders, past about Quality with a capital Q as some sort of
Hereford from Worcester, and just loving the metaphysical thing that is inherent in the world.
Above
Spokes are cut to freedom that it bought. I fell in love with the You’re not actually separate from the object that
length so that they’ve romance of road cycling and the older Tour de you’re working on. Too often, there’s this dualistic
always got the perfect
size in stock France – from the era of the bike I was riding. subject-object thing when we come to working on

22
SPARK

23
Meet The Maker

REGULAR

things – bikes, etc. I am the mechanic; this is the also nice to have my own workspace and to really be
bike. I do the thing; it behaves like this. Sure, it does, able to figure out how and why I wanted to do bikes.
but actually there’s much more of an emotional “The website’s still up, and so is one of the blogs
investment in it. It’s not subject-object dualism. All – I think I entitled it Why we wrench – which talks
of a sudden, it’s what mood is the subject in? How about the metaphysics of quality.
much of a good time am I going to have fixing it? If “I’d started building wheels back when I was
it’s just an annoying machine that won’t work, of squatting. The way that wheels work began to
course it won’t work! You and your readers are interest me more and more. In shops, I’d already
probably more than aware of this sort of stuff. become the person in Bristol to speak to if you
“I knew I had to get better and approach it with a wanted to build wheels. The more I got into it, the
degree of mindfulness. Mechanics is something that more I realised that, in the industry, we’re not giving
I’m a little bit obsessed with. Because I worked wheels the attention that we should. There are a


under such a great head few key concepts to
mechanic – he went out understand around
on his own and now I’d already become the wheel building.
runs a great place called
Robin’s Cycle Services
person in Bristol to “People say that wheel
building is a dark art, but
in Bristol – he was a speak to if you wanted actually, it’s basic


great teacher. He’d Newtonian physics, and
never be angry at you if to build wheels it’s a science. Anyone
something went wrong. can build wheels with a
Instead, bless him, he’d half-decent
be disappointed. He was a real father figure in that understanding of how they work. I keep saying that
workshop. You didn’t want to disappoint because they are a prestressed tension balanced structure,
everyone was in it together. That really made me much like the Clifton Suspension Bridge.
want to push myself. I did, and eventually, the short “I started more of a deep dive into how and why
version of the story after that is a close friend, who I wheels work, and I realised that there was much
worked with at Sustrans [a sustainable transport more to wheels than I’d been taught, and I realised
charity], wanted to set up a cycle café – Roll For The that I loved it. It was a really relaxing, meditative
Soul. I got headhunted for that. It was nice to be flow-like state to find yourself in. There is a certain
trusted to be the person responsible for that. It was amount of, if not creativity, then creation. You start

Right
New bikes waiting
for new wheels

24
SPARK

with a bunch of components. You spec it, and hey


presto, you have a thing that you’ve made. It was a
real nice way to spend your time.
“I think that obsession started to show while
working in Roll For The Soul. I suppose I got less
excited offering people advice on how to fix their
lower-quality machines. One of the things we never
did in the shop I ran was offer bikes for sale. That
was a very conscious decision. We wanted to be
able to say to people, very honestly, ‘the machine
you’ve given us is not financially viable to get this
into a state it can be ridden. You haven’t cared for it;
you’ve ridden it into the ground, and it’s dead. If
you’re going to use it this much, these things need
caring for.’
“It’s hard for some people to understand that if you
want a bike these days, you need to spend 350 or
400 quid. That’s the entry level for an average-quality,
new commuting machine.
“My own desire to be wrenching on stuff, and WHY GET HANDMADE WHEELS?
things like wheel building, decreased, and I wasn’t “The most common place for manufacturers to save Above
Checking the
getting as much out of it. money is on the hubs. It’s also one of the easiest tension on the
“I started building wheels one day a week working places to save weight. With wheels, what you get is UL^S`Ä[[LKZWVRLZ
out of the shop – one day a week became three days this lightweight headline, but talking about wheels
a week, which became six days a week, and before I purely in terms of their weight is nonsensical. You’ve
knew it, I just couldn’t do it any more – it was time got to consider how the whole structure works. It’s
to go full time. Me and my friend Pi (who runs a rotating mass, so you can save weight by speccing
Clandestine) – he’s a frame builder here in Bristol – a cheaper hub with less material really easily, but
decided to set up shop together. It was a little maker that hub just falls apart. You want to save weight
space in Lawrence Hill above some music studios. externally, but you don’t want it to be too light.
“I started slow – there was no business plan. These “When you buy a custom-made wheel, you get a
days I do have a business plan if I do something. I wheel that’s specced for you. Some people need
need to know that something is going to work if I’m more or fewer spokes, or a thicker gauge of spokes.
going to change tack. People should look out for a Some people need to know that their hub axle is
YouTube channel that’s being started soon. It’ll have really sturdy because they’re doing a lot of touring.
lots of information on DIY stuff. I want to get out the The possibilities are endless. It might be as simple
idea that wheel building is something you can do in as you want the nipples on your wheels to be red
your own home if you feel adept or just want to have because your bike needs a bit of bling.
a go. With some basic tools, you can make some “One of my favourite tasks is building wheels for
good wheels. The tolerances we have will be higher more powerful riders. That’s really nice to be able to
than people can do at home, but I want to crack that democratise wheels and cycling for more people and
open and explore the magic of spoked structures. allow a wider variety of people to ride bikes. The
nice thing is, amongst all the builders that I know, go
SPOKE EASY to whoever you dig the most. Either because they’re
“Tolerances kept for spoke tension are much higher, local to you or they have politics you agree with.
and that’s one of the main things that’s going to They might have aesthetics you like or have a cool
affect spoke life. Anyone who’s building wheels by logo. You might just enjoy reading their website.
hand and for a living wants to stand by the quality of Some focus more on performance cycling, and you
their product, so with very few exceptions, no one’s might be keen to get the most out of your gear. Go
going to go skimping on rims or things like that. A lot to whoever intrigues you the most. I know for
of [factory-made] wheels are a race to the bottom certain that all of my peers are building wheels as
in terms of margin using spokes that might not last good as me. If you go to someone down the road,
as long. you’re going to get a great wheel”.

25
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

PLOTTING
+YCUFTCYP RWPFGƓPKVGN[KPVGPFGF KPD[
UQOGVJKPI[QWYTQVGNCUVKUUWGCDQWVVJG
ŨDWKNFCRNQVVGTŨEQXGTHGCVWTGŬ0QDQF[
PGGFUCRNQVVGTťKVYQPũVUQNXGCRTQDNGO
[QWJCXGDWVKVKULWUVHWPŭ
+ƓPFO[UGNHTGRGCVKPIOQTGQTNGUU
XGTDCVKOVJKUCTIWOGPVYJGPGXGTO[
YKHGCUMUYJ[+PGGFCPQVJGTFGXGNQROGPV
DQCTFQTCPQVJGTYQQFYQTMKPIRNCPGQT
CPQVJGTRQYGTVQQN+VũURQKPVNGUUDWVVJCV
KUVJGRQKPV+ũOLWUVCOWUKPIO[UGNHCPFKH
+OCPCIGVQOCMGCP[VJKPIWUGHWNVJCVũUC
PKEGUKFGGHHGEV

Dean
Melbourne

Ben says: Making stuff just for fun is the


be-all and end-all in my book. It’s like
growing your own food on an allotment:
KVũUPGXGTIQKPIVQDGCUGHƓEKGPVVQITQYC
ECNQTKGQHHQQF[QWTUGNHCUKVKUVQNGV
someone else do it and bring it to your
NQECNUWRGTOCTMGV$WVVJCVũUQPN[QPGUKFG
QHVJGEQKP;QWũXGCNUQIQVVJGUJGGTLQ[QH
DGKPIQWVKPVJGQRGPCKTQHIGVVKPIQWVQH
VJGJQWUGYCVEJKPIVJKPIUITQYWPFGT
[QWTNQXKPIG[G/CMKPIKUXGT[UKOKNCTKP
that I know I’m not saving any money; in
OCP[ECUGU+ũOPQVGXGPOCMKPICP[VJKPI
WUGHWN$WVYJCV+COFQKPIKUƓPFKPIC
ƔQYUVCVGEQPEGPVTCVKPIQPUQOGVJKPI
VJCVKUPũVYQTMCPFUCVKUH[KPIVJGJWOCP
WTIGVQETGCVG$WKNFKPIVJCVRNQVVGTYCU
XGT[UKNN[DWVKVYCUCNUQCNQVQHHWP(QT
VJCVKVYCUYGNNYQTVJKV

26
SPARK

LIVE, LAUGH, LUBE


.KMGOQUVRGQRNGYJQJCXGGPVGTGFVJGFQQTUQHCOCMGT
URCEG+ũXGUGGPVJGGPIKPGGTKPIƔQYEJCTV KHKVOQXGU
CPFKVũUPQVUWRRQUGFVQOQXGCRRN[FWEVVCRGKHKVFQGUPũV
OQXGCPFKVũUUWRRQUGFVQOQXGCRRN[9& 9JCV+ũF
PQVTGCNKUGFVJQWIJYCUJQYOWEJVJGTGKUVQITGCUGUCPF
QKNU+MPQYVJGKPHQTOCVKQPKUCNNQWVVJGTGCNTGCF[KPDQQMU
CPFQPVJGKPVGTPGVDWVVJCPMUHQTRWVVKPIKVKPVQO[JCPFU
NCUVKUUWG

Brian
Stoke
ZERO TO HERO
6JGDTQMGP&RTKPVGFIWKVCTVJCV[QWWUGFVWTPGFKPVQCICOGU Ben says:6JGUMKNNQHGFKVKPICOCIC\KPGKUDTKPIKPI
EQPVTQNNGTDCFNWEMК+ECPUGGVJGNQIKEQHYJCV[QWFKFCUECP RGTVKPGPVUVWHHVQIGVJGTKPQPGRNCEG#VNGCUVVJCVũUYJCV
CP[QPGNQQMKPICVVJGKOCIG+H[QWũFCUMGFOGVQ&RTKPVCIWKVCT we’re told. We just let the brilliant Andrew Lewis get on with
PGEM+ũFRTQDCDN[JCXGFQPGVJGUCOGVJKPIYKVJGCEJNC[GTDWKNV VJKPIUCUJGKUFQKPIVJKUKUUWGYKVJVJGNCVGUVRCTVQHJKU
WRHTQOVJGRTKPVDGFOCMKPIVJGIWKVCTPGEMNQPIGT+VũULWUVVJG FGGRFKXGKPVQYJCVOCMGUCNCUGTEWVVGTYQTM6WTPVQRCIG
KPUVKPEVKXGYC[[QWũFFQKVKH[QWYGTGHCOKNKCTYKVJ&RTKPVKPIKP CPFGPTKEJ[QWTOKPFYKVJJKUYQTFU
CP[ECRCEKV[$WVKH+NQQMCVO[QYPIWKVCTUYJKEJCTGOCFGVJG
VTCFKVKQPCNYC[QWVQHYQQF+ECPUGGSWKVGENGCTN[VJCVVJGNC[GT
NKPGURWVFQYPD[VJGVTGGTWPNGPIVJYKUG'XGPVJQWIJVJGTGũU
QPGKPVJGUCOGTQQOCUO[&RTKPVGT+YQWNFJCXGOCFGVJG
UCOGOKUVCMGDGECWUGVJCVũUVJGYC[VJCVVJGOGFKWOPCVWTCNN[
VCMGU[QW+IWGUUVJGYQTNFQPN[NGVU[QWUJCRGKVVJGYC[KVYCPVU
VQDGUJCRGFťGKVJGTYC[IQQFYQTMQPVWTPKPICHCKNGFRTKPVKPVQ
UQOGVJKPIWUGHWNК

.WE[
Bedfordshire

Ben says: I understand what you say about there being a ‘natural’
YC[VQVJKPMQH&RTKPVGFQDLGEVUDWVVJCVKUPũVYJCVJCRRGPGF
YKVJVJGIWKVCTPGEM+VJQWIJVNQPICPFJCTFCDQWVKVEQPUKFGTGF
CNNO[QRVKQPUCPFFGEKFGFYKVJCENGCTJGCFVQFQKVVJGYTQPI
YC[0GXGTOKPF.KMG0#5#*CEM5RCEGOCIC\KPGJCUC
PQDNCOGEWNVWTG6JKUKUJQYYGNGCTPHTQOQWTOKUVCMGUų

27
Crowdfunding now

REGULAR

CROWDFUNDING
NOW
Mixtile Blade 3
The Arm processor board that likes to play with friends

From $169 hsmag.cc/mixtile Delivery: Oct 2022

T
he Mixtile Blade 3 packs a Rockchip low-power processors. While the Cortex-A76s at the
Octa-core Cortex-A76/A55 processor heart of the Blade 3s are powerful by Arm standards,
running at up to 2.4GHz, with up to compared to most server-class x86 processors,
32GB of memory, and 256GB of eMMC they’re relative lightweights. That does bring
storage. The real tick, though, isn’t the advantages, particularly with energy efficiency.
processor, but the form-factor. It’s stackable with a Whether or not this is a good trade-off depends a lot
PCI Gen 3 edge connector. This means that it’s really on your particular processing tasks.
easy to link multiple Mixtile Blade 3s together to There’s also a 40-pin GPIO header, allowing you
make a cluster. to integrate a huge range of hardware with your
There are a lot of trade-offs to consider when machine, dual Gigabit Ethernet, and SATA 3.0.
building computing clusters, but often the key While we’ve not had our hands on this to test, it
decision comes down to whether or not you should looks like it’s a great option as a fully-featured Arm
have a few high-power processors, or lots of processor board.

28
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.

Below
The building
block of an
Arm cluster

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

PG

44
HOW I MADE:
PG
32
TAG JOUSTS
Combine 3D printing and
FreeCAD to make a game
of skill, bluff, and chance

PG

50
INTERVIEW:
ALEX GLOW Take your idea from pipe dream
to prototype and beyond
How to keep building electronics
without leaving the planet
spoiled for future generations

PG PG

58 62
IMPROVISER’S IN THE WORKSHOP:
TOOLBOX: SUBLIMATION
CONCRETE PRINTING
The Romans used it in their weekend We tried printing onto non-printable
project builds – now you can too things. Success level: mixed
Create a product

FEATURE

u rn in g y o u r
in k in g ab ou tt
Th je c t in to
s p r o
electronic ct ? I t ’s n ot
a c t ua l p r o d u
an e c r e a tin g
sy , b u t y o u ’ll b
ea e a n d
g un iq u
somethin n g t h e w ay ,
rn in g a lo t a lo
lea c ov e rs
g d is
as Phil Kin

32
LENS

onics
a d e a c ool electr
o, you’ve
m posted
y o u r s e lf and have
r
project fo has arous
ed

S
w h e r e it e
it online
t e re s t a nd positiv
ble in have
considera e s o me people
a y b
feedback
?M in buying
e y ’d b e interested nt
even said
th
, y o u m ig ht well wa
is stage mbled
one. At th e a in to k its or asse
g your id
c o n s ider turnin
to at le a s t at next?
s e ll to o thers. Wh d uct to ma
rket
u c ts to e w p ro
prod ging a n ct for
e v e lo p in g and brin c re a ti n g a DIY proje
D air from n for a
v e ry d ifferent aff to m o d if y the desig
is a ing ing to
lf . A s w e ll as need ll y if y o u ’re intend
yourse especia way,
c tu ri n g process – ty p e s along the
manu fa ng pro to spects,
-s c a le – and testi n g e of other a
go la rg e o le ra yers.
d to c o n sider a wh g in g s hip ping to bu
you’ll nee mponents
to arran almost
o m s o u rc in g c o
g p ro d u c t, you will red.
fr kin
p ro fe s sional-loo n d g e t it manufactu
For a a P CB a st them
ly n e e d to design p ro to ty pes and te
certa in severa l ugh
m a y n e e d to create c t is c re a ting thoro
You er key asp
e the
ly . A n o th k n o w h o w to use
thorough yers will ng,
n ta ti o n so that bu e r th in g s like testi
docum e to cons id n’t
t. Y o u ’l l also need e , p ri c in g – you do
produ c , of cou rs
g in g , s h ipping and
pack a ss! ters on
t to b e m aking a lo a few poin
ll y w a n g iv e y o u
rea im to in pitfalls
ture, we a of the ma
In this fea vo id s o m e insight,
g e t s ta rted and a m a k e r. T o gain an
how to ninitiated the leap fr
om
li e in w a it for the u e m a d e
that ers who’v perts who
are very
’v e c h a tt ed to mak o th e r e x
we ng with
je c t to p roduct, alo
pro cess. u’ll get to
m il ia r w ith the pro fi rs t m il li on, but yo and
fa r will enjoy
m a y n o t make you e r p e o p le
You t that oth which
a u n iq ue produc h in to th e bargain,
crea te little ca s
e a rn yourself a rojects.
ma y b e
fu n d y our future p
you
could help

33
Create a product

FEATURE

“To make a truly good product, I think


it’s pretty key to use it ‘in anger’,” says
Pimoroni co-founder Paul Beech. “Get inside
the skin of what people will try to do with it.
That will tell you a lot about what needs to
change, what is most important and needs
to be made easier. For the makerverse, I
think you have to avoid just making what
efore you start planning that you think people want. Have a strong

Designing
others to
o
u
a
s
ns
p
e
id
r
r
o
e
e
d

r
q
u
u
at
c
ir
i
t

o
e
f

n
s
or

,
B crowdfunding campaign
and large-scale production
process just yet, you need
to think carefully about your
product’s design and its
opinion about how things should be and
make the product reflect that.
“Possibly the biggest [issue], if you’re
aiming to sell, is knowing exactly who your
customers will be. By name. If you want
careful c o s o urce potential audience. to sell 100 of a kit, make sure you have at

’ll n ee d t
and you
“Put some information up about your least 100 people who will give you a firm

c o m p on e n t s project on a site like Hackaday.io or share yes on being a customer for it. Preferably

reliable
it with your relevant groups to get feedback a lot more. Chucking into the universe
and gauge interest before you invest in rarely works. You need to build a following
Below buying materials or parts,” advises Tindie and interest in what you’re doing. You
Sourcing reliable product manager, Jasmine Brackett. “Input and your approach matter as much as the
components has
been made more from the community is a great way to gauge thing itself.”
KPMÄJ\S[I`[OL interest and build up support before you On a more practical level, you will
NSVIHSZ\WWS`
shortage start selling.” also need to consider aspects such
as whether your product will be a kit
and/or ready-assembled, if it will require a
custom PCB, and how you will source the
components required.

PCB DESIGN
You may well have created your DIY
project with whatever bits and pieces
you had to hand. Most makers will at
least start prototyping using a breadboard
or stripboard to connect the electronic
components. Naturally, that won’t really
cut it for a polished product that you want
to sell, so – unless you’re simply creating
a basic electronics kit comprising common
components to use with an existing
single-board computer or microcontroller –
you’ll likely need to design a PCB (printed
circuit board).

34
LENS

If you haven’t taken Right


Adding components
this step before, we to a PCB design in
covered the process of [OL,HZ`,+([VVS

creating your first PCB


in detail in HackSpace issue 48 (hsmag.
cc/issue48), using the EasyEDA software,
which is ideal for entry-level electronics.
Other PCB design tools available include
the more fully featured KiCad and widely
used EAGLE (check out SparkFun’s tutorials:
hsmag.cc/SFEagleTutorials). If you’re
already familiar with Fritzing, you can even
use that to convert a breadboard circuit into
a schematic for a PCB.
Whatever tool you use, you will end up
with Gerber files for the PCB, solder mask,
silkscreen, drilling, and so on, which you
will need to send to a manufacturer such as
OSH Park or JLCPCB. BUYING FROM QUALITY
COMPONENTS
Whether you are intending to ship your PCB
VENDORS IS CRUCIAL. IT ADDS
as a bare board, with separate components
in a kit, or with them pre-soldered on the
board (by yourself or a manufacturer), you
COST, BUT IT IS WORTH IT
will likely need to source a large number of
electronic components. of times, but has been exacerbated by the Oscar Vermeulen (maker of retro computer
This is very different from creating a DIY current global shortage. kits at Obsolescence Guaranteed) offers a
project, as Jasmine notes: “When you’re “When you’re doing a production run word of caution: “I used to buy cheap ICs
making something for yourself, you can or even a small batch, if you can’t get the off the internet – ending up with some chips
use whatever you have on hand. Unless same parts or their quality varies, you that did not even have any silicon inside.
you’re planning to make more than one for may have to redesign your product to Buying from quality vendors is crucial. It
yourself, you don’t have to think so much use another component or accommodate adds cost, but it is worth it.”
about the easy availability or even the variances in sizing or other specifications,” In addition, he advises only using
reliability of the parts used.” adds Jasmine. mainstream, standard components. “I
Obtaining readily available, good-quality And if you’re tempted to buy super-cheap finished the kit as a product and then found
components can be a challenge at the best components from little-known suppliers, out that this retro-looking switch I chose
was really no longer in production. It caused
huge problems.”
Simplifying the circuit is also advisable,
especially if it’s for a kit for users to
assemble. “If your product is hard to
diagnose and difficult to repair, it is probably
not something you want to sell as a kit,”
says Oscar. “This puts a massive constraint
on your design options. You better avoid any
surface-mount chips, for instance. And every
extra component is one more possibility
for someone to make a mistake building
the kit.”

Left
;OL7*)KLZPNUMVY[OL7P+7
replica classic computer kit

35
Create a product

FEATURE

Sometimes it’s as simple as missing a label


on a PCB. Other times it’s a completely
un-routed PCB trace that I somehow missed
in ERC/DRC.”
Once you’re happy with it, before diving
head-first into mass-production, you may
o, you’ve designed your want to dip your toe into the water by selling

Getting a p r
for large-sc ping,
s p ro
o
a
t
d
l
o
u
e
t
c

y
p
t
ro
ready
duction S product. What’s next? Jason
Coon, of Evil Genius Labs,
advises getting prototypes
made – by a manufacturer
such as OSH Park – before
a few units online to ascertain demand, such
as in an electronics marketplace like Tindie.
“It’s straightforward for people to start
slow on Tindie by getting a small batch
done, getting feedback, and refining the
invo lv e pushing ahead with a final design. “I design or their production and shipping

gh t e s t in g , a nd definitely make mistakes, and sometimes processes,” says Tindie’s Jasmine


thorou have to fix or alter the Brackett. “Often, sellers will ‘graduate’ to

ali ty c on t ro l design after the first crowdfunding or mass manufacturing after


qu prototype build. they have sold on Tindie.” She also notes
that it’s a “great place” to sell any excess
units produced for a campaign.
Unless you want to sink a lot of your
own hard-earned cash into fine-tuning the
product further and scaling up production,
a crowdfunding campaign is an obvious
alternative. There are numerous generic
crowdfunding services available, such as
Kickstarter and Indiegogo, but you may also
want to consider Crowd Supply, which
specialises in electronics projects and will
guide you through the whole process of
production and handle a lot of the logistics
such as shipping. You’ll need your project
to be accepted first, however (see ‘Crowd
Supply’ box, overleaf).

TESTING, TESTING…
Thorough testing is essential and another
key aspect before you sell a product. “I
extensively test prototypes of a new design
myself, before sending them out to others
to help test,” says Jason. “I also test each
Right
Evil Genius Labs’ item individually before packing and shipping
-PIVUHJJP3,+ it, whether it’s an assembled PCB or a fully
board is manufactured
I`*`ILY*P[`*PYJ\P[Z assembled piece.”

36
LENS

Left
(JVTWSL[L7P+7
PUP[ZJHZL¶I\`LYZ
need to build it
themselves as Oscar
=LYTL\SLUVUS`ZLSSZ
kits, which are less
[PTLJVUZ\TPUN

A CTORY
MAKER F
Oscar Vermeulen knows many hobbyist
makers are put off by the time-consuming
hassle of manufacturing, storing, and shipping
stock, so their projects tend to stay at the
prototype stage. Which is how the idea arose
of opening a mini-factory; along with some
friends, he’s planning to open a small-scale
facility in Panama, which has great logistics
“Testing up-front, before you start selling then test and ship out, you’ll want to find due to the Canal.
is obvious,” adds Oscar Vermeulen. “You ways to automate or outsource the time- “It’s purely for ideas that might be
do your own testing, have a few friends consuming aspects of production, packing, perfectly viable on a small scale – a few
hundred or thousand units per year – but
build the kit, and then you do a test run of and shipping.
just too niche to be picked up anywhere in a
a few dozen beta-kits to buyers who know “Most makers get most excited about the commercial manner,” he tells us. “The idea
they are the first ones, and they know you design and prototyping phases; the product is a co-operative one: share a logistical and
will supply them a new kit if something is they love may not seem so wonderful administrative infrastructure. Help other
not right yet. What is less obvious is the when testing and kitting it. Initially, people makers get their products realised and make
quality control of every batch of parts and often rope in family members or friends to their lives easier – avoid filling their garages
with parts. Every week, the maker just sends
components that comes in. Cases that are help, but you’ve got to make sure it’s worth
a list of addresses of buyers that need to be
warped, panels that miss mount holes, everyone’s while; otherwise, it may start to
invoiced and sent a kit or assembled unit. The
switches that switch the wrong way. It feel like a slog when you’re scaling up.” rest is done by the mini-factory.”
takes an amazing amount of time.” If it all seems too much, the alternative is Staying at a beachside resort, makers
to employ a manufacturer to assemble your will be able to get together with people who
GET TO WORK product.“I have some SMT [surface-mount know about things like case design, logistics,
Making a few units to sell is one thing; technology] assembly done by contract and production. “The idea is to take a maker
product from almost ready to 100% production
large-scale production is quite another. If manufacturers, such as Cyber City Circuits,”
ready in a one- or two-week sprint on-site.”
you’re putting together a kit to sell, it can says Jason. Oscar is even planning to
soon prove very labour-intensive. open a mini-factory to share with other 6ZJHY»ZTPUPMHJ[VY`PZZL[[VILI\PS[UL_[[VOPZ
JVUZVY[P\T»ZZTHSSOVSPKH`YLZVY[^OPJOOHZH
“Cutting out or soldering all those pieces makers developing products (see ‘Maker beachside bar – ideal for maker meetings!
might be a labour of love or a way to get Factory’ box).
what you need cheaper when you’re doing it If your product requires a case, laser
yourself,” notes Jasmine. “However, when cutting and 3D printing are feasible options
you’ve got to make 10 or 100 by hand and for small-scale production, but are very
time-consuming – if you really want to
scale up production, you may want to
consider vacuum-forming or injection-
moulding, as used by Oscar for his replica
classic computer kits such as the PiDP-11.
“Once an injection mould is made, you
cannot correct mistakes,” he says, so you
need to know what
Left you’re doing and get
(WYLWYVK\J[PVU
WYV[V[`WLVM[OL it right first time or
bare Piunora PCB, it could prove a very
straight from the
manufacturer expensive error.

37
Create a product

FEATURE

esigning and manufacturing its initial launch. Frustrated customers are

Onc e yo u’v
product ma omers
it to
e
d
c
g
e
o

u
,
t
y
st
your
o u’ll need D a product is only one
part of the equation. You
will also need to create
comprehensive documentation
to show customers how to
not happy customers.”
“Documentation is incredibly important,
especially for kits, but also for the
fully assembled pieces,” adds Jason
Coon. “It’s important to make sure the
to sh ip use it, possibly including a tutorial and buyer has a good experience with what

vid e d e ta ile d accompanying example code. they’ve bought.”


and pr o
e n t at io n to help Of course, you’ll need to get your product It needs to be comprehensive and clear,

docum
into the hands of customers first, which says Jasmine Brackett. “Especially if there
entails organising packaging and shipping. are step-by-step instructions, it’s best to get

them use it DOCUMENTATION


a few people from your target audience to
go through it. What seems obvious to you
“An undocumented product is not a usable might not be to someone else. It’s beneficial
Below product,” advises Timon Skerutsch, creator to have one place online where all the
Online documentation for
`V\YWYVQLJ[PZLZZLU[PHS of the Piunora dev board. “It is just as instructions, files, etc., are kept.” This could
such as this build guide important as the product itself and will be a GitHub repo or your own website.
MVY[OL7P+7YLWSPJH
computer kit dictate how well your product will do after “If you don’t include full printed
instructions when you ship your product, at
least put a link in the box, or even better, on
the item,” recommends Jasmine. “Then,
if you need to update your docs, you don’t
have to post anything, and folks can find the
instructions quickly, weeks or months after
they receive the order.”
Good documentation includes your
product listing. “The clearer your product
page is with a good title, description,
images, and links to documentation, the
better,” says Jasmine. “If you don’t provide
enough information so that the buyer knows
it meets the specifications of their project,
there’s a chance that they may send it
back, which will cost you money. It also
helps to minimise any pre-sale questions or
people deciding to go with another better-
documented solution.”

38
LENS

Left
You’ll need to
think about
product
packaging, like
[OPZL_HTWSL
for the Piunora

SUPPLY
dev board

C ROWD

SHIPPING when something unexpected happens to


Focusing on electronics hardware, Crowd
Unless you’re using a platform such as the odd package as you can quickly reship
Supply is a crowdfunding service that
Crowd Supply that handles all your shipping, it or refund it without feeling you’ve made helps you take your product all the way
you’ll need to arrange it yourself. a loss.” from prototype through crowdfunding and
“It’s a big issue that you don’t have to In addition, she points out, “Sellers need manufacturing to shipping. So it’s ideal for
think about when making stuff for yourself to make sure they research the local laws first-time makers, who comprise around 50%
and that many people overlook,” notes and regulations of where they live and look of its users.
You’ll need your project to be accepted
Jasmine. “Choose packaging carefully so into them in any foreign destinations where
first, however. “It’s actually quite strict:
that it’s economical in materials and size to they are planning to ship. Depending on we turn away between 90 and 95% of our
keep shipping costs low, but robust enough where they are based and how much they applications,” reveals Crowd Supply’s head
to stand up to being tossed around the intend to sell, they may need business of community, Helen Leigh. To be considered,
globe. Consider using a priority flat-rate box licences or to pay tax. Usually, when people you’ll need to have a prototype and a
if you’re in the US and shipping mainly to start selling, sales come under hobbyist commitment to open-source hardware: “We
require at least the firmware and schematics
US customers, as it will save you the cost laws, but as they grow, they’ll likely
to be released.”
of buying boxes, plus includes tracking and reach thresholds to declare their sales for Once accepted, you’re guided step by step
insurance, which will save you headaches tax purposes.” through a highly structured process – dealing
down the road. If you’re going to ship with batches of issues on a GitHub repo, aided
Below
internationally, consider self-insuring your 4HRLZ\YL`V\YWYVK\J[ by a product manager. Crowd Supply also
packages by adding a little to the product or page has a good title, provides a photographer to take shots of your
description, images, and
shipping price. Self-insuring safeguards you links to documentation
final prototype, and a technical writer to help
craft the copy for the campaign, which starts
with a pre-launch to build up some buzz.
“It is designed for engineers who would not
know the first thing about bringing a product
to market,” says Helen. “And that’s why we
do all the logistics as well.” Aided by Crowd
Supply being part of electronics retail giant
Mouser, this includes handling all packaging
and shipping from a warehouse in Texas. In
addition, your campaign’s final number of
orders from backers will be matched and
purchased by Mouser, which will continue to
sell this extra stock.

39
Create a product

FEATURE

E
URCE HARDWAR
OPEN-SO
r t u rned hen Timon Skerutsch’s

How o
his pr
succ e
o
n

s
j
e
e
sf
m
c
u
t
l
a
id
p
k

r
e
e

o
a
d
i
u
n to a
ct
W friend Scott Shawcroft
(a lead on CircuitPython
at Adafruit) said it
would be nice to
have the Raspberry Pi
Not every maker open-sources their hardware
designs, but it’s something that should
be considered, reckons Tindie’s Jasmine
Brackett. “As many makers learn from others,
open hardware is an excellent resource for
learning, and you can create or contribute to
Compute Module 4 in an Arduino form projects to get experience. It’s a great way for
factor, the idea for the Piunora CM4 add- makers to give back to the community.”
Below
;OLÄUHSWYVK\J[PVU on board was born. While some makers may worry about
version of the Piunora the potential of having their open-source
KL]IVHYKYLHK`MVYH “I started designing it, more jokingly
PCB cloned, that’s a fairly rare occurrence
Compute Module 4 to really,” says Timon, “but as I went along
be mounted on top according to Crowd Supply’s Helen Leigh.
with the design, I realised that this “Not many people have that happen to them. If
actually works really well… So I you [do], you’re very successful already.”
pivoted to actually taking it seriously Even then, adds Jasmine, “There are many
and thought about what the target other ways to differentiate your product…
You can use good parts, have a high-quality
audience would be.”
control standard, and provide excellent
Posting the assembled board documentation. Many of the most successful
to Twitter was the spark to turn sellers on Tindie cater to a niche, are
it into a product: “People really passionate about that specific community, and
liked it and it got shared a lot. I are active participants. Because of this, they
was always thinking about starting have a good reputation and can charge for a
premium item.”
to sell products, but the stress
and bureaucracy involved always @V\JHUÄUKV\[TVYLHIV\[6:/>(VWLUZV\YJL
deterred me.” But Piunora felt OHYK^HYLJLY[PÄJH[PVUH[JLY[PÄJH[PVUVZO^HVYN
different: “It was at least for my skill
set, an easy product from the R&D
perspective. It felt manageable.”

MAKING IT HAPPEN
The initial prototype took him
“around two days of schematic
and board layout, and another day
of silkscreen design and detail
fiddling. That was about 90% feature

40
LENS

N
TY CERTIFICATIO
SAFE
One question often pondered by makers looking to create products is whether they need to obtain
AL RESOURCES
N
ADDITIO
product safety certification, such as CE and UKCA. According to Pimoroni’s Paul Beech, “The official
line approximates to (for EU/US/UK mainly): if you’re putting a product on the market, you’ll need to make
a declaration about its safety and be able to back it up with documentation. A chunk of that is chasing
down materials certification docs from your suppliers. If you’re buying from people like DigiKey, they will Need a little more help? There are many online
have the RoHS/REACH docs for the components. So don’t fear it, and do the boring legwork.” resources providing useful information to aid
That doesn’t cover emissions/immunity for electronics, however. While most makers won’t be able you in designing an electronics product for
to afford to test their product to CISPR/EN standards in a lab, “the more diligent makers, once they start manufacturing. Here are just a few…
shipping more than 100 pieces of their small project, do a reasonable chunk of testing with non-lab
settings,” says Paul. “You can reassure yourself your product isn’t going to interfere with Radio 4, which Hackaday U
is a good start. Kits aren’t a get-out: hackaday.io/courses
testing needs to be a genuine ‘as the There are a few free courses available on
customer will use it’ thing. There are Hackaday, such as ‘Prototyping in Mechanical
plenty of YouTube videos and good Engineering’ and ‘Introduction to KiCad
articles on ‘pre-compliance testing’ that and FreeCAD’.
are more in reach for small makers.”
HDDG Talks
One of the numerous YouTube
hsmag.cc/HDDGTalks
]PKLVZVUWYLJVTWSPHUJL[LZ[PUN
OZTHNJJ,4*7YL*VTW From the Hardware Developers Didactic
Galactic meetup group, this YouTube series
features some highly relevant talks, most
notably ‘HDDG 36: Design for Manufacturing’.

Rheingold Heavy
complete – the famous last 10% took me hsmag.cc/RHTutorials
another four to five weeks over the course The maker-focused electronics supplier has
of around six months.” another two months before customers a range of helpful tutorials, including a series
That was just for the product design, were receiving packages. “All in all, the on KiCad.
however. “What took a whole lot more work journey was about a year. If I didn’t have my
Contextual Electronics
was setting up production, establishing pre-existing experience and relationships contextualelectronics.com
relationships, doing paperwork, certification, [from designing electronics commercially], A range of hands-on courses that teach
writing emails, logistics to the distributors, I think it would have probably taken six you the skills to create your own custom
creating the campaign, writing software, months longer.” electronics. Membership costs from $9 a
writing even more emails, documentation, Timon used Makerfabs to manufacture month with a free week’s trial.
doing PR, making a website, and everything Piunora. You should see your manufacturer
else that goes into making and marketing as a partner in your venture, he advises:
a product.” “They are not faceless robots – talk to them,
From finished prototype to crowdfunding understand their bias, make clear what you
campaign (on Crowd Supply) was around expect and need your product to be… If work than you initially imagine, no matter
four months, then another three to four things don’t turn out how you imagined, how prepared you are going into it.”
months for production to wrap up, and then it’s usually a case of not communicating In particular, launching Piunora while
well enough.” doing a full-time day job was stressful:
“It’s possible but it’s hard, especially
WORD OF ADVICE mentally. Make sure you take time for
Timon offers some yourself despite the pressure you will
further advice for be experiencing after you’ve had your
potential product campaign, pre-order etc.… Don’t destroy
makers: “Make yourself: if you keep being transparent
sure you’ve got the about what’s happening then customers will
bandwidth to commit to actually be very accepting of delays.”
it. It will be a lot more While you don’t have to quit your job and
do it full-time, “it will definitely alter how
Left you perceive your hobby quite significantly:
Launching the product
VU*YV^K:\WWS`LU[HPSLK it won’t be just a hobby any more that you
VWLUZV\YJPUNKL[HPSZVM[OL do for fun; there will be a lot of things that
Piunora hardware, such as
this schematic you need to do that will be very un-fun.”

41
SUBSCRIBE
TODAY
FOR JUST £10
Get three issues plus a
FREE Raspberry Pi Pico
delivered to your door
hsmag.cc/FreePico
UK offer only. Not in the UK?
Save money and get your
issue delivered straight to your
door at hsmag.cc/subscribe.
See page 66 for details.

Subscription will continue quarterly unless cancelled


SUBSCRIPTION

SUBSCRIBE
on app stores
From £2.29
Buy now: hsmag.cc/subscribe
Free Pico with print subscription only
How I Made: Make a 3D-printed game with Python

FEATURE

HOW T
his article describes how
to make 3D objects from
Python code and then design
game mechanics that deliver
compelling gameplay. A
completed game, ‘Tag Jousts’, shows how
this is done. You can find all the designs and
sample programs, plus printable copies of
the rules, here: tagjousts.xyz. You can use
this to make your own copy of the game, or
By Rob Miles use the designs as a starting point for your
own game development.

THE TAG JOUSTS GAME


Figure 1 shows a set for two players. The
game contains elements of skill, bluff, and
luck which makes it quite fun to play. You

MADE
could play the game with tokens made of
card or paper, but we are going to discover
how to use software to create the designs
of the play pieces. We are going to use
the Python programming language running
inside FreeCAD.

FIND YOUR INNER PYTHON


Large programs are built as several
co-operating components. A word processor
will have a text editor, a spell checker, and a
printer driver. These parts are usually ‘baked
together’ into the finished program. However,
some applications are constructed as
frameworks which support elements loaded

wj0‫(מ‬٬ as the program runs. FreeCAD works like


this. It contains lots of Python routines which

PRINTED GAME
WITH PYTHON
Write a Python program to design play
pieces, and then create compelling
gameplay with them
44
LENS

What I used
> A computer that can run the
FreeCAD program. FreeCAD
is a powerful computer-
aided design (CAD) package.
It is available for PC, Mac,
and Linux-based systems.
@V\°JHUÄUKP[OLYL!
hsmag.cc/FreeCAD
> You can print your game
pieces using any 3D printer.
If you just want to create
gameplay, you can also
use paper and card game
elements, or even blank
playing cards to construct
your games.

provide all the various behaviours. Actions


you perform in FreeCAD (for example,
clicking the Cube icon in the editor to add a
cube to a design) are implemented as actions
on Python objects inside the program. You
can see this in action by opening the View
menu and selecting the Panels item. Then set
the Report View and Python Console items to
have ticks against them. Now, whenever you
perform an action in the program, you will
see the Python components at work.
Figure 2, overleaf, shows the code that
runs when you create a cube and a cylinder
in FreeCAD and then fuse them together.
These actions were performed by clicking
the Cube and Cylinder icons in the Part
editor, then selecting both items in the
drawing and selecting the ‘Make a union of
several shapes’ icon. These statements may
look complicated, but don’t worry. The ones
we will use in our programs are a lot simpler. create a macro, it is saved in a text file with Figure 1
The tag designs are easy to print
Using Python statements to control an the language extension .FCMacro. on a printer such as an Ender or
application makes it very easy to create Figure 3, overleaf, shows the Python Prusa. A set takes around three
hours to print at good quality
macros. A macro is a sequence of commands statements in a macro that creates a cube
you might want to repeat. We could create fused to a cylinder. They look remarkably
a ‘Make me a cube and a cylinder’ macro similar to the ones in Figure 2. Macros can
by selecting the Recording option from the be loaded and edited within the FreeCAD
Macro menu and specifying a file to hold the environment, but the code editing support is
macro. We then add a cube and a cylinder to very limited. Debugging is impossible, and
the drawing as before, fuse them together, there isn’t even any way of searching the
and select ‘Stop macro recording’. When you source code.

45
How I Made: Make a 3D-printed game with Python

FEATURE

Figure 2
You could create
your FreeCAD
objects by typing
everything into the
Python console, but
it is much easier
to generate the
commands using
the graphical user
FAKING FREECAD interface (GUI)

If you want to write your macros more easily, We could make our game objects using
there is a framework you can use to do this. the high-level FreeCAD commands we have
It takes the place of the FreeCAD macro
already seen, but it is much easier to use the bottom left-hand corner of the cube.
environment and lets you create your
code directly inside Visual Studio Code. lower-level ones. Figure 4 shows how these Objects expose methods that can be used to
It provides a subset of FreeCAD commands, are used to create a box and a cylinder and translate and rotate them.
but it does make it much easier to write and then fuse them together. The tag objects we Figure 5, overleaf, shows how a program
debug code. You can find the framework at are going to create are made up of stacked can position objects in 3D space. Note that if
hsmag.cc/FreeCADSimulator. cylinders and boxes, but you can make much we attempt to put an object ‘inside’ another
more complex items this way. one, this will not cause a problem. We can
When we create an object in FreeCAD, make holes in objects by moving one object
it has a particular size (width, depth, and inside the other and combining the objects
height), position (where it is in the design), using the Cut operation.
and orientation (which way it is pointing). Figure 6, overleaf, shows how we can
These values are expressed as X, Y, and Z make a ‘bead’. Note that although the hole
values in millimetres. is the same size as the pin on the peg that
The objects in Figure 4 were created we created in Figure 5, the bead might not
with the dimensions shown in the code and fit onto the peg. You would have to make the
default position and orientation. The bottom hole larger or the pin smaller (or both) to be
left-hand corner of the box and the centre of sure that they would fit together.
the cylinder were placed at position x=0,y=0,
z=0 and oriented on the Z axis. You can see MAKING TAGS
this because the cylinder is centred around The code in Figure 7, overleaf, will generate
one tag. The great thing about making
tags in software is that we can use looping
constructions to create lots of items if we
want to.
Figure 8, overleaf, shows how nested for
loops can be used to create many objects.
The pattern is created by combining lots of
rotated cubes. Each cube is rotated slightly
to make the pattern more interesting. The

46
LENS

die displays a blank face, the attacker can


decide what will be scoring and says either
‘squares’ or ‘circles’. All the players then play
Figure 3 a tag in the joust. Once the tags have been
You can uncomment
the GUI statements chosen, the players reveal the underside of
shown in green if you their tags and score them by counting the
want the actions of the
macro to be displayed total number of the chosen shape on the top
on the user interface and bottom of their tags. The player with the
when it runs
highest score wins the joust. The winning
player captures their opponents’ tags and
discards their attacking tag. If the top score
in a joust is tied, all the tags in the joust are
discarded. Play continues until each player
has run out of tags. The winner is the player
who captures the most tags in jousts.

THE GAME DEVELOPMENT


PROCESS
The development process for Tag Jousts
turned out to have a lot in common with
video game development. This shouldn’t be
surprising, in that the aim of both video and
board games is to provide an experience
in which the players have a set of inputs
that they can control and an aim to achieve,
whether that is ‘shoot all the aliens’ or
‘acquire the most tags’. The game designer
Figure 4
rotate function is given the point to rotate The Part module needs to decide what the player can control,
contains functions
about (the axis of rotation) and the number that can be used
how the players interact, and what random
of degrees to rotate. You can make the to make boxes, factors to introduce to make the gameplay
cylinders, spheres,
pattern even more interesting by rotating and other shapes more interesting. This all goes to make up
each cube by a different angle or making the what we can call the ‘gameplay mechanic’. At
boxes different sizes. the heart of all this is playtesting – discovering
what works and what doesn’t. As with
THE TAG JOUSTS GAME video games, it is very important to make
We can start our exploration of game-making something for people to play with as quickly
by looking at the Tag Jousts game, which as possible to discover
uses 3D-printed components and has a what works and what
simple but engaging gameplay mechanic.
Each player in the game has a set of 16 tags “EACH PLAYER IN doesn’t. Let’s look
at the development

THE GAME HAS A


and a special die. process for Tag Jousts.
Figure 9, overleaf, shows one of the game
tags. Every tag has a different combination ACHIEVE
of two shapes (square or circle) on the top
and two on the bottom. The counts of the SET OF 16 TAGS” BALANCE
In the first version of
shapes on the tag determine the ‘scores’ the game, the number
of that tag. The game is played over 16 of squares and circles
rounds. Players take it in turns to challenge on the top and bottom
each other in a ‘tag joust’. At the start of a of each tag was set randomly, and each
joust, the leading player throws their die to player had a set of random tags. This worked
decide what will be scoring for that turn. If quite well, but there was concern that some
the die shows a square or circle, that shape sets of tags would be more powerful than
will be the scored one for the round. If the others because they had more tags with

47
How I Made: Make a 3D-printed game with Python

FEATURE

Figure 5
A vector contains
the values of X, Y,
and Z, respectively.
The cylinder is
moved 5 in the X
direction, 5 in the Y
direction, and 10 up
so that it now sits on
the top of the cube

The balance that we have now, with a player


getting to choose the scoring shape around
a third of the time, seems to work well. With
more playtesting, it might turn out that this
needs to be adjusted, in which case we can
change the number of blank faces on the die.

SET A SCENE
Once you’ve had an idea of how a game
higher numbers of squares and circles, so it can be played, it is interesting to consider
CO-ORDINATE CONFUSION was decided that every player should start different scenarios for the gameplay. Tag
CAD tools and computer software use X, with the same set of tags. The number of Jousts is quite abstract in nature, as is the
Y, and Z values to express 3D positions, squares and circles on the top and bottom of idea of scoring using squares and circles.
but they do it in different ways. When
the tags was reduced to two so that each Players seem to quite like this, and they
you’re designing with FreeCAD, you will
find that the Z axis comes up out of the player could have a set of 16 tags made up also like the designs of the tags and how
floor. You can think of X as the width of of every possible combination of squares they are used in play. If you look at games
an object, Y as the depth (moving away and circles on top and bottom. on sale (and there are many), they will have
from you), and Z as the height. However, all kinds of different scenarios which are
if you design a graphical user interface ADD RANDOMNESS wrapped around a gameplay mechanic.
in Python using the Tkinter GUI library,
Playing with the same set of tags made the We could use ‘red lasers’ and ‘blue lasers’
you will discover that X is still the width
game completely fair, but it also turned out rather than circles and crosses, and we
of the object, but Y is now the height up
your screen, and Z is the distance ‘into’ to be a rather flat experience. It was felt that could replace the tags with model robots
the screen. a little randomness would make the game holding different coloured laser guns and
more exciting. Some games (snakes and put coloured ammo packs on the bottom of
ladders) are entirely
driven by chance,
whereas others
(chess) are entirely
“RANDOMNESS
WOULD MAKE THE
strategic. What we
wanted was a game
that had a balance of
Figure 6
We can add a vector
to the parameters for
chance and skill. The
selection die was
GAME EXCITING”
the ‘makeCylinder’ added to help with
function to position
the cylinder when this. This makes it
it is created. The possible for a player to be strategic, but for
Vector class is
KLÄULKPU[OL an underdog to win if they are lucky enough
Base module (i.e. if the selection die comes up in a shape
that favours their tags, or lets them choose).

48
LENS

Figure 7
The number of
circles and squares
on the top tag are
part of the ‘score’
for that tag. This tag
would be worth at
least two circles or
one square

Figure 8
You can make lots of
different patterns by
changing the values in this
program. Note that a large
pattern like this takes a
long time to render; you
can try out ideas more
quickly by reducing the
size of the pattern

each model. Then we could


call each round a duel and
change the name of the
game to ‘Super Laser Robot
Shootout’. It is quite fun to take a game and KEEP DEVELOPING TAGS OF FUN
consider different scenarios in which it can Once you have a game that works, you can The game grew out of key chain
be played. think about changes to make the game even accessories printed and sold in aid of Red
Nose Day, a UK charity event. Each ‘tag of
more interesting or expand the configuration.
fun’ has a random (and probably unique)
MAKE A PRODUCT The initial version of Tag Jousts was distribution of squares and circles on the
Your friends will be much more inclined envisioned as a two-player game, but it turns top and bottom. You can find the code to
to play your games if you make them as out that many more can take part and the create tags of fun here: tagjousts.xyz.
close to a ‘real’ product as you can. This game still works. We might decide it would
takes surprisingly little effort. First, you can be interesting to allow a player to select a
consider packaging. If your game uses small ‘squad’ of tags for a particular game. We
tokens, you can put them in a bag. Small might add some ‘joker’ tags that can be
bags can be bought cheaply from well- circle or square. We might add some new
known online retailers. Search for ‘hessian shapes. And then we might discover that
party bag’. Next, you can create some inventing a game while playing it is at least
printed rules. You can take the STL files as much fun as playing a game that you
containing the 3D designs from FreeCAD bought from a store.
and drop them straight into word processors
and graphics packages and put some text
around them. Be sure to pay attention to
design – choose a nice font and use
it consistently. Print the rules on
coloured paper; this makes them
stand out nicely. Finally, you
can create a website for your
product. This author managed
to pick up the domain
tagjousts.xyz for a year
for less than a pound from
namecheap.com – you can
use GitHub to host the site for
free. Pop the rules and any other
information on the site, and you Figure 9
Picture of the
now have product support in place. top and the
bottom of a tag

49

 
Alex Glow

INTERVIEW

HackSpace magazine meets…

Alex Glow
Hackster’s Lead Hardware Nerd shows how
not to create a load of e-waste

A
s the Lead Hardware Nerd
at Hackster.io, Alex Glow
has an insider’s view of
the technology that’s
coming down the rails
at us in the near future.
Happily, she also makes it her business
to share that knowledge, supporting a
community of almost two million hardware
tinkerers, inventors, and improvers. She’s
also the brains behind a good few projects
herself: she’s sent music into space, was
an early adopter of the companion robot,
makes projects with LEDs and PCBs, and…
well, whatever she feels like really.
Which made Alex think: how do I keep
doing all this, without generating a load
of e-waste, burning a ton of carbon, and
UGPFKPICNQCFQH&RNCUVKEKPVQNCPFƓNNU!
The result of this line of questioning
is green-ee.com, a new (but already
extensive) resource for the discerning
maker who doesn’t want to turn Earth into
CƓGT[TWDDKUJDKP4GCFQPHQTOQTGК

Right
Alex Glow, Lead
Hardware Nerd at
Hackster, has built a
community of over
2 million makers

Image: Alex Glow


(alexglow.com)

50
LENS

 
Alex Glow

INTERVIEW

Hackspace You revel in the glorious job AG The cool kids are working on Green EE, sustainable phone is the one already in
title of Lead Hardware Nerd. What does as I started calling it because I haven’t got your pocket’. So really, thinking about
that entail? a better name: building technology in a YJGVJGT[QWDWKNFVJGVJKPIKPVJGƓTUV
sustainable way. Technology that is helpful RNCEG+VJKPMKUVJGƓTUVUVGR
Alex I’ve made up that job title, obviously. I and thoughtful. Once you get into the nuts and bolts of it,
YCUVJGƓTUVGORNQ[GGCV*CEMUVGTYJKEJ There’s so much interesting stuff, but the things like using lead-free solder,
is a community of hardware developers more frivolous answer is that I think researching what materials work for your
that has been growing really fast and is there’s a lot of cool stuff going on with use case, and using recycled or
now very large – we’ve got almost two keyboards, and a lot of cool stuff with PCB biodegradable materials. There’s some
million members. I started out as the art. There’s also a growing interest in really amazing work going on with PCB
community manager, someone who was companion bots – of course, I’m paying substrates. Neither of these is ready yet for
drawing people to the site by reaching out attention to that. public consumption, but Jiva Materials is
VQRGQRNGƓPFKPIEQQNRTQLGEVUCPFKPXKVKPI But yeah, I really am excited about the doing a cellulose-based PCB substrate, so
people to join. And I was also publishing stuff that people are doing with more it’s not only recyclable and biodegradable,
my own projects on there. sustainable technology. And there are two but it’s easier to peel-off the components
At the time, I was working for a aspects to that: there’s building things in a and the traces and things. Instead of
company called Pinocchio as their maker sustainable way, and then there’s thinking having to peel that stuff off manually or by
in residence. And they’re basically a about what to build – for anything to be machine, you can just degrade out the
mesh network for Arduino that has since truly sustainable, it’s got to be helpful and central substrate and it all just falls apart,
pivoted and become Filament, which is not just built as a learning exercise. There’s which I think is really cool.
like an industrial version. I was publishing plenty of value in building things to learn – There’s also one that’s based on chitin
projects for Pinocchio and working from shrimp shells. Shrimp shells
at Hackster at the same time. After are a waste product; they take


a couple of years, our co-founder these and grind them up, and they
YCUNKMGŨ9GUJQWNFFQXKFGQUКũ#PF I think that cringing turn the chitin in them into PCB
+YCUNKMGŨ;GUК+ũNNFQQPGCOQPVJКũ at your earlier substrate. This project was at a
And he was like, ‘How about one a very early stage when I saw it, and I
YGGM!ũ+ũFPGXGTFQPGXKFGQDGHQTG
work is a great way don’t know if they have actually
so the early ones are extremely to see that done it yet. But ideas like that, I


amateurish – I like to think that you’ve grown think, are really cool.
I’ve gotten better over the years. I As for practical advice for the
think that cringing at your earlier here and now, using cardboard to
work is a great way to see that prototype – it’s cheap, recyclable,
you’ve grown. that’s how we get people excited to build and it’s a waste product. And there are also
There’s also this thing that Ira Glass calls things that are more helpful. Once you get considerations of how you power the thing
the taste gap – where you want to create excited about using your skills and passion you’ve built. I’ve gotten fascinated by this
things, and you have a certain sense of to help the world, then you can think about joule thief circuit. It allows you to power
taste, but you also know that what you’re DWKNFKPIVJKPIUURGEKƓECNN[HQTIQQF low-power projects from a supposedly
making right now is kind of crappy. purposes. My work at Hackster is itself part dead battery. It uses a feedback loop
Anyway, what I do day to day is I of this. I love it because it’s a worldwide DWKNFKPIWRCOCIPGVKEƓGNFKPCHGTTKVG
make videos introducing people to new community sharing open-source designs toroid, with the low power that you’re
technologies that they can use to make for electronics, spreading hardware drawing from the battery over time, and
electronics, interview people who are knowledge, and I frequently get to promote decomposes rapidly and dumps all that
doing awesome stuff with electronics, projects that combat poaching, detect magnetic energy back into the circuit as
and build projects and write tutorials. I HQTGUVƓTGUCPFJGNRKPQVJGTYC[UК electrical energy and adds that to the
also give talks and run events sometimes. power from the battery, and therefore is
=4GEGPVN[?HQTGZCORNG+YCUCV'ODGFFGF HS So how do you make your projects able to power your little LED or whatever
Vision Summit, just running around with more sustainable? We’re running out of for a short burst – then it goes back into
a camera. resources you know. the building-up phase.
Obviously, there’s a lot of cool LED stuff
HS You must see loads of interesting AG There are some really obvious ways that we can do with a circuit like that
projects on a day-to-day basis. What are around this. iFixit (which is an amazing – bike lights, for example. That’s an added
the cool kids working on nowadays? resource), has this great line: ‘the most bonus – a project that helps people stay

52
Left
Cardboard is the
ideal material for
prototyping – it’s
light weight, easily
workable, and cheap

Image: Alex Glow


(alexglow.com)
Alex Glow

INTERVIEW

Below
Alex’s creation
F3NR1R is a
shoulder mounted
companion bot – a
robotic familiar

Image: Alex Glow


(alexglow.com)
LENS

safe at night on a sustainable method of want to learn about electronics, but it also choices, and those choices are
transportation. But then, you can’t use helps those who want to repair stuff, sometimes just made for us. But often,
that to power things like microcontrollers, because you can see inside. we’re told that the solution is personal
unless you have some kind of smoothing. action. And that can be really
People have also built circuits for this HS I saw a talk you did in which demoralising for a couple of reasons,
that allow you to charge, for example, a you said that the degradation of the obviously, because on one level, it’s hard
ƓXGXQNVDCVVGT[QHHQHKVCPFVJGP[QWECP environment wasn’t our fault, but it is to see your individual impacts when you
use that to power your project. So I think our responsibility. What do you mean can’t see an immediate change from that.
that power systems are very interesting. by that? +VUVCTVUVQHGGNNKMGYJCVũUVJGRQKPV!+VũU
6JGTGũUCNCRVQRECNNGFVJG/064GHQTO not actually changing anything. But that’s
that uses a different type of battery – it AG I love the idea of building electronics, designed into the system as well. As
uses lithium iron phosphate chemistry, and I want to spend my life doing that. we’ve seen with BP [which invented the
which is less harmful [than standard Though, there are lots of other things I EQPEGRVQHVJGRGTUQPCNECTDQPHQQVRTKPV?
DCVVGT[VGEJ?+VFQGUPũVWUGEQDCNVYJKEJ love, too. A lot of the things that we have there’s a reason that an individual person
KUCEQPƔKEVOKPGTCN+VFQGUPũVJCXGCU are part of our human lifestyles nowadays taking one fewer car journey per year
much capacity, but it has more cycles, so ťNKMG=OQDKNG?RJQPGUHQTGZCORNG doesn’t necessarily show up at all.
it’s better in some ways – it’s a trade-off. =VJG[ũTGOCFG?KPCYC[VJCVũUTGCNN[ A lot of this stuff is focused on choices
harmful. We also know that a lot of our that huge corporations are making, and
HS Then I suppose you can also make clothes are produced in damaging ways. our leaders or governmental leaders are
hardware more sustainable by making it However, we do have choices that we can making when they could make better
easier to repair when it breaks. choices, but the focus has been


diverted onto us as individuals.
AG Exactly. iFixit has guidelines And so, we’re being made the
for designing your product so that Transparent patsies in their desire to not
it can be easily repaired. So in electronics are change. If we can release
that way, you’re sort of making it
having a comeback ourselves from that guilt, that will
more sustainable. make change more possible.
I gave a talk a few years ago right now. Take, for example, when you’re
about what I called open-ish You know, the whole being shamed, or being made to


hardware, which is sort of the 1990s revival feel guilty: for some people that’s
same idea as using screws instead motivating, and for others, it’s just
of adhesives, and doing what not. We have enough of a problem
some companies do, which is with mental health right now, I
abrade the ID markings off components make, depending on our budget, our level don’t think we need to add to that when
so that users can’t replace them. That’s of privilege, and our access to those we don’t need to, and it’s not helpful, and
obviously an anti-repair, hostile thing choices. For example, it’s easier for it’s not true. We have power to change the
– we can sort of make choices that someone with the means to shop organic conversation, and to make choices, and
are better. or support local businesses, [because spread that information and use our own
There’s a lot of really cool stuff VJG[ũNN?RC[CRTGOKWOHQTVJCV experiments, share what we’ve learned,
going on with updating older Newer technologies that are designed and make that accessible to everyone.
technology, like Joey Castillo’s with an eye on sustainability and fair The fact that we have that power is
sensor watch. So, if you have an labour conditions are going to cost more, kind of amazing. And then the more that
old Casio F-91W, you can put a just because they’re new, or they’re we share with people who are coming up,
new world in it. harder to source, or like, you have to pay like young people, students, people who
Transparent electronics people a living wage. Anyway, these are going to be building stuff tomorrow, as
are having a comeback choices are often hard to make and hard well as today – those are the people who
right now. You know, to adopt. And they require extra research are going to be in the companies
the whole 1990s because they’re not as widely distributed. tomorrow, and be able to have this
revival. And I think And you know, there aren’t big knowledge and provide a starting point to
that’s really cool corporations putting out free tutorials on make better choices for the companies.
as well. It this stuff, because that’s not what Obviously, we’re all still beholden to
obviously helps DGPGƓVUVJGO#PFUQYGNKXGKPVJKU whoever’s above us. For example, at
people who ecosystem where it’s hard to make good Amazon, workers have advocated

55

 
Alex Glow

INTERVIEW

HS So is that what you’re hoping to


achieve with Green-EE.com? More power,
Below
Even when more choice, more information?
the electronics
fail, these PCB
earrings will look AG Absolutely. I’ve been asking myself
damn good
the question, ‘How could I, in good
Image: Alex Glow conscience, start something where I’m
(alexglow.com)
selling electronic things and not feel like
+ũODGKPICLGTM!ũ#PFO[NKODKEDTCKP
comes back with the answer that the best
idea is to just not build it, because you’re
contributing to the problem by building
stuff. But I want to try and look deeper
and turn this into something that we’re
all learning together. I was amazed that a
resource like this doesn’t already exist,
honestly. It came from this talk for the
1RGP*CTFYCTG5WOOKV6JGƓTUVEQWRNG
of months that I was working on the talk,
I was asking people in climate action,
tech, and other communities, ‘if this is
repeating someone else’s work, let me
know. And I’ll just, like, link to that’. And
there was no response.
I still haven’t come across anything
that’s like this project, but I still think it
must be out there. If there are more
=RTQLGEVU?NKMGVJKU+YQWNFNQXGVQJGCT
about them. iFixit has a lot of incredible
TGUQWTEGUDWVVJCVKUURGEKƓECNN[HQEWUGF
on repair, which is just one very
important aspect of this. Then there’s

time and time again for better


practices. And time and time again, the
shareholders have shut them down.
There’s only so much that you can
do. But we can build alternatives so
that people are able to create different
options for others to choose. And then
there’s people who can boost the signal…
everyone has a certain thing that they
can do, you know – some people are
developers; they can build these options.
Some people work with hardware; they
can build those options. Some people
have access to funding, while others
have access to publicity and other stuff.
And in that way, we can give people
more choice, make them feel more
empowered and stop guilting ourselves,
but also realise that we have this power.
It’s beautiful.

56
 LENS


VJKPIUNKMGCWVQEGTVKƓECVKQPCPFVJKPIU
like open-source designs for assembly
and stuff, and information on the
business side. And there’s a huge amount
of content from people developing
websites on like, green or web dev. And
that’s really interesting. And I’ve sort of
put some of that on the site as well. The


goal is to just provide a starting point for
people and link out to a lot of the stuff
that already exists out there – it’s just a
matter of making it more accessible. It’s
me in the present day building something
VJCV+YKNNƓPFWUGHWNKPVJGHWVWTGCPF
that I would have found useful a few
years ago.

HS Are you optimistic that people are


awake to doing the right thing?

AG There’s that William Gibson quote:


‘The future is already here – it’s just not
very evenly distributed’. We have horribly
wasteful things, like dumping potatoes
into the sea to preserve the market
demands. But there’s a lot of exciting
things going on as well; things people are
doing in collaborating with other species.
There’s a lot of work happening with
fungi, and how you can use them for
bioremediation when there are oil spills
or heavy metals. And you can use them
for building materials, like self-healing
construction materials. I wish that I liked
eating mushrooms, because I just hate
them. But I love them in every other way
– I think they’re fascinating.
There’s a building in Hamburg that is
partially powered by these algae panels
on its exterior, which is incredible. People
are using algae for producing oxygen and
eating carbon dioxide – which is what the
QEGCPFQGUTKIJV!+VJKPMVJGTGũUCNQVQH
promise in the idea of biomimicry, where
we’re looking at the solutions that the
Earth already uses
for these things
and emulating Right
Alex’s art – inspired
those. I’m not an by Yuri Gagarin
expert – I’m just among others – has
been in space on
VT[KPIVQƓPFVJGUG satellite 0c66
things out and
Image: Planet
share as I go. (planet.com)

57
Improviser’s Toolbox: Concrete

FEATURE

CONCRETE If you want to make something that lasts, build it


from sand and cement. Rosie Hattersley suggests
making concrete plans

G
iven its use in everyday building by modernist artists such as Barbara Hepworth
projects, concrete seems like a or Henry Moore. Its fine particles mean it can
fairly modern material, but it’s pick up fine detail and texture, which artist and
actually been around for maker Made By Barb exploits in her botanical
thousands of years. The Romans designs, on the facing page.
came up with the formula involving Concrete’s widespread use in construction and
Rosie Hattersley cement, water, sand, and gravel that we recognise DIY projects means there’s every chance you may
as concrete, using it for everything from aqueducts have a leftover bag of cement from a home
@RosieHattersley and temples to the Pantheon. At a mere 1900 years improvement task that could potentially become a
old, this beautiful building is a concrete new-build concrete-based project. As with many building
Rosie Hattersley writes compared to the Egyptian and Turkish subterranean materials, a supply shortage of the cement used to
tech, craft, and life
hacks and tweets water stores and structures that date back 8000– make it has pushed prices up, which is one more
@RosieHattersley. 12,000 years. Robert Courland’s Concrete Planet is a argument in favour of trying to construct some
comprehensive guide to this durable material and concrete items yourself rather than pay even more
provides plenty of inspiration for creative uses: for a builder to do so.
hsmag.cc/ConcretePlanet. Concrete garden planters, DIY paving, and outdoor
furniture can all be made at home. Designs can be

“ The Romans came up with the formula former-free and rustic – such as this table and chair:
hsmag.cc/TableAndChair – but in most cases,
involving cement, water, sand, and you’ll first need to make some form of mould or
gravel that we recognise as concrete” former that you subsequently remove. This wiki on
making a concrete stool is an ideal entry-level
concrete furniture build: hsmag.cc/ConcreteStool.
Concrete lends itself incredibly well to use as a If you’re a woodworker who wants to incorporate
sculptural material, whether that’s large undulating concrete into your repertoire, DIY Pete has a
expanses for wide arches, or a skatepark, Brutalist great concrete-topped table to start you off:
skyscrapers, or large cast forms, as per the designs hsmag.cc/ConcreteTable.

58
LENS

LEAF-CAST
CONCRETE
LAMP Project Maker
Made By Barb
Project Link
hsmag.cc/ConcreteLamp

T
echnical illustrator, and avowed
concrete fan, Barbara has a home
Right
and garden filled with her hardy Concrete can be
creations, most striking of which are used for delicate
structures as well as
the oversized heads used for planters large-scale building
and her half-hidden cast concrete hooded figures.
Her leaf-based lamps formed around Pringles tubes
are height-adjustable and need vinyl tubing to cover
and protect their cables from the concrete. Mesh
wrapped around the crisp can helps the concrete
adhere. The underside of leaves are used since the
veins are much more prominent than on the leaf’s
front. Apply leaves to one side of the tube-can former

“Mesh wrapped around


the crisp can helps the
concrete adhere”
and let it dry before starting on the other side. Once
arranged on the tube former, they should be left in
place until the concrete sets but hasn’t yet caused the
leaves to dry out, after which the leaf can be peeled
off. Apply a very thin layer of paint, followed by a layer
of matte medium.

59
Improviser’s Toolbox: Concrete

FEATURE

CONCRETE
FIREPIT
C
Project Maker oncrete is a fashionable material for back industrial look. Maker Ben’s utilitarian DIY
Ben Uyeda use in kitchens and dining rooms, firepit features alongside other similar projects on
aka and has the durability of marble and Instructables, where he gives full details of how to
HomeMade quartz without the ethical mining ensure the groundwork is done to ensure a safe
Modern issues. HomeMade Modern offers foundation on which to position the outdoor cauldron
details of how to create sharp-lined tabletops, (hsmag.cc/ModernFirePit). Such details are lacking
Project Link side tables, and chairs befitting of the stripped- from the fancier firepit design featured on his own
hsmag.cc/ConcreteFirePit
website, where you can access design files for
“ he gives full details 3D-printable tessellating concrete tiles that you

of how to ensure the assemble to surround your fire. You need to print all
three sizes of the 3D concrete mould in order for the
groundwork is done” design to work.

Right
Multiple small casts
mean you don’t have
to deal with large
amounts of concrete
to get a large structure

60
LENS

CONCRETE CHESS
W
ith summer on its way, it’s handy to She warns that the creation process involves Project Maker
have some al fresco entertainment plenty of patience. Although the pieces may seem Belsey
options in the garden. Maker firm after a few hours, the larger pieces need several
Project Link
Belsey was keen to design her own weeks to fully cure so that they are robust enough for hsmag.cc/
chess pieces for this impressive long-term use. ConcreteChessSet
chequerboard setup, which features figures that
are “proud to be made of concrete” and is available
year round for community garden visitors’ use.
Special cement pigment dye was mixed into the
concrete for the black chess pieces. Most of the
pieces are formed from concrete poured into empty
drinks containers – the king’s crown is the base
from a soft drinks bottle – while ball pit balls provide
moulds for the pawns. Knights and bishops were
made from distinctive geometric shapes cut from
Left
polystyrene. Belsey includes templates for these on Next step: add some
her website (hsmag.cc/Belsey). ISHJR°ZX\HYLZ

OUTDOOR AQUARIUM
A
rmed with some old towels, bricks, water, and then immersed in a concrete mix before Project Maker
and plenty of cement and sand, this being draped over a stool so they would acquire a Gardening
maker set to work turning a corner distinctive, organic-looking form. Once dried stiff, the Ideas
of the backyard into a fishpond towels were placed at the corners of the in-progress
Project Link
with transparent sides (more like an fishpond and the rest of the structure built around it, hsmag.cc/
outdoor aquarium). The towels were soaked in with bricks forming a low wall with window effect OutdoorAquarium

on the front edge, into which Plexiglas was lowered.


This means the fish can be viewed from a wider set
of angles. Concrete was slathered over the remaining

“ towels were soaked in


water, and then immersed
in a concrete mix”
Left
structure to hide the construction fabric, and the Fish deserve
structure painted, before aquatic plants and a water interesting
architecture as
pump were added and fish were introduced. well as humans

61
In the workshop: Sublimation printing

FEATURE

IN THE
WORKSHOP:
Sublimation
printing
By Ben Everard Transfer prints onto mugs and PCBs

A
sublimation printer looks and
works a lot like an ordinary
inkjet printer. You load paper into
it (although it does have to be
proper sublimation paper), plug it
into your computer, and press
print. So far, so ordinary.
The word sublimation means to turn from a solid
into a gas without being a liquid in between. This
stage – the sublimation – is what happens after
you’ve printed onto paper. It means you can turn
the, now solid, ink into gas and transfer it onto
other objects.
When we say other objects – there’s a wide range
of stuff that you can transfer sublimation prints
onto, but not everything. It has to have a coating
that will accept the ink. In most cases, this means
buying a pre-prepared ‘blank’, although you can get
laminates and varnishes that will let you coat the
surface yourself.
Once you have the printed sheet and the object to
Right impress the image on, you just need to stick the
The same PCB is
paper on with heat-resistant tape (aka Kapton tape),
used for both left
and right wing and heat-press it on. This is another limitation on the

62
LENS

You can get heat-presses


that can make custom shapes
range of objects that you can transfer images onto
– you have to be able to heat-press them.
For flat surfaces, it’s pretty easy with a standard
heat-press. You can also get cylindrical presses for
mugs. Beyond that, it’s a bit challenging. For industrial
uses, you can get heat-presses that can make custom
shapes, but that’s probably a little excessive for
hobbyist use.
You have to be able to heat the whole lot up to
about 200°C, so it’s not ridiculously high
temperatures. We have heard of people having Left
success using convection ovens and heat-shrink to Plain white
silkscreen covers the
hold the designs in place, but we’ve not tried this, whole of the PCB
and it’s probably best not to do it in an oven that’s
Below
also used for food. A bit of Kapton tape
holds the PCBs in
We’ve been testing out a range of different place while I heat-
materials and blanks. Mugs, jigsaws, photo-slates, press on the image

63
Improviser’s
In the workshop:
Toolbox:
Sublimation
Paper plates
printing

FEATURE

(slates with a flat side that has a layer of sublimation-


friendly coating), and fabric.
It’s helpful to me if a process is a little tricky or has
a few gotchas. This gives me something to write
about in the article. The problem is, everything went
very smoothly. In fact, the only problem we had in the

It’s helpful whole process was a mug heat-press that just kept
beeping at us, but reading the manual and working

to me if a
out what button to press sorted that out.
Different materials require slightly different
temperatures, and can require radically different

process is a
times. As far as I can tell, heavy things like ceramics
that take a long time to heat up require longer than
lighter things, like jigsaw blanks. However, you should

Below
I’ve made mugs for
our sister magazines
little tricky be able to get the right time from wherever you get
your blanks, if not, you’ll just have to experiment for a
bit. About 60 seconds at 190°C was the quickest we

64
LENS

did (jigsaws), and 240 seconds at 205°C was the RGB LEDs. The design was one wing, but I could just
longest (slate blanks). If you get a sepia tint, leaving flip it over to create the other wing. Above
;OLI\[[LYÅ`»Z
your images looking like they are a few hundred years These came back a week or so later, and it was LEDs can light up
old, then you’ve probably overheated the ink. time to try them out. I didn’t have a specific pattern in HU`JVSV\Y

As a final test, we tried sublimating ink onto a PCB, mind (this was still a test, so I didn’t want to spend
just to see what happens. The initial results were ages on it before knowing if it’d work), so I printed off
really good. While the ink did not have a great deal of a swirling colour image that I found online, stuck a
effect on the FR4, it stuck extremely well to couple of wings to it, crossed my fingers, and started
silk-screened areas. the heat-press.
This meant that we couldn’t just sublimate print The result isn’t quite perfect. The image doesn’t
onto any PCB we wanted – we had to design specific quite have the detail that I’ve been able to get on
PCBs covered in silkscreen to take the ink. I’ve some surfaces. I’m not yet sure if that’s a result
always wanted to make a butterfly PCB. Long-term of the inherent properties of the silkscreen, or if I
readers with a very good memory may remember just haven’t yet dialled in the settings (the PCBs
that HackSpace mag, issue 1, featured a butterfly only arrived a few days before we went to press,
PCB from the now-defunct Boldport Club. In that, so I haven’t been able to properly test the process
they’d used two different silkscreen colours to create out yet). So far, it seems like the ink is very prone
the decorative effect but, in mine, I could just print to overheating with PCBs. The best results that I
whatever I wanted. have had are at 180°C for 60 seconds, but it’s still
This was just a test, so I wanted something that early days.
would look good, but not take too long to design. I This is definitely a ripe area for experimentation if
settled for a circuit that linked up three through-hole you’re interested in making artistic PCBs.

65
3 ISSUES FOR £10
+
FREE BOOK

hsmag.cc/hsbook
„ƚÆŸÏųĜÆåƋ҉Ęåa±č{ĜØB±Ïĩ„ޱÏåĵ±č±DŽĜĹåØŅųƚŸƋŅĵ{ţ¥ŅƚųĀųŸƋƋĘųååĜŸŸƚåŸüŅųƊŎLjØƋĘåĹŅƚųčųå±Ƌƴ±ĬƚåųŅĬĬĜĹčŸƚÆŸÏųĜŞƋĜŅĹ
±üƋåųƵ±ųÚŸţFĹÏĬƚÚ埱üųååƴŅƚÏĘåųüŅųŅĹåŅüĀƴåü±ĹƋ±ŸƋĜÏÆŅŅĩŸ±ƋŸƋŅųåţųŞĜŞų域ţÏÏxÏŅĬĬåÏƋĜŅĹŸxĬ±ƋåŸƋěÆŅŅĩ±DŽĜĹåŸ
ŽUŅĹĬƼţ8ųååÚåĬĜƴåųƼŅĹåƴåųƼƋĘĜĹčţ
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
PG
68
74
SCHOOL OF
FIREFLY MAKING
Get started with Raspberry
Pi Pico and MicroPython Start your journey to craftsmanship
with these essential skills

PG
68 Dithering NeoPixels
78
WEB SENSORS
MADE EASY
Connect Raspberry Pi sensors to PG PG
the web with barely any code
88 94

82
PG
LASER ROCKET
AIRFLOW GLIDER
POLYHEDRONS Sucking and blowing your Shoot your way up
3D shapes from 2D paper way to better cuts and float back down
CircuitPython sequences and adding brightness to NeoPixels

SCHOOL OF MAKING

CircuitPython sequences
and adding brightness
to NeoPixels
Learn to use Python’s dunder methods to add
new features to your classes

Ben Everard
@ben_everard

Ben's house is slowly


being taken over by 3D
printers. He plans to
solve this by printing an
extension, once he gets
enough printers.

I
n CircuitPython, PIO StateMachines have a transfers. It’s not as fully featured as the DMA control
new feature: background_write. This is a that you can get if you program in C, but it is easy to
way of creating a set of data that will then be use and works well in many use-cases.
sent to a PIO program in the background Let’s take a look at one great application for this.
(either once or in a loop). This means that, if Regular readers will know that we’re big fans of
you’ve got a lot of data to send (or need to WS2812B LEDs – sometimes known as NeoPixels.
Above
WS2812B LEDs are a send it continuously), you don’t have to wait around However, one problem is that although they have
great way of adding for it to finish sending. As soon as you issue this 24-bit colour, there is no gamma correction. This
a bit of interest to
your project, or an instruction, the system will start the transfer, and then means that the 8 bits per colour channel is spread
interesting light return control of the processor back to the program evenly through the colour range, and there are very
pattern could be a
project in itself so your code will continue to run while the data few brightness levels available at the low end.

68
FORGE

There is a way around this – dithering. Basically,


this means flicking between different brightness
levels very quickly.
Let’s take a look at how to do this. Along the way
we’ll look at Python sequences – this is the
mechanism that lets us create list-like objects.
If you’ve used NeoPixels with CircuitPython before,
you’ve probably noticed that you can use a NeoPixel
object like a list. For example, to set the third pixel
red, you can use code like:

pixel[2] = (100,0,0)

This works even though pixel is a NeoPixel object


and not a list. This neat little feature of Python isn’t
pull block side 0
available in many other languages. It lets us create
out y, 32 side 0 ; get count of Above
sequences of things that work like lists because If you’ve not used
NeoPixel bits CircuitPython before,
semantically they are like lists even though, at a
you can get started at
syntax level, they’re not lists. We can do this because learn.adafruit.com/
bitloop: welcome-to-
the Python interpreter will pass this through to a
pull ifempty side 0 ; drive low circuitpython
special method.
out x 1 side 0 [5]
In Python (and therefore CircuitPython), this
jmp !x do_zero side 1 [3] ; drive high
particular syntax is akin to:
and branch depending on bit val
pixel.__setitem__(2,(100,0,0)) jmp y--, bitloop side 1 [4] ; drive high
for a one (long pulse)
Dunders (double unders before and after) are
jmp end_sequence side 0 ; sequence is
special methods that are invoked by the Python
over
interpreter at particular times. The most common one
is __init__ that you will come across if you’ve ever
do_zero:
created a class, but there are a few. As well as
jmp y--, bitloop side 0 [4] ; drive low
__setitem__, we’ll use __len__, which is called
for a zero (short pulse)
whenever a programmer uses len(), to determine the
length of our LED string.
end_sequence:
pull block side 0 ; get fresh
FLASHING LIGHTS
delay value
Let’s take a step back, though, and look at how
out y, 32 side 0 ; get delay
we send data to the LEDs. This is done using a
count
PIO program:
wait_reset:
_program = Program( jmp y--, wait_reset side 0 ; wait until
""" delay elapses
.side_set 1 opt .wrap
.wrap_target """
)

This isn’t really a tutorial about writing PIO


__GETITEM__ programs – we’ve covered this before – so we’ll only
Typically, a sequence would have a __getitem__ look at this briefly.
dunder which allows you to query a point in the PIO programs read in data from the transmit FIFO.
sequence. However, in our pixels, it’s not quite This program first reads in 4 bytes and loads them
this simple because we’re not actually storing the into the y scratch register. It uses these a bit like the
values that a program sets. We only have the various counter in a for loop to count the number of bits of
different values. In theory, you could work backwards
data to send (typically, this will be 24 times the
to recreate the level, but that’s beyond the scope of
this article. number of pixels with eight values each for red,
green, and blue).

69
CircuitPython sequences and adding brightness to NeoPixels

SCHOOL OF MAKING

For example, if we flick back and forwards between


level 5 and 6, we’ll get a brightness that appears
about halfway between them. If it spends longer at
level 5 than 6, then it’ll seem closer to level 5 than 6,
so we can create multiple sub-levels of brightness.
The key parts of our code need to do two main
things. First, we need to create a byte array with the
bit counts and pause counts in place. We then need
to work out a way of deciding what levels to give the
LEDs to get the levels of brightness we want.
We create our blank buffer inside our class’s
__init__ method:

class DitheredNeopixel:
def __init__(self,pin, number, extra_bit_
depth, order=None, bpp=3,):
self.byte_count = bpp * number
self.bit_count = self.byte_count * 8
For each bit it sends out, it will send a single pulse
self.padding_count = -self.byte_count % 4
which will either be high for 2/3rds and low for 1/3rd
self.bpp = bpp
(a logical 1), or high for 1/3rd and low for 2/3rds
self.extra_bit_depth = extra_bit_depth
(logical 0). The processor sends out the values for
each LED in turn.
self.pixels = number
After the allotted number of bits have been sent,
the protocol dictates that the data channel must be
self.pix_sm = StateMachine(
held low (i.e. at 0 V) for a set amount of time to reset
_program.assembled,
the strip. This is done by loading in another 4 bits into
auto_pull=False,
the y scratch register and just running an empty loop
ǙƌƖƢȱƖļďĕƖĕƢȱƉļŝɲƉļŝȤ
that many times.
out_shift_right=False,
Once it reaches the bottom of the program, this
pull_threshold=32,
loops back around to the start, and loads 4 bytes into
frequency=12_800_000,
the y scratch register and then sends out the bits
**_program.pio_kwargs,
again. The LEDs will stay at their previous colour until
)
a new colour is sent to them, so in normal operation,
you don’t need to continuously send out data.
# backwards, so that dma byteswap corrects
However, we want to flick through different
it!
brightness levels as quickly as possible.
header = struct.pack(">L", self.bit_count
- 1)
BITSTREAM
trailer = b"\0" * self.padding_count +
Our data stream needs to include the bit counts and
struct.pack(">L", 3840)
the timing count at the end, as well as actual data
for the LEDs. So, let’s take a look at how this will
self.buf = bytearray((8+self.padding_
actually work.
count+self.byte_count)*self.extra_bit_depth)
We want to create ‘sub-levels’ of brightness. That
means that if the LED can have a brightness of, for
offset = 0
example, between 5 and 6, we want to create steps
for i in range(self.extra_bit_depth):
between these two. We can do this by flicking
for j in range(4):
backwards and forwards between the two levels very
self.buf[offset+j] = header[j]
quickly. We’ll create a bitstream with more than one
Above for j in range(self.padding_count+4):
The wiring is simple: set of data so the whole thing will be sent in one go.
you just need 5 V
self.buf[offset+self.byte_
First, it’ll set the LEDs to one brightness level, then
output (from VBUS), count+4+j] = trailer[j]
ground, and signal. another, and then another and so on. It’ll do this faster
The connections offset = offset+self.byte_
than our eyes can see, so this will create intermediate
should be marked on count+8+self.padding_count
your LED strip brightness levels.

70
FORGE

error = 0
The parameter extra_bit_depth is used to hold the
for byte in range(self.extra_bit_
number of sequences of the data we’ll hold. This
depth):
isn’t actually bit_depth since if we hold four copies
val = (colour[i] + error) >>
of the data, that’s not equivalent to four more bits,
self.extra_bit_depth
it’s only equivalent to two bits, but this doesn’t
affect the running of the code, it’s just terminology.
self.buf[(self.byte_count+self.
The buf variable is a buffer that holds all the data
padding_count+8)*byte + 4 + number*3 + i] = val
for all the runs. However, we have to have a header
error = (colour[i]+error) - (val
and a trailer for each run to set up the bit count and
<< self.extra_bit_depth)
pause correctly.
As we mentioned at the start, we need the This uses a dithering algorithm that keeps track of
__setitem__ method so that we can use Python’s the difference between what the LED should show
sequence syntax to update the list. This method has and what it has shown with the different levels up to
to take three parameters – self, the position in the this point.
sequence, and the value that we want to assign to We now have a class that we can use more or
that position in the sequence. less like the classic NeoPixel class, except that
Our LEDs take three values – one each for red, we can set brightnesses beyond the original 8 bits
blue, and green – however, we can get around this per channel.
by taking a tuple. This means that we assign a colour Of course, in this example, we haven’t added any
to a pixel with: error checking, so it’s probably possible to get it into
some strange states! You might also find that some
pixel[i] = (10,20,30)
LEDs have red, green, and blue in a different order.
The code for this is: You can swap this around in your code.
You can grab all the code for this project from
def __setitem__(self, number, colour):
hsmag.cc/DitherNeoPixel. It’s unpolished, but you
for i in range(self.bpp):
can tweak it to your heart’s content to make it work
ȩǙŝďĈŒŦƖĕƖƢǧĆļƢǁëŒƪĕ
in your project.

Left
We’ve used a
breadboard to make
the connections
easier, but you can
also solder them in
place or use headers

71
THE OFFICIAL
Raspberry Pi
Beginner’s Guide
The only guide you
need to get started
with Raspberry Pi
Inside:
Now • Learn how to set up your Raspberry Pi,
includes install an operating system, and start using it
Scratch 3 • Follow step-by-step guides to code your
projects!
own animations and games, using both the
Scratch 3 and Python languages
• Create amazing projects by connecting
electronic components to Raspberry Pi’s
GPIO pins

Plus much, much more!

£10 with FREE


worldwide delivery

Buy online: magpi.cc/BGbook


LED firefly

TUTORIAL

3,+ÄYLÅ`
Learn MicroPython and create your
own electronic pet

I
n this project, you’ll use a Raspberry Pi
Pico to make an LED firefly that flashes
in a particular pattern, just like fireflies in
nature, and connect a switch to control
the light.
To complete this project you will need a
Rebecca Franks few common components.
You can purchase all the required hardware for
@FranksberryPi
this project, and the other projects in this path,
from most hobbyist electronics stores, but there’s
Rebecca is a learning
manager at the Raspberry
a kit specifically for the Pico learning path (see box)
Pi Foundation. She available from Pimoroni (hsmag.cc/PicoIntroKit).
creates computing Before diving into the project, you’ll need to
resources for teachers
and young digital makers. attach a resistor and jumper wires to the LED, as
She has over 15 years shown in the information box on this project page: Pico)’, then click on the text and select ‘MicroPython
experience teaching hsmag.cc/PicoLEDs. (Raspberry Pi Pico)’. If you have never used
computing.
We’ll be using Thonny to program Pico. If you’re MicroPython on your Raspberry Pi Pico, then Thonny
using a Raspberry Pi computer, you should already will prompt you to add the MicroPython firmware.
have Thonny installed. If you’re using a different Click Install.
machine, you can download and install it from To complete the projects in this path, you will
thonny.org. need to install the picozero library as a Thonny
Now we’ve got all the bits for our project, package. In Thonny, choose Tools > Manage
let’s get started. First, we need to set up Pico to packages, then in the pop-up ‘Manage packages
run MicroPython. for Raspberry Pi Pico’ window, type ‘picozero‘ and
Connect the small end of your USB cable to the click Search on PyPi. Click on picozero in the search
Raspberry Pi Pico, then connect the other end to results, and click on Install. When installation has
your computer, laptop, or Raspberry Pi. completed, close the package window, then exit and
Open the Thonny editor, and look at the text in reopen Thonny.
Right
The tape isn't the bottom right-hand corner of the Thonny editor. If you have difficulties installing the picozero
needed, but It will show you the version of Python that is being library in Thonny, you can download the library file
does add a little
NYHWOPJHSÅHPY used. If it does not say ‘MicroPython (Raspberry Pi and save it to your Raspberry Pi Pico.

74
FORGE

Now we’ll light the tiny LED that sits on the top
of your Raspberry Pi Pico. This will check that your
Raspberry Pi Pico is set up correctly.
Create a new file in Thonny by clicking File > New
in the top menu bar. An empty workspace will open.
The picozero library allows you to program
electronics components that are attached to a
Raspberry Pi Pico. At the top of your code, you will

” The LED will only


light for one second,
so make sure you


are watching

need to import the items that you need from the


picozero library.
Type the following code into the main editor pane
in Thonny:
Choose a location on your computer such as your
from picozero import pico_led
‘Documents’ folder. Name your file firefly.py. Above
)`WYLZVSKLYPUN
Now let’s test the code. Thonny has a green play `V\Y3,+Z[VYLZPZ[VYZ
pico_led.on()
button with a small white triangle inside it. Pressing `V\JHUI\PSKJPYJ\P[Z
with jumpers
Choose File > Save As. Thonny will ask whether this button allows you to run your code. Press this
you want to save the file on This computer or the button to run the code.
Raspberry Pi Pico. Choose This computer to save Check that the small LED on the Raspberry Pi Pico
your code to your computer. turns on.
The LED will stay on until you write code to turn it
off, or you unplug the Raspberry Pi Pico.
PICO PATH
The Raspberry Pi Pico is a low-cost microcontroller ON AND OFF
device. The Raspberry Pi Foundation has developed The sleep module allows you to pause your code for
a new path of projects to allow complete beginners a specified number of seconds. Update your code to YOU’LL NEED
to make engaging, interactive gadgets with a small the below to turn the LED on, wait one second, and
kit list of low-cost materials, including a Raspberry A Raspberry
then turn it off. Pi Pico with
Pi Pico, RGB LEDs, passive buzzers, and everyday
craft supplies. The projects use MicroPython with pin headers
from picozero import pico_led soldered on
the new ‘picozero’ beginner library that allows you to from time import sleep
write code such as led.pulse() to pulse an LED. You A data USB-A to
don’t need a breadboard, and you don’t need to solder micro USB cable
components (unless you want to). The projects have pico_led.on()
sleep(1) Yellow LED (or any
been designed for young creators from age 9 to 13, but
colour you prefer)
they are also suitable for older makers who haven’t pico_led.off()
found a way to get started with microcontrollers. The іѕѕђɨljɰȈɰɽɁɨ(any
path of six projects starts with three step-by-step Click the green play button. Thonny will save ɨljɰȈɰɽɁɨǹɨɁȴќњђ
projects to create an LED firefly, a party popper, and a the file on your Raspberry Pi Pico and then run the ɽɁїїѕђʥȈȢȢʥɁɨȟӰ

beating heart. The next two projects guide you through new code. ĀȈȶӵɰɁƺȟljɽ
designing and making a mood indicator and a sound Check that the LED turns on and then goes off jumper wire
machine. Finally, you are encouraged to apply your again. The LED will only light for one second, so
skills to invent and make a sensory gadget. The projects јԺɰɁƺȟljɽӵɰɁƺȟljɽ
make sure you are watching. Run your code as many jumper wire
are ideal for learners at home or in clubs and maker
spaces. Check out the Introduction to Raspberry Pi Pico times as you like.
Optional:ČɽȈƺȟʰ
path at hsmag.cc/PicoProjects. Let’s now switch to an external LED that we can tape (invisible tape
use for our firefly. ʥɁɨȟɰƹljɰɽӰ

75
LED firefly

TUTORIAL

Enter the code to light your firefly:

from picozero import pico_led, LED


from time import sleep

pico_led.on()
sleep(1)
pico_led.off()

ǙƌĕǚLjɲf-'ȺǠǢȻȩ½ƖĕFžǠǢ
ǙƌĕǚLjȪŦŝȺȻ

You can optionally cut some wings out of folded-


over sticky tape and stick them to your LED. Invisible
Right tape works well.
7PJVOHZHI\PS[PU
3,+PU[OL[VWYPNO[ Now we’ve lit up the LED, let’s make it blink.
hand corner Change your code to make the firefly blink on and off
Below in a while True: loop. The timings represent the light
The LED connects
between GP13
patterns of a real firefly.
and Ground Make sure that the code on lines 11–14 is
indented.
In this step, you will use jumper wires to connect
ǙƌĕǚLjɲf-'ȺǠǢȻȩ½ƖĕFžǠǢ
an LED with a resistor to your Raspberry Pi Pico and
write code to light it.
while True:
Make sure that you have an LED connected to a
ǙƌĕǚLjȪŦŝȺȻ
resistor and two socket–socket jumper wires. The
sleep(0.5)
colour of the jumper wires does not matter – they all
do the same thing.
Fireflies are usually yellow, orange, or green, but
you can choose any colour you like.
A resistor controls the current that flows through
a circuit. This protects the LED from burning out and
will make it last longer.
Raspberry Pi Pico has 40 pins on its board. Pins
allow you to connect external components to the
Raspberry Pi Pico.
Explore your Raspberry Pi Pico and find the pin
that is labelled GP13. You will notice that there are
labels for each pin on the underneath side of the
Raspberry Pi Pico.
Connect the jumper wire that is attached to the
positive leg of the LED (the one with the resistor) to
pin GP13. Push it until the black plastic meets the
base of the header.
Connect the jumper wire that is attached to the
negative leg to the GND (ground), below GP13. This
completes the circuit, allowing electrical current to
flow when instructed by your code.
In the last step, you used pico_led to light the LED
on the Raspberry Pi Pico. To add your own LEDs,
you need to import LED from picozero.
Add , LED to the end of the import list on line 1.
Next, set your firefly LED to GP13 and enter the
code to switch it on.

76
FORGE

ǙƌĕǚLjȪŦįįȺȻ
sleep(2.5)

USER INPUT
It’s useful to be able to control when your LED firefly
starts blinking and to be able to turn it off from
the device.
The Raspberry Pi Pico can detect when an input is
connected between GND and one of the GP pins.
The simplest kind of switch is two jumper wires
that can be connected together to close the switch,
Left
or separated to open the switch. Find one pin–socket ;OPZPZHSS`V\ULLK
jumper wire and one socket–socket jumper wire – MVY`V\YÄYLÅ`
the colours do not matter. Connect one jumper wire
ƖŒĕĕƉȺǡȪǤȻȩ©ƢëLjŦįįįŦƌǡȪǤƖĕĈŦŝďƖ
to GP18 and the other to GND. It doesn’t matter
ĕŒƖĕȣȩÕļƌĕƖëƌĕŝŦƢĈŦŝŝĕĈƢĕď
which jumper wire you connect to which pin.
ǙƌĕǚLjȪŦįįȺȻ


ƖŒĕĕƉȺǟȪǠȻȩ©śëŒŒďĕŒëLj

The simplest kind of switch Make sure the jumper wires are not connected,
then run your code.
is two jumper wires that can Now connect the jumper wires together. The
be connected together to


firefly should start to blink.

close the switch


Disconnecting the jumper wires will not stop
power to the LED firefly immediately. The firefly only
turns off when the ǙƌĕǚLjȪŦįįȺȻ code runs.
To add switches, you need to import Switch from
the picozero library. GOING FURTHER
Add, Switch to the end of the import list on line 1. If you have time, upgrade your firefly project. You
Next, set your switch to GP18: could use your project as a room decoration to
remind you of nature when you are indoors.
from picozero import pico_led, LED, Switch
from time import sleep
You could upgrade your project by:
• Adding another LED firefly and making it flash
pico_led.on()
in the same pattern.
sleep(1)
pico_led.off()
• Changing the flash pattern – you could research
the flash patterns of fireflies in nature.
ǙƌĕǚLjɲf-'ȺǠǢȻȩ½ƖĕFžǠǢ
ƖǂļƢĈķɲ©ǂļƢĈķȺǠǧȻȩ½ƖĕFžǠǧ
• Put your LED firefly in a jar. You could even
When you connect the two jumper wires together, use conductive thread to hang an LED from
this completes a circuit and allows the Raspberry Pi the lid.
Pico to detect that the switch is closed.
Add code to check if your switch is_closed (the
jumpers are connected) and only blink the firefly if it
LED
is closed: LED stands for light-emitting diode. It uses
electroluminescence, which is where a material lights
ƖǂļƢĈķɲ©ǂļƢĈķȺǠǧȻȩ½ƖĕFžǠǧ up when an electrical current passes through it. An
LED has two legs – a long one and a short one – and
while True: must be connected the right way around. The long
ļįƖǂļƢĈķȪļƖȱĈŒŦƖĕďȣȩÕļƌĕƖëƌĕĈŦŝŝĕĈƢĕď leg is positive (+) and the short one is the negative (-).
ǙƌĕǚLjȪŦŝȺȻ Another way to check if a leg is positive or negative is
to use your finger to find the flat side of the LED bulb.
ƖŒĕĕƉȺǟȪǤȻȩ©ƢëLjŦŝįŦƌķëŒįëƖĕĈŦŝď
The flat side is on the same side as the negative leg.
ǙƌĕǚLjȪŦįįȺȻ

77
CDP Studio: Sense HAT

TUTORIAL

CDP Studio:
Part 02

Sense HAT
Use the low-code, block-based environment of
CDP Studio to read sensors on a Sense HAT

A
s an ‘out of the box’ software development we’ll be reading the signals from the numerous
tool, CDP Studio is used to build industrial sensors on a Sense HAT attached to our Raspberry
control, automation, and edge systems. Yet Sl1#Xvlqj#FGS#Vwxglrġv#exlow0lq#ĠVhqvhKDWġ#uhflsh/#
Phil King
WRITER

it’s fairly easy to get to grips with its low- (or even this is very easy to do – programming-wise, this
Long-time
no-) code programming environment, and you can project only involves a single preset block in the
contributor to The deploy projects to a Raspberry Pi. Eorfn#Hglwru1#Zh#fdq#wkhq#glvsod|#wkh#uhdglqjv#
MagPi, Phil is a Odvw#wlph/#zh#fuhdwhg#dq#dss#wr#ľdvk#OHGv# with a variety of widgets and graphs in a web GUI
freelance writer and
frqqhfwhg#wr#d#Udvsehuu|#Sl#lq#glļhuhqw#sdwwhuqv/# that can be viewed in a browser on any device on
editor with a focus
on technology. selectable on a web GUI. In this second tutorial, the network.

@philkingeditor

We program the project


on a PC. When deployed
to Raspberry Pi, the web UI
(shown on-screen) can be
accessed from any device

The Sense HAT board


is packed with sensors
You’ll Need that we can read

> Linux or Windows PC


The project is deployed
> CDP Studio from the CDP Studio PC
cdpstudio.com/ to Raspberry Pi via SSH
getstarted
> Raspberry Pi

> Raspberry Pi
OS (Bullseye or
Xåč±ÏƼƤƴåųŸĜŅĹš

> Sense HAT

78
FORGE

Install the software


01 Visit cdpstudio.com/getstarted and
download the free non-commercial version for
Olqx{#ru#Zlqgrzv1#Gxulqj#lqvwdoodwlrq/#pdnh#vxuh#
you select both the Raspberry Pi ARMv8 32-bit
+Gheldq#44,#dqg#Udvsehuu|#Sl#DUPy9#650elw#+Gheldq#
43,#frpsrqhqwv/#dorqj#zlwk#wkh#rqh#douhdg|#wlfnhg#
for your host PC. You will then be able to deploy
projects to any Raspberry Pi model, using Raspberry
Pi OS Bullseye or Legacy version, by selecting the
dssursuldwh#wrronlw#lq#FGS#Vwxglr1

humidity, and two temperature outputs depending  ‰


 ĘåŞųåÏŅĹĀčƚųåÚ
SenseHAT block
on which sensor you want to use. ŞųŅƴĜÚåŸųå±ÚĜĹčŸ
Prepare Raspberry Pi from all the
02 Li#|rxġyh#iroorzhg#wkh#Ľuvw#wxwruldo/#|rxu#
sensors, seen
here in the right-
hand panel
Raspberry Pi should already be ready to use with
Deploying the program
FGS#Vwxglr1#Li#qrw/#|rxġoo#qhhg#wr#suhsduh#lw/#zklfk#
involves enabling SSH and modifying its
05 This time, there’s no need to add any other
/etc/security/limits.conf#Ľoh#Ğ#vhh#magpi.cc/ blocks to the application, nor wire anything up. The
cdprpisetup for details. SenseHAT component will work as it is to take live
readings from the HAT’s sensors. Let’s try it out by
deploying the application.
Wr#gr#vr/#jr#wr#wkh#Ghsor|#FrqĽjxudwlrq#wde#dqg#
Start a new project
03 Unlike last time, there’s no need to create
vhohfw#ZlIl#xqghu#Qhwzrunv#wr#vkrz#ghylfhv#rq#|rxu#
network. Find your Raspberry Pi by its IP address,

Top Tip
a library for this project. So just go to File > Create enter pi as the Username, and click Pair, then enter
Qhz#dqg#fkrrvh#FGS#V|vwhp1#Jlyh#lw#d#qdph#+vxfk# its password.
as SenseHAT) and click Next, then Next again. From Now make sure its IP address (or name if you’ve
wkh#Dssolfdwlrq#W|sh#gurs0grzq/#fkrrvh#ZheXL#wr# uhqdphg#lw,#lv#vhohfwhg#xqghu#Ghylfh#lq#Dssolfdwlrqv/# Deploy on PC
automatically create a web UI for it – although if and that you have the relevant Toolkit selected
Before deploying
you forget to do this, you can always add one later. for your version of Raspberry Pi OS: Raspberry
the project on
Now click Finish to create the system. Unless you Pi ARMv8 for Bullseye, or Raspberry Pi/Raspbian
Raspberry Pi, you
changed it, its default app will be SenseHATapp, DUPy9#iru#Ohjdf|1 may want to test
as shown in the hierarchy in the left panel of Right-click SenseHAT in the left-panel hierarchy it by running it
FrqĽjxuh#prgh1 and choose Run & Connect to run the application on on the local PC,
|rxu#Udvsehuu|#Sl1#Zdlw#iru#lw#wr#ghsor|1#Qrz#vhohfw# in which case
the web GUI is at
wkh#VhqvhKDW#frpsrqhqw#lq#wkh#Eorfn#Gldjudp#dqg#
http://127.0.0.1:
you’ll see the live signals from the HAT’s sensors in
7689/index.html.
Add SenseHAT component
04 Lq#wkh#Eorfn#Gldjudp#wde/#|rxġoo#vhh#wkh#
the right-hand panel.

dssolfdwlrq#eorfn1#Hlwkhu#grxeoh0folfn#lw#ru#folfn#
wkh#dss#lq#wkh#klhudufk|#wr#rshq#lw#xs1#Grqġw#zruu|#
about the default blocks there. In the bottom-left
panel, under Resources, open the I2CIO category.
Now drag the SenseHAT component there into the
middle of the block diagram.
As you can see, it has outputs (on the right of
the block) for all of the Sense HAT’s sensors. These
Copy the
include angular rates and acceleration for the X, Y, path for each
Z axes of the HAT’s gyroscope and accelerometer, sensor output
in the block
to sense orientation and movement in three to link it to
ƋĘåųåĬåƴ±ĹƋ
glphqvlrqv1#Wkhuh#duh#dovr#pdjqhwlf#Ľhog#rxwsxwv#
widget in the
for its magnetometer. Finally there are pressure, web GUI

79
CDP Studio: Sense HAT

TUTORIAL

Ğ#dqg#Frs|#Sdwk1#Edfn#lq#Ghvljq#prgh/#sdvwh#lw#
lqwr#wkh#Ľhog#iru#fgsUrxwlqj#dw#wkh#erwwrp#ri#wkh#
properties panel.

Test your first meter


07 Let’s check our GUI and temperature meter
are working correctly. As before, right-click
the system name in the hierarchy and choose
Design a web GUI
06 That’s all very well, but it’s not the most
Run & Connect. Once it has been deployed, the
Application Output panel at the bottom will show
user-friendly way to view the sensor readings. the URL for the web GUI. It will be your Raspberry
Right-click the system or app name in the Pi’s IP address followed by :7869/index.html
hierarchy panel and select Stop. – for example, ours was “192.168.1.112:7689/
Jrw#wr#Ghvljq#prgh#wr#vwduw#ghvljqlqj#d#zhe#JXL# index.html.”
to show your readings. In the left panel, you’ll see Open it in a web browser and you should
a variety of elements that you can add to the GUI see the meter in your GUI showing the current
fdqydv#lq#wkh#plggoh1#Zhġoo#vwduw#e|#dgglqj#vrph# temperature reading.
widgets to show the temperature, pressure, and
humidity readings from the Sense HAT.
Zh#rswhg#wr#xvh#d#vwdqgdug#Phwhu#zlgjhw#iru#
Add more meters
ours, but you could use a Vertical Bar (under
Glvsod|#Zlgjhwv,#iru#rqh#ru#pruh#uhdglqjv#li#|rx#
08 Vwrs#wkh#dssolfdwlrq#iurp#uxqqlqj1#Zhġoo#
prefer. Simply drag the widget from the left panel now add meters for pressure and humidity to our
onto the canvas to add it. In the bottom-right zhe#JXL1#Lq#Ghvljq#prgh/#gudj#d#phwhu#ryhu#iru#
Creating the web properties panel, you can then alter its minimum both (or copy and paste your temperature meter).
GUI in Design and maximum values (in minValue and maxValue) Then change the min and max values and text
mode. Paste the
routing for the dqg#wh{w#odehov#+wh{wSuhĽ{#dqg#wh{wVxĿ{,1#Iru#rxu# labels in the properties panel, as we did before.
sensor output into temperature meter, we set min and max values to For our pressure meter, we opted for min and
the meter widget’s
ÏÚŞŅƚƋĜĹčĀåĬÚ 053#dqg#83/#dqg#odehov#wr#Fhovlxv#dqg#Whpshudwxuh1# pd{#ydoxhv#ri#;:3#dqg#4433/#zlwk#wh{w#odehov#ri#
You can alter To send the sensor data to the meter, you will hPa and Pressure. For the humidity meter, the
ƋĘåƤĀĬĬÏŅĬŅƚųŸ need to add the routing for it. Go back to the Block plq#dqg#pd{#ydoxhv#vkrxog#eh#3#dqg#433#+dv#lwġv#
for the meters if
ƼŅƚĬĜĩ娱ĹÚåƴåĹ Gldjudp#dqg#uljkw0folfn#wkh#VhqvhKDW#rxwsxw# always a percentage), while the text labels are %
±ÚÚƤÏŅĬŅƚųåÚ
you want – we chose Pressure Temperature (the and Humidity.
ŸåÏƋŅųŸüŅųÚĜýåųåĹƋ
ƴ±Ĭƚåų±ĹčåŸ temperature reading from the pressure sensor Again, you will need to add the routing for each
meter so it displays the correct sensor signal.
So right-click the relevant output (Pressure or
Humidity) of the SenseHAT block in the Block
Gldjudp/#vhohfw#Frs|#Sdwk/#dqg#Ğ#lq#Ghvljq#Prgh#Ğ#
sdvwh#lw#lqwr#wkh#fgsUrxwlqj#Ľhog#ri#wkh#surshuwlhv#
panel for the meter.
If you want to get creative, you can alter the
ĽooFroru#ydoxhv#lq#wkh#surshuwlhv#wr#fkdqjh#wkh#
frorxu#ri#hdfk#phwhuġv#Ľoo#frorxu#vr#wkh|ġuh#qrw#doo#
blue. For our temperature meter, we also set min
dqg#pd{#ydoxhv#iru#QrupdoFroru/#ZduqlqjFroru/#
dqg#ZduqlqjKljkFroru#wr#doorfdwh#wkh#frorxuv#wr#d#
range of temperatures on our meter.
Zkhq#uhdg|/#uxq#wkh#dssolfdwlrq#djdlq#dqg#
you should see all three meters in the web GUI,
showing the relevant sensor readings.

80
FORGE

DOWNLOAD
THE FULL CODE:
magpi.cc/github

Creating a graph in
Design mode. Paste
the routing paths for
the sensor outputs
into the String List

 ‰
 ĘåĀĹĜŸĘåÚƵåÆ
GUI, with meters
for temperature,
pressure, and
humidity, plus a
graph plotting the
three axes of the
accelerometer

Add a live graph


09 Meters and display widgets aren’t the only
refresh it so you see the revised GUI. Under your
three meters, the graph should show the current
way to display data in the web GUI. Let’s add a dffhohurphwhu#uhdglqjv1#Zlwk#Udvsehuu|#Sl#o|lqj#
Vljqdo#Judsk#wr#rxu#JXL1#\rxġoo#Ľqg#lw#xqghu#Judsk# ľdw/#wkh#]#d{lv#uhdglqj#vkrxog#eh#4J#+wkh#rwkhuv#3,1#
Zlgjhwv#lq#wkh#ohiw#sdqho#ri#Ghvljq#prgh1#Gudj#lw# If you tilt Raspberry Pi up to stand on its short side,
into the GUI canvas (you may need to expand the
latter) and alter its size accordingly.
wkh#[#uhdglqj#zloo#eh#4>#vwdqg#lw#rq#lwv#orqj#vlgh#dqg#
wkh#\#ydoxh#zloo#eh#41#Wr#jhw#kljkhu#uhdglqjv/#wu|#
Top Tip
Zh#rswhg#wr#vkrz#wkh#uhdglqjv#iurp#wkh#Vhqvh# shaking Raspberry Pi!
Random issue
HAT’s accelerometer for our graph. In the graph’s
surshuwlhv#sdqho/#vfuroo#grzq#wr#Ľqg#fgsVljqdov/# Taking it further When the project
then click Change String List next to it. This brings Zh#qrz#kdyh#d#zhe#JXL#vkrzlqj#olyh#uhdglqjv# has been deployed
up a dialog where you can paste the routing for from the Sense HAT. You could add more sensor on a Windows
each sensor output you want to add. As before, you readings to it, alter its layout, or jazz it up however PC, the three
AddRandom
can obtain the routing by right-clicking the output you want. You could also log your sensor data using
blocks will set the
ri#wkh#Vhqvh#KDW#eorfn#lq#wkh#Eorfn#Gldjudp#dqg# d#FGSOrjjhu#eorfn#Ğ#vhh#magpi.cc/cdplogger for
same value at the
selecting Copy Path. Our paths were SenseHATApp. more details – and plot it on a graph using the same time, turning
SenseHAT.AccelerationX and so on (replacing X Gdwdedvh#Judsk#zlgjhw#lq#Ghvljq#prgh1 all three LEDs
with Y and Z). You’re not restricted to the Sense HAT either: ŅĹxŅýƋŅčåƋĘåųţ
Zh#dovr#vhw#wkh#|D{lvPlqYdoxh#dqg#|D{lvPd{# you could read values from sensors connected to When deployed
Value for the graph to -2 and 2 – since we found the GPIO pins on Raspberry Pi using a GPIOServer to Raspberry Pi,
however, each
them to be the min/max G values read from the eorfn#+dv#zh#xvhg#lq#sduw#rqh,1#FGS#Vwxglr#dovr#
individual LED will
Sense HAT’s accelerometer. Of course, you could features built-in support for I2C devices and the toggle randomly.
add other sensor readings to the graph if you want, DGV4448#DGF#Ğ#vhh#magpi.cc/cdpi2cio.
or even add a second graph for something that
qhhgv#d#glļhuhqw#yhuwlfdo#vfdoh1

Test it out
10 Our web GUI now features meters for
temperature, pressure, and humidity, along with
a signal graph to show live readings for the three
axes of the accelerometer. Let’s try it out.
As before, Run & Connect the application to
deploy it to your Raspberry Pi, then visit the
web GUI URL in a web browser – don’t forget to

81
Polyhedra

TUTORIAL

Polyhedra
Maths doesn’t have to involve solving equations, as Mike Bedford
proves by showing you how to make polyhedra using card and glue

P
olyhedra are three-dimensional When we turn our attention to three-dimensional
mathematical objects, so making space, we find polyhedra instead of polygons.
them as physical models might A polyhedron is a three-dimensional figure with
seem an obvious thing to do. multiple faces and their names are similar to those
Building them was once a popular of polygons. So, for example, we have tetrahedra,
activity among those with a hobby pentahedra, hexahedra, and heptahedra. Like
Mike Bedford interest in maths, and even by those with a polygons, polyhedra can be regular; in this case, that
passion for arts and crafts. But in the past couple means all the faces are identical regular polygons,
Despite loving all things of decades, physical models have lost support in and all the angles at any corner are equal. But here’s
digital, Mike admits to
being a bit of a Luddite,
favour of on-screen images. We wouldn’t want to an interesting thing: while there’s an infinite number
vinyl records and all. dismiss the appeal of computer-rendered models of of regular polygons, the same isn’t true of polyhedra.
polyhedra, but we think that physical models also It might seem surprising, but there are only five
have their appeal. After all, there’s surely something regular convex polyhedra, the so-called Platonic
rather special about an object you can admire as solids, which are the cube, regular tetrahedron,
you hold and rotate it in your hands, so we’re going regular octahedron, regular dodecahedron, and
to turn back the clock. If you’d like to make your regular icosahedron. And in case you’d wondered, as
own impressive polyhedral models, just collect we had… you probably figured from the ‘poly’ that a
together some sheets of coloured card and some polyhedron has lots of something, and let’s face it,
glue, and read on. they have lots of all sorts, but it transpires the Greek


word ‘hedra’ means base or seat.

There’s an infinite number of polygons, MAKING PLATONIC SOLIDS


depending on the lengths of their sides and their Before looking at how to make a polyhedron, let’s


think about taking a cube like a cardboard box and
internal angles unfolding it, cutting along some edges as necessary,
but ensuring that it remains as a single piece. You’ll
end up with a flat piece of cardboard, which might
FROM POLYGONS TO POLYHEDRA be like the one in the second part of the illustration
You might not have learned about polyhedra in (at the top of the facing page), depending on how
school, but you’ll surely know about polygons. A you unfolded it. This is called a net, and it’s fairly
polygon is a multisided two-dimensional figure; obvious that it can be folded back into a cube. Any
for example, triangles, rectangles, pentagons, and polyhedron can be created by folding a net, and this
hexagons. There’s an infinite number of polygons, is the easiest way to make one.
depending on the lengths of their sides and their With the Platonic solids, you could fairly easily
internal angles. But we tend to be more familiar draw the nets by hand, using a ruler and protractor.
with regular polygons – those in which all the sides However, it’s easier to find one online and print
are the same length and all the internal angles are it onto card. Choose a net with tabs for gluing,
the same. because if you use a net without tabs, you’ll have

82
FORGE

to use adhesive tape, some of which will end and assembling the polyhedron, or subsequently if
up on the outside of your finished polyhedron. you handle it with sweaty fingers. We used white Above
These are the only
Beware that some printable nets aren’t too accurate; card but, in hindsight, if you’re pasting on coloured convex regular
indeed, our dodecahedron net wasn’t perfect. Once polygons, print the base net onto grey card so that polyhedra, the
Platonic solids, and
you've printed the net, cut it out and, if the short if it shows through at the edges, it won’t be too their nets. Left to
edges of some tabs connect to a secondary polygon, obvious. There are lots of different ways of colouring right: tetrahedron,
cube, octahedron,
cut along the short edge to separate it from that regular polyhedra so no adjacent faces are the same dodecahedron,
and icosahedron
polygon. With thick card, carefully score along all shade, but just a few colours can look better than
the lines so they’ll be easier to fold. Assembling it lots. You’ll see in the photo (overleaf) that we used
by gluing tabs and folding is fairly intuitive, but we four colours for our dodecahedron.
suggest gluing just a few at a time and waiting until
the glue dries before continuing. Use paper clips
or masking tape – but not a tape that’ll damage the
card when you pull it off – to hold joints together
until the glue dries. Consider using a piece of
stiff wire, or a needle, to push the last few joints
together from the inside.
Thick card will make a better polyhedron, but
there’ll be a limit to the weight of card your printer
supports, and if you go above that, you risk damaging
the printer. The maximum might only be 200 gsm, Left
The Kepler-Poinsot
which isn’t too much thicker than good-quality paper. polyhedra have
identical regular
Our solution was to print two nets onto thinner card. polygons as their
Then we cut out all the individual polygons from faces, but those
faces intersect.
one of the nets and glued them onto the other net. Clockwise from top
As well as overcoming your printer’s limitations, it left: small stellated
dodecahedron,
helps with coloured polyhedra. First, it avoids using great stellated
lots of ink, and second, it’ll prevent you smudging dodecahedron, great
icosahedron, and
the printed, solid coloured areas while you’re gluing great dodecahedron

83
Polyhedra

TUTORIAL

2
THE INS AND OUTS The small stellated dodecahedron looks like an
We described the Platonic solids as convex, so ordinary dodecahedron with five-sided pyramids
presumably some polyhedra aren’t. In fact, if we attached to each of its twelve pentagonal
stick with regular polyhedra, there are another faces. This might suggest why the name
Below four that aren’t convex. They’re the Kepler-Poinsot includes ‘dodecahedron’, but the great stellated
We built a Kepler- polyhedra: the small stellated dodecahedron, the dodecahedron doesn’t fit that theory because it
Poinsot polyhedron,
ZWLJPÄJHSS`H great stellated dodecahedron, the great icosahedron, looks like an icosahedron with triangular pyramids
great stellated and the great dodecahedron. And when we say attached to each of its 20 triangular faces. Instead,
dodecahedron, by
Ä_PUN[YPHUN\SHY they’re not convex, we mean they have faces that they have the word ‘dodecahedron’ in their names
pyramids onto the go in and out, so they can be thought of the 3D because they genuinely do have twelve faces,
faces of a regular
icosahedron equivalent of polygons, like stars. despite them both appearing to have 60 triangular
faces. The faces of the Kepler-Poinsot polyhedra are
intersecting, as you can see in the images of these

” Skeletal polyhedra are made


of just the edges and, since
their faces are missing, you
can see right through them

strange regular polyhedra (previous page). So, look at
the yellow face of the small stellated dodecahedron.
Officially called a pentagram, but you can think of
it as a star, it’s a ten-sided polygon and there are
twelve in all – the yellow, red, green, blue, purple,
and brown ones you can see, plus six more at the
back – so it really is a dodecahedron after all.
You can find nets for the Kepler-Poinsot polyhedra,
but we think it’s better to make them by gluing

84
FORGE

3
add-ons to the base Platonic solids because the end
result is stronger.
REAL WORLD POLYHEDRA Above
Here’s how to
As you can see in the photo, we made a great make a Platonic
Polyhedra aren’t just mathematical curiosities. They ZVSPKZWLJPÄJHSS`H
stellated dodecahedron by gluing 20 triangular turn up in nature and have practical applications too. dodecahedron. (1)
Print out the net onto
pyramids onto an icosahedron. Nets with the You’re never going to see them unless you have thin card and cut it
base Platonic solid and the add-ons as separate unnatural visual capabilities, but some molecules have V\[*\[V\[[^LS]L
their atoms arranged as polyhedra. The atoms form the pentagons in your
objects aren’t too common, although we found preferred colours of
corners, and the chemical bonds between them form card, and glue them
one for the great stellated dodecahedron at
the edges. The most well-known contains 60 carbon onto the net. (3) Fold
hsmag.cc/GreatStellated. Again, we figured atoms and it’s called Buckminsterfullerene, or just a the net up, gluing
that less can be more, so we used an attractive wherever there’s a
Buckyball to its friends. The arrangement of atoms can tab. (4) And here’s
three-coloured design. also cause polyhedra to emerge at much larger scales, the end result
and this takes us to minerals, which often exhibit a
A DIFFERENT APPROACH bewildering variety of polyhedral shapes. For example,
pyrite – otherwise known as fool’s gold – can have
Even though our models are hollow, polyhedra are
crystals which are cubes, octahedra, pyritohedra which
really solid objects. But the obviously hollow skeletal
are similar to regular dodecahedra, an octahedron
polyhedra make an interesting alternative. Skeletal formed as a combination of an octahedron and a
polyhedra are made of just the edges and, since pyritohedra, and cubes with some or all of the edges
their faces are missing, you can see right through and corners chamfered off, thereby making them as
them. They’ve been made from drinking straws and much as 26-hedra. Twinned polyhedra, commonly
wire – and you can probably think of other ways to formed from two intersecting cubes, are also found.
make them – but we recommend an alternative that
doesn’t differ much from our method of making
ordinary card-based polyhedral models.
Put simply, it involves building a polyhedron
from a net printed on card but, before folding and
gluing it, cutting out the centres from each of the
faces. Be careful not to cut away too much of the
faces, though, because that would weaken the end
result – take a look at the photo (overleaf) for some
guidance. An alternative colouring scheme came to
mind and the end result looks quite good. Instead

85
Polyhedra

TUTORIAL

Right
For a change, we
built this uniform
polyhedron as a
skeletal model. Here
you can see the
two-coloured net
ILMVYL°HZZLTIS`

Below
The truncated
octahedron in all its
skeletal glory

What’s more, there are a lot more of them, so


there’s plenty of opportunity to keep you amused for
as long as your patience lasts.
Like regular polyhedra, uniform polyhedra also
have faces that are regular polygons, but they
don’t all have to be the same. One class of uniform
polyhedra is the Archimedean solids, and there
are 13 of them. You can see one that we made in
skeleton form – it’s called a truncated octahedron
and it has twelve faces – six regular hexagons and
six squares.

” Uniform polyhedra also


have faces that are regular
polygons, but they don’t all
have to be the same

of colouring the various faces differently, because
you’re now going to be able to see the inside, we
used just two colours – one for the outside and one
for the inside. So, print two copies of the net onto Another class of semi-regular polyhedra that’s
different colours of card and glue them together. Cut definitely well worth checking out is the polyhedral
off the tabs from the net that’ll be on the outside, compound. Put simply, they look like they’ve been
and separate its individual polygons before gluing, to formed from several intersecting polyhedra. The
make the structure easier to fold. simplest is made from two regular tetrahedra,
while the one formed from five tetrahedra is, in our
NOT QUITE AS REGULAR opinion, particularly attractive.
Until now, we’ve concentrated on regular polyhedra Finally, if you want a real challenge, how about
because symmetrical things appeal to our sense of making one of these – or any of the polyhedra we
aesthetics. But a degree of non-symmetry can look looked at earlier – out of a solid block of wood?
good too. So, we’re going to take a look at some Polyhedral models have been made this way,
other polyhedra which, while still having some and they can be used as attractive mathematical
symmetry, are perhaps a bit more interesting than ornaments, but they’ll certainly tax your
the Platonic solids and the Kepler-Poinsot polyhedra. woodworking skills.

86
go-carts
de electric
homema
We race

Come and join us!

TITO RS
O M PE RS
C A TO
E CT
& SP
OM E!
WELC
>> Late Brake Show’s Big Brake
6th-7th August Peterborough

>> Diggerland
19th-20th August Castleford, Yorkshire
phy
otogra
Z70 Ph ight
Ian Kn

hackyracers @Hacky_Racers

hackyracers.co.uk
Moving beyond the K40

TUTORIAL

Moving beyond
the K40
Blowing smoke

H
itting something with a high-power EXTRACTION SYSTEMS SUCK
laser beam doesn’t make it magically There are three important types of airflow in a laser
disappear: it vaporises it, and can cutter, the most obvious of which is extraction.
also generate a lot of particulates Removing particulates and fumes from the laser
and smoke. Dealing with the vapour chamber, and preventing them from ending up
cloud from laser cutting isn’t as simple somewhere in the environment, is the most basic
Dr Andrew Lewis as creating a few vent holes in your case. Smoke and level of airflow management. On cheaper laser
gas can prevent the laser from cutting properly and, if cutters like the K40, the level of fume extraction
Dr Andrew Lewis is a
specialist fabricator left to float around in the laser chamber, they will coat included as standard is usually very poor, with a
and maker, and is the the optics with a layer of opaque residue that causes single 120 mm fan being used to pull air out of the
owner of the Andrew
them to reflect poorly, heat up, and potentially fail. In chamber and dump it directly outside. You can tell
3L^PZ°>VYRZOVW
this article, you’ll see how different techniques can that the extraction system is poor, because you will
help you get rid of unwanted smoke and improve your see evidence of smoke or vapour stains on the items
overall cut quality. you’ve cut, and you’ll smell smoke or plastic in the

Right
With some off-the-
shelf components and
a 3D printer, you can
improve the quality of
your laser cutter
and keep your lungs
safe from harm at
the same time

88
FORGE

room while you’re cutting. Generally speaking, if you arrestor is a metal device that deliberately creates
can smell the cutter working in an open room, and turbulence inside a duct to break up the laminar Above
The plastic duct
the extractor fan isn’t uncomfortably loud, then airflow, extinguishing embers before they reach provided with some
fumes are not being extracted effectively. the extractor. K40 lasers is a perfect
example of what not
Even though the purpose of the extractor The goal of the extractor fan itself is to clear your [V\ZL!HÅHTTHISL
is simple, there are a few considerations that laser chamber of smoke as quickly as possible. ducting that will
probably give off


complicate the There are plenty of dangerous gases
implementation of an options for industrial PMP[JH[JOLZÄYL

effective extraction Definitely avoid using extraction systems, but

any plastics that


system. Lasers generate they are very expensive
heat, and that can lead to buy. With the proper
release noxious gases


to sparks, embers, accessories, a marine
and (in the worst-
if they burn bilge blower makes a QUICK TIP
case scenario) fire decent alternative. Bilge Seal up your laser
being sucked into the blowers are intended to chamber with
extraction system. For that reason, it’s not wise blow fresh air into the bilge of a boat, pushing any neoprene tape and
to use plastic ducting in areas outside the laser noxious gases out of the bilge vents in the process. silicone to prevent
chamber, and definitely avoid using any plastics that They are very effective at extracting fumes from the radiation and fumes
escaping, but leave
release noxious gases if they burn. Most extraction laser chamber, run from 12 V or 24 V DC, and can be
deliberate air inlets,
fans aren’t designed to deal with hot embers, and fitted with a speed controller to optimise the or your extractor
it’s wise to use an in-line spark arrester before the extraction rate (and reduce the noise) to suit the will try to implode
extractor fan to stop any chance of damage. A spark project that you’re working on. For most laser your chamber.

89
Moving beyond the K40

TUTORIAL

effects on the human body, causing a wide range of


STAY SAFE symptoms that include dry eyes, a runny nose, and
A laser cutter is a dangerous machine. Invisible laser death. It’s quite easy to add in-line filters to your
radiation can disfigure or blind you, or someone else, exhaust system, as long as you understand that
permanently. Materials being cut with a laser can you’re filtering two different things from the
release toxic, corrosive, and explosive fumes. Check
exhaust. Particulates like smoke and ash can be
which materials are safe to work with before you
start cutting, and do not cut a material unless you are
filtered using coarse and fine particulate filters,
sure that it is safe to do so. Never operate a laser in similar to those found in vacuum cleaners. Gaseous
an unsafe situation, and never let the machine run components of the exhaust can be filtered out using
out of your control. Always wear laser safety goggles activated carbon. This is the sort of filter you find in a
when working with the laser, and be aware of the kitchen extractor fan, or an air conditioning system,
risks from mechanical parts, high voltages, corrosive to remove cooking smells. Arrange the filters in the
gas clouds, unexpected fires, and reflective surfaces.
exhaust ducts so that the coarse filter is closest to
Never leave the laser in a state where it could be
activated accidentally by someone who does not the laser cutter, and then place increasingly fine
understand the risks. Always have appropriate safety filters towards the exhaust side. How often you
equipment nearby. change your particulate and carbon filters will
depend on how frequently you use the machine, and
what type of materials you are working with. If you
cutters, a bilge blower rated at about 270 CFM (cubic intend to do a lot of wood or cardboard cutting, you’ll
feet per minute) should be enough to keep the need to change your particulate filters more
chamber clear – that’s about three or four times the frequently than if you were cutting acrylic or etching
flow-rate of the fan that comes with some K40 units. glass. As a source of filters, you could consider
It makes sense to filter your exhaust to remove as standard diesel or petrol engine intake filters,
many pollutants as possible. Venting noxious gases vacuum cleaner filters, or pollen filters from an AC
into the environment is very rude, and allowing your system for particulate filtering. You can also buy filter
laser cutter to do so is similarly uncouth. Gaseous material on the roll and make your own custom
and particulate air pollution have strong negative filters. Activated carbon filters are available in sheets

QUICK TIP
Air assist helps
make cuts cleaner,
but the extra airflow
can also keep
embers burning and
start a fire on some
materials. Never
leave the laser
unattended while
it is running.

Right
Both sides of the
material will generate
smoke, but many
systems only
concentrate on
extracting smoke
from above the cut.
That can leave nasty
residues on your
machine bed and on
the item you’re
working with

90
FORGE

that you can cut to a convenient size. Remember


that increasing your filter surface area will improve
airflow, so having a large filter box and large filters is
better than having discrete in-line filters.

MORE INTAKE THAN EXHAUST MAKES


THINGS GET FATTER
Something that hasn’t been mentioned here yet
is the need for adequate air intakes on your laser
cutter. You don’t want any unnecessary holes
in your laser chamber, because they present an Above
opportunity for a stray laser beam to escape. At the These fans have been
added to the K40 laser
same time, you need to allow adequate ventilation to generate smoke
to replenish the air that the extractor is removing, assist. Unfortunately,
because of their
otherwise your machine will start getting thinner position in the case,
they do very little
when you turn the extractor on. This leads on to to move smoke
the second type of airflow you need to think about, generated below the
VIQLJ[(ÄS[LYZOLL[
which has been nicknamed ‘smoke assist’ by some on the inside of the
users of the K40. case helps control
particulate levels
If the job of the extractor is to remove smoke
from the chamber, then the job of smoke assist is to Left
Air assist is an almost
push smoke and gas towards the extractor vent as essential feature
for a laser cutter,
quickly as possible. Left to its own devices, an particularly if you’ll be
extractor will remove smoke from the chamber, but working with wood.
It doesn’t matter
the flow of the smoke towards the vent will eddy in whether it’s built into
places, and there will be pockets of smoke swirling the lens holder or a
3D-printed add-on, air
around, while freshly drawn-in air is vented instead. assist nozzles have a
Smoke assist stops this from happening by making positive effect on the
machine optics and
sure the smoke gets pushed out of the chamber by the resulting cuts

91
Moving beyond the K40

TUTORIAL

the laser is situated. It’s also wise to include


particulate filters on the intakes to prevent any bits
of dust or grit getting blown into the chamber from
the environment. The filter will also help make sure
nothing gets blown out of the chamber if the
extractor fails. There are some situations where
smoke assist isn’t really necessary, and can be a
hindrance. If you are cutting something very thin,
then the draught from the smoke assist could be
enough to blow the part clean off of the bed. Some
control boards and firmwares have the ability to
control smoke assist and extractor fans in software
(Marlin, for example), or you could just use a motor
speed controller and a manual switch if that level of
remote control is not an option available to you.
An average 120 mm, 12 V PC fan will move
50–70 CFM of air under normal conditions. Silent
fans working from multiple angles. The typical setup fans tend to run much less air through, clocking in at
Above & Below
The difference in for smoke assist is with fans mounted in the walls of about 30–40 CFM. In the context of the laser cutter,
quality between parts
cut with and without
the laser cutter, with some sort of optical baffles in silent fans aren’t going to make much difference to
air assist is obvious place to prevent direct laser light from escaping from the overall sound level, but you might choose to use
to see. The wooden
enclosure was printed the chamber. The airflow of the fans should be more fans with a lower CFM to control the airflow
without air assist and calculated so that the combined output of the fans is through the chamber. With a standard bilge blower
looks like it’s been
smoke-damaged. In roughly equal to the airflow of the exhaust, although running at about 270 CFM, you’ll be installing
contrast, the toy tools it’s better to be slightly above the extraction rate to somewhere between four and eight fans to match
have very few smoke
marks at all prevent fumes travelling back into the room where the flow. If you’re not sure how things are going,

92
FORGE

cover your chamber with a clear plastic sheet, and you could use your shop air to power the air assist. QUICK TIP
experiment using some smoke matches or pellets to Simply add a valve regulator and water trap to Air assist can be
see how well the extractor is working. control and condition the flow rate of input air to a both a blessing and
The final type of airflow you need to think about is usable range. In some cases, the sound of a a curse, as it can
known as air assist, and it has two main functions. compressor running for 60 seconds every few blow bits around
the machine like
Air assist is the term used to describe a small, minutes is more appealing than having constant air
a tiny tornado.
directed jet of high-velocity air that is focused more pump noise while the laser runs through a job. If you
Like all machine
or less directly onto the focus point of the laser. The do choose to use a compressor rather than an air tools, you’ll need to
high-velocity airflow acts as a shield for the laser pump, then you can enable or disable the air assist experiment to find
lens, keeping the area between the lens and the electronically by using a servo-controlled valve the best air speeds
object free from smoke and vapour that would between the inlet to the machine and the nozzle of and machine feeds
reduce the efficiency of the cutting laser. A the air assist. If you’re using an air pump, you can for your laser cutter.
secondary effect of the high-velocity air is that the simply control the pump using a relay. As usual, you
edges of the cut area can modify firmware to


cool more quickly, and trigger things as needed

If you’re using an air


particulates are much using G-code.
less likely to mark the With your modified
surface of the object pump, you can simply airflow systems, you’ll
you’re cutting.
control the pump probably notice a few


things when you start
LOUD MEANS using a relay using your laser cutter.
WORKING Firstly, the machine will
There are several also probably be much
different ways to implement air assist, and the noisier than it was before you started. Extractor fans
internet includes a whole spectrum of largely are loud, air pumps are loud, and even air hissing
useless or vague suggestions. Many new laser lens from a remotely sited compressor can be loud. There
mounts have an air assist fitting built into them, isn’t a huge amount that you can do about this,
which is a good choice if you’re happy to buy one. If without physically positioning blowers and extractors
you’re using the K40’s stock laser head, then you’ll remotely and applying layers of acoustic foam. The
need to come up with an alternative solution. The air noise is a necessary trade-off for the clean air. Noise
assist nozzle is essentially a directional small-bore levels aside, the laser will most likely make much
pipe, so developing a suitable solution isn’t difficult. nicer cuts and engravings with less clean-up time
Some users have made their own rigid metal needed, particularly on materials like plywood –
nozzles from brake line, but a 3D-printed nozzle like getting rid of the smoke quickly really helps with
hsmag.cc/AirAssist works just fine, and is easy to that. The environment will also be much less smelly,
fit onto the head using just a cable tie. Flexible particularly if you’ve added carbon and particulate
silicone medical tubing, or airbrush line, makes a filters to the inlets, as well as the exhaust.
good lightweight choice for an air hose – the hose
isn’t under a huge amount of pressure at any time.
With a nozzle between 3 and 5 mm in diameter, and
AIR SPEED
the highest air velocity around 15 mm/s (this is a If you don’t know the airflow of a fan, you can
rough value based on the author’s own experience), calculate it fairly easily if you have access to an
even a small aquarium air pump producing 15 LPM of anemometer. Airflow is often measured in CFM (Cubic
Feet per Minute), sometimes in LPH or LPM (Litres
air could just about keep up. However, the flow of air
per Hour or Minute), and sometimes m3/s (cubic
from a small aquarium pump isn’t ideal because it metres per second). Converting between these units
doesn’t produce a constant flow. Smaller pumps is relatively easy, and there are plenty of online
often use a single small diaphragm to generate air, calculators that can do this for you.
and this can cause some ‘flutter’ in the air supply. Calculating CFM using an anemometer is just a
For an aquarium this doesn’t matter, but when trying matter of measuring the speed of the air passing
to generate air assist, it can have a detrimental through the fan ducting. The maths is simple enough,
and if you plug the numbers into a good calculator like
effect. More advanced pumps that produce a more
hsmag.cc/AirSpeed, you won’t even really need to
powerful output are a better choice. If you have a think about it.
reasonably sized compressor in your workshop, then

93
EXO-S: developing a swing-wing rocket glider

TUTORIAL

,?6:!
KL]LSVWPUNH
Z^PUN^PUN
YVJRL[NSPKLY
Is it a bird? Is it a plane?
Is it a rocket?

L
iving out in rural North Wales, I don’t
have a local rocketry club, and I only
Jo Hinchliffe
make it to the larger UK rocketry
@concreted0g events every now and again as they
are all at least a three-hour drive away.
Jo Hinchliffe is a This means I tend to miss some of the
constant tinkerer and rarer types of rocket projects occasionally flown in
is passionate about all
things DIY space. He the UK. One example is, despite them being quite
loves designing and prevalent in the wider world of model and high-power
scratch-building both
rocketry, I’ve never seen a rocket-boosted swing-wing
model and high-power
rockets, and releases the glider in real life.
designs and components A swing-wing glider is a fantastically interesting
as open-source. He also
has a shed full of lathes concept, where a rocket motor-propelled glider
and milling machines flies up vertically like a rocket and then changes its
and CNC kit! configuration to become an aeroplane – it then glides
back down to the ground rather than descending
Figure 1 under a parachute (Figure 1). These work using
7YLÅPNO[WOV[V standard model rocket motors which, as well as
ILMVYL[OL[LZ[
SH\UJOVM,?6:! acting as a rocket motor, have a small charge that
[OL,?WLYPTLU[HS
6WLUZV\YJL:^PUN
blows out of the other end of the motor after a
^PUN9VJRL[.SPKLY predetermined delay, usually pushing the nose cone

94
FORGE

off and a parachute out. In swing-wing rocket gliders,


this charge pushes off the nose cone which is instead
connected to a release pin that unfurls the wings.
Armed with only a little research, I wanted to
prototype something to see how a wing deployment
mechanism might work. I’m a big fan of all types
of CAD, including Cardboard Aided Design, so I set
about making a card-and-glue prototype. I’d noticed
that a lot of the swing-wing designs use an offset
release pin mechanism to release the wings, usually
because the pin can be run along one side of the
fuselage, but I wanted to see how a centre line
release pin might work. I drew up some rough shapes
in Inkscape and used my budget CNC diode laser rig
(reviewed in issue 47 of HackSpace magazine) to cut
some cardboard, which could easily have been done
by hand with scissors or a craft knife.
I used a couple of sections of bamboo kebab
skewer to create some pivot points, and I used a
little 0.8 mm MIG welding wire to fashion a couple
of hooped assemblies which could be held in line
with another length of MIG wire acting as a release wings and the wing pivots to hopefully fit. At this
pin. Small rubber bands were added to the ’wings’ stage, I started using the idea of two horns on each Above
(JSVZL\WVM[OL
which were attached at the other end to a small pin. of the plywood pivot plates. The idea being that when JVTWSL[L,?6:^PUN
Pulling the wings together, they could be locked in the two wings are folded back and lie over the top of M\ZLSHNLHUKTV[VY
[\ILHZZLTIS`
place with the MIG wire each other, there are two


Below
pin and then released horns that align in such a ;OLÄYZ[JHYKIVHYK
to deploy outwards. I
I drew up some rough way that the release pin WYV[V[`WLVM
HWPUYLSLHZL
added another couple of can be inserted between ^PUNTLJOHUPZT
kebab skewer sections shapes in Inkscape and used them, and that stops
to act as stops to ensure
my budget CNC diode laser them from being pulled


the wings deployed to open by the rubber
the correct position. rig to cut some cardboard bands. The second horn
Whilst this cardboard on each pivot plate is
prototype was a messy positioned so that when
experiment, it made me consider how a wing stops in the wings are deployed and the rubber bands pull
position at the end of its travel – it proved to me that a them into position, they stop the wing as the horn
MIG wire pin was strong enough to retain the wings. contacts the edge of the fuselage (Figure 2, overleaf).
Moving to the second prototype, I wanted to For this prototype, I went with the idea of the pin
3D-print some kind of fuselage. I also wanted to use running along one side of the fuselage, which works
balsa wings. Balsa is a great, lightweight material,
but I doubted that it was strong enough to withstand
the deployment forces, both the pull of the elastic
bands and the hard stop in the deployed position.
I’d seen that people had reinforced the pivot area of
deployable wings using thin plywood, so I planned
to do this. I first designed a simple fuselage block in
FreeCAD to be 3D-printed. For this second prototype,
I wanted to get a correctly sized object with a working
release mechanism and wing deployment – I wasn’t
concerned about it actually flying. Having made a
decision about the width of the fuselage and the
position of the pivot point, I could then design the

95
EXO-S: developing a swing-wing rocket glider

TUTORIAL

Right
;OLZLJVUKWYV[V[`WL
HSSV^LKTL[VHJ[\HSS`
JYLH[LH^VYRPUN^PUN
KLWSV`TLU[Z`Z[LT

fine but does add a little complexity as it makes the


WING-TIPS design non-symmetric. I drew both the wings and the
The tips of the wings are hinged and have a rubber pivot plates in Inkscape and then laser-cut them. I
band assembly to make them pop up into their final created a 4 mm diameter pivot point in the 3D-printed
angled position when the wings are deployed. These fuselage block and used a small piece of brass rod to
dihedral tips are useful in that they help create
create the pivot shaft (Figure 2). I dimensioned the
stability in flight and introduce an amount of self-
levelling in aircraft. It’s also a fun challenge to work
fuselage so that, hopefully, when the plywood plates
out how they can be deployed! and the balsa wings were glued together and stacked,
The hinges are made simply from packing tape, and they would fit well with little play in the vertical axis.
the hinge edges are bevelled to promote the deployed At this point, I experimented with attaching rubber
tip sitting at an angle. However, with a rubber band bands to the wings. I drilled some 1.5 mm holes
deploying the dihedral tip, they need some form of through the balsa and decided to reinforce the holes
stop assembly to ensure that they deploy equally. In
by applying a smear of superglue around the wall
the first non-flying prototype, I laser-cut some thin
plywood which created a hook for the rubber band of the hole and letting it dry. I then inserted the
and an angled stop which limited the movement of the rubber bands through and experimented with knot
tip. Whilst this worked excellently, it did create quite a tying to try and retain them. This proved to be not
large drag-inducing lump at the end of the wings. For a good solution as the knots risked getting trapped
the flight prototype, I ended up mounting the rubber between the wings when they were folded into the
band through holes, similar to the wing deployment,
stowed position, or they could tighten, shrink, and pull
and then gluing a small piece of MIG wire bent to an
angle onto the wing, which stopped the dihedral tips through the hole. In the end, I cut some tiny 3-4 mm
in the correct position. lengths of the 0.8 mm MIG wire, and after inserting
the rubber band through the hole, put these through
the rubber band and pulled the system taught. This
pulled the MIG wire into the under-surface of the hole
and, with the rubber bands under tension, seemed to
hold them in place well.
For the release pin holder, I glued a short length
of tube (cut from a ballpoint pen ink tube) to the side
of the fuselage. I also quickly added a balsa spar and
a small tail assembly that I borrowed from another
glider I was experimenting with. I added a small MIG
wire hook along the spar at the end position of the

96
FORGE

wings when stowed – this gently held down the create a lot of drag! Finally, I decided that I wanted to
dihedral sections of the wing. make the long spar, out towards the tail section, out
Testing the mechanism revealed a couple of of a 4 mm carbon fibre rod to try and minimise the risk
things. The first is that it’s incredibly satisfying and an of it snapping due to the violence of the wings
addictive mechanism. Seeing the wings deploy and deploying. I went through a couple of iterations on the
land in the unfurled position with a satisfying click is a two-piece fuselage, leading to this design (Figure 3).
joy and makes the hard work worthwhile. I’ve made You can see that the pin is made from MIG welding
a short video about the EXO-S project with footage of wire and is placed into its hole before the two sides
all the test deployments, which are fun to see – you of the fuselage are brought together.
can watch it here: hsmag.cc/EXO-S. Having worked out the fuselage body assembly, I
Second, it’s quite a violent action, and having then cut the wings and sanded them slightly to create
filmed the tests, replaying the footage in slow motion a rudimentary aerofoil from the flat balsa. A better
revealed a lot of bending and flexing of the balsa spar. aerofoil would indeed create a more efficient wing
Despite knowing this prototype would never fly, I with more lift, but it would also create more
also experimented with taping a used motor to the challenges in designing a deployable wing. Perhaps
fuselage to ascertain if I could roughly get the centre the next iteration will address this. I designed and cut
of gravity somewhere near the midpoint of the wing, the horizontal and vertical tail sections, aiming for
i.e. around the pivot point. It appeared that this would them to be around 20 percent of the main wing
certainly be doable in subsequent prototypes. surface area. I also designed and 3D-printed a small
I felt after testing that I could probably make the
next prototype the first that I might attempt to fly. I Figure 2
had numerous changes I wanted to include based off ;OLWP]V[WSH[LZ
LHJOOH]L[^VOVYUZ!
the earlier prototype. I knew I wanted to make the VULZL[MVYTZ[OL
fuselage body thinner, and I wanted to try and create YLSLHZLWPUJH[JO
HUK[OLV[OLYZL[
a fuselage design where the release pin travels WYL]LU[Z[OL^PUNZ
MYVT[V\JOPUN[OL
through the body rather than featuring on the outside. M\ZLSHNLIVK`
This has a couple of advantages. One is that, again,
Figure 3
the wings and pivot plate design can be symmetrical, <ZPUN+WYPU[PUN
and it also potentially reduces drag on the airframe by TLHU[[OH[JYLH[PUN
HM\ZLSHNLIVK`
a small amount. It has to be said, though, that ^P[OPU[LYUHSZSV[Z
compared to a standard model rocket, these HUKJOHUULSZMVYH
YLSLHZLWPU^HZLHZ`
swing-wing gliders are not very streamlined and [VHJOPL]L

97
EXO-S: developing a swing-wing rocket glider

TUTORIAL

Figure 5
;OL,?6:HPYJYHM[VU[OLSH\UJOWHKYLHK`MVYP[ZÄYZ[ÅPNO[

bracket to fit around the carbon spar, with a flat the centre of gravity around 25 percent back from
Figure 4 surface underneath to glue the horizontal tail surface the leading edge of the wing. I then cut the release
:PTWSL+WYPU[LK
IYHJRL[ZHSSV^[OL to (Figure 4). pin wire to length, fashioning it to insert into a slot
[HPSJVTWVULU[Z[VIL With all the pieces cut and printed, I began to in the small nose cone I’d designed and 3D-printed
NS\LKVU[V[OLJHYIVU
ÄIYLZWHY assemble the prototype. Turning my attention to using Rocket Workbench in FreeCAD. With the wings
the motor mount tube, I cut a length of Estes BT- attached, pivoting around a short length of the 4 mm
20 tubing and then 3D-printed a small ring to be carbon tubing, we were ready for a test flight.
glued internally as a thrust ring for the motor to be Using a spent motor with the wings deployed,
pushed in against and to transfer the motor thrust I carried out a few test hand launches – gently
to the airframe. I’d modelled the top edge of the throwing the airframe over some long grass to see if
fuselage body so that it had a radius that matched it glides. It’s fair to say that it is on the heavy side and
the cardboard tubing to maximise the gluing surface. definitely isn’t going to float around a lot on thermals,
I glued this on after inserting a spent motor and then but that said, it does seem to fly the right way up
experimented with the motor tube position to get and glide without too much stalling. I was happy for

BALANCING ACT
Back in issue 12, we had a tutorial on using the free and open-source OpenRocket application to help us
to design and simulate an example rocket. One of the subjects discussed was the relationship between
two points on a rocket’s airframe: the centre of gravity (CG) and the centre of pressure (CP). The CG is
easy to find, simply finding the point where a rocket or a glider will balance rather than tilt towards the
nose or the rear.
The CP is where all the resulting forces acting on a rocket body are centred. You can imagine the
CG as the point that a rocket or rocket glider will pivot around if another force acts on it. The CP
must be behind the CG and closer to the rear or bottom of the vehicle. When designing a traditional
round-tube rocket, designers often aim to get the CP behind the CG at a distance between one and
two times the diameter of the body. So, for a 5 cm diameter rocket, the CP might be designed to be
5–10 cm behind the CG. If you imagine the CP is acting as a lever and can create a pivoting force
around the CG, then you can further imagine that a longer lever, with the CP further back, can create
more movement in the rocket if a force, say a side wind or breeze, pushes the lever. So if you have
a CP five times the diameter of the airframe behind the CG, a relatively small breeze may well make
the rocket turn near-horizontally into the wind.
With a swing-wing glider, it’s harder to simulate stability. However, the EXO-S design and swing
wings in this format generally have the CG much closer to the nose cone end than most rockets would – this is due to
the position and weight of the motor. The other factor is that in the stowed position for vertical flight, the wings and the tail
surface will theoretically pull the CP way back in the airframe, so we automatically have a pretty overstable design – this
means they tend to turn into any breeze in the first part of the flight.

98
FORGE

this first attempt to simply make the deployment


transition, and I wasn’t too worried about amazing
performance in the deployed section of the flight.
A decent weather day finally arrived, so I ventured
to a local rocket flying spot. Setting up the glider
on a standard Estes launch pad, I used a second pad
and a collection of clothes pegs to help hold the
launching wires up at the height they needed to
be (Figure 5). As the all-up weight was 76 grams,
I decided to use a B6-4 motor. With it all set up, I
retired to the launch controller box. There was a slight
cross-wind, so I was sure that the overstability of I also decorated the new motor tube with some
the airframe was going to make it turn into the wind. orange vinyl and reprinted a bright orange nose cone Above
,?6:PUNSPKL
Following a check of the skies and a countdown, as it’s difficult to spot the airframe in the brush and TVKLK\YPUNVULVM
the button was pressed. The B6-4 motor presented grass of the flying field (Figure 6). The second flight [OLOHUKSH\UJOLK
[LZ[ÅPNO[Z
plenty of thrust, and the EXO-S shot off the pad well. still arced a little into the wind and was a similar flight
It performed an arcing flight as it predictably turned to the first with a short glide section at the end – Figure 6
9LWSHJPUNHUK
into the wind. I wondered if it might plummet back promising results and consistency in the deployment YLWVZP[PVUPUN[OL
to the ground before even deploying. However, with are great to see. TV[VY[\ILHUK
HKKPUNZVTLTVYL
a reassuring ’snick’, the deployment charge activated So, I’ve learnt lots developing this, and I am now JVSV\Y[V[Y`HUK
THRL[OLSHUKLK
and the wings popped out perfectly – a great totally addicted to ideas around deploying wings! For JYHM[TVYL]PZPISL
transition was achieved. It was a little late, but EXO-S future developments of the EXO-S project, I have
did begin to move to a slightly more horizontal mode a few redesigns in mind. First up, I need to shed
and did indeed glide somewhat! I was really pleased weight to reduce the wing loading; the fuselage
with the result. I’d told the few observers that I’d be body, the pivot plates, and the wings themselves
quite happy if it didn’t glide at all but simply performed are all target areas to lose a few grams. Secondly,
the deployment of the wings, which it did perfectly. a more refined wing design with more aerofoil and
There was damage to the motor tube as it had better lift characteristics. I’d also like to play a little
landed a little heavily, and whilst I could have with the angles of the wings and tail surfaces to try
straightened it out and reused it, I decided to replace and create better glide characteristics. It’s certainly
it. I shortened the tube and moved its position to get a fun and challenging set of problems to wrap my
the centre of gravity closer to the 50 percent point grey matter around! You can find the FreeCAD and
of the wing to try and make the entire airframe less Inkscape files for the EXO-S on this repository:
overstable for a more vertical flight path next time. I hsmag.cc/EXO-S mk1.
also replaced the launch lug for a larger diameter one,
meaning I could use a thicker and longer launch rail,
as, quite obviously, you get less rail remaining with the
high up position of the motor with swing-wing gliders.

Below
-PYZ[SH\UJO0[»ZL_JP[PUN[VZLLHU`[OPUN
`V\OH]LKLZPNULKÅ`MVY[OLÄYZ[[PTL

99
BE FROM JU S T £ 5
SUBSCRI e o f o ne
the pric
> FREE! 3 issues for
> FREE! Delivery to y
our door
AT IO N ! L e a v e a n y time
> NO OBLIG

FREE
PI ZE R O 2 W*

on to the print magazine


ti
Wit

g
h

pi
y

.
o

c
u

c
r

/1
1

2
2

mo
-
n
m
t
o
s
nth subscrip
h
ma * While stocks
last

Buy online: store.rpipress.cc


FIELD TEST
HACK MAKE BUILD CREATE
Hacker gear poked, prodded, taken apart, and investigated

PG

110
SPACE
SHUTTLE
PG
102
KIT BEST OF
BREED
Learn to solder with
this design classic

PG

112 Music-making for makers

PRUSA
SL1S
The resin printer
built for speed
Our favourite music-making accessories for your Raspberry Pi

BEST OF BREED

ONLYTHE
BEST
Our favourite music-
making accessories for
your Raspberry Pi
Products to help you make and play music

By Marc de Vinck @devinck

M
usic, whether it be creating,
streaming, or just simply
distributing it, has always been a
popular topic amongst DIY
electronics enthusiasts. Although
visual-based projects like blinking
LEDs and LCDs certainly take top billing for
popularity, many of those projects also involve
adding some auditory feedback. And the Raspberry
Pi is well-suited to help add some musical flair to
your project.
In this roundup, we’ll be looking at some audio-
related accessories that will have your next
Raspberry Pi project singing. The Raspberry Pi, on its
own, can perform many different functions for
generating sound, recording it, or just playing it back,
but there are times when a little extra help would
make it much easier. Hopefully these products will
inspire you to come up with your own Raspberry
Pi-based musical device or, at the very least, get you
thinking about your next project!

102
FIELD TEST

Piano HAT vs
RasPiO Analog Zero
PIMORONI $19.22 pimoroni.com PIMORONI $10.40 pimoroni.com

S
omewhere between a row of push-
buttons on a breadboard and a Moog
Matriarch sits the Piano HAT by
Pimoroni. It’s a beautifully designed
and implemented capacitive touch
piano HAT for the Raspberry Pi. It
features 16 capacitive touchpads, 13 piano keys,
octave up and down buttons, an instrument cycle
button, and 16 white LEDs. Make music and a
light show!
The Piano HAT is compatible with any 40-pin
Raspberry Pi and comes fully assembled and ready to
go! Simply plug it in, grab the excellent Python library
and example code, and you are ready to use it as a
synth controller, make some music, or even use it as
an affordable MIDI controller. Head to the Pimoroni
website to learn all about this fun little HAT. Left
Tap out your tunes

O
ne thing that the Raspberry Pi
isn’t particularly good at is
VERDICT
reading analogue sensors. It’s all Piano HAT
digital! And anyone who is looking to A fun little
create a musical device based on the accessory.

10/ 10
Raspberry Pi will want a way to read
simple analogue sensors and controls. And that’s
where the RasPiO Analog Zero comes into play.
With this handy breakout board, you can add
eight analogue inputs without any trouble, RasPiO
and the best part – there’s nothing else to Analog Zero
install. The GPIO Zero Python library is A simple way of
part of Raspberry Pi OS. Simply adding analogue
solder the board together and plug it in/out.

9/ 10
in. Now your Raspberry Pi can read
Right eight analogue signals simultaneously!
Digital is overrated,
go analogue It’s a synth builder’s dream!

103
Our favourite music-making accessories for your Raspberry Pi

BEST OF BREED

Display-O-Tron HAT
PIMORONI $28.35 pimoroni.com

I
know what you are thinking! The Display-O-
Tron HAT is not a musical interface. And you’re
right, it’s not. But how often do you need a
display when building a streaming music player,
or synth? Often! And who wants a simple
16×2 display when you can have a much
cooler-looking and more capable screen like the
Display-O-Tron?
This HAT features six zones of RGB LED back- VERDICT
lighting, a 16×3 LCD display, and six capacitive touch Display-O-Tron
buttons. This board would make a great streaming HAT
server display, or IoT music player. Just don’t forget, A funky and fun
you aren’t limited to displaying ASCII characters: you display for your
could make some beautiful, albeit low pixel count, Raspberry Pi.

10/ 10
graphics too. Take a look at the product page for
additional info, and links to the Python library to get
you up and running.

Left
Add a display to
your instrument

104
FIELD TEST

Pirate Audio: Headphone Amp


PIMORONI $22.68 pimoroni.com

I
Pods may be a thing of the past, but the
Pirate Audio: Headphone Amp from
Pimoroni can make your dream of a DIY
portable audio player a reality. Or, you could
simply use it as an amp for streaming music
from your Raspberry Pi at your desk.
The small-form-factor mini HAT features amplified
digital audio via I2S, a dedicated headphone amplifier
IC, Low/High gain switch, and a 1.3” IPS colour VERDICT
screen. You also get four tactile buttons, and it comes Pirate Audio:
fully assembled. It’s the perfect size for a Raspberry Headphone Amp
Pi Zero, but it will work with any 40-pin variety of Upgrade your
Raspberry Pi. Pimoroni also has detailed instructions audio.
on getting started, including a custom Pirate Audio

9/ 10
installer that will help configure everything and installs
the custom Python library along with the Mopidy
extensible music server.

DFRobot High Power


)S\L[VV[O7V^LY(TWSPÄLY
Above
Music on the go

SPARKFUN $16.95 sparkfun.com Left


For when you need to
blow the roof off

T
he DFRobot High Power Bluetooth
Power Amplifier Board, available VERDICT
from SparkFun, makes adding a high- DFRobot High
power Bluetooth amplifier to your Power Bluetooth
Raspberry Pi simple and at an Power Amplifier
affordable price. The board features Additional
100-watt output power, a volume control button, and power for
dual-track output. It will work with any flavour larger setups.

8/ 10
Raspberry Pi and a 4–8 ohm speaker from 50–300
watts. Now your Raspberry Pi can transmit two-
channel audio over Bluetooth up to 15 metres away!

105
Our favourite music-making accessories for your Raspberry Pi

BEST OF BREED

Adafruit I2S 3W Class D


(TWSPÄLY)YLHRV\[4(? (
ADAFRUIT $5.95 adafruit.com

I
f you are considering building an audio
player into your next project, then you
should take a look at the simple-to-
implement Adafruit I2S 3W Class D
Amplifier Breakout board. It’s a surprisingly
powerful little mono amp that’s able to send
3.2 watts of power to a 4 ohm impedance speaker.
And it works with I2S audio, so there is less noise,
making the sound output much cleaner. It also
features selectable gain, click and pop reduction, and
best of all, it’s very affordable. If you want clean
sound, grab this board!
VERDICT
Adafruit I2S 3W
Class D Amplifier
Breakout -
MAX98357A
You can’t beat
the price of this
little amp.

10/ 10
Above USB AUDIO ADAPTER
Amp and analogue
output in one
ADAFRUIT $4.95 adafruit.com

Yes, the standard Raspberry Pi has an on-board


audio jack, but if you want to do some extra
processing and potentially get better audio out of
your Raspberry Pi, take a look at the USB Audio
Adapter from Adafruit. It allows you to plug
speakers or headphones directly into your USB
port. Adafruit has a complete guide on how to set
up your Raspberry Pi to use USB for audio output.
It’s a simple process. Head on over to the site for
complete step-by-step instructions.

106
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


PLAY
& CODE
GAMES!
RETRO GAMING WITH

RASPBERRY PI 2 ND E D I T I O N
Retro Gaming with Raspberry Pi shows you how to set up a
Raspberry Pi to play classic games. Build your own games console or
full-size arcade cabinet, install emulation software and download classic
arcade games with our step-by-step guides. Want to make games? Learn
how to code your own with Python and Pygame Zero.

Set up Raspberry Pi for


retro gaming
Emulate classic
computers and consoles
Learn to code your
own retro-style games
Build a console,
handheld, and full-size
arcade machine

BUY ONLINE: magpi.cc/store


Space Shuttle Discovery Soldering Kit

REVIEW

Space Shuttle Discovery


Soldering Kit
An electronics project that’s out of this world

PHYX £9 pimoroni.com

By Jo Hinchliffe @concreted0g

L
earning to solder is a rite of passage The very neatly designed printed circuit boards
for the aspirant maker, and it’s a (PCBs) slot and solder together to create this free-
journey that’s well worth undertaking. standing little desk model, based on the NASA
Most recommended starting points Space Shuttle STS Discovery. The base has, on the
are small through-hole component kits, underside, a coin cell holder (battery not included, but
where larger components have leads it’s a standard CR2032) and a switch. The power is
which slide through holes to be soldered – and routed through the sculpture to the three flickering
good target starter projects are often badges, or LEDs which you mount on the back of the shuttle.
small electronic experiments which explore a useful It arrives flat-packed and panelised into one PCB,
Below electronic design or principle. This kit, designed with the small collection of components heat-sealed
The PCB panel
is beautifully by Phyx and sold by Pimoroni in the UK, sits at the into the top section of the anti-static packaging. There
designed and is decorative end of kits but, rather than a badge, it is a are no instructions with the kit, but they are written
manufactured with a
ÅH^SLZZ°ZPSRZJYLLU small desktop sculpture! up as a short list on the Pimoroni product page. It’s
fair to say that if you have soldered up a few LED
badges before tackling this, you probably won’t need
the instructions anyway as it’s pretty intuitive how the
boards slot together, and all the positive connections
are marked on the exquisite PCB silkscreen so you
can work out which way around components go.
The instructions say to solder the LEDs into the
boards first, which makes far more sense than what
we did, which was to add them after assembling the
boards together. We wanted to see what the piece
looked like before deciding what length and position
to place the LEDs in!
To begin, you carefully de-panelise the PCB by
gently bending the PCB sections to break the small
perforated tabs that hold them in place. It’s optional
but, next, you can use a sanding block (or a nail emery
board is very good for this) to rub down the remaining
bits of the perforated tabs. As we said, probably best
to insert the LEDs now if you are new to soldering,
or leave them until later if you are confident in your
soldering abilities! With our panels ready, we first

110
FIELD TEST

Left
It’s probably simpler
to solder the LEDs
before assembly but,
if not, a blob of Blu
;HJRJHUOLSWRLLW
them in place

Below
Once de-panelised,
you can optionally
sand down the
leftover parts of the
perforated tabs

soldered the switch to the underside of the base and a mechanical joint. It’s pretty straightforward, and
then the battery holder. Again, this is pretty obvious actually suits a slightly wider soldering iron tip, which
to place, as the battery holder is clearly outlined in you probably have if you are a beginner with an entry-
the silkscreen. level soldering iron. Definitely solder just one side
With the base components fitted, we set about first, and then check the alignment of your panels. It’s
soldering the two parts that form the shuttle together. quite easy to get them not quite straight but, until you
When you insert the shuttle upright board, you’ll solder both sides, it’s easy to readjust by remelting
see that there are large rectangular pads on both the solder joint.
the upright and the horizontal surface which align at With the shuttle soldered, we repeated the same
90 degrees, and you need to solder a bridge across type of solder connections to solder the bottom of
these to create both a conductive joint that is also the upright into the base, which again clearly marked
the positive side, so you can be sure to get it the right
way around. We then set the LEDs in place. Now that
the boards receiving the LEDs were assembled, we
used a blob of Blu Tack to hold the LED in place whilst
we soldered. This is probably a touch harder than
doing them first, but it allowed us to look at the LED VERDICT
placement in relation to the whole assembled shuttle! A lovely little
Once finished, and with a flick of the switch, the desk toy,
LEDs put out a pleasing orange flicker, which gives
suitable for
beginners to
a great representation of the shuttle motors. One
soldering, and
thing that we find with all PCBs that have a white offering an
solder mask is that they can look a little bit stained alternative
after soldering, and so, we gave ours a quick clean-up starter project
using a cotton bud with some isopropyl alcohol on to a badge.
and it was restored to its lovely finish. Excellent.

9/ 10
We imagine it won’t be too long until we buy the
other kit in the same series, which is a model of the
SR-71 plane!

111
Prusa SL1S SPEED

REVIEW

Prusa SL1S SPEED


Convert goo into plastic parts as fast as possible

PRUSA £1678.80 prusa3d.com

By Alex Bate @alexjrassic

T
he latest in Prusa’s venture into
resin printing, the SL1S SPEED
promises high-resolution prints and
an unprecedented level of detail, at
a whopping three times faster speed
than its predecessor, the Prusa SL1.
But does it live up to the hype and, more importantly,
the £1679 price point?
“Resin printing is messy and expensive.” For years,
this is what you’d hear in makerspaces, convention
halls, and online forums, as those new to the world
of 3D printing questioned whether to invest in a hot
plastic or resin printer. On the whole, the argument
was valid. Before the days of wash and cure
machines, resin printing required a lot of space, time,
and patience – not to mention the piles of isopropyl
alcohol-filled Tupperware – just to produce anything
clean and non-toxic.
Heaps of resin-stained rubber gloves, surrounded
by snips, paper towels, and hacked UV curing
solutions, littered workbenches and kitchen tables
as enthusiastic users reached to open yet another
window for ventilation.
Why would anyone want that when the alternative
FDM printer was so neat and tidy in comparison?
But that was then, and this is now, and with the
invention of wash and cure machines, fume filters,
and tidy desktop enclosures, resin printing has come
a long way.
Out of the box, the Prusa SL1S SPEED is a weighty,
compact piece of kit with a hard plastic shell and
aluminium base that Prusa promises will absorb
vibrations for better performance.
Setting up is a breeze as the touchscreen guides
you through the process, including collaboration, with
the help of clear on-screen instructions and images.
Anyone with prior 3D printing knowledge will no
doubt know their way around a number of slicing

112
FIELD TEST

nine hours less to print four. Now, why you’d want


four Benchys is up to you; we won’t judge. Left
The build
But what also came to light during this process was plate dips
just how easy it was to plug and go with the SL1S. into the vat
of resin
No configuration, no tweaking of settings, we simply
pressed a button and off it went, unlike the Ender that
took two attempts to get the adhesion down, and
another two to unkink some cheap filament.

NEED FOR SPEED?


Resin printing has always outranked FDM when it
comes to print detail. It’s one of the reasons we’ve
seen a mass increase in resin printer consumption
by the model-making and mini-printing communities.
FDM simply cannot compete when printing at
such a small scale with intricate parts. The SL1S
produces highly detailed parts, but so do significantly
cheaper competitors.
So, should you spend £1679 on an SLS1
SPEED printer?
Ultimately, and unsurprisingly given the name, it
comes down to time. The Prusa prints fast, but it’s VERDICT
also quick to set up, easy to use, and – in our tests at
For quality,
least – reliable. All these things save you time which, speed, and
as any Instagram Business ‘Guru’ will tell you, is ease of use, the
apps, such as Cura and Simplify3D, and will find the money. How much time you save and how much this SL1S leads the
transition to resin printing fairly straightforward. For is worth to you depends on what you want to print pack, but price
the rest of you, PrusaSlicer, Prusa’s open-source tool, and your own personal circumstances. is an issue.

9/ 10
is your go-to for prepping your models for printing, and If you want minimal-hassle desktop resin printing,
the Prusa YouTube channel, alongside the included then this is a great choice, but it comes with a hefty
beginner’s manual, will help you through the process. price tag.
Speed: it’s in the name so let’s talk about it. Prusa
promises 1.4 seconds exposure time per layer.
Around 2 to 3 seconds per layer is more common for

” The Prusa prints fast, but


it’s also quick to set up,
easy to use, and – in our


tests at least – reliable

desktop resin printers, so the SL1S gives a significant


speed boost here.
Whether you’re printing one model or multiple, so
long as you can fit them all on the 127×80×150 mm
build volume, your output time doesn’t change. Unlike
an FDM, where multiple models equal increased print
Right
times, resin printers excel at producing prints in mass. Resin printers
are great at
To give you an idea of how this speed-up works – reproducing
compared to the Ender 5 Pro at its highest settings, ÄULKL[HPS
the SL1S took an hour less to print one Benchy, and

113
#57 ON SALE
21 JULY

RASPBERRY PI
PICO
GET THE MOST OUT OF
YOUR MICROCONTROLLER
Also
EMF CAMP 2022
GREAT WHITE SHARKS
BUILD YOUR OWN IOT DEVICE
GET THE MOST OUT OF YOUR 3D PRINTER
AND MUCH MORE

hsmag.cc/subscribe
Alex Glow’s companion robot F3NR1R, seen here
in its cardboard prototype form – if you’re iterating
through designs of a product, or even just an idea for
yourself, cardboard is a cheap, sustainable medium
you can use as much of as you want.
1J,7. .BOBHFZPVSTFSWFSTPS
XPSLTUBUJPOTSFNPUFMZ

"DPTUFŗFDUJWFTPMVUJPOGPSEBUBDFOUFST 
*5EFQBSUNFOUTPSSFNPUFNBDIJOFT

1J,7.)"5
GPS%*:BOEDVTUPNQSPKFDUT 1SF"TTFNCMFEWFSTJPO

3FBMUJNFDMPDLXJUISFDIBSHFBCMFTVQFSDBQBDJUPS0-&%%JTQMBZ#PPUBCMFWJSUVBM$%30.
ŚBTIESJWF4FSJBMDPOTPMF0QFOTPVSDF"1*JOUFHSBUJPO0QFOTPVSDFTPGUXBSF

$YDLODEOHDWWKHPDLQ5DVSEHUU\3LUHVHOOHUV

3FTFMMFSTVHHFTUJPOTBOEJORVJSJFT
XIPMFTBMF!IJQJJP

You might also like