100% found this document useful (2 votes)
356 views100 pages

Hs 67 Digital

Uploaded by

Didier Solheid
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
100% found this document useful (2 votes)
356 views100 pages

Hs 67 Digital

Uploaded by

Didier Solheid
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/ 100

hsmag.

cc June 2023 Issue #67

NFC ULTRASONIC
Make personalised LIGHTS
greetings cards Motion-detecting lights
for your workspace

Printing a
LARGE
format
camera PRUSA’S
NEWEST PRINTER

We get the
inside story from
Josef Průša
June. 2023
Issue #67 £6

PICO C H AT G P T C ATA P U LT SCOPE


Free eBook!

Download your copy from


hsmag.cc/freecadbook
WELCOME EDITORIAL
Editor
Ben Everard
ben.everard@raspberrypi.com

Features Editor
Andrew Gregory
andrew.gregory@raspberrypi.com

Welcome to Sub-Editors
David Higgs, Nicola King

HackSpace magazine DESIGN


Critical Media
and Raspberry Pi
criticalmedia.co.uk
Does open source matter in 3D printers and, if it does, what Head of Design
should we do to defend it? It’s a question that Josef Průša Lee Allen
Designers
posed to the community alongside the launch of the MK4. Sam Ribbits, Olivia Mitchell, Sara
Hobbyist 3D printers started with the RepRap movement, Parodi, Jack Willis

where open source was key to a worldwide community being Photography


Brian O’Halloran
able to rapidly modify and improve designs. We’re now in a
CONTRIBUTORS
post-RepRap era when most 3D printer designs aren’t open- Marc de Vinck, Andrew Lewis, Rob
source (though they might run open-source software). Miles, Jo Hinchliffe, Nicola King

At HackSpace magazine, we’re not open-source purists, PUBLISHING


Publishing Director
and we recognise that commercial reality can make opening Brian Jepson
your design difficult. However, we view open source as brian.jepson@raspberrypi.com

Advertising
a significant and important feature for users. It means
Charlie Milligan
that a machine is easier to modify and fix. It means that charlotte.milligan@raspberrypi.com

the community can continue to update it if the original DISTRIBUTION


manufacturer doesn’t. It means contributing designs back to Seymour Distribution Ltd
2 East Poultry Ave,
the hardware community which helped get us all here. It’s London EC1A 9PT
with this in mind that we’re pleased to feature the Prusa MK4 +44 (0)207 429 4000

on the cover this month. This is the latest incarnation in a SUBSCRIPTIONS


lineage that has probably done more for open-source printing Unit 6, The Enterprise Centre,
Kelvin Lane, Manor Royal,
than any other. And it’s a corker. Crawley, West Sussex, RH10 9PE
Got a comment,
question, or thought To subscribe
about HackSpace
magazine?
BEN EVERARD 01293 312189
hsmag.cc/subscribe
Editor ben.everard@raspberrypi.com
get in touch at Subscription queries

32
hsmag.cc/hello hackspace@subscriptionhelpline.co.uk
PAGE

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

3
Contents 70

06 SPARK 21 LENS
06 Top Projects 22 3D Evolution
Clever stuff made by clever earthlings Take a deep dive into the Prusa MK4

16 Objet 3d’art 34 How I Made: Large Format Camera


An affordable family car, for tiny people Homemade digital daguerreotypes

18 Letters 40 Interview: Josef Průša


Praise for the brave cat wrangler He’s quite pleased with the Prusa MK4. Here’s why…

48 In the workshop
Chain devices together with I2C

Cover Feature Tutorial

3D
Ultrasonic lights

EVOLUTION
72 Add a cyberpunk feel to your
workbench with NeoPixels

14

22
4
CONTENTS

34
Tutorial
Electric scooter

88

Interview
Josef Průša

78 Force captive electrons


to do your bidding

53 FORGE
54 SoM KiCad
Go from design to schematic on your first PCB

60 Tutorial NFC
Make custom greetings cards with funky electronics
40 The Willy Wonka of 3D printing
talks us through the magic
66 Tutorial Beginning electronics
Go back to basics with a breadboard and LED

70 Tutorial Print in place


Print complex parts in one go
87 FIELD TEST
72 Tutorial Ultrasonic lights 88 Best of Breed
A hands-free lighting solution for your workspace Summer is on its way – get outside!

78 Tutorial Scooter part 2 94 Review Pico oscilloscope


Build a battery pack fit for a king Make waves with open hardware

82 Tutorial ChatGPT 96 Crowdfunding Hoverboard


Can artificial intelligence design a robot chassis? Float like a 500 lb butterfly

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

ESP32-powered
plant monitor
By Ovidiu hsmag.cc/ESP32-PlantMonitor

W
e’ve seen plant monitors many times before
now, but this one, by self-taught electronics
tinkerer Ovidiu, is worth a closer look.
First of all because its creator is self-taught:
if you can imagine it, you can build it; the
only downside of being self-taught is that it’ll
probably take you longer than it would if you knew what to do/where
to look.
Ovidiu’s used an ESP32 and an e-ink display to create a plant
monitor with an impressive eleven days battery life (longer if you
run it without the display), and kept electronic components off the
soil probes so that they are cheap to replace should they break/get
stolen by foxes. The machine monitors temperature, soil moisture
levels, humidity, light levels and more, and shares data via Wi-Fi
or Bluetooth.

Right
Big respect to all the
self-taught hardware
makers out there!

6
SPARK

7
Top Projects

REGULAR

Lego sewing
machine
By The Brick Wall hsmag.cc/LegoSewingMachine

W
e take our collective hat off to anyone
who can sew: by hand, it’s fiddly,
slow, and frustratingly difficult; with a
sewing machine it’s even harder, as the
mechanisation element only means that
we can go wrong more quickly. So, we’re
extremely impressed by The Brick Wall’s sewing machine build,
which uses Lego (plus one small rotating handmade part to hook and
release the thread) to assemble a working, hand-powered sewing
machine. And yes, it produces a perfect chain stitch.

8
SPARK

Above
This Lego sewing
machine was inspired
by the Singer model
20, which was first
produced in 1910

9
Top Projects

REGULAR

10
SPARK

Open-source
robot dog
By Halid Yildirim hsmag.cc/PicoRobotDog

W
e’ve seen a few robot dogs over the years,
most notably James Bruton’s openDog
and Boston Dynamics’ terrifying Spot
hunter killer. Here’s one with a twist,
created by computer engineering student
Halid Yildirim. Halid’s big breakthrough has
been to separate the electronics from the robot chassis, enabling
different electronics modules to be swapped in and out.
Because it’s modular, there are key features, and non-key
features that can be added or removed to keep the cost down.
Core features include the computing unit, battery and power
management units, remote control, GPS, gyroscope, and pressure
sensors on the legs. Swappable capabilities include Lidar and gas
detection modules.

Left
Halid’s robot is
programmed in
the Arduino
programming language

11
Top Projects

REGULAR

Furby Borges
By Roni Bandini hsmag.cc/FurbyBorges

I
n 2018, Roni Bandini hacked a Furby to turn it into a
Jorge Luis Borges-quoting animatronic. He left as many
components in situ as possible, only bypassing the audio, to
create an effect that worked, but wasn’t as good as it could
have been.
Five years later, the JL Borges Furby is reborn. Roni
has removed the original electronics that controlled the Furby’s
mouth and eyes, opting to replace them with an Arduino Nano and
an H-bridge. He’s got rid of the original sound effects equipment,
replacing it with a DFRobot DFPlayer Mini MP3 player. He’s also
used a passive infrared sensor, so that whenever someone walks
past the furry they’re treated to a snippet of the great Argentinian
writer’s work.

Right
We discovered the
works of Argentine
writer Jorge Luis
Borges when he
was quoted in the
Sean Duffy series
of novels by Adrian
McKinty. They’re
very, very good

12
SPARK

13
Top Projects

REGULAR

Persist-o-meter
By Yurko Tymchuk hsmag.cc/Persist-o-meter

P
ractice makes perfect. But real life gets in the way
of practice. To solve the problem of pesky reality
intruding onto his valuable ukulele playing time, Yurko
Tymchuk has developed a progress tracker using 3D
printing and magnets to record his daily goals. It looks
a lot like a calendar, and every time you fulfil your
goal for that day, you add a magnetised cross to the board indicating
success. The text describing the goals is printed on detachable
labels, so if you were to get bored with the ukulele and want to learn
the piano instead, you’d just print a new label.
This is a 3D-printed model, but with some special instructions:
first, it uses 0.2 mm layer heights, to get the best fit with the
magnets he’s used. Second, in order to insert the magnets and to
change colours, he had to pause and restart the print a few times.

14
SPARK

Above
Yurko’s design
uses two 10 mm M3
screws and around
50 6 × 3 mm magnets

15
Objet 3d’art

REGULAR

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

O
ccasionally we come across a
3D print that’s so well done
that we can’t tell whether it’s
3D-printed or not. That’s what
happened the first time we saw
this 7.4:1 scale model of a Mitsubishi Pajero,
modelled, printed, and assembled by
Casadio Design. They’ve taken their own
family car for inspiration, and turned it into a
fully functioning radio-controlled, four-wheel-
drive model, with results so impressive that,
at first glance, we thought those small
boulders were the size of large boulders.
Casadio has produced an unbelievably
detailed 350-page assembly guide, and you
can grab the design files from cults3D.com
– see the video at hsmag.cc/Pajero for
more instructions.

16
SPARK

17
Letters

REGULAR

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

HAXAPHONE
Every so often, an electronic musical
instrument comes along that is unique
and comes to define a sound. Sometimes
these instruments endure to provide an
interesting and unique sound through
the decades – the theremin springs to
mind. Other times they turn out to be a
brief spark that illuminates a genre and
then dies out – for example, the keytar.
The haxaphone (HackSpace issue 66
page 8) surely fits into one of these two
camps – I have absolutely no idea which
camp history will place it in. All I know is
that I want one!

Brian
Cambridge

Ben says: I am no musician, but I also


want to try a haxaphone. I doubt I can
get a sensible noise out of the thing, but
I’d love to try.

18
SPARK

SOLDERING SOLIDARITY
Thanks for the tips on soldering with paste in issue 66. I’ve been through-hole
soldering for more years than I care to count, but I’d never tried anything more
intricate. We’ve got a hotplate at my local hackspace, so I didn’t need much
equipment. I don’t know what I was waiting for! It’s actually easier this way. A
dollop of paste, pop the component on top, apply heat and Bob’s your mother’s
brother, as they say. Thanks for giving me the motivation to try it.

George
Liverpool

Ben says: You’re welcome. It depends a lot on what you want to do really. If
you’re designing your own boards, I think we’ve reached a point now where it’s
easier to go surface mount. The chances are you’ll need some components that
are only available surface-mount anyway, so you might as well do the lot. It
does take a bit more equipment to get started, but not huge amounts, and as
you say, there are plenty of community spaces with the bits you need.

CUTE KITTY
Kudos to Sahas Chitlange. Not only have
they created a great-looking build, but
they’ve also managed to acquire a cat
patient enough to wear it. I once tried to
get my cat to wear a collar, but he spent
the entire day gaining the flexibility he
needed to rip it off. Since then, anything
that’s gone near his head has been
removed with haste (including an
ill-advised ‘Evil Unicorn Horn for Cats’).

Sandra
Gloucester

Ben says: I too have a moggie that cares


little about what I want to do. I’m pretty
sure he spends most of his time plotting
against me. I hate to think what he’d do
if I gave him the power of technology.

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

PG

34
HOW I MADE:
PG
22

3D
LARGE FORMAT
CAMERA
Take pictures the way the
Victorians did – with a 3D-printed
large format camera

40
PG

EVOLUTIO N
INTERVIEW: INTER R
PRUSA’S LATEST P
JOSEF PRŮŠA ON TEST
On development, X-ray
machines, and why he’s still
3D printing 3D printers

PG

48
IN THE
WORKSHOP
We’ve not managed to build
much this month, but we
did learn about I2C
3D Evolution

FEATURE

EVOLU
3D
TION
EST P R IN T E R O N TEST
PRUSA’S NEW

T
he Prusa i3 line of printers has model in the last 13 years. Some parts
its origins at the very start of have changed. Originally, the Mendel was
the hobbyist 3D printer made of just 3D-printed parts, and
movement. The Prusa Mendel off-the-shelf ‘vitamins’, such as lead
(the first printer to bear the screws and bushings. Now, the MK4 still
‘Prusa’ name), released in has many 3D-printed parts, but its frame is
2010 with a blog post that started: custom-designed and cast from aluminium
“Hello, I’m new here so I guess I should alloy. Other things have stubbornly stayed
introduce myself first. My name is Josef the same, including the iconic ‘bed slinger’
Prusa, I’m a 20-year-old student from design, where the Y-axis is the print bed
Prague, Czech Republic and I’m in [the] moving back and forth.
RepRap world for about a year now. You The MK4 is on sale now for £1054.80
can follow me on twitter.com/prusajr. Two fully assembled or £790.80 as a kit, and
months ago, I started [the] process of upgrades from the MK3 start at £241. Of
simplifying Mendel design. So far, I was course, the obvious question about a
able to reduce parts count, assembly time, printer with such a long lineage is – is it a
use of vitamins, and also price.” dinosaur from another era that has been
The Prusa Mendel evolved to become surpassed by modern machines, or does
the Prusa Mendel iteration 2, then the 13 years of refinement mean that this is
iteration 3 (known as the i3), MK2, MK3, the ultimate tried and tested machine?
MK3S, and now the MK4. It’s the seventh We’ve been investigating.

22
LENS

23
3D Evolution

FEATURE

MK4 ON TEST
U S E THE NEW PRINTER?
IT L IK E TO
WHAT’S

A
t first glance, the MK4 looks much entire print bed moves backwards and forwards as
the same as the MK3. It’s got the the Y-axis. The print bed is a pretty heavy part of
now familiar arch of black the design. Secondly, it has a ‘direct drive’
aluminium alloy as a frame over the extruder where the motor driving the filament is
top of a bed that moves in the on the print head itself.
Y-axis. At the front, an angled There are advantages to both of these design
screen provides user feedback, and the whole lot choices, but they come at the cost of having a lot
is controlled by a single knob and button. of mass that the motors have to shift. The problem
However, while things on the surface may look with this isn’t the top speed these axes can
similar, almost every aspect of this machine has achieve, but the amount of momentum that they
been reworked. In some cases, this is to make it have when you try to change speed or direction.
faster, in some cases more reliable and, in some This momentum can cause the printer to wobble
cases, more user-friendly. Let’s take a look at what slightly at sharp corners and this becomes visible
these changes are, and whether they’ve worked. as wave-like structures on the printed part, known
When it comes to speed with 3D printers, weight as ‘ringing’. You can see this in prints on the MK4.
is a huge issue. Not the total weight of the printer, There is a solution to this, or at least a partial
Bottom right but the weight of the moving parts. There are a one: input shaping. The idea behind this is that if
The new larger drive
couple of things here that are working against the you can predict where the problems will happen,
gear has more contact
with the filament MK4. Firstly, it’s a ‘bed slinger’ design where the you can put in additional motor movements to
counteract them in exactly the same way active
noise-cancelling headphones work. This, however,
requires the printer to be able to predict the exact
JOSEF PRŮŠA movements caused by the momentum. The MK4,
unlike its predecessors, comes with a processor
HackSpace Magazine: The Prusa MK4 is an incremental design. You’ve been working powerful enough to do exactly this.
on that for a number of years, right?

Josef Průša: Definitely. As with any product, even when you are pushing a product to
the market, you already know what you want to improve in the next versions. How long
does it take to finalise a product? It might take half a year, or more, to [get] a finished
prototype into production. So, we’ve been developing some of this stuff since very soon
after releasing MK3.

HS: And in contrast to that, the XL is an all-new design. Has that


resulted in a big difference between the two new models?

JP: No, I would say not really. Most of the time they were being
developed concurrently. As we were developing the new system for
the electronics and the new firmware for this generation of printers,
we just added XL on top of that, and the features for the tool changing
were added. But the printers themselves are completely different
machines. I would say MK4 is the everyday workhorse that you have
at home or in the office, whereas the XL is exploring what can
be done: with multi-material printing, with the tool changer,
it’s just made to experiment with new stuff.

24
LENS

Left
All the power and
signals from the
extruder are combined
into a single cable

Below
Two screws tension the
idler gears, but can be
released with a catch

Without input shaping and pressure advance,


Prusa has the MK4 is a moderately fast printer; certainly

promised a
faster than any of the previous generation of
bed-slinger printers that we’ve come across. There
n
pre-release versio is a bit of ringing at points with sharp corners, but

of the firmware”
it’s not particularly noticeable unless you’re
looking for it. However, it’s slow compared to the
latest crop of fast printers (which are mostly
CoreXY designs where the print bed moves in the
Alongside input shaping, there’s also pressure Z-axis).
advance, which is another way of calculating the
difference between the ideal world of G-code and PRINTING HEAD ON
the real world of kinematics, except this time for The new extruder – branded the Nextruder – is
how the extruder pushes out plastic. When the probably the flagship feature of the new printer.
extruder first starts extruding a line, there’s a short It’s lighter than previous iterations and the weight
delay before plastic comes out and, likewise, when is now closer to the X-axis, meaning that it can be
it finishes, there’s a delay between the extruder controlled more closely at higher accelerations.
stopping and plastic stopping squirting. At high While speed is an important factor, perhaps the
print speeds, this can cause problems, so to print
reliably, the printer needs to be able to
compensate for this.
At the time of writing, the Prusa MK4 had the
hardware to do input shaping and pressure
advance, but it wasn’t supported by firmware.
Prusa has promised a pre-release version of the
firmware supporting these features in the very
near future (indeed, it may have shipped by the
time you read this), with a stable release in due Left
A new filament guide
course. While the promotional videos that they’ve keeps the filament on
released showing this running look impressive, we the spool, even when
the extruder is moving
haven’t been able to test it out. around quickly

25
3D Evolution

FEATURE

biggest change here is the inclusion of a load cell.

MOTOR
This component acts much like a set of electric
scales, only upside down, and allows the printer to

MAGIC monitor the force on the nozzle. At present, this is


used to calibrate the mesh bed levelling. By
The previous MK3S detecting the actual distance from the nozzle to the
incarnation of this bed, this printer eliminates the need for first-layer
printer had motors with calibration, even after nozzle changes or print
1.8 degrees per step,
surface changes. This should mean that the first
and these have been
upgraded to 0.9 degrees layer prints correctly every time, regardless of
per step. These can what changes you make to the printing setup.
resolve a higher degree There’s no more first-layer calibration, no live Above
of accuracy and create The grandly titled ‘love board’ sits on the extruder, and lets
adjust z. You can swap print surfaces, swap
you disconnect any of the electronic parts with a simple
smooth prints. Prusa calls nozzles, rebuild the print head, and the MK4 quick-release socket
the difference ‘Vertical
adjusts everything automatically. At least, that’s
Fine Articat’ or VFA. The
what Prusa claims, and in our tests, it works. No The previous V6 nozzle assembly has been
result is noticeable, but
not enormous. If you’re matter what we’ve done to change the setup, the around for a long time – and does the job well.
producing prints that first layer has always come out clean. Nozzles are cheap and available in a lot of different
have to be absolutely top There’s also been a change in the way the forms. However, it also has drawbacks, not least
quality, then this might extruder motor pushes the plastic out. In previous the fact that the whole assembly is a little
reduce the amount of versions, the filament has been forced between complex. The nozzle screws into the heat block.
sanding and filling you
two small gears, but in the new setup, there’s a Above this, a heat break helps stop the
need to use.
single, larger drive gear (and two smaller idler temperature creeping up into the extruder.
gears). The claim is that this should make it more However, this heat break was lined with PTFE
reliable. So far in our testing, this has proved which breaks down at 230 degrees. There were
reliable, but the true test of this will be in the years three parts that had to come together perfectly and
to come. if they didn’t, either the filament got a bit stuck or
Below the extruder motor, the filament is forced oozed out around the side.
Below
The MK4 has the through the hot end. Here, perhaps, we see the
same dimensions as biggest change to the printer, although it’s
the MK3, so fits in the
same enclosures completely invisible at a casual glance. Below the
the
extruder motor,
through
filament is forced
the hot end”
In the MK4, the nozzle comes attached to a
metal tube which screws into the heat break. This
metal tube pushes into the extruder and the
aluminium body of the extruder acts as a cooler.
There are a couple of advantages to this. Firstly, a
simpler filament path generally means fewer
problems and, secondly, it’s much simpler to
remove the assembly – two thumbscrews bring
everything out.
You can then very quickly swap in a new hot
end assembly with, for example, a different nozzle
size. You can do this very quickly if you have the
whole assembly ready to go (that includes heater,
heater block, and thermistor). Alternatively, you
can unscrew the nozzle (including the tube) from
the heater block and it’s a slightly slower process.

26
LENS

The thermistor, in particular, has thin wires and Above


The load cell produces
very little strain relief, so could be a weak point a great first layer with
here if you plan on swapping the nozzle a lot. no tweaking

Having spent more time than he cares to Left


The whole hot end
remember with one of the older extruders in assembly that can be
pieces, this reviewer is very glad to see everything removed with just two
thumbscrews
simplified. Another new addition – the love board
– also helps keep disassembly simple. This board
combines the signals and power from everything
in the extruder and makes it simple to unplug any
of the electrical components.
The downside of changing away from the classic
V6 nozzle is that you no longer have access to the
huge range of nozzles that are available in this
format. You can get a V6 adaptor for the MK4 to
let you use any that you already have, and Prusa
has promised a wider range of nozzles will be UPGRADE OPTIONS
available shortly, but we can’t currently say what
You can upgrade earlier Prusa printers with some of the features of an MK4. The
will be available.
options are:
One bugbear of the MK3 with this reviewer was
the screw that tensioned the extruder gears. MK3.5: This upgrades the electronics of a MK3S (or MK3S+) to those of an MK4.
There’s no way of telling if it’s tightened Once Input Shaping and Pressure Advance are available, this should support it.
sufficiently. If you have to undo it (for MK3.9: This builds on the MK3.5 upgrade to also include a Nextruder. This
maintenance), you just tension it until it feels brings load cell bed levelling, quick-swap nozzles, and the rest of the advantages
about right and then hope that it doesn’t start of the new extruder.
Full MK4 upgrade: This includes everything of the MK3.9 and also upgrades
grinding the filament. On the new extruder, there’s
the motors to the high-precision ones.
a clip to release the tension. While there’s still a
screw to adjust the tension, you don’t need to These are all available as upgrade kits. You’ll need to print some of the parts, but
unscrew this to perform maintenance on the filament is included in the kit.
printers. It’s a little change that is easy to miss, but
one that will make a few lives easier.

27
3D Evolution

FEATURE

Above
The Wi-Fi module has to be
mounted outside the metal box that
houses the rest of the electronics

Throughout our testing of the Nextruder, the

JOSEF PRŮŠA
thing that has stood out is that it’s just nicer to use
than previous iterations. It’s easier to get the first
layer correct, it’s easier to set up, it’s easier to take
HS: What are your favourite features on the XL and the MK4? Or is that like asking you to
pick your favourite child? apart, it’s easier to maintain. While having a fast or
highly detailed printer is obviously a good thing,
Josef Průša: No, I know, for a fact. It is the load cell homing. I recovered my old Flickr having one that works is better. It’s hard to quantify
account recently; you know, as the company was bought and sold a few times, it got a little how much of an impact these changes will have in
bit locked out, but I recovered it. And I found a picture of my very first prototype of the load the weeks we’ve been testing this printer, but
cell, taken twelve years ago. It’s taken that long to get to this point, where I can ship it and be
anything that makes it easier to set up and maintain
happy with it. I’ve waited twelve years for this.
I’m sorry that we couldn’t be first in the market, due to the pandemic and stuff, but we are will undoubtedly have a big impact on how much
not using simple on/off; we are really reading the unknown values and the position.
The load cell is placed in a way that it cannot be damaged inside the all-in-one extruder/
heatsink and it calibrates basically with every tap, so there’s no way it can drift over time.
When we were testing it, the key was that we had an egg on the heat bed and we were Below
This model (by Triple G
dropping on top of the egg. The goal was not to break the egg. It’s very gentle. And it is the
Workshop on Printables)
first implementation which got to the people, and I cannot wait to see how we can optimise printed crisply at 0.2 mm
it further. It’s quite cool to see how people have tested it out on the livestreams. They print layer height
the first layer, then walk away knowing that the rest of the print will be good. They’re printing
on balsa wood, on cardboard. I will probably embrace this weirdness a little bit more and
include a mode for printing on curved surfaces – something in between non-planar slicing
and normal layer slicing. Something in between, because the non-planar slicing is such a
difficult problem to generalise and get out the door. But we can optimise quite a lot to print on
non-planar surfaces.
With the load cell being part of the nozzle, you are sure that the range is, and the forces
are, the same around the whole print volume. But if the sensor is placed somewhere
else, it is not quite as consistent, especially if you want to enable printing on some more
special materials.

28
LENS

don’t – but when things go wrong, they’re fixable.


Our workhorse printer is an MK3S that was once
dropped out of a loft (pro-tip, don’t hold them by
the spool holder). Yes, it broke, but the designs are
available, so we could just print replacements for
the broken parts and we were running again
within a couple of hours. This isn’t the only bit
that’s been replaced on the printer over the years,
and the original orange and black colour scheme
Above is turning into a patchwork.
You can see the ringing on this model (Whistle Pan flute by The MK4 seems like an evolutionary upgrade
dp makes on Printables). Input shaping should help reduce
this when it becomes available and brings additional ease and speed to this line
of printers. At the moment, the big unanswered
use and enjoyment you’ll have out of your printer question is regarding speed. Will it be able to keep
over the years. This is even more important for up with the fast CoreXY designs that are now
printers that are used in communal scenarios, available? According to Prusa, it’ll be very close to
whether that’s a workplace or makerspace. these printers in terms of speed (they’ve released
a video of it printing a Benchy in under 20 minutes
A GUI FOR GOOEY PLASTIC with a 0.25 mm layer height and 10% infill), but
Although the printer retains the classic screen and until the speed features are enabled in the
knob interface, the MK4 now has a higher firmware, we can’t confirm this – or see what sort
resolution colour screen. For almost any other of impact this will have on quality.
piece of tech released in 2023, having a colour Even without those sorts of speeds, the MK4
screen wouldn’t be news, but the i3 line of printers brings the i3 series up to date, and continues the
have held onto the monotone LCD for far longer Prusa tradition of making solid machines that are
than most. easy to use and produce good prints time and time
again. It’ll be a reasonable choice for a

The screen is
workhorse printer.
However, if this printer really can print reliably
but
touch-sensitive,
at high speeds, then they’ll have shaken up the 3D
printer market once again with a high-speed,
this isn’t enabled reliable, and easy-to-use printer at a reasonable Above
The new motors mean that

at present”
price. If their MK3S upgrades can offer a cost- flat parts – like the triangles
on this low poly wolf (by Brett
effective way for people to retrofit this fast printing Poultney on Printables) –
onto existing machines, then this will be even come out much crisper
According to Prusa, the screen is touch- more of an achievement. It is, however, still in the
sensitive, but this isn’t enabled at present. We’re realm of ‘if’ at the time of writing.
certainly pleased that they’ve decided not to use Can Prusa do it? We’re poised and ready to test.
the touchscreen. Twiddly knobs are far easier to So, as soon as there’s firmware available, we’ll let
use, at least for us. you know.
It’s a testament to the interface design that
there’s relatively little to say about it. Generally,
user interfaces are only notable when there’s a
problem. With the MK4, we’ve just been able to do
what we want to do without thinking too much
about the screens that let us do this. There is only
one problem with the interface on the MK4 – they
have decided to retain the reset button under the
knob. This is possibly the most useless button in
3D printing.
The thing that we’ve long admired about the Left
The colour screen is now
Prusa line of printers is that they just keep on
accompanied by colour
going. That’s not to say they always work – they text on the front console

29
3D Evolution

FEATURE

ET OF PRINTERS
INTERN
N ECT A N D P RU SALINK
P R U SACO N

S
o far, we’ve looked at the printer Prusa has two different systems for accessing
hardware, but the MK4 does have one the MK4 over the network:
more trick up its sleeve: wireless
connectivity. While network PrusaLink is a way of accessing your printer from
connectivity was an optional bolt-on the local network. This allows you to forego
for the MK3, it’s built right into the plugging and unplugging the USB stick (though
MK4. Internet access on devices can be a bit of a you will still need one attached to the printer),
double-edged sword. On the one hand, it can be a and just transfer files directly to the printer. You
useful tool to make the machine more accessible. can upload files either through a web interface or
On the other hand, it can be a way for companies by uploading directly from the slicer.
to try to lock users into closed ecosystems. How
Below these two factors play out depends entirely on PrusaConnect is an online service that lets you
You can control the basic how the company behind the product decides to control your printer from the internet. It has the
printer settings from
anywhere in the world develop the software. same features of PrusaLink, plus online file
storage and the ability to manage multiple
printers. You can upload files, adjust settings and
launch prints from any internet-connected device.

OCTOPRINT
While we like PrusaConnect, it’s not the only option for
adding network connectivity to your MK4. At the time
of writing, the OctoPrint setup for the MK4 is still in
the early stages, but it will most likely quickly become
straightforward to connect.

There are pros and cons to the two systems.

OctoPrint has a huge range of add-ons that can


perform almost any action. It’s well tried and tested
and includes support for webcams and time-lapse
photography. Because it streams G-code line-by-line
as it prints (rather than transferring files in one go),
there’s not the lag as the files transfer.

However, it does require additional hardware (a


Raspberry Pi). Accessing OctoPrint from the internet
(as opposed to the local network) is something that
you’ll have to set up yourself, either through a cloud
service or by managing the routing of a connection
from the public internet onto your private network.

30
LENS

Both of these options have been around for a little Above


You get 2Gb free online
while, but required you to add additional hardware storage, and you can also
(a Raspberry Pi). With the new control board, transfer files onto your
printer’s USB stick
everything runs everything.
You can add a camera to PrusaConnect by Left
You can check on the
repurposing an old phone or tablet. Just install an printer’s sensors via the
PrusaConnect web page
app and point it at the printer to keep an eye on
what’s going on.

You can add a


onnect
camera to PrusaC
the printer doesn’t mean you don’t have to be
physically there to remove the prints and prepare
n old
by repurposing a the print surface.

phone or tablet”
The one drawback of these systems is that it’s
quite slow to transfer data to the printer. Some of
the more complex print files took tens of minutes
PrusaConnect is officially in Beta, so not ready to transfer, so if you’re in the same space, a USB
for prime time. In our experience, the features that stick might be a quicker option.
are there work well, but it’s a bit limited in what it We appreciate the open nature of the internet
offers. For example, we’d like multiple users to be connection on the MK4. You can use the bits that
able to access a printer and track the amount of make sense to you, whether that’s none, local
filament on a spool, but neither of these is network access, or full cloud control. While it’s not
available at the moment. If you’ve got more the most fully-featured system at the moment, it’s
complex needs, you might want to consider really easy to set up and use, and doesn’t need
OctoPrint (see box). Obviously, remote access to any additional software.

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

Subscription will continue quarterly unless cancelled


SUBSCRIPTION

Get 6 issues plus a $43 USA / €43 EU


FREE Raspberry Pi
Pico W for just… £40 Rest of the world

SAVE
hsmag.cc April 2023 Issue #65

44% Bluetooth
Wirelessly connect
to Pico W
DIY
GAMES
16 maker projects to keep
boredom at bay

Soldering Flexible
Working with 3D Prints
surface-mount Wibbly-wobbly
prints with TPU

Apr. 2023 Issue #65 £6

F L I G H T S C O R P I O S TA M P L I G H T S
How I Made: Print yourself a large format camera

FEATURE

HOW M
odern digital cameras use
image processing
technology to produce
high-quality results. But this

I
makes everyone’s pictures
look perfectly identical, and it takes a lot of
the satisfaction out of getting a good
picture (at least for the author). In this
article, you’ll discover how to use retro
technology and 3D printing to create a
By Rob Miles super high-quality film camera that gives
your photographs a real sense of occasion.

HAVE CAMERA, WILL TRAVEL


Figure 1 shows the completed camera.

MADE
The body is 3D-printed from designs at
hsmag.cc/WillTravel. The body was
printed in white PLA, which turned out not
to be the most lightproof of colours. You
should use a darker colour. The camera has
since been sprayed with multiple coats of
matt black paint – both inside and out, to
make it more light-tight. The light proofing
is not quite perfect on the author’s camera,
but this is only a problem if the camera is

PRINT YOURSELF A
LARGE FORMAT CAMERA
Create super high-quality images using
a camera you printed yourself

34
LENS

Figure 1
What I used
The hand grip on the left contains a > A lens and shutter assembly.
cable release which is linked to the
shutter on the front of the camera. Search your favourite auction site
You can trigger a shot by pressing for ‘large format shutter lens’
down the plunger on the handle. This
makes it much easier to use. Plus, >  ome 4×5 film holders. Search for
S
the author thinks it looks cool
‘4×5 film holders’. You put your
unexposed film into them, and
they attach to the back of the
camera to expose the film. These
can be found quite cheaply
> If you are making the helicoid
version of the camera, you will
need a ‘M65 to M65 Mount Lens
Adjustable Focusing Helicoid
17–31 mm Macro Tube Adapter’
> 6 × M3 6 mm countersunk bolts
and 6 × M3 3 mm (length) ×
5 mm (outer diameter) brass
knurled insets
> 3/8” to 1/4” tripod screws adaptors
> If you want to add the viewfinder,
search for ‘2 Functions Mobile
Phone Lens 0.45 × Wide Angle
Lens and 12.5 × Macro HD
Camera Lens’ on your favourite
shopping site
>  dark ‘changing bag’. This is a
A
light-tight bag where you transfer
your film into the film holders that
are loaded into the camera
> A 4×5 cm ground glass screen.
The best place to buy one of
these is from Intrepid Camera
(intrepidcamera.co.uk). It also
sells Fresnel lenses
>  length of elastic ‘bungee’ cord,
A
as used in jackets and hoodies.
used in direct sunlight. He plans to add This holds the back screen on the
some felt inside to improve this. The camera and stretches to allow you
camera lens at the front is mounted onto a to insert the film holder
helicoid (the black cylinder with the three >  esigns for your camera. You
D
knurled rings behind the lens in Figure 1) can download them from here:
which is turned to move the lens in and out the lens further away from the camera, it film.kolve.org/3ddesign
and adjust the camera focus. There are also will focus on closer objects. You identify
designs available which use 3D-printed the infinity position by pointing the camera
threads on the lens holder to screw the at a distant object and then adjusting the
lens in and out. lens until the image is sharp. You can use
this for ‘zone focusing’, where you just set
TO INFINITY AND BEYOND the lens for the distance the camera is
One of the first things you need to do from the subject, and everything in that
when you have built your camera is zone will be sharp. If you look at the
discover the focus position for infinity. camera in Figure 1, you will notice some
Ideally, this would be when the lens is white dots painted on the lens mount. The
closest to the camera. Then, as you move two you can see identify the infinity focus

35
How I Made: Print yourself a large format camera

FEATURE

KEEPING THE COST DOWN

Photography can be expensive. You can spend


a lot on a modern digital camera. But you can
have fun and make amazing results for a lot
less cash. The most expensive component of
the camera is the lens and shutter assembly.
This focuses the image and controls the
amount of light that reaches the film. These
lenses can cost over £100, but the good news
is that, unlike the latest digital camera, an old
lens will hold its price very well. It might even
go up in value. You can swap a single lens
between multiple cameras, as they all use the
same fitting. Film and developing your photos
are getting expensive, but there are some very good low-cost films around, and you can find bargains with
expired sell-by dates. Home processing is cheaper and quicker than sending your shots away and is a lot
of fun. You can pick up a second hand scanner to get your negatives into your computer, or you can use a
smartphone to photograph the negatives and an app to convert them to positive images. For around the cost
of a few video games, you can get yourself started on a creative and fun hobby.

position. When the two dots are aligned,


Figure 2
You can add a Fresnel the camera is focused on the far distance.
lens on top of the
ground glass to make
There is also a dot for 2m focus distance.
the image brighter
IN THE FRAME
To set up your photograph with the camera,
you attach a viewing screen to the back,
as shown in Figure 2. The screen is held
in place with elastic cords. It contains a
sheet of ground glass which is placed in
the position that the film will be in when
the picture is taken. The lens projects an
image onto the ground glass. Because of
the way lenses work, the image is inverted
and flipped left to right, which makes the
viewfinder interesting to use, but you do
get used to it. The image can be hard to
see, especially if you are outside. You can
improve your view by putting a ‘dark cloth’
around the camera and over your head
to keep out external light. This also gives
your pictures a proper Victorian sense
of occasion.
If you are using zone focusing, you can
set your focus using marks on the lens and
use the round optical viewfinder on the top
of the camera to frame your picture. The
viewfinder is based on a close-up lens which
is sold for use on mobile phones. When you

36
LENS

Right
The bright parts of
the sky have come
out completely black,
whereas the dark area
under the table is white
in the negative

are ready to take your shot, you slide a film


holder in front of the viewing screen.

WELCOME TO THE DARK SLIDE


The film holder contains a ‘dark slide’ that
protects the film from light. When the holder
is on the camera, you remove the dark
slide, take the picture (having remembered “LOAD
THE FILM
to set the shutter speed and aperture), and
then put the dark slide back into the holder HANDLE ANGLE PRINTING
and remove the holder from the camera. You can see the camera handle on the left-hand

INTO THE
A film holder contains two sheets of film, side of the camera in Figure 1. It has a complex
shape that made it very difficult for the author to
one on each side. The author owns two film
print. If it was printed vertically, the handle came

HOLDERS”
holders, which means he can go out and unstuck from the printer, causing the print to fail.
take four pictures before he must come If the handle was printed horizontally, the slot for
home again. Before any pictures are taken, the cable release, which runs the entire length
the film and empty holders are placed into a of the handle, needed to be printed with internal
special light-tight changing bag, which has support that was very hard to remove. In the end,
the problem was solved by printing the handle at
light-tight cuffs sewn into it. You put your
a 45-degree angle so that it had lots of contact
hands through the cuffs and then load the
with the print bed and needed no internal support.
THE BIG PICTURE
film into the holders. After the pictures have This was perhaps a bit wasteful with filament, but The camera takes pictures onto sheets of
been taken, you use the changing bag to get it did make for a very good-looking result. This is film that are 4×5 inches in size. These
the film out of the holders into either a light- something that you might like to try if you have a images contain lots of detail and, because
tight box to be sent away for processing or tricky thing to print. the lens is a long way away from the
a development tank. film, you can get beautiful out-of-
focus effects. Lenses have a property
ACCENTUATE THE NEGATIVE called ‘depth of field’, which
The development process produces a determines how much of an image is
negative image; the darker parts of the in focus. A lens with a large depth of
negative are made from tiny grains in the field would take a sharp picture of
film which have been illuminated and then both you and a tree in the distance
turned to silver. You make a print from a behind you. A lens with a shallow
negative by projecting it onto photographic depth of field will be able to take a
paper which, like film, turns darker when sharp picture of either you or the tree,
exposed to light. This reverses the light and but not both. You might think that
dark of the negative, resulting in a positive having more sharpness in a picture is
image. If you don’t want to do that, you can a good thing, but you can get some
use a scanner to create an image file that very pleasing effects by blurring parts
can be processed by software to create the of an image. The picture of the duck
correct appearance. in Figure 3 looks better because the

37
How I Made: Print yourself a large format camera

FEATURE

LARGE
FORMAT
CAMERA
trees and fence in the background are
blurred. Smartphone cameras are very small
and put their lenses very close to the image
sensor. Because of the physics behind the

“OUR 3D-PRINTED way lenses work, this means a phone


camera has a large depth of field. Phones

CAMERA…LETS PHYSICS
use sophisticated software that can analyse
an image, decide which bits are in the
distance and blur them. The results can be

DO THE HARD WORK” impressive, but our 3D-printed camera just


puts the lens a very long way from the film
and lets physics do the hard work.

Figure 3
The lens was focused on
the duck, which is very
sharp. The trees in the
background are blurred

DIGITAL VS ANALOGUE
A digital camera breaks a picture down into a grid of picture
elements or pixels. Each pixel stores red, green, and blue intensity
values representing the colour of that position in the image. An
image is recorded by a grid of sensors producing light intensity
values at each pixel. The value is the amount of red, green, or
blue light falling at that pixel. These values are used to calculate
a colour for each pixel. Analogue cameras use film coated with
silver halide particles called ‘grains’, which are chemically
changed when hit by light. Chemicals in the film developer convert
the changed grains into opaque grains of metallic silver. Colour
film uses three grain layers which are sensitive to different light
wavelengths. During development, these are bound to dyes which
react with the silver in the grains to produce the complementary
colour for that primary. Red areas are green, green areas are red,
and blue areas are orange.

You could say that film images are more ‘real’ because they
have not been subjected to any digital process. A difficulty
with digital cameras is that, because each pixel only measures
one primary colour, the final of each pixel is calculated using
the colour values of the pixels around it. This is why different
digital cameras produce slightly different results; they each use
different algorithms to combine the sensor values. An advantage
of analogue photography is that the colour resolution is spread
over the whole image. An advantage of digital photography is that
there is no film to be bought and developed, and you can view the
images as soon as you have taken them. Both have their place, and
they are both great ways to take pictures.

38
LENS

CONTROLLING EXPOSURE
When you take a picture with your phone,
the camera works out how much light the
sensor needs to get a properly exposed
image. When you take pictures with the FANCY FITTINGS
printed camera, you need to set the shutter
speed (how long the film is exposed to the
light) and the aperture (the size of the hole The lens mount is fitted onto the camera body
using bolts that screw into brass fittings which
the light comes through). The easiest way to
are embedded in the camera body. The author
do this is to use a light meter application on size of the box must exactly match the lens had never used this technique before. It is a very
your phone. You set the speed of the film in you are using. A lens has a particular ‘flange quick and simple way of creating strong and
the app (how sensitive the film is to light), focal distance’ (FFD), which is the ‘in focus’ reusable fittings.
point your phone at the scene, and then distance from that lens to the surface of the
copy the reading values onto the camera. film. You need to make
If your shutter speed is less sure that the box you
than a thirtieth of a second, make is the right size for
you will need to put the your lens. The website at
camera onto something solid. hsmag.cc/WillTravel has
Otherwise, camera shake will a lookup table you can use
blur the image. to find the FFD for your
A camera can only capture lens. You can then select
To put the fittings into the camera body, you will
a fraction of the range of light an appropriate design from the
need a special tip for your soldering iron. You can
and dark areas in a scene; ones available. find one by searching your favourite e-commerce
if you get your exposure The Will Travel body contains threaded site for ‘heat-set insert installation tip’. The brass
wrong, you might find that holes you can use with 3/8” to 1/4” fitting is heated up on the tip and then pushed into
the faces of your subjects adaptors to allow you to put the camera the hole in the camera body.
are too dark or too light. You on a tripod. There are three
deal with this by measuring accessory shoes you can use for
the light from the parts of flash-guns, lights, or the
the scene you care about. As viewfinder. There are also holes
you take more pictures, you into which you can fit spirit levels.
can use this limited range The handle can be used on either
to your advantage, making a side of the camera body.
subject stand out by blowing
the background out to white OCCASIONAL
or turning the background PHOTOGRAPHY
dark. Next, you will start The 3D-printed camera brings a
using lights to control how real sense of occasion to taking a
the picture looks, and hey picture. On a good day, the results
presto! – you are turning into will stand comparison with very
a proper photographer. expensive cameras. The lenses
The author hasn’t tested the fittings to
and shutters might be old, but the results destruction, but they seem to be a lot stronger.
PRINTING A CAMERA they generate are very impressive and can
The most expensive camera be made into enormous images. Also, taking
in the world is still just a box photographs ‘the hard way’ teaches you a
with a lens at one end and huge amount about photography, and how
something light-sensitive to use the limitations of the medium to get
(film or an electronic sensor) the best results. If you are of a certain age,
at the other. So, if you want you might even find it fun to revisit the days
to make your own camera, of home development and seeing pictures
you only really need a appear before your eyes in the darkroom.
light-tight box. However, it’s The author has had a lot of fun with this and
not quite that simple. The hopes you do too.

39
os
Josef Průša

Ju
INTERVIEW

HackSpace magazine meets…

°
Josef Pruša
3D printers: they’re quite a big deal

W
e’ve been having an
awful lot of fun
playing with/
thoroughly testing
the latest offering
from Prusa Printers,
the Mk 4. As part of that, we got the
chance to pick the brains of Mr Průša
himself, on the development process
behind the XL and the new Mk 4, on 3D
printing 3D printers, and why his suppliers
hate their new X-ray machines.

40
sef
o sa
LENS

uAbove
Josef Průša, at
home among the
printers, which
are busy printing
more printers

41
os
Josef Průša

Ju
INTERVIEW

HackSpace Take us back to the machine. Because we don’t use it just for
beginning: how did Prusa Printers start? the PCBs; we can check the quality of a lot
of other parts without destroying them.
Josef Průša I found out about 3D printing Sometimes if you have to mill something
and I found out about the RepRap project, down to check something, the suppliers
which was wonderful. But… I’m not going will come back to you and say that
to say that I’m lazy, but I like to do things whatever defect you’ve found was broken
urgently. So when I saw the original during the milling process.
Mendel model, and I tried to build it, it was This way they can’t trick you. And this
just so, so complex. Sourcing the parts is the second time that X-ray technology
and putting it together took far too long. has become unpopular with our suppliers,
At the same time, I started to think because we also use handheld XRF
about how to do it a different way with the spectrometers – like an X-ray gun that
things that I had around. And that is how you can put on metal or something; you
it originally got Prusa-fied – my Prusa press a button and it’ll tell you the
Mendel Iteration 2. elemental parts of an alloy, for example.
But, from the very beginning, people Sometimes we get suppliers switching
kept calling it simply Prusa, because they the alloy for something cheaper, which
didn’t want to use the whole big name. can also be tricky.
And that’s how it all started. I was doing
it as a hobby for three, four years. And HS Do you still use 3D printers to print 3D
then I knew at that time that the printers in your factory?
university where I was studying wasn’t
for me, I wasn’t very happy with the JP Yes, we do. We have over 700 now;
university. So I ended my studies there most of them are Mk 3s, but we will soon
officially and, on the same day, I started be switching the whole farm to Mk 4s to
the company. get more throughput.
Sometimes when you start a company, But yes, we still do it every day. I think
you have to let everybody know what it should be required for 3D printing
you’re doing. But in my case, people had manufacturers to use their machines in
already started asking me to build production, because the 3D printing world
printers for them long before I started would be a much better place now if
doing so as a business. And they liked the everyone did.
design. So it was a little bit of a smoother We do some injection moulding, but
start than usual. those are the parts that we know aren’t
In ten years, we grew it quite a lot: I now going to change, and it would be
have over 800 employees. And we make inefficient to make with 3D printing. But
as much as we can here in Prague. We price-wise, it’s not that big of a deal
just opened our in-house PCB assembly compared to injection moulding.
line, so we have absolute quality control And the Automated Farm System is
on the PCB stage, which is crucial for the also getting quite complete; this will
longevity and the reliability of the printer. automate that process even further. We
We don’t just outsource it somewhere showed the concept machine at the Dubai
else. Now, we manufacture in-house, so Expo, representing the Czech Republic. It’s
there can’t be any way to hide failures on basically an automated [print] farm: you
the PCBs. have rows of printers and there’s a picker
which goes and takes the print plate
HS And I saw that you’ve bought an X-ray out, puts the new one in, and everything
machine. What’s that for? is automated.
Above
The MK4 has been
JP That is part of the PCB assembly line, HS There’s also something very nice in development
to be able to check for the voiding. I can about open-source machines being made since Before the
Pandemic (BP)
tell you a lot of suppliers hate the X-ray by open-source machines.

42
sef
o sa
LENS

u 43
os
Josef Průša

Ju
INTERVIEW

Above
According to Josef, the
current golden age of
innovation in 3D printing
is in danger if too many
patents get in the way

44
sef
o sa
JP It’s self-replication at scale. I was never
trying to push it beyond what is
reasonable, and I think that’s the key – to
show our customers where it can be used.
Because complexity in the 3D-printed
parts doesn’t cost us much, and the rest of
the parts can be quite simple.
JP The best way to come up with new
products, the only way to come up with
new products, is to try to solve
somebody’s needs. In this case, it was
co-operation with a hospital. And we
nailed that down. And on top of that, we
are finding use cases for many, many,
become the number one, but as we are
growing and growing, I can see it
happening quite soon.
LENS

It really is a service to the community


for us. We still don’t run ads – I’m very
happy about this, that there can be some
nice place on the internet that doesn’t

u
You can see this especially clearly on many other fields. have hidden extra ways to squeeze
the previous Mendel model, the triangular money out of the user.
shape where you can just use straight HS That brings us on to Printables, the
metal rods and all the complexity was site you launched a while back to host 3D HS On a different note, I saw an update
held in the 3D-printed parts. models. How’s that going so far? from the Elizabeth Holmes trial and it
reminded me to offer you a belated
HS And you’re making your own JP So for me, I think our biggest congratulations on making it into the
raw materials now, including competitor in this regard was a little bit Forbes 30 Under 30 list.
tungsten filament. left behind by its parent company.
I knew that we needed to do something; JP Three years on from making that list
JP Right! We were very pleasantly we already had prusaprinters.com as our and I still haven’t been arrested!
surprised because the first batch sold out domain name, for our own blog, so we What is more important to me than
quite quickly; we’ve since made a second used that. these awards is that my printers’ users
batch, but evidently there is a big hunger I’m quite happy that we used the Prusa are happy with the machines, getting
for such materials. Printers name as a way to grow it. upgrades, upgrading them to the new
And it is quite cool to read the models. That’s what brings me joy.
tweets a couple of hours after I Not being on some list.


posted about its release. You see What good is being on a list?
guys saying ‘oh, I’ve been waiting We’re not seeking any We’re not seeking any
for exactly this – I’m going to use it investments. investments. Rather, we invest
at work at the reactor shielding.‘ ourselves in local hardware
That’s a lot of fun! And we want to
Rather, we invest startups. There’s not many people
do more of the high-end filaments ourselves in investing in hardware, especially
and materials in the future. We local hardware if it’s everyday working things. We


have some cool things in the backed an IoT bike lock and stuff
pipeline, but I cannot talk about
startups like that, which is also important.
these just yet.
Do you know what one of the HS I guess that you’re not
biggest user bases for the tungsten Because, at the moment when it was time working on a ChatGPT extension for
filament is? People who like to go fishing. to switch the name, we knew that it was a PrusaSlicer then?
Apparently you can 3D-print part of the very good concept and we were not afraid
lure, to weigh it down. They didn’t have to, you know, get such a wonderful JP That will be interesting. What’s going
filament for that before. So, on the one domain as printables.com. to happen in a year from now? If we make
hand, you have reactors; and on the other It was quite a hassle to acquire it, but a prediction now of where AI will be in a
hand, you have fishing. Even though I I’m very, very happy about it. I think year from now, we’ll be laughing at
know the filament is expensive, you don’t there’s a chance that printables.com will ourselves in a year’s time. We’re obviously
need to use all that much. So if fishing is be the largest [3D model hosting site] by looking into using the new technologies
someone’s really big hobby, a roll of traffic within the next year. I’m very, very in many places around the company.
tungsten filament might be cheap happy about it. But I value security and safety and
compared with some of the higher-end privacy quite a lot; I don’t think many of
products in that hobby. HS That’s not long at all. the AI machine learning things which are
now being hyped can be done quite safely
HS Am I right in thinking that the initial JP Three years of hard work is actually a or privately now. I think, in the rush to
demand for the tungsten filament came long time in the 3D printing space. adopt this stuff, a lot of engineers at some
from a medical research centre in the Especially at the very beginning, it companies are just pumping super-secret
Czech Republic? seemed like a very daunting task to stuff into the GPT interface over the

45
os
Josef Průša

Ju
INTERVIEW

” Basically, we just manufacture one big, solid


part. There are no connection points;
it is impossible for it to leak


internet. That is not what we would like JP No, no – I really try not to have parts
to do. We would like to do all the machine on the machine which are just non-
learning on the premises. functional in 3D printing.
Who owns the art created by AI?
Because it’s just an amalgamation of all HS And the next-gen extruder – what
the data that was put in, it would be very was the breakthrough there?
difficult to prove a breach when anything
with a non-commercial licence has JP The breakthrough was the
been used. combination of all of the parts in one.
What I tried myself is coding. Over the Basically, we just manufacture one big,
years, I got quite rusty in programming, I solid part. There are no connection
must admit, and I just wanted to test it points; it is impossible for it to leak.
out. So I did a little script to take data People call it the blob of death, when they
from one API and put it into another API. don’t tighten the nozzle properly and the
With me being rusty, it might have taken plastic gets heated and starts to leak, and
me three days. But with all the new AI you come to the printer and you just see
stuff, it was done in an hour. I had to the extruder covered in a huge blob of
correct it a couple of times, but it was plastic. [That can’t happen with our
quite amazing. extruder.]
If I may make one prediction, I think That is one of the things that we are
people will soon start to value face-to- very happy about. It is faster, it’s more
face communication a lot more, because reliable, and more integrated. We wouldn’t
we’ll get fed up of all the chatbots trying be able to do the load cell without it.
to pose as real humans.
HS And are you planning to keep
HS You decided to add RGB LEDs to the supporting the Mk 4 with upgrades, like
Mk 4. you have done from the original Mk 1?

JP I mean, RGB LEDs are just fun. But, you JP So, I would say with the Mk 3 we have
know, sometimes when you have the a very good track record. We’ve been
printer at the other side of the room and doing firmware updates and keeping
you’re printing at high speeds, you don’t everything top-notch for five years. And
know, you don’t hear if it’s printing well or that is just the beginning.
not. I wanted to have a quick way of We still support the Mk 2s and
glancing across the room and seeing everything. So I would say we are ready
what is happening with the printer, if to support the Mk 4 for quite a long time.
everything is OK. The RGB LED is a good That is what people love about us: the
way to indicate that. machine is not a paperweight after a year.
And I’m especially proud of the
HS So, it’s not because of the normal possibility to do the upgrades, because we
maker tendency to put flashy lights have saved a lot of e-waste this way.
on everything? People love it. And I love it too.

46
sef
o sa
LENS

u Above
Lengthy software
support means your
Prusa won’t turn
into a paperweight
overnight

47
In the workshop: Pomodoro timer

FEATURE

IN THE
WORKSHOP:
Pomodoro timer
By Andrew Gregory In which we try to do something simple
and end up learning about I2C

T
his month, I set off with the
intention of building a Pomodoro
timer controlled by physical
movements, rather than buttons
or switches. To capture the physical
movements, I’d need an IMU, or
Inertial Measurement Unit. Pimoroni sells one of
these that uses the same motion sensor chip used
in smartphones and watches to measure 3-axis
acceleration, 3-axis gyroscopic motion, and 3-axis
compass heading. I’d also need a screen (Pimoroni is
selling off its lovely Scroll pHAT HD displays,
featuring 17×7 LEDs, for £6.90 plus shipping), and a
real-time clock module to keep the time. I also threw
an atmospheric sensor into the basket, because
why not?
Above For now, I’m sticking with Python, as not all the
When you’re breaking
components out onto sensors support my first choice, MicroPython. The
breadboard, it’s easy to Scroll pHAT HD fits neatly on the GPIO pins, and
get the orientation wrong.
If you see error messages with a quick download of Pimoroni’s example code,
that look like ‘Remote
I/O error’, you’ve wired
it just works. Now to add the IMU sensor… and
something up wrong there aren’t any pins left on the Raspberry Pi. This
is impossible.

48
LENS

Below
The Scroll pHAT
HD, like most
HATs, covers all
the Raspberry Pi’s
GPIO pins

Except that it’s not. The Scroll pHAT HD sits


over all of the Raspberry Pi’s GPIO pins, but it
can’t use them all – surely no device needs three
power supplies and eight ground pins, never mind
all the rest of the GPIO pins? The answer was
found at pinout.xyz, by Phil Howard. The device The bad news is
that the IMU also
I’m using needs only four pins: 5 V power, Ground,
and GPIO 3 and 5. That’s the good news. The bad
news is that the IMU also needs to use those
same four pins. It turns out that the atmospheric
sensor and real-time clock also use those same
four pins. Something is going on here, and that
needs to use those
something is I2C.
I2C was invented in the 1980s, as a way for
chips to talk to each other. Back then, they didn’t
same four pins
49
In the workshop: Pomodoro timer

FEATURE

Above
With just three I2C
devices connected,
our breadboard is
looking a little messy

Right
Some devices
connect over I2C
using the much
smaller, neater
JST connectors

50
LENS

have the chip shortage that we’re mercifully complicated than that. On a Raspberry Pi, the pins
coming out of right now. Rather, tech companies that send out data over I2C are pin 3 and pin 5; the Above
The gear we’ve
were starting to put chips in everything, as chips I2C device will also need power (pin 1 or 2) and chosen for this
became radically smaller, cheaper, and an all-round ground (Pin 9). Any I2C device can connect to these build all uses the
same small set of
better way of controlling devices than using same four pins, provided it has a unique device GPIO pins. This is
a problem…
discrete components. Chips are also known as address. The clock module I’ve been attempting to
integrated circuits, and it’s from here that I2C use has an address of 0x52; the environmental
gets its slightly clunky name: Inter-Integrated sensor uses 0x76 or 0x77.
Circuit communication. To set up the I2C pins on a Raspberry Pi, go into
From this, we can infer correctly that every the Raspi-Config tool by entering:
device that uses I2C has a chip on board. Each
sudo raspi-config
chip has a unique address, and I2C supports up
to 1008 separate addresses – I’m going to need a Now, go to Interface Options, then to I2C. Enable
bigger breadboard. I2C by selecting Yes, and choose to enable I2C every
If you’re using discrete components – say, an LED time the Raspberry Pi boots.
and a buzzer – you’d need to connect each one to a Failure is the first step in learning; this has been a
separate GPIO pin and switch each pin on or off to frustrating learning curve, but now I know what’s
get current into the component. I2C is more possible, we can get cracking.

51
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


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

60
PERSONALISED
CARDS
Use NFC to bling up your
PG
54
greetings cards

SCHOOL OF
MAKING
PG

66
LET THERE Start your journey to craftsmanship
BE LEDS with these essential skills
Get started with this
basic component 54 KiCad

PG

70
PRINT IN PLACE
Working mechanisms straight off the print bed

PG

72
PG PG

AUTOMATIC 78 82
LIGHTS
Remove your light switch
E-SCOOTER
Build your own
AI DESIGN
Can ChatGPT write
and save seconds every day! personal transporter OpenSCAD code?
Getting started with KiCad, PCB layout

SCHOOL OF MAKING

Getting started
with KiCad, PCB layout
In this second part of the series looking at PCB creation with KiCad,
we lay out our PCB ready for fabrication

Jo Hinchliffe
@concreted0g

Jo Hinchliffe is a
constant tinkerer and
is passionate about all
things DIY space. He
loves designing and
scratch-building both
model and high-power
rockets, and releases the
designs and components
as open-source. He also
has a shed full of lathes
and milling machines
and CNC kit!

I
n the last issue, we got our schematic for the ‘Update PCB from Schematic’ icon. This opens
our Pico add-on board created, and we a window, and we can simply click the Update PCB
assigned each schematic symbol a footprint button and then click the Close button (Figure 3).
which represents the individual component Once back in the PCB Editor, we now should have
we are adding for each part of the design. our design as a collection of footprints attached to
In this issue, we will finish this starter project our pointer. Left-click to place the component bundle
by laying out the PCB design ready for manufacture. somewhere in the middle of the page (Figure 4).
If you haven’t opened KiCad, do so now. Open the The PCB editor has a grid feature which snaps
previous project and select the PCB Editor icon from footprints at useful points. In our current case, the
the available applications (Figure 1). If you have pin socket footprints will snap with the centres of
opened the project and the Schematic Editor, you the pad holes on the grid. As the Pico conforms to
can jump to the PCB Editor by clicking its icon in the 2.54 mm pin spacings, it’s useful at this point to set
Schematic Editor toolbar. the board editor grid to ‘2.54 mm (0.1000 in)’. You
Having opened the PCB Editor, you should see can select this from the centre drop-down menu on
a similar page to the Schematic Editor, but in black the upper toolbar. We can now align our two pairs
Figure 1 (Figure 2). You’ll notice it is blank, so the first action of pin socket footprints so that they are in line with
Our completed
routed PCB design is to pull in our footprints. To do this, we can click each other horizontally.

54
FORGE


Figure 2
The blank PCB Editor ready to import our footprints
The PCB editor has Figure 3
The Update PCB from
Next, move one element of one pair so that it a grid feature which Schematic window
primarily brings in the
lies two grid dots away from its connected pair.
snaps footprints at component footprints


You do this by clicking on the centre of a pad on and connectivity, or

useful points
can be used to apply
the footprint and then pressing M, similar to in the later changes to a
schematic design
Schematic Editor. If you only move it across one grid
dot, they will overlap. You should see a collection
of small white lines connecting the pads between
the two connected footprints – this is called the
‘rat’s nest’. We will remove these white lines when
we lay the trace connections. It’s important that
our board matches up to a Pico, so we used the
dimensional diagram (Figure 5, overleaf) taken
from the Pico data sheet documentation, available
here: hsmag.cc/PicoDatasheet. You’ll notice that
the distance between the vertical rows of pins
is 17.78 mm – this equates to 7 × 2.54 mm. This
is why your Pico fits perfectly into a prototyping
breadboard. Move the remaining outer pin socket
footprints so that it is on top of one of the pairs you
have placed correctly, and then move it seven grid
spots to the right. You can now arrange the last
footprint to be two grid spots inside. The outside
pair of footprints should now match a Pico’s pin

55
Getting started with KiCad, PCB layout

SCHOOL OF MAKING

positions, and the inner footprints should be close


Figure 4 to them, and parallel. So far, we should have only
Our component
footprints imported, been working on the F.Cu (PgUp) layer, which is the
with the rat’s nest a top copper layer on our PCB board. Before we route
representation of the
connections between the tracks between our footprints, double-check
components and pads
made of small lines
that you are on this layer by checking the drop-down
menu on the top toolbar.
Figure 5
A technical drawing
of the Pico taken from LEAVE ONLY FOOTPRINTS
the data sheet gives
us the dimensional Next, we can wire the pads on the opposite
information we need footprints together. To do this, select the Route
Tracks (X) icon, then click the centre of a pad and
drag the track over to the centre of the opposite
pad. The track should be red, indicating that it’s on
the top copper layer. If we, for example, were to
move to the B.Cu (PgDn) layer, the default colour for
tracks on the lower copper layer is blue. Continue
QUICK TIP and connect all pads together, noticing that the rat’s
Remember, a lot nest lines disappear as you do so.
of your keyboard Referring to our Pico technical drawing, it’s a
shortcuts are good time to define the shape and edges of the
universal. For board. To do this, we can use the uppermost drop-
example, F1 and F2
down menu to move from the F.Cu (PgUp) layer to
zooming works in
both the Schematic the Edge.Cuts layer. On this layer, we can use the
Editor and the Draw a Rectangle tool to create a cutout shape for
PCB Editor. our board. Before we select this tool, let’s switch

56
FORGE

the grid to a more useful spacing. Select the 1 mm


grid spacing, then left-click the rectangle tool. Figure 6
Drawing a rectangle
Left-click anywhere in the PCB Editor page and that defines the
drag a rectangle (Figure 6). The rectangle should cut edge of the
PCB board
be snapping to the grid – we can drag it out until
the labels tell us we are drawing a 21 mm width by
51 mm height rectangle. Left-click one more time
to create the rectangle. Moving back to the Select
Items (S) tool, we can now select the rectangle and
press the M key to move it into position. Notice

” Connect all pads together,


noticing that the
rat’s nest lines disappear
as you do so

from the Pico technical drawing that the outside
edge of the Pico sits 1.61 mm from the centre of
the pin pad position. To position this accurately, we
reduced the grid spacing to the smallest listed and
used a technique to measure distances on the page.
If you press the SPACE bar at any time when in the
PCB Editor, you might notice that values labelled
‘dx’, ‘dy’, and ‘dist’ are set to zero. This is very Left
Routing tracks to
useful as you can place your pointer at a point, say
connect the
the centre of the top rightmost pad, press pads together

57
Getting started with KiCad, PCB layout

SCHOOL OF MAKING

Figure 7
A first glimpse of our
rendered PCB board

the SPACE bar to create a zero or datum point,


ASSIGNED AND SEALED and then move the pointer to, in this case, the
One point we mentioned earlier in this project is the edge cut rectangle. We can then use the dx and dy
idea that KiCad schematic symbols are generic – we values to help us position this, or anything we need
assign the hardware footprint to them using the to, accurately.
Assign Footprint tools. As an experiment, we could Once we have positioned the board edge
now show the advantage of this. Say we have our
rectangle correctly, we can get a first glimpse of
PCB layout completed and ready for manufacture, but
after checking, we realise that our B3SL-1002P button our board in the 3D Viewer. You can actually look at
package is not available or in stock anywhere. We the board in the 3D Viewer before adding an edge
can simply go back to the Schematic Editor and click cut, and it will render to a rectangle size that is the
the Assign Footprint tool icon. We can then edit the smallest that can accommodate all the footprints
SW_SPST symbol to have a different, and hopefully, currently in the PCB. To view the PCB, click View
in stock, component. For example, we selected the
> 3D Viewer. You’ll see the board, but you’ll notice
B3SL-1022P footprint package, double-clicking it to
QUICK TIP ensure it is added to the centre console list. You can
that all the 3D models of the header sockets are all
There are lots then click Apply > Save Schematic > Continue, and placed into the rows of holes. In reality, we would
of drawing tools then click OK to close the dialog. Moving back to the only want headers on the outer rows installed on
to create more PCB Editor, you can then once again click the Update the back of the board, with the inner rows left
complex edge cuts PCB with changes made to the schematic (F8) icon, or unpopulated, or possibly populated with header
in KiCad. Also, in press F8 on the keyboard and the board will update with pins. We could edit the board and the component
future articles, the replacement footprint added. If, as in this example,
footprints to reflect this, but for this ‘getting started’
we’ll look at you replace the part with another part that is virtually
the same footprint, you might not need to rewire the example, we can click the Toggle 3D Models for
importing graphical
elements from other traces, but, of course, you should check and adjust Through Hole type Components (T) icon to turn
drawing software, connections and positioning as required. off the models (Figure 7). In future articles, we’ll
such as Inkscape. explore not only using correct 3D models but we’ll

58
FORGE

look at how we can add custom 3D models to


our libraries.

FLOOD ZONE
We can now continue to arrange and wire our
remaining components. For the LED and the switch/
button, we are wiring traces directly to the pin
connections to the Pico – this is perfectly OK, but
in future parts of the series, we will look at using
copper flood zones. A copper flood zone is where an
area on a layer of a PCB is flooded with copper that
is connected to a certain ‘net’, with the net value
being chosen by the user. This means, for example,
that we could make a PCB where everything on the
back layer is a GND-connected copper flood, then
any pads that connect to ground simply join the
flood with small traces. This can dramatically reduce
the amount of traces in more complex designs, Above
We’ll use numerous
making them easier to route. PCB fabricators in
Finally, how do we get this board made? Well, this series, but a
great place to start,
there are lots of options – we will look at many where you can directly
upload KiCad PCB
of them throughout these articles. Globally, there files, is OSHPark
are lots of services available from companies to
Below
manufacture and even assemble your boards. Our complete PCB
These services may need different approaches with all components
placed and routed
in terms of what information and files you need
to upload to get the job done. Often we need to
export Gerber files for each layer of the PCB, and
also drill files which show the position and size

” In a few weeks – often


less – you’ll have
‘Perfect Purple PCBs’
through your door!

of holes. Some companies might have limitations



on what size holes they can produce and what
tolerance they can produce the board too. We’ll
explore this in future articles, but the simplest
way, if you wanted to get this board fabricated to
an excellent standard, is you can upload the file
that ends ‘.kicad_pcb’ to the OSHPark website
(oshpark.com). The website and service are
brilliant. In-browser, it creates numerous renders of
your board, which you can then inspect and check
to see if they are correct before adding the PCB
to your cart to be manufactured. In a few weeks
– often less – you’ll have ‘Perfect Purple PCBs’
through your door!

59
Make interactive greetings cards with NFC tags

TUTORIAL

Make interactive
greetings cards
with NFC tags
Pep up that boring greetings card with a fun NFC tag.
Nicola King explores the possibilities

Nicola King
@holtonhandmade

Nicola King is a freelance


writer and sub-editor.
She vows to spend
less time searching for
makery paraphernalia,
and more time creating
useful items from her
(substantial) stash.

Above
A selection of different NFC tags – when choosing
which tag to use for a specific project, you’ll need
to consider memory requirements, read/write
cycles, where it will be positioned, whether it needs
to be waterproof, how it will be attached, and so on

T
YOU’LL NEED
here are lots of fun ways of using made greetings card for this endeavour but, if you
A ready-made
near-field communication (NFC) in have the time, you could really push the boat out and
greetings card,
or card-making our day-to-day lives. In this tutorial, make your own card for that extra handmade touch,
supplies we will be taking a humble greetings whether that’s using a digital cutting machine such as
card and hiding an NFC tag inside it in a Cricut which can cut out your chosen design, or just
An NFC tag,
e.g. hsmag.cc/ order to gift an unconventional digital purchasing some blank cardstock and card-topping
TimeskeyNFC surprise. The best part is that you need very little in ephemera from a craft store for you to piece together
An NFC-enabled terms of ‘equipment’ to get going, it takes next to no in an artful manner – the choice really is yours.
smartphone time to set up, and you really don’t need to be a tech Next, let’s talk about NFC tags, and the many
An NFC app
whizz either, so let’s jump right in. different options available. These unpowered tags
downloaded to come in various shapes and sizes, but are generally
your phone STEP 1 ASSEMBLE YOUR SUPPLIES on the small side, fitting in the palm of your hand,
(such as NFC Tools)
Let’s firstly gather together what we need for this and they are usually super-cheap to buy. We picked
A pen project. In the interests of speed, we’ve used a ready- up a handy selection pack from Amazon which

60
FORGE

NFC tags vary in terms of their memory capacity


and read speeds. The tags that we bought were all Above
A close-up of a
described as NTAG215, which means they have a sticker tag, showing
medium-sized memory capacity (504 bytes). You can the coiled circuit
which will take its
purchase tags with a bigger memory, such as those power from the
labelled NTAG216, which hold 888 bytes – it really nearby smartphone
or other device
depends on your specific needs. It’s worth bearing
in mind that tags with less memory will generally be

” You could really push the boat out and make your


own card for that extra handmade touch

slightly less expensive. It’s also worth pointing out


that you can rewrite many NFC tags, which is clearly
contained some black and clear-coloured coin-shaped a carbon footprint-reducing route to take. So, check
sticker tags around 2.5 cm in diameter, some similar this out before you purchase.
coin-shaped NFC cards, some mini NFC cards, some Now, let’s turn to our smartphone. The first thing
credit card-sized transparent NFC cards, and five we need to do is ensure that it is NFC-enabled. On
cool-looking epoxy NFC keychains. In all, the £15 pack our Android phone, we went into Settings, then
contained 30 pieces, which offers a lot of flexibility into a sub-section called ‘Connection and sharing’,
for different NFC-related projects. Given that we are under which we found ‘NFC (allow data exchange
working with a greetings card, we chose a thin, light when this device touches another one)’ switched on.
sticker tag for this venture as it will fit very neatly Every phone is different of course, but this setting Left
inside the card. The beauty of the sticker NFC tags is should be easy to find – on iPhone, it should be in the The Read tab of the
NFC Tools app gives
their simplicity and the fact that you can stick them Control Centre. you the details of the
virtually anywhere, so they can be used in places that Next, we need to download an appropriate NFC scanned tag. As you
can see, this one is
other technologies can’t. tag writer app that will enable us to program our empty of data

61
Make interactive greetings cards with NFC tags

TUTORIAL

Right
After selecting the
Write option, hold the
phone near to the
NFC tag to write the
selected records to it

Below
We stuck an NFC tag
to our greetings card
with a helpful message
for the recipient

tag. There are a number of suitable apps available, We are sending a birthday card and, to our tag,
including NFC Tools, NFC Tag Reader, NFC TagWriter, we want to add a link to a music video (Kool and the
and others. We chose to download NFC Tools, a Gang singing Celebration) from YouTube to wish the
popular and easy-to-use app which allows you to recipient a happy birthday. You could, alternatively,
read, write, and program tasks on NFC tags and other send them a link to a digital voucher, if you are feeling
compatible chips. generous. The choice is yours, but the point is that
QUICK TIP we are going to add a URL to the tag in this next
Try not to bend STEP 2 PROGRAMMING YOUR TAG step. Go to the ‘Write’ tab and select ‘Add a record’,
NFC tags too much, Once you have the app installed and launched, go and then select ‘URL – Add a URL record’. Click in
especially the very to the ‘Read’ tab. Put your tag on the table and hold the URL box, and paste in the link. Press OK. Then
thin ones – if the
your phone over it. All of the technical data regarding select ‘Write/XX bytes’ (the XX relates to the number
antenna breaks, the
information stored the tag should appear on your phone and, as ours is a of bytes and will vary). The app will then invite you to
on it is unlikely to new, blank tag, it is empty of data as we’ve obviously approach your NFC tag with your phone to write that
be recoverable. not programmed anything yet. URL to the tag. We found that we had to put the top
of our phone very close to the tag, but it worked and
we received a ‘Write Complete’ message. Click on
WHAT IS NEAR-FIELD COMMUNICATION? OK, and you have successfully written a URL to the
NFC is a technology that has gained momentum in recent years, and is a set of tag. If you want to test it, just hold your phone close
communication protocols that enables wireless communication (sharing data, media, and to the tag and the page should open.
more) between two electronic devices that are in close proximity to each other. Its history
is rooted in radio frequency identification technology (RFID), and NFC is really an evolution
from RFID tech, with both NFC and RFID having distinct use cases. NFC technology is
used in things like credit cards, ID cards, transport passes, car keys, access badges, hotel
access keys… to name but a few.
NFC tags are passive devices with no power of their own, and consist of a thin copper
coil (antenna) and a microchip, which is used to store very small amounts of data, such
as a URL or a password, for example. These tags operate at 13.56MHz. The coil allows the
tag to wirelessly receive power from the NFC reader (in this case, a smartphone) through
electromagnetic induction. NFC tags are activated directly by the magnetic field of the
NFC sensor of the smartphone/other device that reads them. So, when the smartphone
comes close to the tag, the tag is instantly energised and transmits the stored data in its
microchip to the smartphone.
Officially, the two electronic devices that are communicating with each other should be
about 1.5 inches (3.8 cm) apart, but they can be up to 4 inches (10 cm) from each other in
practice. In our simple tutorial, we have paired an NFC-enabled smartphone with an NFC
sticker (a very popular and practical form of NFC tag) which gets its power from the phone.

62
FORGE

” Have some fun playing with NFC tags – we wanted


to know the best route to a local garden centre

presented with the best route in Google Maps. You


can also set passwords for the tag, lock it, erase data,
and so on.
Additional options are available in the Tasks tab
when you download the NFC Tasks companion app
and grant it permissions. These include the ability
to alter your own phone’s controls, e.g. muting the
volume, as well as setting timers and alarms.
It’s even possible to use NFC tags to turn on lights,
unlock doors, and perform other actions in your Left
The NFC tag in our
smart home setup. There are various ways of setting birthday card links to
this up, such as using iPhone Shortcuts or sending a YouTube video of
Kool and the Gang
custom URLs to an app like Home Assistant to trigger singing Celebration
an automation.
Below
So, what are you waiting for? Get yourself some Some of the many
NFC tags, download an NFC app to your smartphone, record options
available in the NFC
STEP 3 TAP TO FINISH and see where it takes you. Tools app
As already mentioned, we used a sticker NFC tag,
peeled it off its backing and placed it inside the card,
with a note asking the recipient to point their phone
OTHER IDEAS FOR HOW TO USE NFC TAGS
at it. Note that when the recipient taps their phone We can literally only skim the surface with regards to what you can use NFC tags for. The
on the tag, the link should open, but they may be first possibilities are numerous, and we’d recommend you read around the subject a little to get
asked which browser they want to use if no default some inspiration, but here are a few of our favourite suggestions:
browser is already set on their phone. It’s also worth
noting that you can add multiple records to a tag, so • Make your own virtual business card – cardstock business cards are so old hat! Just
program your contact information, social media details, website etc. onto your tag and
we also added a text message.
away you go. The credit-card-sized NFC tags would be perfect for this. This handy
There are many other options too – for example,
explanatory video is well worth a watch: hsmag.cc/NFCBusinessCard.
you could add details of your Wi-Fi router to a tag, so
that any visitors to your • If you want smart home automation and some handy life hacks, NFC tags are just the
home/office can just tap ticket. You can use them to help with tasks around your home such as turning lights
it to gain access. You on and off, setting a kitchen timer, setting an alarm etc. You could even automate
can add a link to videos, your grocery list – stick a tag to the side of the bread bin, for example, and scan it
when you are out of bread so that ‘bread’ gets added to your shopping list. Take
social networks, phone
these ideas and just run with them! Try this instructional link out for more information:
numbers. Have some hsmag.cc/NFCSmartHome.
fun playing with NFC
tags – for example, we • Send secret messages – children might like this one. Just program your tag with your
wanted to know the best message and hide it for someone to find. Amusing more than practical…
route to a local garden
• Lessen the chance of lost PE kits – if you have offspring who are prone to losing
centre. Selecting ‘Add a
their PE kit (voice of experience speaking here!), then why not program their name,
record’ in the Write tab the name of the house they are in at school, and any other pertinent details into a
of NFC Tools, we chose waterproof and durable key fob NFC tag and attach it to the PE kit? Unlike a Bluetooth
‘Open a destination tag, it lacks the range to help you find it yourself, but it might improve the chances of it
address’. Next, we input getting returned if someone scans the tag with their phone.
the name of the garden
• Having a party? Add an NFC tag to the invitation so all the info is there at the tap of a
centre, selected ‘Write/
smartphone, including directions. You get the idea… you’re really only constrained by
XX bytes’, wrote it to the
your imagination.
tag as before and, when
we read the tag, were

63
This stunning 224-page hardback book not only tells
the stories of some of the seminal video games of
the 1970s and 1980s, but shows you how to create
your own games inspired by them using Python and
Pygame Zero, following examples programmed
by Raspberry Pi founder Eben Upton.

Get game design tips and


tricks from the masters

Explore the code listing


and find out how they work

Download and play game


examples by Eben Upton

Learn how to code your own


games with Pygame Zero

Available now hsmag.cc/store


Beginning electronics with a breadboard and an LED

TUTORIAL

Beginning
Part 01

electronics
with a breadboard
and an LED
Stewart Get started with electronic projects using simple components. Find
MAKER

Watkiss
out what makes the electrons flow using a LED light and switch
Also known as
Penguin Tutor,

I
Stewart is a maker
and YouTuber who n this project, you will learn how to create need some jumper wires, or solid core wire to
loves all things circuits on a breadboard, along with basic create the complete circuit. Avoid stranded wire
Raspberry Pi and information you need to know when starting as that is difficult to insert and the individual
Pico. Author of
Learn Electronics out with electronics. Find out how to work out strands can break off. The wires for battery packs
with Raspberry Pi. which way the LED goes and follow the easy guide normally have stranded wires, but hopefully they
twitter.com/ to find the right-value resistor. Add the switch are tinned, which makes them easy to use. If not,
stewartwatkiss and you have the basics of a first circuit. then you may need to push them in using one of
the jumper wires.
The first circuit is shown in Figure 2.

Using a breadboard
You’ll Need 01 A prototyping breadboard is a way
Testing the first circuit
> Breadboard
of creating electronic circuits by pushing
components into the board. Using a breadboard
03 Has the LED lit up? If so great. If not, don’t
magpi.cc/
breadboardhalf is a great way to learn about electronics. You worry: it may be that the LED is the wrong way
can use it to create a circuit, swap out some around. We didn’t mention it before, but the LED
> Battery holder
magpi.cc/ components, and experiment with different does need to be connected in a certain direction for
batteryholder values. When you’ve finished, you pull the it to work. Using a breadboard means that it’s easy
components out and they can be reused for your to experiment: just unplug the LED and insert it
> LED
magpi.cc/ next project. They are designed so that integrated with the leads the opposite way around. If the LED
diffusedleds circuits can be plugged into the centre of the still doesn’t light, then look for a switch on the
board, and you can connect components to the battery connector or recheck the wiring.
> 220Ω resistors
magpi.cc/ various pins. Most include power rails that run
220resistors horizontally across the top and bottom, and
LED direction
> Jumper wires
magpi.cc/
vertical rails with five holes each – see Figure 1.
04 When using a breadboard, it’s easy to swap
mmjumpers components around, but it’s not so easy when you
create a permanent circuit. There are a few ways
> PCB switch
Wire up an LED circuit
magpi.cc/
tactileswitch
02 You can start by creating a simple circuit
to tell which way around an LED needs to go, the
easiest (but less reliable) is to look at the length of
using a battery, LED, and resistor. You’ll also the leads. The longer lead is normally the anode

66
FORGE

Figure 1 Each hole in a row of (typically


five) holes is connected to
each other, with a split in the
middle where the groove is.
Putting a component in one
hole in a row connects it to a
component in another hole

Every hole in one of the long columns


on the side of the breadboard is
connected all the way across. They’re
often used to provide an easily
accessible positive and negative ‘rail’

which is connected towards the positive side is that the LED


of the circuit (the red wire from the battery), and must be the correct
the shorter lead is the cathode which is connected way around. The reason for
towards the negative side of the circuit (the black this is that it is a semiconductor
wire from the battery). A more reliable way of device. Semiconductors have special
determining the anode and cathode is to look for
a flat area on the body of the LED; the flat area
normally denotes the cathode (negative) side of
 ithout the resistor, the
W
the LED.
LED will allow too much
current to flow and burn
05 How the circuit works itself out
For an electronic circuit to work, there need
to be connections going from the positive terminal properties that allow them to work as a conductor
of the battery, through the components, and then or an insulator when certain conditions are met.
back to the negative terminal of the battery. This In this case, the LED is a type of diode which acts
completes a full circuit. The additional factor here like a one-way valve. It acts as a conductor when

Figure 2
Top Tip
Datasheets are
The LED lights up your friend
when a current flows
through it, but only Datasheets are
works in one direction available for
most electronic
components. They
A breadboard is a great way will provide the
to start electronics; you information you
can connect components need to use them
without damaging them in your circuits.

67
Beginning electronics with a breadboard and an LED

TUTORIAL

Voltage, current, and resistance


07 The three fundamental measurements
of an electrical circuit are voltage, current,
and resistance.
Voltage is the amount of electric pressure.
Voltage is measured in volts, which uses the
symbol V.
Current is the flow of electric charge going
through a conductor. It is measured in amperes
(normally referred to as amps), which has the
symbol A. When used in electronics, the current
is normally very small, so is often shown in
milliamps (mA) which are thousandths of an amp.
Figure 7 The
updated circuit in the forward direction and an insulator when in Resistance is how much a material opposes the
includes a switch the reverse direction. flow of electric current. It is measured in ohms,
to turn the circuit
on and off denoted by the Greek omega character, Ω. You
may also see values in thousands of ohms, known
as kiloohms (kΩ), or even millions of ohms,
The resistor
06 The other component included in the circuit
known as megaohms (MΩ).

is a resistor. As its name implies, this resists


the current around the circuit. This is needed to
Ohm’s law
protect the LED; without the resistor, the LED will
allow too much current to flow and burn itself out.
08 The voltage, current, and resistance are
The resistor used in this circuit is 220 Ω (ohms), all related to each other. This is all described in
but why do we use this value? To understand how Ohm’s law. The easiest way to understand this is
to choose resistors, you need to understand some by using Ohm’s law triangle (see Figure 3). This
basic electrical circuit theory. This may sound a has V for the voltage, I for the current, and R for
bit daunting, but you only need to understand the resistance. Cover the letter for the value you want
very basics. to find, and you have the formula. If you know the
current (I) and the resistance (R) but need to know
THE MAGPI
the voltage (V), then cover up the V and it leaves
you with I × R. If you want to know the resistor
value needed for a specific voltage and current,
then cover the letter R and you have V ÷ I.

Calculating the resistor voltage


09 and current
To calculate the resistance required, we first need
This tutorial
is from in The to know the voltage across the resistor. This will
MagPi, the official be the voltage of the battery, minus the voltage
Raspberry Pi dropped across the LED. The voltage across
magazine. Each the LED is specific to the type of LED used, but
issue includes a you can use approximate values based on the
huge variety of
typical values.
projects, tutorials,
tips and tricks to We are using four AA batteries. These are
help you get the normally 1.5 V per battery, providing a total of 6 V.
most out of your We’re using a red LED based on the typical values,
Raspberry Pi. which is 2 V. This gives 6 - 2, which is 4 V across
Find out more at the resistor.
magpi.cc
The current that the LED requires depends upon
Figure 4 Typical LED values for voltage and
current. Check datasheets for non-standard LEDs several factors, including type, size, and brightness.

68
FORGE

that is safer than risking too high a current. The 


Figure 6 Many
switches have
value we used is 220 Ω. four pins. The pins
on each side are
connected together,
with the switch going
between them

How to recognise the correct


11 resistor
If you look at the resistors, they don’t include the
resistance value written on them. Instead, they
normally use bands of different colours. A resistor
Figure 5 The resistor colour table. For four-band resistors, there
will normally have four or five bands of colour.
are two significant figures, a multiplier, and a tolerance band The four-band variant is the most common, so
we will explain that. There is usually a bigger gap
We have used 20 mA across the table (Figure 4), between the third and fourth bands so you know
which is a realistic value for a standard 5 mm LED. in which order to look at the resistor.
The first and second bands denote the first and
second significant figure of the value, followed by
the third band which is a multiplier (effectively
Calculating the resistor value
10 We now have the voltage across the resistor
the number of zeroes after the first and second
values). For our 220 Ω resistor, it will be red (2),
(4 V) and current (20 mA), so we can use that to red (2), followed by brown (×10). The fourth band Figure 3 The
Ohm’s law triangle,
calculate the required resistance. Using the formula is the tolerance, which for E12 resistors is often makes it easy to
R = V ÷ I, we calculate 4 / 0.02 = 200 Ω. gold (5%). See Figure 5. find the formula
for calculating
You may notice that earlier we specified a resistance,
voltage, or current
220 Ω resistor. This was not a mistake. You can
indeed use a 200 Ω resistor, but they are less
Add a switch
commonly available.
12 At the moment, the circuit
stays on all the time. You can add a
T he current that the LED switch to the circuit so that it only
comes on when this is pressed. This
requires depends upon requires a push-to-make switch,
which is one which completes the
several factors, including circuit when the switch is pressed.
These switches normally have
type, size, and brightness four pins, but these are wired in
two pairs, as shown in Figure 6.
When you insert these into the
Resistors are available in different values, but breadboard, the pins on the left
it would be impossible to have resistors for every are connected, as are those on the
calculated value. There are different series of right. Just remove the jumper wire
values known as E-series. Your author normally going to the resistor with a wire The LED needs to
be connected the
uses E12 series, which provides a reasonable from the supply to one side and correct way around.
Look for the longer
selection of values, with the nearest values being connect the other side of the switch
lead (anode) or the
180 Ω or 220 Ω. We’ve chosen the higher value, as to the resistor (Figure 7). flat area (cathode)

69
Print-in-place

TUTORIAL

Print-in-place
Straight off the print bed and into action

O
ne of the most fascinating
features of 3D printers is the
shapes they can make that
wouldn’t easily be possible
with other manufacturing
technologies, and nothing shows
Ben Everard this off quite like print-in-place mechanisms.
Perhaps the most obvious example of what’s
@ben_everard
going on is the caged ball. As the cage and ball are
printed at the same time, the ball can be entirely
Ben’s house is slowly Above
being taken over by 3D
in the cage. The same principle can apply to Our print-in-place catapult has a hinged
printers. He plans to mechanisms, the simplest of which are hinges, such arm that can fling ping-pong balls
solve this by printing an as in bag clips. One cylinder is printed inside the
extension, once he gets
enough printers. other and you end up with a joint that can hinge, but For objects that separate vertically, you can use
not come apart. a test, such as hsmag.cc/ClearanceCheck, to see
The major design consideration when doing what your printer can handle. This prints rotating
print-in-place mechanisms is how much clearance parts with different amounts of clearance. You can
they need. Put your parts too close together and then test each part to see which ones rotate, and
they’ll stick. Too far apart and the joint will be sloppy. that’s the smallest clearance you can have.
Exactly how far apart will depend on your printing It might seem a bit counter-intuitive that you can
setup and the orientation of the part. also have print-in-place parts that are separated in the
Z-axis. After all, you can’t print in thin air. However,
this can work if you’re careful. If there’s a small
vertical gap, the filament below will support the part
above it without actually adhering properly. The final
part can need a bit of force to loosen the joint the first
time it’s used but, after this, it should work fine.
We decided to test out print-in-place designs
with one of our favourite hinged mechanisms – the
catapult. We wanted the whole thing to print as one
piece, requiring just the addition of an elastic band
once it comes off the build plate.
There’s nothing particularly complex about the
catapult design, but we won’t go through it all here.
Download the STL file from hsmag.cc/catapultstl
Right if you just want to fire scrunched-up paper across the
The ball in cage room, or the FreeCAD file from hsmag.cc/catapult if
by KIO-Design on
Printables shows you want to play with the variables.
the basic principles You can print it upside down without supports.
of print-in-place.
Two objects that To make it a super-fast print, use lightning infill
can be printed (available in PrusaSlicer 2.6). Once you’ve printed
together, but then
can’t be separated it, you just need to add an elastic band. Loop it

70
FORGE

Left
Viewing from the
bottom, you can see
how the links of the
dragon join together


As you can see, there really is nothing special
You just have to make sure about designing print-in-place. You just have to make
sure that each piece is printable and that there is
that each piece is printable a sufficient gap to let the parts move. If you need
and that there is a sufficient supports for some parts of your model, you might


need to use support blockers in your slicing software
gap to let the parts move Below
to make sure that they don’t end up being placed
This print-in-place
inside the mechanism in such a way that stops them dragon, by Sunset on
from being removed. Printables, has lots of
links that create a
round the bar that holds the two sides together, Now that you’ve seen how print-in-place can work, very fluid model
then hook it onto the end of the arm. Pull the cup you can design your own parts.
back, load it with your ammunition of choice, and
fling it in a responsible direction so as not to cause
distress or damage (if you ignore those last twelve
words, don’t blame us). In the FreeCAD design
files, the specifications for the print-in-place parts
are in the variables spreadsheet. There are
options for pivot radius, pivot tolerance, and
arm tolerance. The pivot tolerance is the
difference between the radius of the solid
bar of the pivot and the radius of the hole
this goes through. By default it’s 1 mm,
which gives a very low-friction swing,
but you can try dialling it in closer. The
arm tolerance is the distance between
the arm of the catapult and the slot
in the base it sits in. Make it closer
and the catapult will be slightly more
accurate, but it might add more friction.

71
Hands-free lighting

TUTORIAL

Hands-free lighting
Shine a light on your projects without ever
having to flick a switch

Dr Andrew Lewis

Dr Andrew Lewis is a
specialist fabricator
and maker, and is the
owner of the Andrew
Lewis Workshop.

Above
The HC-SR04 can give you hands-free control over
your lights, but needs enough space to operate
without interference. This lighting project pushes
the limits of the setup, with tools and a work surface
relatively close to the sensors. You could use a laser
ToF sensor for more precise detection with less
chance of accidental triggering, or you could modify
your code to require a close sensor swipe from one
of the sensors to ‘activate’ the regular sensing mode

72
FORGE

QUICK TIP
The cone angle
of the HC-SR04
ultrasonic sensor
means that building
a light over a couple
of metres will be
impractical. For
longer lighting runs,
try using a VL53L1
laser time of flight
(ToF) sensor instead.

Left
If you’re feeling
ambitious, a fourth
sensor could be used
to control the colour
temperature of the
lights, to provide
a warm or cool
working environment

I
t isn’t always easy to turn a light on and off The problem with just adding more lights is that you
in the workshop. Your hands are covered in oil, don’t always want the light to be everywhere. Badly
the switch is too far away, and speech control positioned lighting will shine in your eyes and blind
only works if you can remember the name of you, rather than help you to see. Constantly turning
the light you want to control. With a Raspberry lights on and off disrupts your flow while you’re
Pi Pico, a strip of NeoPixel lights, and some working, and it isn’t always easy to adjust the position YOU’LL NEED
ultrasonic sensors, you of a light if your hands 1 × Raspberry Pi


can create a dimmable are covered in oil or Pico
strip light that only wet paint. 1 × NeoPixel/
shines where you want The problem with just WS2812 LED
it to. In this project, you’ll adding more lights is that SWIPE RIGHT strip
learn how to control TO LIGHT 3 × HC-SR04+
you don’t always want the


NeoPixel LEDs from a This project addresses ultrasonic
Raspberry Pi Pico running light to be everywhere these problems by sensor
MicroPython, and how using three ultrasonic MP1584EN DC
to use multiple ultrasonic sensors to control a strip buck converter,
sensors to detect the position of your hands. of NeoPixel lights. Two of the sensors are mounted set to output
3.3 V
To paraphrase Adam Savage, we all need more light at each end of the strip of lights, and measure the
in the workshop. This is particularly true as we age. distance to your hands. The remaining sensor is 2.5 mm panel
Our lenses become less clear, the parts of the eye mounted perpendicular to the lights and allows you to mount DC
power socket
that detect contrast changes begin to die off, and the adjust the brightness of the light strip. By positioning
muscles that control our iris become less able to react your hands in the air between the sensors, you can Suitable 5 V DC
to changes in light. These changes can affect our daily control which area of the light strip will be illuminated, power supply
(Your requirement
lives in a number of ways, but most notable is the so that you only turn on the areas that you need will vary depending
need for more light when working on fine projects. to use. on NeoPixel length)

73
Hands-free lighting

TUTORIAL

Right
Connecting the
circuit together is not
complicated, and pin
choices are more to
do with convenient
positioning of cables
than any special
features of the Pico

Below
You can mount
the light using
double-sided foam
tape. However, the
adhesive used on
some LED strips can
lose its effectiveness
in rooms where the
temperature gets very
warm or very cold. In
these cases, some
clips and screws can
be a better choice

While the Raspberry Pi Pico doesn’t require much


POWER PROBLEMS power at all, once you add multiple ultrasonic sensors
and a length of LED lights into the equation, you’re
NeoPixel strips run from 5 V, and they are power-hungry
going to need quite a chunky power supply to keep
beasts. The more NeoPixel LEDs you have per metre,
the more power you are going to have to feed to them everything running and, if your NeoPixel strip is over
to keep them happy. For longer lengths of NeoPixels, two metres, you should probably think about adding
you’ll need to inject an extra 5 V power into the strip multiple power supplies to keep the LEDs looking at
every few feet, or your LEDs will start to show the their best. If your lights are on the shorter side, you
wrong colours and generally misbehave. should be able to get away with using a single power
If you look at the circuit diagram for this project,
supply for everything.
you’ll see that the LED strips have a capacitor across
their power wires. The value of the cap isn’t critical, but
it’s worth realising that it’s there to protect the power
supply from sharp transients if lots of the LEDs turn on
or off at the same time. Without capacitors to buffer
the output, it’s possible that the power level might even
vary enough to reset or crash the Raspberry Pi Pico if
it’s sharing the same power supply.

QUICK TIP
A simpler version of
this project could
use the ultrasonic
sensor input to turn
a light or relay on or
off using a simple
hand gesture.

74
FORGE

QUICK TIP
If you feel up for a
challenge, why not
use a Raspberry Pi
Pico W, and give the
lights some additional
Wi-Fi compatibility?

In the broad sense, this light is a NeoPixel strip Left


Twisted pair wire
with HC-SR04+ sensors at both ends and a Pico at will help reduce
one end controlling the show. Connecting the sensors the possibility of
interference over
closest to the Pico is easy, as you have a 3.3 V power longer cable lengths
connection that you can use built right into the Pico,
and the cables between the sensors and the Pico are
nice and short. The sensor at the opposite end of the
POTENTIAL PROBLEMS
light is a different matter. The sensor is sitting at the The most common ultrasonic sensor used by makers is probably the HC-SR04, which
far end of the NeoPixel strip, but needs connecting has 5 V logic. This is a problem for Pico users, since the Pico uses 3.3 V logic, and isn’t
to 3.3 V power and the trigger/echo pins need to be tolerant to 5 V signals. One option here is to use a level shifter, like the TXB0108, to act
connected to the Pico’s GPIO pins. as an intermediary between the sensor and the Pico, ensuring both receive the correct
voltages on their signal lines. Alternatively, the slightly more expensive HC-SR04+ is
a low-voltage version of the sensor that run directly from 3.3 V without needing the
NO MORE OILY SWITCHES level shifter.
Solving the power connection issue is simple. If The HC-SR04+ has a 15-degree cone. Reading that value from the data sheet might
the power input for the light is at the far end of the make you think that the effective size of the sensor area increases as the distance
NeoPixel strip, the Pico can use power from the strip from the sensor increases. To put it another way, the further you are from the sensor,
itself via the VBUS pin. In this way, the Pico will also the more chance that you’ll accidentally wave your hand into the area that the sensor
function as a step-down voltage converter for the is monitoring. It’s actually a bit more complicated than this, because the cone varies
between somewhere around 40 degrees and 15 degrees, depending on the distance
two sensors connected to the 3.3 V pins. This leaves
from the sensor. The practical upshot is that this light can’t be positioned somewhere
the remaining sensor at the opposite end of the that it’s likely to encounter interference from objects statically positioned in or moving
cable, which can be connected to a step-down power through the cone, although things like parallel walls aren’t generally a problem because
converter set to produce 3.3 V. For the trigger and the angle of incidence between the beam and the surface will see the echo reflected
echo pins, it’s advisable to make the connections with away from the sensor.
twisted pair copper wire to reduce the possibility of The next quirk that you need to consider is that you’ll be using multiple sensors,
two of which will be facing each other. That means you’ll need to fire each sensor in
interference over the longer length of the wire.
sequence and wait for a response before firing the next to avoid the sensors interfering
With all of the circuitry complete, you can
with each other. It’s also worth noting that other ultrasonic devices like distance gauges
position your light. Remember, the HC-SR04+ has a and car parking sensors could also interfere with the sensors used in the lights.
15-degree cone, so the detection area will be quite The most unexpected issue encountered with these sensors is that flexing the PCB
large, and you’ll need to make sure that there are no can shift the position of the sensors, which affects the distance reading slightly and
obstructions in the detection area. If you need a more can, in some cases, cause an object not to be detected after a certain distance. Making
precise sensor, consider the VL53L1 laser-based ToF sure the board isn’t under any physical stress is important to maintain accuracy.
sensor instead.

75
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


Rad your ride with Pico

TUTORIAL

Rad your ride with Pico


Turn a manual scooter into a motorised monster

I
n the first part of this series, you to mistreatment by swelling up with explosive gas or
discovered how motor controllers and turning themselves into a raging inferno. Discharging
throttle controllers can be used by a a LiPo battery too deeply can permanently damage
Raspberry Pi Pico to control an electric it, and so will overheating it. All of these constraints
motor on a scooter. In this article, you will mean that creating your battery pack requires some
find out how to make custom battery packs careful planning.
Dr Andrew Lewis for your scooter and add some features that will To begin with, you’ll have to decide the basic
keep you safe while you ride. voltage that you need your scooter battery to provide.
Dr Andrew Lewis is a Electric motors have high torque, but without With a charge level that hovers between 3.7 V to
specialist fabricator
and maker, and is the adequate power to supply the motor you will have 4.2 V per cell, a 24 V motor should work with six
owner of the Andrew a very disappointing ride. Twenty years ago, a lead- cells in series. You will also need to consider the
Lewis Workshop. acid or nickel-cadmium battery would have been the continuous discharge current of the batteries that
most appropriate choice for powering an electric you use. Some 18650 batteries only discharge at 1C
bike. Now, lithium polymer (LiPo) batteries are a (C being the rate at which the battery can be charged
much better alternative. As you probably know, or discharged, such that a fully charged 2500 mAh
LiPo batteries are not as friendly as other types of 1C battery would provide a maximum of 2500 mA for
battery, and will sometimes indicate their opposition one hour). To power a scooter motor, you will need a
battery with a 10 A or even 20 A continuous discharge
rate, depending on the motor that you are using.
Now that you know how many batteries you
need, and have the right type, you’ll need some
method of using them safely. You will need a battery
protection board. Battery protection boards allow
you to easily build your own battery packs from
18650 cells, and look after all of the difficult jobs

BE AWARE
As stated in part one of this tutorial (in HackSpace #66,
hsmag.cc/issue66), you’re not going to be able to ride
a scooter like this on the open road, on a footpath, or
even in a bike lane in the UK. Electric scooters are in
a class of vehicle known as ‘powered transporters’,
which makes them the same as a car or a motorcycle
in the eyes of the law. Scooters don’t have some of the
features needed to pass an MOT test, so they are not
legal to ride on the road or the pavement. You risk fines
of several hundred pounds and the loss of your driving
licence if you do ride them in public. The government
are developing new standards and adjustments that
Above
Here, you can see 18650 cells in a 3D-printed holder, and a battery protection board. When they
will eventually make electronic scooters legal in the
are welded together into a complete battery, they will be encased in plastic to protect them. An UK, but they are not legal yet.
additional rubber shim will be placed behind the protection board to make sure that no short
circuits can occur

78
TAKE
CARE
Scooters – whether
powered or not – carry
some risks. It's your
responsibility to make
sure the scooter
doesn't go faster than
you personally feel
comfortable with. You
are also responsible
for ensuring that any
chassis modifications
you make are sufficiently
strong. We strongly
recommend you err on
the side of caution as
your decisions on both
these risks could impact
not just you, but the
people around you.

Left
The battery and
motor controller
for this scooter
are mounted at the
front. The battery is
removable, and can
be swapped out in a
couple of seconds.
Batteries are charged
using an identical
battery holder to
the one mounted at
the front of the bike,
except the charger
is connected to a
bench power supply

” Battery protection boards


allow you to easily build
your own battery packs


from 18650 cells

like preventing excessive discharge, monitoring


the battery voltages, and recharging the batteries
safely. Protection boards are usually rated by current
and have an S value associated with them. The QUICK TIP
S value tells you how many batteries a board is Modern LiPo
designed to protect. For example, a 24 V 15 A 6S batteries have
board would have six 18650 cells connected to it, a minimum safe
giving you a 24 V battery with a maximum discharge voltage of around
Above 2.5 V. If you allow the
rate of 15 A. The battery protection board connects
If you’re going to use a spring to power a device, make sure battery to drop below
to each cell individually so that it can keep a close that it’s thick enough to handle the power it will be transferring. 2.5 V, it may never
eye on what’s happening. That means a 6S battery If it isn’t, either add multiple springs, or copper tabs with thicker
braided wire at the top and bottom of the spring. Overheating recharge or work
protection board will have the cells connected power connectors can cause fires properly ever again.

79
Rad your ride with Pico

TUTORIAL

QUICK TIP
Battery protection
boards don’t usually
include temperature
protection. To protect
your batteries
against overheating,
you should
consider placing a
low-temperature
(possibly +85°C 40 A,
28 V, as an example)
thermal fuse in the
battery pack. The
thermal fuse will
break the circuit if
the battery heats up
too much.

Right
Keep your cells neat
using plastic cell
supports, and when
you’re done with your
spot welding, give
everything a nice
generous coating of
Kapton tape before


the cells go into
their final home (the
3D-printed removable
pack, in the case You do not want any
of this scooter
conversion) opportunity for the
system to short out and


BATTERY WELDER cause a fire
One thing that 18650 batteries are particularly sensitive
to is heat, which can make connecting them together
a bit of a problem. The sort of temperatures needed together in series with an extra connection between
to melt solder are too high for an 18650 battery to each cell for a total of seven connections, and two
endure, and attempting to solder cells together will other connections that serve as the input/output of
end with either a completely dead battery, or one that
the battery pack.
performs far below its expected rating. To join 18650
cells together, you really need to use a battery welder. What’s good for your motor isn’t necessarily good
QUICK TIP The battery welder is a miniature spot welder that for your controller, and trying to power a Raspberry
It’s best to think allows you to join nickel strips to batteries (and PCBs) Pi Pico directly from 24 V will release plumes of
about using without excessively heating the battery. The power magic smoke into the air. You need to add a small
removable battery used to spot-weld the metal strips is tightly focused, buck converter that takes the 24 V battery power
packs if you are and dissipates very quickly before it can cause damage
and reduces it down to 3.3 V for the Pico and the
going to ride your by overheating the cells. Battery welders are relatively
inexpensive, and are worth purchasing if you have any logic side of the motor controller. Most importantly,
scooter regularly.
power tools that might need battery packs replacing in you need to add a fuse to your scooter, immediately
Having to wait while
the hard-wired the future. They often come with a selection of nickel after the battery connection. You do not want
batteries recharge strips to suit different battery needs. any opportunity for the system to short out and
is not ideal. cause a fire.

80
FORGE

Above
The box below the battery houses the motor controller, fuse,
and DC-DC buck converter that reduces the 24 V battery power
down to 3.3 V for the Pico and motor controller logic. The key
in the side can be removed to disconnect the enable signal for
the motor. This isn’t actually that important, since if you were
leaving the scooter, you’d probably remove the battery anyway

Above
If you are making
your own battery
packs rather than
using the 3D model
files provided with
this article, you need
to make sure it’s
impossible to connect
your batteries in
reverse. Providing
reverse voltage to the
buck converter would
probably kill every
single component
in the scooter, and
cause a great deal
of swearing

SPI DISPLAY
Although it isn’t strictly necessary, it’s quite nice to
have a display on your scooter to tell you how much
power you’re applying at the throttle, and optionally
monitor your battery levels using a potential divider
connected to one of the analogue inputs on the Pico.
A round ST7789 SPI display can be connected to the
Pico using the instructions at hsmag.cc/SPIDisplay,
with some example code included with this project to
show how it can be used as a simple power gauge.

81
HackSpace mag experiments: ChatGPT

TUTORIAL

HackSpace mag
experiments:
ChatGPT
We let an AI chatbot do our 3D design for us

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.

C
hatGPT is the current darling of the While this author does have some experience with
AI world. It can produce impressively OpenSCAD, that was several years ago, and he’s
useful responses to many questions, forgotten almost all of the little he did know. He tried
and some people are finding it useful to get ChatGPT to write the entirety of the code. Each
for writing programming code. Using time, just copying and pasting the chatbot’s responses
the OpenSCAD 3D modeller, 3D into an OpenSCAD session and rendering the code.
designs are just code, so we decided to put it to The first thing we’ve learned about prompt
the test and try to get it to design something for us. engineering is that you get the best results by
We wanted something not entirely trivial, but also keeping everything simple and building up from small
not something so complex that it had no chance of parts. To help with this, we decided that we’d design
Above understanding it. We decided on a simple buggy: four the wheels, axles, and body of the buggy separately.
You can sign up for
a free account and wheels, two axles, and a body. To give it the best The full process for getting everything designed
design your own possible chance, we decided to get it to design these and working properly was quite long, so here’s an
monstrosities at
chat.openai.com parts individually. edited transcript of how it went. We started with the

82
FORGE

prompt: ‘Can you write an OpenSCAD program to


create a robot wheel?’.
ChatGPT came back with the following code:

$fn = 50; // set the number of faces for the circle

// define the parameters for the wheel


outer_radius = 20; // outer radius of the wheel
inner_radius = 10; // inner radius of the wheel
spoke_width = 4; // width of the spokes
spoke_length = 30; // length of the spokes
num_spokes = 8; // number of spokes

// create the outer rim of the wheel


difference() { }
cylinder(r = outer_radius, h = spoke_width); } Above
In OpenSCAD, 3D
cylinder(r = inner_radius, h = spoke_width); models are defined
} // create the spokes of the wheel by code, so a chatbot
should be the perfect
for (i = [0:num_spokes-1]) { AI to make them
// create the spokes of the wheel rotate([0,0,i*(360/num_spokes)]) {
for (i = [0:num_spokes-1]) { cube([spoke_width, spoke_length, spoke_
rotate([0,0,i*(360/num_spokes)]) { width], center = true);
cube([spoke_width, spoke_length, spoke_ }
width], center = true); }
}
This is obviously flawed. The problem is that the
}
axle hole is subtracted from the rim of the wheel
This does produce a working wheel. It’s got rather than the centre of the spokes, which is where
spokes. We didn’t ask for spokes, but then we didn’t the axle will actually meet the wheel. We had a bit of
specify ‘no spokes’ either, so I suppose this is OK, if back and forth with ChatGPT trying to get it to solve
a little over-complicated. There’s no way to attach an the problem, but it seemed beyond its capabilities.
axle, so the next step is to ask for an axle hole, and In the end, we resorted to a simpler prompt: ‘Can
ChatGPT replied with the following code: you create a robot wheel with a 10 mm axle hole and
without spokes?”.
$fn = 50; // set the number of faces for the circle
The result was deceptive:

// define the parameters for the wheel $fn = 50; // set the number of faces for the circle
outer_radius = 20; // outer radius of the wheel
inner_radius = 10; // inner radius of the wheel // define the parameters for the wheel
spoke_width = 4; // width of the spokes outer_radius = 20; // outer radius of the wheel
spoke_length = 30; // length of the spokes inner_radius = 10; // inner radius of the wheel
num_spokes = 8; // number of spokes axle_hole_radius = 5; // radius of the axle hole
axle_hole_radius = 10; // radius of the axle hole
// create the outer rim of the wheel
// create the outer rim of the wheel difference() {
difference() { cylinder(r = outer_radius, h = 10);
cylinder(r = outer_radius, h = spoke_width); cylinder(r = inner_radius, h = 10);
cylinder(r = inner_radius, h = spoke_width);
// subtract the axle hole cylinder from the
// subtract the axle hole cylinder from the center of the wheel
center of the wheel translate([0, 0, -1]) {
translate([0, 0, -1]) { cylinder(r = axle_hole_radius, h = 12);
cylinder(r = axle_hole_radius, h = spoke_ }
width+2); }

83
HackSpace mag experiments: ChatGPT

TUTORIAL

Right
With all the parts
sliced, it’s ready
to print

At first glance we thought this had worked, but it. This is definitely true. At almost any skill level, you’ll
it’s made the hole in the middle far too large. For find it easier to just use a CAD tool. However, at some
some reason, it’s drawn a wheel rim rather than a point this is going to change. It might be in the near
complete wheel. future, or it might take longer, but eventually you’re
The prompt, ‘I don’t think we need an inner radius. going to be able to describe a problem to a computer
You can just have a cylinder the size of the outer and it’s going to design a part for you.
radius with the axle hole cut out’, created a working People talk about how 3D printing will revolutionise
wheel, but we needed to add: ‘Sure! To add a manufacturing, and while it’s had a pretty big effect,
tolerance of 0.2 mm to the axle radius, can we modify it’s not hit the mainstream – the reason being it is hard
the axle_hole_radius variable to include the tolerance?’ to design things. OK, hard is probably the wrong word,
to get the final code of: but it’s a particular skill that takes time to learn. When
AI can take on some of these challenges, having a
$fn = 50; // set the number of faces for the circle
3D printer at home becomes an attractive option to a
lot more people. We are, however, getting ahead of
// define the parameters for the wheel
ourselves. Let’s take a step back and see how we get
wheel_radius = 50; // outer radius of the wheel
on with the rest of the vehicle.
tire_width = 20; // width of the tire
Perhaps the most confusing part of the build
axle_radius = 9.9/2; // radius of the axle
came with the axle. This should just be a cylinder
tolerance = 0.2; // tolerance for the axle hole
of the appropriate length, and while it was pretty
axle_hole_radius = axle_radius + tolerance; //
straightforward to get ChatGPT to create an axle at the
radius of the axle hole with tolerance included
correct length, the code rendered nothing. On close
inspection, we saw the problem:
// create the wheel
difference() { // define the parameters for the axle
cylinder(r = wheel_radius, h = tire_width); // axle_radius = 4.9; // radius of the axle
create the cylinder for the wheel tolerance = 0.2; // tolerance for the axle hole
translate([0, 0, -1]) { axle_length = body_width + 2 * tire_width + 5; //
cylinder(r = axle_hole_radius, h = tire_ length of the axle
width + 2); // create the axle hole
} // create the axle
} difference() {
cylinder(r = axle_radius, h = axle_length); //
At this point, you’ve probably realised that getting
create the cylinder for the axle
ChatGPT to design a cylinder with a hole in it is far
translate([0, 0, -1]) {
more work than just designing a cylinder with a hole in

84
FORGE

cylinder(r = axle_radius + tolerance, h =


ChatGPT on what to do). There are some things that
axle_length + 2); // create the axle hole
ChatGPT seemed to find really easy (like understanding
}
how long to make the axle), and some things it really
}
struggled with. We’ve run a few experiments now,
ChatGPT inexplicably added an axle hole to the axle, and we think there are two things that ChatGPT, in
which has removed the entire axle. Fortunately, we its present state, doesn’t seem to understand (if
rectified it with: ‘The axle doesn’t need an axle hole’. ‘understand’ is even the right word here):
That’s the wheels and axle sorted. Let’s try and
generate the body. We started with the prompt: • Additive structures and subtractive
‘Can you write OpenSCAD code for the body of a structures. If you ask it to make a hole in
robot buggy with holes for two axles, each hole with an object, you’ll often find a cylinder added,
a radius of 5.5 mm?’. And it did, however, it was a and likewise, it created a ‘hole’ around our
particularly uninspiring rectangular block. We gave it entire axis.
the feedback: ‘Can you make the front of the buggy
more aerodynamic?’ It responded with: • Rotation and translation in 3D space.
In this example, you can see that the cone on
$fn = 50; // set the number of faces for the
the front of the buggy is clearly not in the right
circle
place. To be honest, we find it quite endearing
where it is. When we’ve tried more complex
// define the parameters for the buggy body
objects, this is always the sticking point.
body_length = 100; // length of the buggy body
body_width = 60; // width of the buggy body
ChatGPT is clearly not ready for complex 3D design
body_height = 40; // height of the buggy body
just yet, but it can do basic OpenSCAD code and
axle_radius = 5.5; // radius of the axle holes
create functional objects. We didn’t correct any syntax
or fix any errors; we only ever provided feedback on
// create the buggy body with axle holes and an
design. ChatGPT (and other similar large language
aerodynamic front
models) is only going to get better from here. How
difference() {
soon these improvements will affect its ability to work
union() {
with three dimensions we don’t yet know, but we’ll
// create the aerodynamic front
continue trying our buggy test with new models and
translate([0, 0, body_height/2]) { Below
will report back as things change. If you really want to,
cylinder(r1 = body_width/2, r2 = 0, h you can download your
= body_height/2); own ChatGPT car from
hsmag.cc/ChatGPT-car
}
cube([body_length, body_width, body_
height/2]); // create the main body

// create the axle holes


translate([body_length/4, body_width/2,
0]) {
cylinder(r = axle_radius, h =
body_height);
}
translate([3*body_length/4, body_
width/2, 0]) {
cylinder(r = axle_radius, h =
body_height);
}
}
}

This adds a cone slightly off-centre to the buggy.


At this point, we’ve got the basics of our buggy
sorted. We changed the sizes a little (by directing

85
DON’T MISS THE BRAND NEW ISSUE!

SUBSCRIBE
FOR JUST

£10!
> T
 HREE!issues
of The MagPi

> F
 REE!
Raspberry Pi
Pico W

> F
 REE!
delivery
to your door

NEW
+ FREE
MO
DEL!

RASPBERRY PI
*W

PICO W*
hil
es
toc
ks
las
t

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

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

PG

94

PICO
OSCILLOSCOPE
Test your circuits with this
Pico-based board
PG
88
BEST OF
BREED
Let’s get gardening

PG

96

HOVER
BOARD
We are very nearly living
in the future
Spring is here! Time to deploy the sensors!

BEST OF BREED

ONLYTHE
BEST
Spring is here! Time
to deploy the sensors!
A collection of electronics for outdoor remote sensing

By Marc de Vinck @devinck

I
’ve covered gardening-related electronics
a few times, including wireless sensors,
and a host of outdoor-related devices.
And since spring is here, it made me think
it’s time to look at the possibilities of remote
sensing again. I have always wanted to
bring a little IoT to my own garden, and hopefully
this is the year I do implement some kind of
electronics. The past few years have been difficult to
tackle that project since components, especially
microcontrollers, have been difficult to come by, but
that’s finally changing. You can source
microcontrollers and some single-board computers
of various flavours at most of the online shops, and
even a few brick-and-mortar retail shops. And I’m
seeing new sensors being made available every
week that would be perfect for remote monitoring.
Even as I write this article, I can hear the birds
chirping outside, and I have a view of a very sad-
looking garden that is just starting to show signs of
life after its winter hibernation. I’d like to start
gathering data, like sun exposure, moisture levels,
and possibly even a camera to catch any critters
raiding the tomatoes. So that’s where this Best of
Breed comes into play. I’ll be looking at a few things
that I’d like to add to my garden this summer to help
me go from a boring plot of land to one that can start
to speak to me about its needs.

88
FIELD TEST

Witty Pi 4 vs
Adafruit Feather RP2040
with RFM95 LoRa Radio
UUGEAR $27.63 hsmag.cc/WittyPi4 ADAFRUIT $29.95 adafruit.com/product/5714

T
he Witty Pi 4 from UUGear is a great
solution for all your Raspberry Pi
timing, scheduling, and power
management needs. No longer will you
need to worry about the accuracy of your
Raspberry Pi clock thanks to the on-board
real-time clock and temperature sensor that allows for
additional accuracy and temperature compensation.
And anyone who has worked with the Raspberry Pi
knows about power management and the relatively
difficult nature of powering your Raspberry Pi on or off,
and this is where the Witty Pi really shines.
Unlike a microcontroller that you simply power-off,
you need to go through a powering-off sequence with
your Raspberry Pi, similar to your desktop computer.
And the Witty Pi can do that too! Now your Raspberry
Pi can shut down and only wake up when needed,
saving lots of power. If you have a remote monitoring
project, or one that runs off battery power, the Witty Pi
should be something to consider adding to the build.

T
he Adafruit Feather RP2040 RFM95
LoRa Radio board, aka ‘RadioFruits’, VERDICT
is Adafruit’s take on a microcontroller
Witty Pi 4
with integrated long-range (LoRa)
packet radio transceiver, along with a Great addition to
built-in USB and battery charging a Raspberry Pi.

9/ 10
system. This is the perfect microcontroller board for
creating wireless sensors that have a longer range
and require less power than other wireless solutions
like Bluetooth. Adafruit Feather
The board features an RP2040 chip running at RP2040 with
133MHz, the same as you can find on a Raspberry Pi RFM95 LoRa
Pico. You also get a generous 8MB of on-board QSPI Radio
flash and 264kB of RAM, plus on-board RGB LED, Simple long-
STEMMA QT connector, and lots of GPIO pins. range sensing.

10 / 10
Between the on-board battery management, LoRa
radio, and RP2040, it would be hard to beat this little
board for creating an outdoor sensor network.

89
Spring is here! Time to deploy the sensors!

BEST OF BREED

M5Stack PoE Camera


with Wi-Fi (OV2640)
PIMORONI £39.90 hsmag.cc/M5Stack

T
he PoECAM-W is an open-source and
programmable camera that integrates
PoE (power over Ethernet) and Wi-Fi
giving you plenty of connectivity
options. The brain of the product is an
ESP32 board with an integrated
webcam and W5500-embedded Ethernet controller.
You get a 2-megapixel image sensor, 8MB PSRAM,
and 16MB flash large memory. VERDICT
This could be a good addition for monitoring your M5Stack PoE
outdoor space for pesky intruders, capturing time- Camera with
lapse videos of the growing season, or just seeing Wi-Fi (OV2640)
what’s going on outside. It’s easy to deploy since you The perfect
can program it via the Arduino IDE or ESP-IDF. And, of compact camera.

10 / 10
course, you must consider how you will make it
waterproof, but that could be as simple as mounting it
to the inside of a window in your house or shed.

WITTY PI 4 MINI

UUGEAR $18.42

hsmag.cc/WittyPi4Mini

Just like its big sibling, the Witty Pi 4 Mini is a great


addition to your Raspberry Pi, but in a smaller
package and with fewer options. The Witty Pi adds
a real-time clock with power management to your
Raspberry Pi. It can control your Raspberry Pi’s on/
off sequence, greatly reducing its power usage. If
you’ve worked with a Raspberry Pi before, you
know the challenges of power management, and
this board does a great job!

90
FIELD TEST

Adafruit Feather RP2040 Left


Remotely control

RFM69 Packet Radio


your garden

ADAFRUIT $19.95 adafruit.com/product/5712

T
he Adafruit Feather RP2040 RFM69
board is another board Adafruit
lovingly refer to as part of its
‘RadioFruits’ line of microcontrollers.
The board is very similar to the RP2040
with LoRa, but this one features an
RFM69 Packet Radio (868 or 915MHz). It’s great for VERDICT
sending packets of data between different boards Adafruit Feather
featuring the same type of radio. You can RP2040 RFM69
communicate up to five kilometres, but of course Packet Radio
that’s under ideal conditions and with a proper A good low-cost
antenna. Speaking of antennas, you will need one for radio and micro.

9 / 10
this board to work, and you can make your own with
a small piece of wire, or you can buy one and use the
on-board connector.

91
Spring is here! Time to deploy the sensors!

BEST OF BREED

Enviro Grow
(Pico W Aboard)
PIMORONI $51 hsmag.cc/EnviroGrow

A
nd how can we not cover the
Enviro Grow systems by Pimoroni Left
Get your plants to
when talking about remote sensing water themselves
and gardening? In a previous Best of
Breed, I reviewed the Grow Kit, and
no surprise, it was great. Well, now
there is the Enviro Grow kit with a Raspberry Pi Pico
on-board, featuring lots of accessories to get
you started.
The kit includes the main Enviro Grow board with
the Raspberry Pi Pico on the back. The board also
includes an on-board BME280 temperature, pressure, VERDICT
humidity sensor, a Piezo buzzer, and a light and Enviro Grow
proximity sensor. And that’s just the beginning of (Pico W Aboard)
what’s included in the kit – you also get three Environmental
moisture sensors, three mini submersible pumps, a sensing with
battery pack, batteries, and a bunch of other parts to a Pico!

10/ 10
get a fully automatic watering system up and running.
It’s a great kit for a great price. Head over to the
Pimoroni site to learn more.

92
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


DSO-500K oscilloscope

REVIEW

DSO-500K oscilloscope
Pico W on signal monitoring duty

FHDM TECH $33.50 hsmag.cc/dso-500k

By Ben Everard @ben_everard

O
scilloscopes are, at heart, very you want to have multiple samples per wave. How
simple tools. They take a voltage many samples per wave depends on exactly what
and use that to display a point on you’re trying to see. This is a bit of a problem because,
a screen, usually, in a time-based at very high speeds, electronics become challenging.
graph. That’s really all it takes to be an Not only does the scope’s processor have to be able
oscilloscope. However, underneath to read and process the data as it comes in very fast,
this is a huge web of complexity. but the analogue electronics that sit in front of the
The first bit of complexity is the limits on the analogue-to-digital converter (ADC) also have to handle
signal that it can display – the two main limits being the signal without introducing noise, which would
voltage and frequency. For many users, voltage isn’t render the reading inaccurate. The faster the data rate,
particularly limiting. Many modern circuits only use the harder these two problems are. These two limits
fairly low voltages, and almost any oscilloscope can are slightly different, and the oscilloscope’s data sheets
handle these. Frequency, though, is more of a problem. should show them separately. The samples per second
If you’re trying to debug a waveform, you need a (usually given as MS/s or GS/s) is the number of
sample frequency higher than the waveform because samples the processor can read. The bandwidth is the
you need to see how the waveform is structured, so maximum frequency the analogue circuit can handle.

94
FIELD TEST

Typically, there will be more than one input as well. iPhone app called ‘Scoppy’ that displays the signal and
Two and four are the most common options. lets you set various options. Obviously, this means that
There are a bunch of other things that a modern the size and quality of the screen is entirely dependent
oscilloscope should do to help you work out what a on the device you hook it up to.
signal is showing. For example, adding two inputs The interface provides most of the basic features
together, or integrating a signal. you’d expect of an oscilloscope, including YT, FFT,
With all this in mind, let’s take a look at the DSO- and XY modes, various triggering options, and
500K oscilloscope by FHDM Tech. measurement of signal properties such as Vmax, Vmin,
500K refers to the number of samples per second frequency, and duty.
the scope can take (this is combined on both channels, This decoupling of screen and back-end (along with
so if you’re using both, it’s 250,000 per channel, per the fact that the firmware is open-source) means that
second). The bandwidth is 150kHz, so any signals over you can also build your own back-end. The ADC is that
this frequency may be of a Raspberry Pi Pico


distorted or filtered out. W, and you can flash the
To put these numbers The limit on human firmware onto this. The
in context, the limit hearing is about 20kHz, analogue interface can be
on human hearing is as big or small as needed.
so any audio frequencies


about 20kHz, so any In some cases, you might
audio frequencies will will be well within its range just be able to connect
be well within its range. directly to the ADC pins.
However, even the In other cases, you might
slowest ‘standard’ mode I2C is 100kbps, so you’d need some protection circuitry. The Scoppy app has a
struggle to accurately see the waveforms of these free version, but the premium version is bundled with
signals. However, this device also has a ‘logic analyser’ the DSO-500K.
mode in which it only detects the logical state of a This is a budget and fairly low-speed oscilloscope.
connection. In this mode, it can do 20MS/s. There’s no For audio work and similar speed signals, it can work
protocol decoding for the logic analyser, but you can great, but anything faster is going to cause problems.
export the samples as a CSV file. The logic analyser feature is interesting, but without
The scope can handle +/- 6 V with regular probes or the ability to decode protocols, it’s a bit limited
+/- 20 V with 10x probes, although neither is included, compared to other options. The standout feature of
so you’ll need these in addition to the main board. this, for us, is the openness of the platform. The ability
This oscilloscope doesn’t have a user interface to build your own hardware to work with the front-
built in. Instead, you can connect to it over Wi-Fi or end means that there’s a wide scope for hacking and
USB from a phone or tablet, and there’s an Android or building your own debug hardware.

Left
The user
interface is
much like a
traditional
oscilloscope

VERDICT
A bit slow, but
with excellent
hacking potential.

9/ 10
95
Crowdfunding now

REGULAR

CROWDFUNDING
NOW
Crowdfunding SkySurfer
Take to the skies

From $1698 hsmag.cc/skysurfer Delivery: April 2024

I
t’s 2023, where’s my hoverboard? Here. It’s
here. Hunter Kowald is crowdfunding the next
phase of what he calls a SkySurfer. It’s basically
an octocopter that you can stand on.
Now admittedly, it takes a special kind of
person to try and stand on what is essentially an
upturned blender (OK, eight upturned blenders). It
takes an even special-er person to stand on a
first-generation crowdfunded version. And an even
more special person to buy the first version as a DIY
kit and try to build it themselves.
Is it safe? Maybe. We have no idea, and we don’t
have a spare $54,000 to find out ($10,000 of this is a
down payment during the crowdfunding campaign,
and the rest is due on delivery).
According to the manufacturers, it can carry 500 lbs
(227kg), and can go at up to 65mph for 20 minutes.
We suspect that it can’t do all three of these at the
same time, but that puts the range at somewhere
around 20 miles. Even if travelling at this speed cuts
the battery life by half, that still means you could get
ten miles out of a single charge – that puts this in the
commuter range for many people. We suspect that
your local aviation authority may have some concerns
about letting you do this, but is this the transport of
the future, or just a niche product that will swiftly
move from futuristic crowdfunder to side note in the
history books?

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

97
ON SALE
22 JUNE

hotography
P
HACKS
ALSO
3D PRINTING
CIRCUITPYTHON
RASPBERRY PI
LASER CUTTING

hsmag.cc/subscribe
Farming
Welcome to the Prusa print farm. Here, in a factory
not too far from the Czech National Museum of
Technology, the current wave of the industrial
revolution is happening right now.
The farm consists of over 700 printers, all printing
parts to make other 3D printers. It is, as Josef
Průša puts it, “self-replication at scale… to show
our customers where it can be used”. Or, as it’s
called in the software industry, “eating one’s own
dog food”. At present, these are mostly Prusa MK3
printers – the same model that you can buy yourself
and use at home, and we find that simultaneously
comforting and exciting.
PiKVM Manage your servers or
workstations remotely

A cost-effective solution for data-centers,


IT departments or remote machines!

PiKVM HAT
for DIY and custom projects Pre-Assembled version

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

Available at the main Raspberry Pi resellers

Reseller suggestions and inquiries:


wholesale@hipi.io

You might also like