HackSpaceMagazine34 PDF
HackSpaceMagazine34 PDF
SMART POWER
Internet-
enabled
illumination
DISCOVER
+ FEATHER
RECYCLE PLUG AND PLAY FOR
+
old clothes
EASY ELECTRONICS Sept. 2020
Issue #34 £6
Workshop
CAMERA
+ OPEN
Para
CORD DOG Inside the
world of open-
source robotics
EDITORIAL
Editor
Ben Everard
Welcome to
[email protected]
Features Editor
Andrew Gregory
HackSpace magazine
[email protected]
Sub-Editors
David Higgs, Nicola King
One of the first things you have to decide when starting a new DESIGN
Critical Media
project is how much of it you’re going to build yourself. Or, to criticalmedia.co.uk
put it another way, what your building blocks will be. Some Head of Design
Lee Allen
people like to just add a few bits to existing hardware, some Designers
people like to work with pre-built modules, some like to work Sam Ribbits, Harriet Knight,
Ty Logan
with small parts, and some enterprising folks prefer to start Photography
with raw materials (such as Sam Zeloof, who makes Brian O’Halloran
GET IN TOUCH
This magazine is printed on
hackspace@ paper sourced from sustainable
raspberrypi.org forests. The printer operates an
environmental management system
hackspacemag which has been assessed as
conforming to ISO 14001.
hackspacemag HackSpace magazine is published
by Raspberry Pi (Trading) Ltd.,
Maurice Wilkes Building, St. John’s
ONLINE Innovation Park, Cowley Road,
Cambridge, CB4 0DS The publisher,
hsmag.cc editor, and 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 110
06 SPARK 33 LENS
06 Top Projects 34 Feather
If Carlsberg made maker projects… Plug and play electronics for any project
30 Kickstarting
An ATmega-based portable gaming station
Tutorial
Cover Feature Silk filament printing
DISCOVER
FEATHER
72 Silky smooth prints for
flawless forms
34
4
CONTENTS
76
72
Tutorial Silk filament printing
Super-shiny material only for Sunday best 99 FIELD TEST
76 Tutorial Workshop camera 100 Best of Breed Artificial intelligence
Accident-proof your camera setup Boards to make your project think
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 (Trading) 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.
5
Top Projects
REGULAR
Off-World
Bartender
By Donald Bell hsmag.cc/27gylZ
R
eaders of a certain age (or those of you who are
able to use YouTube) will be familiar with The
Great Egg Race, a British children’s television
programme that set kids a different engineering
challenge each week, and sat back and watched as
they solved it. It was great telly, and showed that the
best problem-solvers are people who don’t know the rules that
they’re supposed to be breaking.
We thought of The Great Egg Race when we heard of the Cocktail
Robotics Grand Challenge, an annual event in San Francisco where
robots are judged on how well they make delicious booze. Donald
Bell’s entry this year is a Blade Runner-inspired device that uses two
Raspberry Pis ( a 3B, and an A+), an RFID reader, an Adafruit Feather
HUZZAH ESP8266, pumps, tubing, and a heck of a lot of LEDs for
that off-world 2040 aesthetic.
Right
“I’ve tasted
things you people
wouldn’t believe”
6
SPARK
7
Top Projects
REGULAR
3D-printed
Davinci catapult
By Brian Brocken hsmag.cc/fZl7G1
B
rian Brocken knows what he’s doing when it
comes to 3D-printed kit builds: his previous
design, a wind-up car (hsmag.cc/0oSivs), went
down so well that he decided to make another
device that can be used in its unassembled form as
a greetings card.
As it’s flat, the whole thing prints in one go with no supports, and
takes around three hours with a layer height of 0.2 mm. The kit snaps
together with no need for glue and, as the name suggests, it’s
inspired by a design by the original maker genius, Leonardo da Vinci.
Right
We have yet to
test whether
this catapult can
launch a 90 kg
projectile
over 300 m
8
SPARK
9
Top Projects
REGULAR
Hex clock
By Mukesh Sankhla hsmag.cc/feehfJ
C
lock designs are an ideal way to inject some
creativity into a build. There is a set of rules, and
you can break them in some ways, but not others.
This unique design by Mukesh Sankhla uses a
matrix of triangular pixels in the shape of a hexagon
to display the time, weather, or any other data on an
IoT clock. The unusual display means that standard characters
won’t work, so Mukesh has had to design his own set of digits
from 0 to 9; we think they look great.
Right
Mukesh used the
FastLED library
to code the
animations on the
clock-face
10
SPARK
11
Top Projects
REGULAR
Rotary
phone radio
By Caroline Buttet hsmag.cc/6gSais
T
his rotary phone has a Raspberry Pi built in that
links up to radiooooo.com, an online radio
service. Behind the map, there’s an Arduino that
controls the selection of the country – the user plugs
the phone into the jacks to use, then dials in on the
phone to listen. It’s a simple idea, but the thing that
caught our eye was the flawless execution, by Swiss-based
designer Caroline Buttet. Now, who’s ready for some 1980s
Sheffield synth-pop?
Right
Pick up the phone,
choose a country
and a decade, and
listen to some
great music
12
SPARK
13
Top Projects
REGULAR
7-segment
display
By Neeraj Rane hsmag.cc/m4GEm0
W
e all spend far too long these days staring
at screens. One solution to this is to replace
the digits on your output devices with
mechanical seven-segment displays. OK, so
it’s not very practical, but it looks amazing and
won’t give you eye strain. This design is by
electrical engineering student Neeraj Rane, who replaced the
servos used in similar mechanical displays with electromagnets,
because he preferred the sound they make. The non-electric parts
are 3D-printed and, modestly, Neeraj says it’s “useless but fun”.
Right
Watch Neeraj’s
video to see the
seamless digits
in action
14
SPARK
15
Top Projects
REGULAR
Vacuum Tube
Preamplifier
with Nixie Display
By Justin Scott hsmag.cc/vrD6Gr
A
udio geeks are notorious perfectionists, forever
finding things to tinker with in the elusive
quest for better sound. This preamp by Justin
Scott combines the warm analogue sound of
vintage vacuum tubes with the glowing cold war
look of Nixie tubes, to show the volume level and
input selection. There are loads of amp designs available – Justin
used a PH-16 kit from tubes4hifi.com – but the enclosure is all
his own.
16
SPARK
Below
Justin added
several features
to the stock
design, including a
motorised volume
knob with
remote control
17
Objet 3d’art
REGULAR
Objet 3d’art
3D-printed artwork to bring more beauty into your life
W
e’ve pretty much got used
to the idea that masks are
here to stay. It took a
while, and we felt funny at
first, but they’re normal
now, with some people even turning them
into fashion statements. That’s why we’re
impressed with early adopter Bane who,
back in 2012’s The Dark Knight Rises, was
wearing his mask with aplomb as part of
Gotham City’s autumn/winter look.
This fantastically detailed Bane mask
was printed on the Project R3D RailCore II
300ZL printer, using SnoLabs Black PLA+,
at a layer height of 0.2 mm, and is the
work of Fernando Hernandez, aka Dsk001.
He modelled it himself, using a photo
for inspiration. It won't protect you from
COVID-19, but it will give you super-villan
chic. If you’re new to using Fusion, or you
want to get a sense of what can be done,
Fernando has shared a video of the design
process here:
hsmag.cc/mQtAfg
18
SPARK
19
Meet The Maker
REGULAR
I
f you’ve ever fancied unlocking the focus on programming, and not enough on making
processing power in your phone to power things creatively.
an AI robot made of cardboard, you should “That’s how I got into programming. I did an
really check out the work of Ross Atkin. engineering course, where they taught us C. I
He’s taking seriously high-spec robotics kit couldn’t learn C like that; it was impossible. ‘You’re
and packaging it in a low-cost robot, making not going to make anything, but we’re going to make
as much as possible out of one of the most readily you learn about pointers.’ Great. These kinds of really
available materials we know of: cardboard. abstract, hard to understand things.
We spoke to Ross live via telepresence (more on “I tried again when I was at art school because I
that in a moment), using his latest creation, the really wanted to make stuff, and in order to make the
Smartipresence. This is a crowdfunded kit (it should stuff I wanted to make, I had to program an Arduino.
still be open for backers by the time you read this) By helping people make things that they already
that bolts onto his ongoing creation, the Smartibot, want to make, you’re so much more likely to engage
and uses affordable materials to bring the boardroom a much wider cross-section of kids than if you’re
experience to the kitchen table. It’s not as good as saying, ‘We’re going to make this thing that’s only
seeing your distant relatives in the flesh, but it is a lot going to appeal to the geekiest subset of kids with
the geekiest subset of parents.’ And those people
”
don’t need our help: they were going to learn anyway.
Introducing kids to design and engineering is The people who need our help are the people who
were on the cusp of doing that, or the people who
massively important. They’re not exposed to it will never try.
”
“Whereas if you show a child a toy monster truck
anywhere near enough in the education system with a camera turret on top and say, ‘We’re going to
make this – we’re going to 3D-print parts, we’re
going to wire up the electronics, we’re going to
better than Zoom. So Ross: what’s it like, splitting program it so that it drives autonomously and follows
your time between a normal job and being a maker? a car that you’re driving,’ that’s cool! No one is going
“Introducing kids to design and engineering is to not want to do that, and you’ve learned so many
massively important. They’re not exposed to it skills in doing that.
anywhere near enough in the education system. “That’s one of the reasons I was keen to be on a TV
Even what we consider to be STEM education and show called The Big Life Fix. I did two series and a
the stuff there has been emphasis on I don’t think is Children In Need special. The producers had brought
that good at equipping kids with the skills that they together a small team of designers, engineers, and
actually need. It’s almost set up to exclude masses computer scientists. We built one-off bits of
and masses of kids, because there’s far too narrow a technology to solve problems for individuals and
20
SPARK
Right
Ross’s latest creation,
the Smartipresence, is
an affordable, easy to
use telepresence robot
21
Meet The Maker
REGULAR
Left
The motor that tilts
the phone is a direct
drive 1:220, so there’s
no need for gears
22
SPARK
groups of people. One of the groups was some layers of management. I’ve done loads of projects
farmers in the West Country who kept getting their with them that I’ve enjoyed doing; it was good work.
sheep stolen. One was a village in Wales that didn’t But none of them turned into anything that anyone
have any phone or internet connectivity. But the uses. That’s a bit frustrating.
second series was all about addressing individual “With the infrastructure stuff, some of it is in
disability needs, because the dynamic of the production now, but it’s really hard to get it out there
programme worked better with an individual. and in use, because there are so many people who
“A lot of the work I do is with disabled people using need to buy into it and it take a long time. And so I
very similar methodologies, but in that work, even if
”
it’s with people with a particular impairment, you’re
still trying to design for a group. Whereas with the TV You get to manifest their personality in
show you’re designing for one person, which is a
very cool experience, and not something you get to the design, which is such a great thing
”
do very often as a designer.
to be able to do
“You get meaningful feedback all the time when
you engage with the people you’re trying to
represent and design for. But it’s much easier to
make decisions when you’re making for one person. realise that with the robots and doing Kickstarters,
All that matters is do they like it or not: you’re not you can get products out and into people’s hands
trying to balance competing needs. And you get to really quickly.
manifest their personality in the design, which is
such a great thing to be able to do. SMARTIBOT
“This brings us back to part of the reason I wanted to
INFRASTRUCTURE do Smartibot. I realised that on the TV programme
“My first job was designing street furniture. Litter we kept building the same basket of electronics:
bins, things like that. At the time, the Disability Bluetooth connectivity, motor drivers etc. – and
Discrimination Act had just come into force, so one actually there are many bits of assistive tech that
of the first projects I got set was to design a range of have the same bundle of electronics at the core of
street furniture that was compliant with the Act. It them. And you can adapt the software really easily,
was frustrating because the legislation didn’t have right? Once you’ve got Bluetooth connectivity, you
any guidance on how to make things work – it just can pair that to just about any input device. And if
said ‘make a bench like this’. But there was no you can drive motors, then you can act upon the
reasoning behind the decisions, so if you couldn’t physical world.
make a bench like that, there was no way to
determine what was the next best thing.
“I did a master’s in product design at the Royal
College of Art, after which there was an opportunity
to do a project looking at the needs of people with
sight loss and street design. I had already worked in
that field, and this was an opportunity to learn more.
That project involved following a load of people with
sight loss around on journeys they’d typically make
unaccompanied, talking to them and analysing how
the street could be designed better.
“That led to doing some design work in that space,
and I then did a few research projects for Stannah,
then TFH, who make special-needs toys, and a couple
of projects for Scope, talking to disabled people about
technology and the environments.
“When you’re working on infrastructure, things
move very slowly. I do a bit of work with technology
with one of my clients, and that moves a bit faster –
they’re a really big company, and they’ve got loads of
23
Meet The Maker
REGULAR
“The problem with the economics of assistive offset the fixed cost of production, but the smaller
technology is that disabled people have a very number of people you’re selling to, the lower that
diverse set of needs, far more so than non-disabled volume is, and the more expensive that thing ends
people. Ideally, you’d design for one person, but the up being.
more people you try to include, the less good a fit it’s “The way that you challenge that economic reality
Above
To keep costs down, going to be for each person within that group. is by making mainstream products that are made
as much of the “So you have this inherent trade-off. With traditional in mainstream volumes have assistive applications.
Smartibot as possible
is made of cardboard manufacturing, you have to make enough volume to That’s what Apple has done brilliantly by putting a
load of assistive tech into iOS devices. They have
a screen reader [VoiceOver], and they have Switch
access, which is quite an esoteric feature that’s only
needed by a small number of people. But it’s very
impactful for that group, so it’s really impressive that
they built it in.
“Making robots for kids is a mainstream use case
– that’s how I came up with the Smartibot. I can do
proper volumes in that. With 3D printing and stuff
and the inherent flexibility of the hardware, we tried
to turn what had been a product development
problem into a 3D printing and code problem,
because we’ve solved the bit in the middle. We’ve
given you this electronic thing, and if you want to
build an assistive tech product, you can integrate that
with any input method you can. For the output,
you’ve got a mechanical engineering problem, but
there are a hell of a lot more people who can solve
24
SPARK
that problem than there are people who can design a It’s by a guy called Gordon Williams who’s just
circuit board and put it into production. outside Oxford, and it’s a full JavaScript
“One of the things you’ll find when you start implementation for microcontrollers. The board runs
dealing with factories is that a lot of the assumptions JavaScript, you send it JavaScript, and you program
you have simply aren’t true. If you get a nice in JavaScript. There’s a blocks editor that works the
company who are happy to work with you, that same as MakeCode.
process of exchange is something I really enjoy. You “You connect to it over Bluetooth, send it
might not get what you thought you were going to JavaScript, your robot’s running your program, and
get, but you’ll end up with something you still really you can send it more JavaScript any time you want.
like, by understanding what the limitations are. That’s “The app we designed is completely customisable.
something you don’t get with software. You can edit the control pads, and then you’ve got
“I was making cardboard wheels to fit the motors, these choices of control elements that you can drop
but the minute you put a lot of torque through one, in. Say we put in a button; to keep it simple, you can
the shaft just rips off the cardboard. So we needed a just drop it in. The board has 14 motor controllers
way of putting torque into the wheel that didn’t do and 10 servo connectors, and you can set motor
that. I’d been trying to make the whole thing out of positions for those. You can map as many commands
cardboard, and it is mainly cardboard, but we needed to each button as you want. Here, there’s a test thing,
this tiny plastic part mounted to the shaft with holes so I can write a function in the robot firmware that
in it so that you can mount it to the cardboard. works off that button, and you’ve got a fully
“The Smartibot is an Espruino-based board, which generalisable control system, and you can pass
is a platform that no one seems to have heard of. arguments to it as well – whatever you want,
because it’s just JavaScript.
“It does things like mixing, so if you’ve got two
axes on a joystick, it can mix between two motors
for steering, or to take the monster truck example,
you can mix an up motion in a joystick with side to
side to control the steering servos. It gives you
masses of flexibility built into the app without
needing to do any programming.
“To me, that’s the approach. Don’t just plonk them
down in front of a computer with ‘Hello World’ and be
surprised when they don’t get it. Meet people where
they are and take them to where they want to be”.
25
Lucy Rogers
COLUMN SPARK
D
o you remember school things I enjoy – and I am far too lazy. So it
biology lessons, and seems I like to know that I ‘could’ do these
learning about the food things if I had to – but I’d rather not have
chain? A leaf gets eaten by to. There’s a line. How far down the chain
an insect and the insect am I prepared to go? Which things do I
then gets eaten by a bird. enjoy doing, and which will I pay to not
Every time you go along the ‘chain’, there do – which things do I depend on others
is a loss of energy. to do? What things can I not do, even if I
Over the past few months, many of us wanted to?
have been doing things that take us lower The last few months have made me
down the food – or purchasing – chain, appreciate the things I do depend upon
Lucy Rogers by making things. For example, making – particularly water, electricity, gas,
meals from the raw ingredients rather and internet connection. But also the
@DrLucyRogers than buying ready ability to get food
meals, baking bread, when I want it, and
Lucy is a maker, an engineer, making cakes etc. I rely on others much purchase everyday
and a problem-solver. She is There are those of items, such as light
adept at bringing ideas to life us who have grown more than I had bulbs and toilet rolls,
and is one of the cheerleaders vegetables. I even realised. And I now when I want them.
for the maker industry. bought a SodaStream But I hadn’t really
so that I can make
appreciate them all considered my health
my own fizzy pop. a lot more – until I was stung
There are many by a wasp. I’ve been
who have made their stung before and,
own clothes, masks, or other textile items. after the initial ‘ouch’ and applying vinegar,
Many home haircuts. Many DIY projects. I’ve generally ignored them and forgotten
It got me thinking about how far down about them the next day. This time I had
the chain I could go. Self-sufficiency has a reaction. I went to the chemist to get an
always appealed to me, but I also know antihistamine cream. The next day I went
there is a lot of ‘grunt’ work involved back to see if a tablet would be better. The
– hard manual labour that can get pharmacist took one look at the sting –
monotonous. And that puts me off. I have the swelling and the hot red patch and
made string and rope from stripped willow told me to see a GP immediately. After an
and lime bark, and also from stinging e-consultation, where I had to send photos
nettles. I have lit a fire by rubbing two of the reaction, I was given antibiotics.
sticks together. I have made a shelter Although I like to think I am pretty
using branches, twigs, and leaves – and independent and self-sufficient, and can
slept in it. turn my hand to most things, I rely on
But that kind of life, for me, would mean others much more than I had realised. And
I wouldn’t have time to do all the other I now appreciate them all a lot more.
26
Drew Fustini
COLUMN SPARK
Open-source space
Hacking at the final frontier
S
pace exploration is usually on satellites and rocketry. Their UPSat
associated with national was the first open-source hardware
agencies like NASA, or with satellite, and it was successfully
private corporations such delivered to the International Space
as SpaceX. However, there Station, then deployed into orbit in 2017.
is now a growing movement This deployment was a remarkable
of people who believe that space achievement: a real milestone in open-
shouldn’t be limited to governments and source space exploration.
companies, and that space exploration Whenever I’m in Oregon, I make sure
can be made more accessible with open- to visit Portland State Aerospace Society
source technologies. (PSAS), an interdisciplinary, open-source
27
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
VEXING VERSIONS
I’ve been using Inkscape for years, and it was only when
reading issue 33 of HackSpace magazine that I realised they
had only just released version 1.0! It’s amazing software – why
should they keep it at version 0 for so long? Anyway, I just
downloaded the latest version, and I’m loving the new
path features.
Paul
Derbyshire
CUDDLY ELECTRONICS
Can I just say, I loved the tutorial on using a Furby as an
output device. It’s one of those things that I know I now
need, but I don’t know what I need it for.
Ali
Paris
28
SPARK
NATURE
The stereotype of the nerd is someone who loves technology
and hates the outside. Sure, I’ve met a few people like this, but
personally, I’m really interested in nature, and lots of the
nerds I’ve met are as well. I really enjoyed learning about the
ways of combining these two interests in issue 33. Oh, and
I’ve been doing my bit for the environment by counting
penguins. Am I a scientist now?
James
London
29
Crowdfunding now
REGULAR
CROWDFUNDING
NOW
Open Game Station
DIY handheld entertainment
T
he Open Game Station is a modular, for getting input (an accelerometer and sound sensor)
handheld gaming system based around that could be interesting options for creating unusual
the 8-bit ATmega32U4 microcontroller. game styles.
While this isn’t the most powerful If you’re looking to test your programming skills on
microcontroller around (far from it in fact), some limited hardware, or just want to sit around and
it’s got enough oomph for simple 2D games. play retro-style, 8-bit games, the Open Game Station
Perhaps the biggest hurdle for any maker gaming looks like it’ll be a great-value option.
system is getting a good selection of games, because
while it’s fun to program your own, it’s also nice to
have some others to have a play with. The Open
Game Station solves this problem by being
compatible with the Arduboy. This means that
there are hundreds of games already available
(there are 277 on Erwin’s Arduboy Collection,
and this isn’t exhaustive: arduboy.ried.cl).
The form factor of this portable looks like
it’ll fit nicely in your hand (although we
haven’t held one to test this out properly),
though it isn’t as portable as the original
Arduboy. The Basic version ($25, plus shipping)
comes with the basics you need for gaming – a
microcontroller with screen, buzzer, and batteries –
while the Pro version ($35) adds a few extra features
30
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.
Left
The expansion
slots give you
the chance to
add features
31
LENS
HACK MAKE BUILD
Uncover the technology that’s powering the future
CREATE
PG
46 PG
34
HOW I MADE:
A PCB
How KiCad and HackSpace DISCOVER
magazine helped one maker
FEATHER
take his skills further
PG
50
MEET THE BOARD THAT’S
IN THE TRANSFORMING HOME
WORKSHOP ELECTRONICS PROJECTS
We revisit our Arduino watch
(now that we’ve worked out
how to program it)
PG PG
52 60
INTERVIEW: IMPROVISER’S
JAMES BRUTON TOOLBOX
Who needs Boston Dynamics Ideas to use up all that
when you’ve got access to woven nylon rope you’ve
cheap stuff on eBay? been keeping hold of
Discover Feather
FEATURE
DISCOVER
FEATHER
PLUG AND PLAY FOR
EASY ELECTRONICS
W
hen starting a microcontroller project, alongside a battery charging port, and sometimes a
most of us don’t reach for bare chips – wireless comms module.
though this is certainly possible – we The really great thing about Feather, though, is just
start with development boards. These how big the ecosystem is. You can use microcontrollers
package up a microcontroller and a few from most of the major families (including ARM, AVR,
other basic features, such as power management, into and ESP) and couple these controller boards with
an easy-to-use module. ‘Wings’ which add functionality.
Development boards come in all shapes and sizes, Each Feather board is 2 inches long by 0.9 inches
from large and packed full of features, to teeny-tiny wide, with 16 pins on one side and 12 on the other.
with only the barest of essentials. So, which should you These pins each have a specific function that has to be
choose for your next project? The form factor in the same place on every board. That means that you
influences a number of things – which microcontroller can take an expansion board and it should work with any
you can use, what add-ons are available, what features Feather mainboard (there are a few exceptions to this,
you can fit on board, and of course, what size your final but not many). This is the big advantage of Feather – a
project will be. wide range of microcontrollers works with a wide range
There is no perfect form factor as we all have of Wings. This means that you’ve got a huge amount of
different needs and want different trade-offs, but we flexibility in how you create your project. Also, for board
find that there’s one that seems to fit well in a large makers, it means that you only have to design your
proportion of our projects: Feather. mainboard and you automatically get compatibility with
The Feather form factor is small – though not tiny – hundreds of expansion boards. Let’s take a closer look
it’s big enough to accommodate most microcontrollers at how this ecosystem came to exist.
34
LENS
35
Discover Feather
FEATURE
THE BIRTH
OF A NEW
PARADIGM
WE CHAT WITH LIMOR FRIED TO FIND
OUT HOW FEATHER CAME TO BE
F
eather is the brain-child of Limor Fried, HackSpace: Was there a particular moment of
CEO of Adafruit, and the majority of inspiration behind creating the Feather?
Feathers and FeatherWings available are
from Adafruit (though there’s an increasing Limor Fried: The Feather comes from a very long
number of boards from other companies and lineage of development boards. Around 2007, when the
individual makers). Arduino was first released, we wanted a breadboard-
Limor started publishing electronics projects on her friendly Arduino-compatible and got the Arduino
blog in 2005. Soon, readers started requesting kits that team’s blessing to call it Boarduino (learn.adafruit.
brought together the parts needed to create the kits. com/boarduino-kits). Once we got a pick-and-place
From this, Adafruit was born and gradually became one machine in 2010, we made an ATmega32u4 breakout
of the largest businesses in the maker world. Today, (adafruit.com/product/296). Then in 2015, once low-
Adafruit is synonymous with hobbyist electronics, and cost BLE [Bluetooth Low Energy] modules became
there are few electronics makers who haven’t used available, we stuck one onto the 32u4 breakout to
either their products or their software. make an all-in-one dev board: the Adafruit Bluefruit LE
As well as building a business, she’s found time to Micro (adafruit.com/product/2661). The pinout on the
become a YouTube star and her weekly Ask an Micro is nearly the same as the Feather – all that was
Engineer show (one of several she regularly stars on) is missing was a battery charger that would let people
the longest-running live electronics show in the world. make wireless BLE projects. By then there were other
She took a little time out from her busy schedule to wireless chips like the ESP8266 that would benefit
chat with us about how Feather came to be the from a breadboard-friendly, battery-powered board, and
ecosystem it is today. Here’s what she had to say. thus we made the Feather!
36
LENS
Th rea ins
b at
e db pi
Bo o re
th
ar ard d F
du -f e
in rie ath
o nd e
– ly r
th A
e rd
u
in
o
oa ery t
r b v ui
he he fr
at – t lue
rd
Fe er B
st th u4
fir ea 32
F he
T
HS: I think the first Feather was the 32u4 In the last two years, we’ve seen other electronics
Bluefruit back in 2015. When designing that, did companies create Feather compatibles and Feather
you think you were creating a form factor that accessories, and that’s been really awesome too.
would take off in the way it has?
HS: Why is Feather the shape and size it is? Did you
LF: Yes! It took ten years to get there, but I really start with a size you wanted to hit, or did you start
thought I had a great form factor. One thing we did early with a list of features, and see how small you could
was quickly spin up a variety of ‘add-on’ FeatherWings make it (or something else)?
with different sensors, displays, GPS, to make sure that
we could support complex projects. LF: We wanted it to be breadboard-friendly, and still have
a few ‘holes’ on a solderless breadboard, but wide
HS: If not then, at what point did you realise that enough to fit common wireless modules. So that sorta
Feather was going to take off as an important made the width ‘fixed’, then we didn’t want it too long
form factor? because we have seen that it’s easy to bend pins if the
aspect ratio is too high. Two inches seemed good. We
LF: A few years ago, Particle (a manufacturer of Feather- wanted lots of GPIO, and the I2C/SPI/UART/analogue
like cellular/WiFi/BLE boards) emailed us and asked if pins to be in fixed locations. Mounting holes are helpful
they could join the Feather ecosystem – they wanted to for folks making enclosures. The design really just
make dev boards for their chips and software, but did evolved from the previous layouts!
not want to design all the accessories which is very
time-consuming. Joining Feather means instant access HS: LiPo charging is perhaps the one feature that
to 100+ Wings! We published specifications and the Feathers have to have (beyond those provided by the
latest set of Particle boards are now Feather-compatible! microcontroller). Was there a temptation to include
37
Discover Feather
FEATURE
Ad t o ts t t w l W
lo h c e
d f b o y ith ing
a lin o th
lig roje Pix
w k ur e
p eo
ho in
N
le g
fa im 05
ur r’s
al s L F4
ite
vo o
on r i 2
rs he M3
pe eat ST
F he
T
LF: Phil [Torrone] and I have a technique when we need LF: Check out the Feather specification documentation
to come up with names – we go to a local dim sum at hsmag.cc/JmdAFl to get an idea of what is required
restaurant on a Sunday, order all sorts of dumplings and to make something Feather-compatible. You can also
tasty fried foods, and discuss what the design is. In this look at the Awesome Feather GitHub repo to get
case, we had something untethered, light, flat, and thin. inspiration, and when you’ve completed your Feather
38
LENS
Ad yo Joy
to e
d ur W
ga p in
th
m roj g
es ec
co ts
nt wi
ro th
ls
er th the
W the
ak i p
M ew u
g
in
ic m nk
us lu ra
M vo C
or Wing, submit a pull request
so we can have it included at
hsmag.cc/Rd6OYF.
LF: I’d love to see some RISC-V Feathers, maybe one you think there
featuring the K210 which has machine learning are other things on
acceleration. For Wings, we think an RTK GPS or the horizon?
NB-IoT module Wing would be a very good addition.
We’re working on some of these, too. LF: Yes, yes, yes! Powerful chips
like the RT10x Cortex-M7s, maybe
HS: According to the Feather history page, you even STM32MP1 Linux chips (we recently reviewed
designed a Feather or Wing every week for a year. the OSD32MP15x all-in-one Linux chip that would
That sounds like a hectic schedule. How did it go? easily fit on a Feather).
We’re also seeing a lot of accessibility technology
LF: It was like a marathon! I tried to interleave different (AT) for folks who want technology that can help them
Wings and Feathers to do easy ones like the M0 series use their assistive devices. For example, the Freedom
(where we made half a dozen SAMD21 boards with Wing Adapter (hsmag.cc/KFs3HB) can connect to
different add-ons like BLE, WiFi, SD storage, LoRa/ wheelchair joysticks so that folks who are used to
sub-GHz radio…), and tougher ones like the FONA controlling wheelchairs can then turn around and use
Feather that has cellular support (that took quite a the same input device to play video games, pilot
few revisions!) drones, browse on a computer. The Wing adds the
wheelchair part, and then the Feather underneath is
HS: Is there a Feather that you’re particularly what adds Bluetooth, WiFi, or USB control.
proud of?
HS: There are now quite a few people building
LF: I really like the STM32F405 Feather. I think it came Feather boards, both maker companies and
out very nicely with a powerful new chip I had not used individual makers. What’s been the most surprising
before. There’s an SDIO card-holder on the bottom, thing for you about this Feather ecosystem?
STEMMA QT connector for easy sensors, and it was
our first USB-C Feather! LF: Boards like the OrangeCrab and Evo M51, and
other really powerful Linux-capable Feathers are really
HS: Where do you see the Feather ecosystem not what I expected! Folks have crammed 1GHz
going in the future? Is it a case of getting more processors into the Feather format – I’m glad it’s able
processor power, RAM, and flash in chips, or do to stretch to that sort of advanced functionality!
39
Discover Feather
FEATURE
GIANT BOARD
A PENGUIN FEATHER
Creator Chris Alessandro
I
’ve been making electronics and writing board in a lot of spaces. I thought it would be
software for almost ten years now, and I interesting to try and fit a full Linux-based computer
always wanted to make my own single-board onto the Feather form factor as sort of a challenge as
computer (SBC). I’ve made other SBCs in the well. The size and pinout of the Feather worked well
past, but they were mostly just experiments. I with the processor and other parts we had chosen.
had been browsing a large components supplier’s If you’re looking to make your own Feather form
website and came across the Microchip SAMA5 series factor board, I would highly recommend studying the
of SiPs (system in package). It includes the processor specifications provided by Adafruit.
and memory on the same chip, meaning that it makes If you’re not sure where to start, having a look at
it a lot easier to route the package in a small space. I existing Feather boards is also a great place to get
had been trying to decide on a form factor when I had ideas. As long as you stick to the spec, you should end
the light bulb moment, and had the idea to try and fit it up with something that works with a great line of
all on a Feather-sized board. It seemed like a fun add-on boards. Adafruit is always making new add-ons,
challenge, and I thought a lot of people would like it. and your board will continue to be compatible well into
The Feather form factor was chosen because we like the future
Adafruit a lot and what they’ve done for the community. I like the iterative design process and change things
There are also many pre-existing add-on boards, so it as needed. Order a board, test, test, and test. If
made a lot of sense to me to use the form factor. The something doesn’t work right, change the design. I
size is also all super-small – smaller than most other keep this process going until I end up with something
Linux SBCs – so you could fit a fully Linux-capable that works well and meets all my needs.
40
LENS
ORANGECRAB
SQUEEZING AN FPGA INTO A SMALL FORM FACTOR
Creator Greg Davill
I
started working on the OrangeCrab back in The biggest challenge on the Feather layout is just
April 2019. Back then there were very few the size, in this particular design I was forced to use a
options available for making use of high- very small package option for the EP5 FPGA that also
density DDR3 memory chips. I’d just finished makes the PCBs more expensive to fabricate. The
working on a tiny board, the Boson Frame routing for the DDR3 interfaces was also quite
Grabber, a 21 mm × 21 mm PCB that had an ECP5 and challenging, but achievable on a six-layer PCB.
HyperRAM. It was designed to fit behind a thermal A major comment on the OrangeCrab is that, for an
camera from FLIR and add SD recording capabilities. FPGA board, it has very limited I/O. So a new project
Because I’d managed to fit everything on that very that I’m in the stages of prototyping is a custom board
small board, I thought it would be a fun challenge for size, but using the SYZYGY FPGA interface standard.
myself to make this new design on a small form factor That’s called the ButterStick.
board. I ultimately picked the Feather because it has If you’re thinking about creating a Feather, my
a wide selection of available add-ons, and some very advice would be to go for it! There are lots of new and
clear guidelines from Adafruit about creating custom interesting development boards that people are creating
Feather boards. in the Feather format, and I think it’s awesome!
41
Discover Feather
FEATURE
PEWPEW
FEATHERWING
TURN ANY FEATHER INTO A GAMES CONSOLE
Creator Radomir Dopieralski
I
was running programming workshops [when I prototyping boards, and only made an add-on, a
had the idea to build my Feather]. Python is, in FeatherWing, that added display, buttons, and battery
my opinion, one of the best programming necessary to turn a Feather into a simple game console.
languages for learning, and making computer Around that time Adafruit became interested in
games is a great way to learn, so I wanted to teach MicroPython, and they made their own fork, called
programming by making games with Python. However, CircuitPython, which was more focused on teaching and
after trying several different things, it turned out that it’s good experience for the beginners.
difficult to do. People who come to the workshops bring
their own laptops with a variety of different operating MOVING FORWARD
systems, different versions, sometimes even without I have made a whole bunch since. My latest is a version
admin access. Installing and configuring everything on of the Feather M0 Basic Proto that is as bare-bones as
them takes time -- you need the Python interpreter itself, possible while still being compatible, called Fluff M0. It
you need an IDE, you need all the game libraries you are only has six components – even the USB port is just a
going to use, and so on. That can easily take an hour of cutout in the PCB – so that it can be made as cheap as
the workshop before they get to draw a single pixel. possible. It can be useful when you want to run a
I tried to improve the situation in various ways, but CircuitPython workshop as cheaply as possible, or when
ultimately I decided that I need a dedicated device, which you want to replace a Feather you used in a project with
I can prepare beforehand, with everything needed for the something that you can leave there without regret – and
workshop already on it. However, at the time I didn’t really recover your Feather for a new project. I am also working
have the skills and experience to make such a standalone on a couple of walking quadruped robot designs based on
device from scratch, so I used Adafruit’s excellent the Feather form factor.
42
LENS
OPEN BOOK
BUILD YOUR OWN E-READER
Creator Joey Castillo
T
he inspiration for this board traces back to modern gadgets integrate into our lives. Most aren’t
the GNU Unifont project – this really tethered to a wall wart; they’re battery-powered, and
ambitious effort to create one bitmap font rechargeable over USB. A while back, I worked with
that encodes glyphs for all the languages of Feather on another project, a data logger for back-
the world. The idea of building an open country hiking. I could toss it in my backpack in the
hardware device for reading literature in every person’s morning and plug it into a power bank to recharge in the
language was incredibly exciting to me, and I thought it evening, right next to my smartphone. That’s possible for
would be empowering to make it an object that folks literally every Feather project, which is awesome!
could build themselves and understand.
Lately, Feather is my first choice for most things I GETTING STARTED
want to build. The compactness of the form factor is part My advice is to just try some stuff! A standard
of it, and the ecosystem of FeatherWings, but the built-in FeatherWing-sized board costs $9 for three copies at
LiPo charging was what attracted me to the platform in OSH Park; you can design your idea, send it to them, and
the first place. I think it’s brilliant that Adafruit made have a board in your hands a couple of weeks later. You
battery charging a core part of the spec, because it can see what worked and what didn’t, try again, and
makes Feather match up really well with the way learn as you go. That’s what I did, anyway!
43
SUBSCRIBE TODAY
FROM ONLY £5
SAVE
U P TO
35%
Subscribe today and get:
FREE delivery
Get it fast and for FREE
Exclusive offers
Great gifts, offers, and discounts
Great savings
Save up to 35% compared to stores
SUBSCRIBE TODAY
Subscribe for 12 months Rolling monthly subscription
£25
FREE!
Adafruit Circuit
Playground Express
With your first 12-month print subscription
This is a limited offer. Not included with renewals. Offer subject to
change or withdrawal at any time.
SUBSCRIBE
on app stores
From £2.29
Buy now: hsmag.cc/subscribe
How I Learned: PCB design
FEATURE
How I Learned
PCB DESIGN
How Tim Richardson used an article in HackSpace
magazine to learn how to design his own PCBs
W
HERE DID IT ALL It was exactly what Tim needed
START? to understand the design workflow,
Tim has learned a little terminology, and the basics of how to start.
about electronics
through using WHAT TO DESIGN FIRST?
a Raspberry The height of a Raspberry Pi Zero
Pi and working on the CamJam with a micro-HAT (μHAT) was
EduKits. Now, having a higher than Tim wanted. He’d
little extra time in the day made a couple of projects
due to not commuting, where a Raspberry Pi Zero
he decided to try his was placed behind a
hand at PCB design. screen, but there was one
However, he immediately project he had in mind that
found himself staring needed the combination
at a cobweb of to be much thinner, so
incomprehensible how about mounting a
terminology. Eagle, Raspberry Pi Zero and
KiCad, footprints, μHAT on the same plane?
schemas. He didn’t know To solve this, Tim decided
where to start. to create a new PCB that
Not giving up, Tim asked he called the LowRider.
a friend he met through Pi The major parts for the
Wars, Paul Fretwell LowRider were two ‘short’
(@drfootleg), about how he headers. Most single-board
got started. “From a couple of computers have long pins or
articles in HackSpace magazine,” sockets to make connecting add-
came the response. So, Tim went ons and jumper wires more secure.
through his back issues and found issues The Raspberry Pi’s pins are 7 mm long, but
17 and 18 with Jo Hinchliffe’s Tim used shorter pins.
(@concreted0g) two-part article on using The next job is to design a ‘schematic
KiCad to produce a simple PCB. diagram’. For the LowRider, this was
46
LENS
Left
Standard (top) versus
LowRider headers
connecting two ‘2×20 2.54 mm pitch’ In the next tutorial, we looked at creating
headers; in plain English, that is two rows of a PCB. As instructed, Tim opened KiCad
20 pins with the pins 2.54 mm (0.1”) apart. Pcbnew, and was presented with a blank What is a ‘copper
More jargon to learn! page, as the article said. So, this is what a
With KiCad’s Eeschema open, Tim started netlist was for! Pcbnew read the netlist and flood area’?
by placing ‘symbols’ on the schematic footprints then appeared, along with This is the copper layer that fills both
diagram. Tim found the right header symbols a whole ‘rat’s nest’ of white lines between sides of a board with copper from
and proceeded to connect pin one of one the symbols! which the tracks will be etched, and
forms the ‘ground plane’.
header to pin one of the other, and so on. The next part of the game is to eliminate
Well, that was easy… each of the white lines! You do that by
The next stage is to take each symbol drawing ‘tracks’ between each pin of one
(component) and assign a ‘footprint’ which
links the symbol to the actual physical shape
of the part.
Left
The KiCad ‘Assign Footprints’ tool lists The LowRider
each component from the schematic diagram schematic
diagram
and helps you find matching footprints, or
you can design your own. For a Raspberry
Pi peripheral, Tim wanted to use a footprint
that represented the GPIO pins. After more
searching, he found a HAT template, so he
imported the parts that he wanted.
Then began something that would happen
many times in this adventure: starting again!
Tim replaced the generic header with a
Raspberry Pi header that had all the pins
correctly labelled. This meant having to
reconnect each of the pins again. This would
not be the last time Tim had to start over.
Once all the footprints were assigned,
the instructions in Jo’s article told Tim to
generate the ‘netlist’. He wasn’t sure what
that meant, but did it anyway.
47
How I Learned: PCB design
FEATURE
Above
Above The finished
The LowRider PCB (left) compared with the same μHAT combination (right) LowRider PCB
component and the corresponding pin on the diagram and fixing all those was almost Tim gathered his components together,
other components. the answer. Despite all ground pins being did lots of Googling, and eventually came up
Tim dutifully drew the tracks, followed connected, there were still areas of the with a basic circuit that worked. With some
by drawing the outline and mounting holes ‘ground plane’ which were not connected help from the very supportive Raspberry Pi
of the board. Next, Jo’s article told Tim to to ground! community, Tim also found a Python library
create a ‘copper flood area’. It took Tim a bit of head-scratching to which could control all four LED strips at the
Tim began to notice problems: he realise he just had to move the tracks same time, independently. The only proviso
had connected each ground pin to each around to give more space, and move was that it was limited to just four specific
corresponding ground pin on the other some tracks from the top of the PCB to the GPIO pins, but since the chip that Tim was
header. KiCad kept complaining that the bottom and vice versa. With the addition using had four level shifters, this was perfect.
Tim once again fired up KiCad, but had
Despite all ground pins being connected, finally learned what a KiCad template was!
He started a new KiCad project with a
there were still areas of the ‘ground plane’ predesigned μHAT template. This had the
header already on the schematic diagram and
which were not connected to ground! a corresponding footprint for the whole μHAT
on the PCB.
Even though Tim had learnt a lot from
‘ground plane’ was not actually grounded. of ‘vias’, Tim finally completed the board to his first PCB, he still had more to learn. For
Tim tried to fix these one at a time by his satisfaction. example, with specific GPIO pins used to
connecting individual ground pins to the It was time for manufacture. There control the LEDs, almost any other pin could
ground plane, but discovered that was are loads of options for this at different be used for turning the level shifter channels
wrong; every ground pin needed to be price points, with different lead times and on and off. He initially chose pins close to the
connected to each other via a single qualities. Tim used PCBWay (pcbway.com) LED control pins, but when it came to routing
‘ground’. Going back to the schematic in China, which had an easy-to-use interface the tracks, it simply could not be done neatly.
and instructions on preparing KiCad designs Eventually, he chose a bank of GPIO pins that
for manufacture. Ten boards cost $8, so it were located near the physical location of the
seemed worth the risk. level shifter on the board.
What is a Tim chose to power the Raspberry Pi
PIXELPI from the same 5 V power supply as the
‘ground plane’? While waiting for the first PCB to arrive, LEDs. Reading the HAT documentation, it
This is the copper layer that fills one Tim started designing his second board. recommended using a ‘ZVD’ diode circuit
or both sides of a board providing a For a long time, Tim had wanted to control to protect the Raspberry Pi, but he could
link between all the ground points of WS2812 LEDs with a Raspberry Pi. He not find a design anywhere. Eventually he
the components.
had looked into the idea quite some time gave up and ‘phoned a friend’ who designs
ago and had bought some ‘level shifters’ PCBs; they recommended using a specific
in preparation. Schottky diode.
48
LENS
Left
The final breadboard used to test
the circuits and software
49
In the workshop: A smartwatch
FEATURE
IN THE
WORKSHOP:
A smartwatch
By Ben Everard Taking control of my personal computing
I
’m fascinated by the idea of wearable
computing. It’s a staple of science fiction
that the protagonist can access some
advanced AI, or control large amounts
of hardware with something minuscule
strapped to their body (often their wrist).
Over the last ten years or so, we’ve seen an
explosion in the amount of computing power we can
carry with us (mostly in the form of smartphones),
but to me, it all feels a little lacking. Yes, there’s a lot
you could do with this quantity of computing power,
but I can never quite seem to get the benefit from it
that I’d like. Smartwatches are – for me – even more
disappointing. The ones I’ve seen are so wrapped
up in proprietary services that want to scoop up
your data, and locked down, that I’ve not really felt
they’ve deserved the moniker ‘smart’. When I came
across the LilyGo T-Watch 2020, which promised
an Arduino-compatible smartwatch, I hoped that I’d
found something with which I could at least start my
journey towards wearable computing that delivered
the experience I wanted.
I reviewed the watch in issue 33 and found
that it was a capable device. As promised, it was
Arduino-compatible with libraries to access all the
key hardware. It has a capable processor (courtesy
of the ESP32 that powers it), a battery capable of
lasting all day, a touchscreen interface, and a button
for user input. This was the bare bones I needed to
Above
The watch isn’t build my own wearable computing.
small, but it is Regular readers of this section will know that I
small enough to
be unobtrusive favour a prototype-driven way of creating things. I
50
LENS
I wanted one
that’s useful to me, and extensible enough to be some headroom
for imperfect
useful to you. programming
that I could
easily extract
the data from
wanted one that I could easily extract the data from
to process as I saw fit, and that wasn’t tied to some
proprietary back end.
Secondly, as a Brit, I’m obsessed with the
weather. On our small island, the seasons seem to
come and go several times in a single day, so having
a heads-up about what the weather is likely to do
over the coming days is useful.
51
m
James Bruton
a
INTERVIEW
J u
HackSpace magazine meets…
James Bruton
Who needs a multimillion-dollar research program
when you’ve got a YouTube channel?
r
e’ve all seen the
videos of Boston
Dynamics’ robot dogs.
To some, they’re an
exciting glimpse of an
automated future
where difficult, dangerous, and dirty jobs
are taken over by machines, freeing
humankind for a life of constant leisure.
For others, they’re an awful harbinger of
the day the robots take over and we have
to hide from them like rats in sewers. It
depends whether you prefer The Jetsons
or The Terminator.
Rather than take either of these
approaches, James Bruton saw the
multimillion-dollar advanced robotics
and thought, ‘I can do that’. His project,
openDog, is now in its second version,
having gone through two years of
development and improvement in the
aim of recreating Boston Dynamics’
walking, balancing quadruped. And best
of all, it’s completely open-source
hardware and documented on YouTube
and James’s personal site. We caught up
with him to find out how it’s going.
Above
One man and his
dog: James Bruton
with the current
iteration of his
openDog project.
52
e s
m on
LENS
ut 53
m
James Bruton
a
INTERVIEW
J u
HackSpace Let’s start at the beginning: I kind of made that walk somehow, by inertial measurement unit to make sure it
how did you get started with putting load cells in the legs and using the keeps its centre of gravity over its feet.
building openDog? motors to create a virtual spring with the And it walks on two legs at a time, using
ball screws, but it turned out to be very the diagonally opposite legs in a trot gait.
James Bruton I started trying to build messy. Without fast processing, it’s not It works OK, but the servos are pretty
a bipedal robot back in 2004, before very practical. underpowered, so it wasn’t capable of
YouTube. My website, xrobots.co.uk, was anything else other than walking in a
a blog and I put stuff on there every few HS Were you pleased with the result? straight line.
days. I built seven or eight machines – I suddenly got the confidence then to
this is going back before you could get JB I took a step back from it. I did two test say I can pretty much make this dog
cheap stuff from China. eBay existed, dogs, which were back-drivable gear- walk. It’s almost rigid, very lightweight,
but it was basically people selling boxes with brushless motors, so the spring and I’ve got these quasi drivable back-
junk out of their attic. And I couldn’t is basically the holding power for the drivable test dogs.
find any websites that told you how motor. You can push it backwards, and it’s And they can move fast and hit the
to build human-sized walking robots, a very low gear reduction. You can ground, so I’m going to forget about
funnily enough. back-drive the motor by manipulating it, openDog version 1, and we’ll do openDog
So I decided to write one and figure at very low reduction, so when you push version 2, which is where I am now.
out how to do it. That went on for a the joint back it pushes the leg, and that Last week I published part 6 of version 2.
r
number of years until YouTube came makes it kind of springy. But you can It’s a completely new hardware design; it’s
into being. I ended up with Gonk Droid control that, because you can read the all 3D-printed, apart from some carbon
and Robot X, which are both bipedal motor encoder position and work out fibre tubes. It’s got twelve brushless motors
walking robots that walked on two legs where you’re driving it away from the again, completely different ones this time,
and did it reasonably OK. Boston the big pancake ones that have lots
Dynamics had come along at of torque. They go straight onto the
”
that time with their robot dog, joint with a 5:1 belt reduction, so
so I thought, well, I can make I suddenly got the are easy to drive.
a robot that walks on two legs [I] took all the ODrives out of
confidence then
not too badly, so if you have four openDog version 1 – those motors
legs, that’ll be even easier, and I to say I can pretty are £140 each and there are
should be able to make something much make this twelve of them, so it’s not cheap
”
pretty convincing fairly quickly. dog walk to build. The whole thing cost
The only thing I forgot is that the about £2000, with the ODrives
bipedal robots have big square and everything.
feet and ankle joints, and the robot But it’s extremely agile, and it
dogs don’t, of course – they walk can jump and land on its naturally
on points. position it wants to be from, and use that springy legs and in part 6, which came
I’d already built this exosuit, a frame to calculate the force, and you can either out last week, it does actually walk. I did
that walked when I walked [it looks a lot follow the position or resist it. You can that by making the legs move really fast,
like the power loaders that Sigourney basically make this adjustable spring. which keeps it stable – it’s a natural
Weaver’s character uses in Aliens ], and it I did a couple of test dogs that had a spring, like jumping on a pro stick. And
used ball screws and brushless motors, motor in each leg, and they just hit the then just moving the legs a little bit as I
which are immensely powerful. I knew ground while I tried pushing them around move the joystick to move it around, so
they were powerful enough to move with brooms and things like that. So that that’s in openDog v2 part 6. That dog
almost anything, so I thought, let’s build worked pretty well. But I’d done 20 videos weighs about 18 kg, which is probably a
a really rigid thing with ball screws on all on this massive thing and didn’t know third of the weight of the first one, and it’s
the axes. I planned out a kinematic model what to do with it. It still didn’t work very extremely fast.
and built version 1, but now that the thing well, and I’d built these two test dogs that
is built, it’s a two-man lift. It’s built out looked really good, so then I built two HS What did version 1 cost?
of 6 mm aluminium and has twelve ball mini dogs.
screws that are massive lumps of steel, They were just the test to see if I could JB Probably about the same.
and twelve of these brushless motors. It make a dog that walks without spending A lot of that is the ODrives which I’ve
can locomote, but it’s nothing like Boston loads of money again. That’s sort of hybrid recycled though – those are £150, and
Dynamics’ robot. dynamic; it does some stuff with an there are six of them.
54
e s
m on
LENS
ut
Above
The first openDog
was a beast –as 60kg
it was the size of a
Dogue de Bordeaux
55
m
James Bruton
a
INTERVIEW
J u
Right
“Paramount
contacted me
and asked me
if I could build
them a life-size
r
Transformer –
and then we just
did it!”
56
e s
m on
HS It does look, when you start cutting
out sheets of 6 mil aluminium, it looks
more like ‘Open Rhino‘ than openDog. It’s
a big unit.
t
data to sway the hips and ankles, and it what’s made it work more easily in the JB There are very few people
kind of worked. Development has come end. This back-drivable, low-reduction contributing. I mean, there are people
on a lot since then. joints, and massively powerful brushless who want to make a pull request because
motors… the software that makes the indentation isn’t in line in the code
HS Is that because a biped will have all openDog 2 work will not make openDog 1 and things like that…
its weight on one leg, rather than work, because it’s not really anything – That said, I have a couple of patrons
u
bouncing along? it’s just moving joints to fixed positions at who subscribe on Patreon, and one of
fixed times. But because of that spring them is building it, and there’s another
JB I don’t know – they [the bipedal robots that we get out of the motor holding who’s implemented a machine learning
James made] looked really dynamic, they power is what makes it work inherently. setup – he’s making a robot dog walk
took quick steps. When the Gonk droid It’s what makes it dynamic where it better by giving it rewards. So you can
walks, it looks like a child or something. moves sideways, when it wobbles a bit have, it’s a little servo dog, but he’s got an
I guess it was lighter. If you get lighter and brings itself back – it’s totally down optical mouse tracker underneath that
and smaller then the problem’s not so to the mechanical build. can work out how fast it’s walking.
bad. You can make a small dog That’s something I’ll be working
with radio-controlled servos, and with him on probably to make my
”
that’s fine because it doesn’t need dog walk better. That’s something
to absorb such massive inertia. As If you’ve made for the future.
soon as you start scaling up, things something twice as
spiral bigger and bigger. If you’ve HS Let’s get on to some other big
made something twice as big, it’s
big, it’s bigger in three things you’ve made. What else
bigger in three dimensions, so it’s dimensions, so it’s eight have you been working on?
eight times the volume and eight times the volume and
”
times heavier. So every time you JB I’ve done a few projects with
eight times heavier
double it, then double it again is 64 Colin [Furze]. One was an Amazon
times, it’s a cube function. Alexa-activated bed shaker, and we
So my little servo dog, there are also did two eBay promos
loads of those on YouTube and they look HS One thing that struck me about the (everything has to be bought off eBay).
fantastic, but if you scale them up, then version 1 videos – that you started it in Colin built the giant TIE fighter, and I built
there’s suddenly so much inertia pushing software and you were writing code BB-9E, which was the bad BB-8. We did a
its rigid leg down on the ground. You’ve before you’d even written any hardware. promo with the kids who find the TIE
got to have that spring in there. Did you take a different approach for fighter in the middle of a field. That was
version 2? with eBay and Disney, for the launch of
HS I guess these are all considerations Star Wars 8. We did another one which
that you’d never thought of when JB Not really, no. All I did there was the was Marvel Avengers: Infinity War, which
you started. kinematic model, which was me making was when we built the Hulkbuster.
In openDog version 1, video 1, you sure I could move the joints in Cartesian
start out saying, “I’m going to build coordinates and work out all the joint HS The rolling ball version of R2-D2? It’s
something like the Boston Dynamics axes. But that’s as far forward as I’d obviously CGI…
dog. Obviously it’s not going to be as thought with that; I’d never thought about
good as that, because I’m not as good as it moving. JB For the movie, they had a mixture of
Boston Dynamics.” The mini dogs and version 2 are using things. They had these ones with big
Do you think that’s true now? Have you exactly the same kinematic model that stabiliser rigs on them, with a central
caught up with them yet? I’ve copied and pasted every time, with pivot and an arm that held the head, so
57
m
James Bruton
a
INTERVIEW
J u
servos to make a V-shaped lever to move
the head around, and there’s a library for
that. Remote-control, I used Bluetooth on
a serial port, but there are other ways. It’s
just a case of understanding how they
all tie together, and what you’re trying
to achieve.
There’s the mechanical build of
course, which has to have motors with
the right torque and speed to be able
to compensate quick enough to hold
it stable.
It shouldn’t be your first project! If you
were going to try building one of these,
then your first project should be one of
those two-wheeled balancing robots,
because that uses a lot of the same
principles. BB-8 has a heavy weight in
r
the bottom so it stays upright when it’s
switched off, but when you drive you still
have to keep that mass moving
dynamically so it doesn’t wobble around
Right
James’ driveable like a Weeble
BB-8 droid, from
the latest Star
Wars films HS And the Iron Man suit that you made,
do you still have that?
those were practical effects, but they the head control arm, which then moves JB I do, it’s all packed away in boxes. I
CGI’d out the rig. They had some that in another three axes so that it can turn don’t know if I’ll ever wear it again. I
were pushed by a person; one that just and move the head all around. It’s all think probably, looking back on it now,
sat on the ground and its head bobbed controlled with an inertial measurement that was before I had a 3D printer when I
around and didn’t move anywhere. unit and PID controllers. Because started that.
When Harrison Ford broke his leg and otherwise, it will just wobble around I started trying to build an Iron Man
everyone had to go home, that’s when like crazy. suit in 2008, and it was all clay sculpts
they built the free-roaming one that they So regulating the speed and the and moulds and casts. I used templates
use for red carpet events. And, of course, pendulum to hold the head forward at made from foam, and then I made moulds
that’s the one that everyone wanted to the perfect angle as you drive, all of from foam and made fibreglass and
replicate, and that’s how mine works: that motion control has to be integrated resin-cast parts. I only had a 3D printer
there’s no supporting rig on it – it drives dynamically – it varies the motor speed right at the end, for some of the catches
around by itself. and positions 50 times a second, or more. and bits and pieces. Other than that, it’s
So it’s a bit of a challenge. all handmade.
HS How does that work? Is the head held It took four years. That’s when I started
on with magnets? HS How big a leap is building something seriously making YouTube videos. My
like that, with all those mathematical top-viewed video on YouTube has had
JB It is, but what’s going in inside is considerations, from starting out with around 67 million views, and that’s four
obviously a lot more complicated. It’s flashing all LEDs on and off, the ‘Hello years compressed into four minutes of
based on a single axis that drives in one World’ of robotics? me building the Iron Man suit. Some of
direction. On that, there’s a pendulum those early clips are the first videos that
that swings sideways, so it leans to steer. JB I relied heavily on Arduino libraries. I started making; the resolution is 4:3 on
And on that pendulum is a flywheel so The inertial measurement unit has a an old DV camcorder. And it still gets,
it can spin on the spot. And all those library that just gives you an angle. maybe, half a million views a month
things have the same centre of rotation. There’s a library for the PID controller today. There’s a bit of a legacy there
Also with the same centre of rotation is to control the motor speed. I used two with YouTube.
58
e s
m on
HS And how about right now?
”
they’ve got their own processors on
them to do all the positioning for you.
I’m a big believer in living on example
code anyway.
ROS itself actually isn’t that easy,
although it’s all built for you. It’s quite
electronic engineering in the 1990s,
before open-source infrastructure
existed. We basically did programmable
LENS
t
something on speech recognition There was no buying things a lot more accessible.
coming out at the end of August, an Adafruit module All my projects rely on third-
but I haven’t done anything else party Arduino libraries – you don’t
for a while, because of a huge, big,
and downloading a have to get into the nitty-gritty,
secret project that’s taken all my library, sticking some low-level stuff. Things like the
time. It’s a big build. And I can’t variables in, and it ODrive to control brushless
u
”
tell you about it. motors – you could just attach an
working back then encoder to a brushless motor, and
HS Using somebody else’s there’s an Arduino library to drive
operating system, ready-built as that motor to a position. Trying to
ROS is, does that feel like a step down hard to get your head around, so it feels control brushless motors from scratch is
after doing everything from scratch, as like quite an achievement getting it pretty tricky. Shared libraries is the
you did with openDog? to work. reason openDog exists.
I mean if you think about Arduino and
JB You say that, but then I’ve used Raspberry Pi, and everything that’s HS So I guess that’s why you were
Arduino libraries and so on, and the around these days, and how it used to be so keen to release your CNC files,
ODrives to control the brushless motors, in the old days. So, I did a degree in 3D-printing files, and all the other
code yourself?
59
Improviser’s Toolbox: Paracord
FEATURE
P
aracord, the word and the tool, inside a nylon outer shell. This arrangement of cords
comes from its use by American together has a breaking strength of 550 pounds.
paratroopers in the Second World Of course, that isn’t the only kind of paracord
War. On landing, the soldiers would available on the market, and they now come in
salvage the lines from their parachutes all kinds of colours, patterns, and thickness. Their
and then later use them for all kinds of thickness determines their type, though sometimes
Mayank Sharma emergency fixes in the field. it’s also their breaking load, measured in pounds,
Owing to its usability and durability, paracord that is used as an identifier. For instance, the cord
@geekybodhi
soon became a standard military supply and part described earlier is commonly referred to as Paracord
Mayank is a Padawan of the standard deployment package. Over time, Type III, or a 550 Paracord, since it has a breaking
maker with an more people, even those outside of the military, load of 550 pounds.
irrational fear of drills. discovered paracord could be used for all kinds of Due to its popularity, the cord is available in many
He likes to replicate
electronic builds, outdoor projects. variants of varying quality. Type II is also widely used
and gets a kick out Paracord owes its origins to the invention of for more elegant knotwork, and Type I is often used
of hacking everyday
nylon in 1935 by Wallace Carothers. Nylon became as an accessory cord. The term ‘Mil-Spec Paracord’
objects creatively.
the durable replacement for the Japanese silk for is used for paracord that is made to strict US military
making the chords of the parachutes. A paracord is specifications, and is quite popular for its use in all
essentially just a nylon cord that’s made up of a core kinds of extreme outdoor sports.
of threads placed inside a woven nylon jacket. Irrespective of how they are used, paracords are
often braided or weaved. Knots play an important
“Despite their exotic history, paracords function when working with paracords as well. In
fact, the knots are often used to stylise the outcome.
are fairly accessible, and you can find Many makers also join paracords by melting their
them in your favourite crafts store” ends together. The nylon cores fuse together easily
when heated to create joints that appear seamless
and are quite strong.
The US military established standards for the Despite their exotic history, paracords are fairly
production of paracord. The most common type is accessible, and you can find them in your favourite
made up of seven inner nylon strands, that are in crafts store. If you haven’t worked with paracord
turn made up of three smaller strands each, packed before, here are some projects to get you started.
60
LENS
T
im loves working with paracord, and
although he has tons of projects on
his blog, we like this one in particular.
He’s used different lengths of grey and
blue coloured paracords – the exact
amount of paracord you will need will vary depending
on the size of your phone. He first makes a cardboard
template of his phone, which he then uses for
measurements. Tim knits the outer perimeter of the
case by using a length of paracord and tying it up
in cobra knots. Don’t worry if you don’t know how
to tie the knot because Tim has done a great job of
explaining and demoing it in the video. The rest of
the case is created by flattened lengths of gutted
61
Improviser’s Toolbox: Paracord
FEATURE
A HAMMOCK
W
Project Maker ant to take your paracord knitting that’ll dictate how much paracord you’ll need. His
David skills to the next level? Follow has a width of up to his neck, which is about five
Canterbury survival instructor, and former feet. He’s using four-inch meshes throughout the
television presenter, David Canterbury hammock, which dictates how many down lines he
Project Link
hsmag.cc/9WfVGI as he uses a few hundred feet has to put in his cross-line at the top.
of paracord to weave himself a hammock. The For the meshes, he makes a two-inch mesh at the
good thing about his hammock is that it’s made top with a four-inch mesh for the rest of the
with a simple netting method using any type of hammock. He uses his fingers as a gauge and creates
strong cordage. the mesh using reef knots. This gives the mesh
David starts by forming a cord line at the top better uniformity. The process is time-
where he ties a simple girth hitch knot over the top consuming, but David explains it in great
line and then pulls two lines through it. It’s important detail and also shares useful tips that’ll
to understand how big the hammock needs to be as help you during the build process.
62
LENS
SURVIVAL
BRACELET
T
om Hardy’s bracelet Project Maker
in Mad Max is quite Shawn
a rage and can be Matthews
easily made with
Project Link
some paracord. hsmag.cc/yUncTC
Shawn takes an eleven-foot length
of paracord and folds it to find
the centre point. He then takes the centre point and
wraps it around his wrist to gauge the diameter of
the bracelet and marks the endpoint. The remaining
length of paracord is then tied using cobra knots all the
way through the bracelet until you are left with a tiny
loop at the end. To secure the bracelet, Shawn uses
a couple of paracord fids to create stoppers at the
ends of the paracord bracelet. He then takes the fids Above
off, determines where he needs to place the stopper If this bracelet
doesn’t catch
by trying on the bracelet, ties the stopper knot, and your fancy, the
singes the ends to complete the adjustable bracelet. BoredParacord
channel has got
Watch Shawn’s video to better visualise the process. lots of others
TANGLE-FREE
HEADPHONES
I
f you haven’t yet switched Project Maker the wires back together, which Matt has
to wireless headphones, you Matt Carl explained in detail in another video tutorial
can use some paracord to that he’s linked to in this one. Make sure
Project Link
make your annoying corded hsmag.cc/vEQbFd you thread some heat shrink tubing, which
ones, that always get tangled, will come in handy later. Then connect
irritate you a little less. You’ll first have to the wires as instructed, and check the
cut the headphone wire, and then string the pieces headphones, before insulating the connections
Above
through a gutted length of paracord. Once you can’t with some electrical tape. Wrap up the process Matt suggests adding
push the wires through any further, Matt suggests by covering the joints with the heat shrink tubing some hot glue over
the joints for some
you instead scrunch up the paracord and then extend that had been piped earlier, and your tangle-free structural integrity
it over the wire. You’ll then have to strip and connect headphones are ready.
63
3 ISSUES FOR £10
+
FREE BOOK
hsmag.cc/hsbook
Subscribe to The MagPi, HackSpace magazine, or Custom PC. Your first three issues for £10, then our great value rolling subscription
afterwards. Includes a free voucher for one of five fantastic books at store.rpipress.cc/collections/latest-bookazines
UK only. Free delivery on everything.
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
72
PRINT IN SILK
Get great-looking prints
right off the bed
PG
66
SCHOOL OF
MAKING
PG
76
WORKSHOP Start your journey to craftsmanship
CAMERA with these essential skills
Toughen your camera for
a workshop environment 66 CircuitPython
68 Rag blanket
PG
78 PG
POWER 88
SUPPLY
Get the right power
WIFI
LIGHT-SWITCH PG
for your project
Internet-enabled illumination
96
PG PG
82 92 RUNNING
SERVICES
DEBUGGING GLITCH SYNTH Get your code to run when
Finding faults in hardware Make weird sounds electronically you want it to
CircuitPython on ESP32-S2
SCHOOL OF MAKING
CircuitPython on ESP32-S2
A new microcontroller joins the CircuitPython family
T
he ESP32 microcontroller has been At the time of writing, there are only a few
around for quite a while, and offers development boards built on this microcontroller. The
great value for money. For around Saola-1 comes with either a WROVER or WROOM
£7 you can get a powerful dual- module, and Unexpected Maker is selling a pre-
core microcontroller with on-board release version of the FeatherS2. We tested out a
Bluetooth and WiFi. It’s compatible Saola-1 with WROOM.
with Arduino and MicroPython, but not CircuitPython. This module does have a USB port, but it’s set
Ben Everard
The reason for this is that it lacks a native USB port. up in the same way as previous ESP32 boards – in
@ben_everard While there is a USB port that you can use to send other words, incompatible with CircuitPython. The
data to the device, it’s a little clunky to work with. new native USB connections are exposed on the pin
Ben loves cutting stuff, You need to use a command line tool to upload files headers, so the first thing we need to do is attach a
any stuff. There’s no
longer a shelf to store
(this is built into the Arduino IDE), whereas with USB port to them. You can get USB breakout cables,
these tools on (it’s now CircuitPython, devices are mounted as removable but we soldered up a micro USB port to expose the
two shelves), and the storage you can drag and drop files to. connections we needed. In a USB cable, you’ll find
door’s in danger.
Fortunately, there’s a new version of the ESP32: a ground, 5 V, D-, and D+. D- and D+ both carry the
the ESP32-S2. This is a stripped-down version of same signal, but inverted so D- is always the opposite
the microcontroller – it has only a single processor of D+. To wire up the board, simply connect 5 V to
core, for example. However, it does have a native 5 V, GND to GND, D- to pin 19, and D+ to pin 20.
USB port, and this means that it’s possible to
”
run CircuitPython on it and mount the drive as
removable storage. We decided to try it out to
There’s no support for either
see what it’s like. This is more complex than other Bluetooth or WiFi, though
”
CircuitPython devices, and we wouldn’t recommend
Below that may change
it at the moment unless you’re familiar with setting
Make sure you’re
using the latest up microcontroller development environments.
dev version of
esptool when
Hopefully, this will change as more CircuitPython- To make matters a little more complex, the actual
flashing the device specific hardware comes on the market. CircuitPython binary that you need to flash on the
board needs to be loaded over the original USB port,
not our new addition. To do this, you need the latest
version of esptool – you can download this from
GitHub at github.com/espressif/esptool. If installing
from a different source, ensure that you have version
3.0-dev or higher to include support for the ESP32-S2.
You’ll also need Python installed for this to work
(see GitHub README for details – you’ll need the
Development Mode installation). With that installed,
you can download the CircuitPython binary from
circuitpython.org, then flash it to the device using
esptool with a command something like the following:
66
FORGE
Left
You have to add your
own extra USB port
if using one of the
Saola-1 boards
BENCHMARKS
The ESP32-S2 is a powerful microcontroller, so we decided to compare it against two
You’ll need to change <com port> to the relevant other common, powerful microcontrollers: the SAMD51 (in the form of an ItsyBitsy M4
serial port, and you may need to change the path Express) and an nRF52840 (in the form of an Adafruit CLUE). You can see the full results
or name of the downloaded CircuitPython binary. below, but broadly speaking, this processor is somewhere between the two in terms of
performance (in all these benchmarks, lower is better).
If this runs without errors, you should now have
It’s worth taking this with a pinch of salt, as this is the very first version for the
CircuitPython running on the device. Switch the USB ESP32-S2 chip while the others have had a few years’ worth of improvements. We may
cable to the new USB port, and you should be able to well see performance increase on this platform in the coming years.
access the file system and REPL as you would with
any other CircuitPython device. Benchmark ESP32-S2 nRF52840 SAMD51
Perhaps the major difference between the GPIO on/off 3.743 7.34802 2.237
ESP32-S2 and other CircuitPython boards is that pins
on the ESP32-S2 are named IO1, IO2, etc., while on integer sum 5.41299 8.534 3.05
other boards we’ve used they’re named D1, D2, etc. integer multi 12.154 10.438 4.023
If you’re looking to use the connectivity features of
the ESP32-S2, then you’ll be disappointed. At the time float sum 2.96001 6.03198 1.671
of writing, there’s no support for either Bluetooth or float multi 2.99501 6.021 1.647
WiFi, though that may change in the coming months
(this is still an alpha release after all). However, you do float divide 3.106 6.05801 1.664
have access to lots of CircuitPython goodies.
67
Make a rag rug from cast-off clothes
SCHOOL OF MAKING
I
f you’ve spent the last few months we’ll look at three different methods of rag rugging,
reorganising things and chucking out items starting with the classic shaggy rag rug. The
you no longer need, chances are you’ve materials and preparation are similar for all three
been waiting for charity shops to signal that options, and you can mix and match techniques.
they’re again able to accept donations. Start by assembling the clothes and other
Right now, they’re overwhelmed. Rather fabrics you want to use, ideally choosing colours
Rosie Hattersley than add to the deluge of cast-offs, you could turn that complement each other. For a doormat-sized
unwanted clothes and bedding into something project, you’ll need about five pieces. The fabrics
@RosieHattersley
useful instead. It’s a slow-paced, mindful process can be a range of types and thicknesses. For
that you can do in front of the TV, or while listening example, the dark blue edges of our project piece
Rosie Hattersley writes
tech, craft, and life
to a podcast. come from brushed cotton pyjamas, while the
hacks and tweets Although an actual rug is usually what’s made bright blue is a much lighter, wrinkle-prone nylon.
@RosieHattersley. when rag rugging, you could just as easily use this T-shirts, shirts, jeans, and cotton sheets and duvet
upcycling technique to decorate the edge of picture covers are also ideal for turning into rag rug pieces.
frames, a lampshade, or even make a piece of eco-
art to create an instant shabby chic effect. Here, TOOL TALK
If you’re going to make a largish project such as a
doormat-sized rug like ours, or a decorative rug for
a room, you might want to buy to dedicated latch
hook tool or spring tool. Both have prominent hooks,
plus a means of trapping your fabric on it so that it
doesn’t fall off as you pull it through the hessian.
They cost less than £5 from craft or sewing stores.
Another option is to use a crochet hook. These
are cheaper and more widely available, but don’t
have a means of securing your fabric to them.
Finally, you could use a small pair of needlenose
pliers. You’ll make larger holes in your hessian, so
Right
Assemble tools to
help you poke fabric
through a hessian
backing. Round up old
T-shirts and prepare
to attack them
Far Right
A latch hook snags
pieces of fabric, then
holds them in place
while it draws them up
68
FORGE
”
other fabric
T-shirt material
Hessian fabric,
cut to size
For the loopy rag rugging technique, you need Sharp scissors
to create long strips from your source fabric. For
Wooden latch
maximum cutting and rug-making efficiency, lay your hook, crochet
fabric flat and snip along the longest side to make hook, or
strips. The Ragged Life Blog (raggedlifeblog.com) needlenose pliers
has lots of fabric prepping tips. Strong needle
For the third technique, braided rag rugging, you and thread
also need long strips. As an alternative, you could
Masking tape for
cut up T-shirts and other sizeable items into balls of the braided
‘yarn’ by cutting a series of diagonals into either fabric technique
69
Make a rag rug from cast-off clothes
SCHOOL OF MAKING
CHECK AS YOU GO
At the end of each row, turn the hessian over to check
there are no huge gaps. This can happen easily as the
fabric disguises them as you work. Add pieces of rag
rugging to fill any gaps. Floaty fabrics, such as light
nylon, are the most likely to be hiding big gaps. Gaps
can also appear if you leave several rows between
loopy rag rug rows.
STRETCHING EXERCISE
Stretchy fabrics, such as cut-up old T-shirts, are an
obvious upcycling choice, as many of us have lots of
them. Stretch fabric tends to twist as you work, leaving
side of the fabric, and then cutting the fabric as one a narrow, quite flat row of loops. You’ll need to create
a couple of these rows in this fabric if you want it to
Above continuous strip. Instructions for using the braided
Our rug progressing stand out.
as we snip up various rag rugging technique are on the next page. Alternatively, create two rows at once by working in
unwanted clothes
a grid, making the first loop, then starting the next one
SHAGGY RAG RUGGING adjacent to it before moving on to a new pair. Because
Start at one corner of the hessian and a few squares you don’t have to create one lengthy row then another,
in. Insert your chosen tool through the front of the it seems psychologically faster and more satisfying.
hessian so that the hook (or pliers head) protrudes.
With your other hand, take your first piece of cut-up
fabric and place it, pattern-side upwards, on the For a purely shaggy rag rug effect, create more
hook. Place or hold it underneath the hessian. If rows of rag rugging using exactly the same technique,
using a latch hook tool, bring the small piece of varying the colours or fabric types as you wish. Rows
metal above the hook down so that it latches into should be around three squares away from the first
the hook, snaring the fabric. row if making a tightly woven rug, but can be spaced
Draw the fabric back a little further apart if
”
up through the hessian, your strips of fabric are
and wiggle it so that To begin loopy rag rugging, quite thick or wide. Three
approximately half the or four squares apart
fabric strip is on the
take a long strip of fabric is ideal.
top side of the hessian. and pull it through from the
”
QUICK TIP Press the latch hook LOOPY RAG
underside of the hessian
It’s sensible to hem arm again to release the RUGGING
the edges of the fabric. Now, push the Loopy rag rugging is
hessian (or other hooking tool down through a square two or three a faster technique than shaggy rag rugging, but it
open-weave fabric) along from the first one, snare the other end of the creates a much flatter design. To begin loopy rag
you’re using as the
fabric, and draw it up to the top of the hessian. If rugging, take a long strip of fabric and pull it through
backing for your
rug, so the strands you look on the underside of the hessian, the fabric from the underside of the hessian. Tie a knot at
don’t get in the way strip should be snug against it, but shouldn’t pull the the end of the fabric strip that is on the underside.
while you attach the hessian out of place. Repeat the process of hooking Now create a line of fabric by pulling the fabric strip
pieces of fabric to it. oblongs of fabric to create a line of rag rugging. through evenly spaced squares.
70
FORGE
Left
Use different coloured
fabrics to create a
pattern in the rug
Below
The hessian
disappears behind the
rags as you complete
the rug
It’s easiest if you pull the fabric up through the Begin by preparing the braids. Plait strips of
first square and allow enough fabric to sit on top of coloured fabric together, securing them at one end
the hessian to form while you then poke the rest of by taping them to a tabletop with masking tape. Add
the fabric strip down through a square close to the new strips when one runs out by cutting a slit in the
”
first one. Next, push end of the existing plait
your ragging tool down strand and another in
through a third square When you’ve plaited all the strand to be added.
another couple along Pass the new strand
your fabric, lay out the
the row, and pull the through the slit in the
plaits so you can see which
”
fabric underneath taut other strand. When you
against the hessian. is the longest run out of fabric strips
Continue the loop- of that colour, tie off the
making process, leaving plait at the end. QUICK TIP
loops on top and pulling tight underneath. When a When you’ve plaited all your fabric, lay out the A plaited coil, made
strip of fabric runs out, simply knot a new one and plaits so you can see which is the longest. Start with from random offcuts
of fabric, is an ideal
continue making loops! Unlike shaggy rag rugging the fabric of which you have the least (so it seems
way to edge your
(which ends up with fabric ends splayed in all to go further) and coil it around itself and secure it hessian-backed rag
directions), you can make a feature of how you angle by sewing it tightly together through the centre of rug to give it a neat
your loops. each plait. Wrap or sew subsequent plaits to the one finish. Simply sew it
you’re running out of to continue the coil. onto the hessian.
BRAIDED RUG MAKING
Your cut-up fabric strips lend themselves well
to making circular items, such as round rugs or
coasters. If the material you have available is a real
mishmash, rather than being sourced from three or
four distinctly coloured items, consider a braided or
plaited design.
PATTERN FORMING
Fabric in several different colours is a clear contender
for a pattern, rather than just coloured strips. A
balanced, symmetrical pattern is both easy and
effective, since you just need to split each fabric pile in
half and can work inwards, changing colour as needed.
If you’re creating a pattern, draw it on the hessian
with a marker pen as a guide. Large shapes, letters,
and numbers all work well; intricate patterns less so,
except with the loopy rag rugging technique. Organise
your cut-up fabric so you can see how much of each
you have, decide roughly what design or arrangement
of colours you want to use, and allocate the colour by
fabric available and amount needed.
71
Beautiful prints with silk PLA
TUTORIAL
P
LA is the most popular plastic for Some people report clogging issues with silk,
3D printing, and it comes in some but this isn’t something we’ve experienced. With a
fantastic colours. But the surface wide range of different silk filaments on the market,
finish is always a little matt. Silk PLA and each one having a different blend of PLA and
has added magic that makes it shine. elastomers, it’s hard to pinpoint the cause of this.
OK, it’s not magic, it’s elastomers that If you experience this, it’s worth going through
Ben Everard leave your prints looking glossy and gorgeous. the usual processes for cleaning your extruder and
For the most part, silk PLA prints just as regular perhaps checking that you’re printing at the correct
@ben_everard PLA does, and you might be able to use your slicer’s temperature for your filament (it may need to be a
normal PLA settings. However, the elastomers that little warmer than PLA).
Ben loves cutting stuff,
make silk filament shiny also affect its physical
any stuff. There’s no
longer a shelf to store properties slightly. It tends to be a little more flexible CHOOSE YOUR STYLE
these tools on (it’s now and stretchy, and this can affect how it prints. We Silk filament can create excellent-looking prints, but
two shelves), and the
door’s in danger. can’t give exact advice as each silk filament is a little it can also highlight every imperfection in the print,
different, but you may find that you need to play depending on how it’s used. It looks best on prints
with the retraction or extrusion multiplier settings to with a lot of features, such as sharp edges or tight
get it to print reliably. curves – the reflections then pick out these features.
72
FORGE
Above
Silk filament highlights any imperfections, such as the wobble in Above
this overhang on Benchy The raw filament looks great even before it’s printed
ALTERNATIVES
If you want high-gloss prints, silk PLA is a great choice,
but there are a few alternatives:
73
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
THE BEST
PROJECTS FROM
HACKSPACE
MAGAZINE AVAILABLE NOW
THE ULTIMATE SKILLS,
TRICKS, AND MAKES hsmag.cc/store
TUTORIAL
Workshop-ready
camera kit
Add a suit of armour to your digital camera
and keep it safe it from workshop accidents
Dr Andrew Lewis
@monkeysailor
Dr Andrew Lewis
is the owner of
Shedlandia.com, a
restorer of old tools, a
fabricator for hire, a
research scientist, and a
founder member of the
Guild of Makers.
I
f you’re thinking of getting more serious
about documenting your projects, then
you’re eventually going to end up investing
in a decent camera and microphone.
When you do get that new piece of kit, it’s
worth taking a few extra steps to protect
Right that investment and make sure your camera is
Oil, paint, and glue
can damage your
workshop-ready.
camera. A silicone Making things can be a messy and dangerous
cover will protect
your camera from the occupation. Fire, acid, aerosolised paint, glue, solvent
worst of the grime. spills, metal particles, and high-speed tools don’t make
Choose a distinctive
colour so you can a workshop the ideal environment to immerse your
see (and avoid) it shiny new camera into. Here are a few simple things
easily while you’re in
the workshop you can do to give your new kit a fighting chance.
76
FORGE
YOU’LL NEED
Silicone
camera cover
Tempered glass
screen protector
UV filter to suit
your camera lens
Two-handed
camera stabiliser
Left
A camera steady grip Above
serves multiple functions. Always keep at least
It keeps your dirty hands one ultraviolet or
off the camera when you neutral-density 0 filter
move it, and anything that’s on your lens. Projects
attached to your camera do occasionally
(external mics, recorders, launch themselves
and even the built-in and take unexpected
screen) gets a protective flights through the
ring around it that prevents workshop, and
damage from sideswipes extra layers of
and falls. The downside of glass on the end of
this type of grip is that you your camera lens
need to remove it to change can prevent a very
the battery expensive accident
Below Below
Lens hoods are designed You probably need
to stop side lighting from to see the screen
causing flare effects in when you’re filming,
your images, but they also and that means you
make a physical barrier need to expose the
that protects the lens from delicate surface to
knocks and scrapes. You messy fingers and
can use the lens hood mechanical perils.
to anchor a cylinder of A tempered glass
card, paper, or thin plastic screen protector
to shield the exposed keeps your LCD safe,
sides of the lens when and can be changed
you’re working in a really when it gets stained
messy environment or broken
77
Variable power for your projects
TUTORIAL
Variable power
for your projects
DC step-down or ‘buck’ converters are a flexible and cheap
way of getting electrons
L
ots of the time, when experimenting can be incredibly efficient. They are available in lots
with electronics, we need to feed a of different forms, and they have become cheap and
particular voltage into a system, and easy to source online.
it’s a rite of passage for many to wire One of the first we looked at is a cheaply available
up a voltage regulator to create a board built around the LM2596 IC (Figure 2). This
fixed voltage supply that we need. board is available in a few different form factors,
Jo Hinchliffe Linear regulators, such as the ubiquitous LM7805, with the most common and cheapest being one that
@concreted0g
are great in that they can take an unregulated voltage has a simple input end, an output end, and a small
between 7 volts and 25 volts, and regulate the output multi-turn variable resistor to set the regulated output
Jo Hinchliffe is a constant
to a fixed 5 volts. However, linear voltage regulators voltage. Taking an input voltage between 3.2 V and
tinkerer and is passionate aren’t the most efficient approach and often have to 40 V, and outputting a lower voltage between 1.25 V
about all things DIY dissipate a lot of energy as heat, and you may have and 35 V, it‘s capable of delivering up to 3 amps.
space. He loves designing
and scratch-building both to add increasing sized heat-sinks for them to be The basic LM2596 is simple in operation – attach
model and high-power able to cope if you draw a lot of current. Also, whilst a supply to the input, then your multimeter and hold
rockets, and releases the
linear regulators have many great uses, sometimes the probes to the output. Using a small flat-head
designs and components
as open-source. He also you might want to have the ability to vary the output screwdriver, adjust the small pot, and you can vary
has a shed full of lathes voltage – this is where variable DC ‘buck’ converters the voltage to suit your needs. A common hack with
and milling machines and
CNC kit!
can be very handy. Variable DC step-down or buck these, to make them more useful for experimenting
converters are a type of switch-mode converter and with use across a range of projects, is to replace the
tiny potentiometer on the module and wire in a larger
multi-turn potentiometer. In Figure 1, you can see that
we built a simple, yet accurate, variable power supply
Figure 1
A collection of DC-DC
buck converters, some
with variable voltage,
and some with both Figure 2
variable voltage and One of the commonest boards is this one that
current regulation uses the LM2596 IC, and has a single trimming
potentiometer to adjust the output voltage
78
FORGE
Figure 3
Another variant of the
LM2596 board with
a switchable LED
voltmeter that can
show the input voltage
and also the variable
output voltage
79
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.
TUTORIAL
D
iscover how to eavesdrop on
the messages sent between
components in your circuits. Learn
the common causes of problems
and how reading the contents of the
Dr Andrew messages can facilitate diagnosis and
Robinson save days of debugging time.
In my previous article, Debug Techniques with
Dr Andrew Robinson is Multimeters and Oscilloscopes, we gave our golden
a part-time university rules for debugging: break the system down into
lecturer and runs his own
design and manufacture subcomponents and observe the behaviour. To
electronics consultancy achieve this, you’ll need to monitor the messages
in Manchester. He’s
being sent between systems.
responsible for creating
CodeBug, PiFace, and We also mentioned how planning for debugging
the Quizit.net interactive at the design stage can make things easier. You
quiz site.
need to be able to probe communications signals to
take measurements, or temporarily break and inject
stimulus data. As such, design your PCB accordingly;
provide pads or space for headers to connect
test wires and include zero ohm resistors, or wire
links where you might need to temporarily break a
connection. Consider adding a spare output pin you
can use to generate a trigger signal, or a reference
marker to indicate when a point has been reached
in your code. And a final tip: label everything on the
silkscreen so it’s easy to probe the correct wire!
82
FORGE
MISO
majority of communication links are based on the
transmitter applying a voltage to one or more wires SS
(referred to as data lines) to represent the data
being sent. A receiver reads the data by measuring
the voltage (or absence of) on the wires. Since the
”
data being sent will change over time, so too will
If possible, compare the data that your code
”
the voltage, and the receiver needs to know when
the voltage on all the lines should have settled and sends with a known working example
be ready to read. There are two schemes for this:
clocked and self-clocking.
messages or characters). Compare what is received
CLOCKED VS SELF-CLOCKING with what the sender thinks it is sending by also
Clocked protocols have an additional signal line getting the sender to log outgoing data. Typical
that indicates when the other signals have settled causes of no or completely incorrect data are
and data is ready. Commonly encountered clocked misconfigured baud rates or pin configurations (e.g.
protocols include I2C and SPI. Other protocols, such if a pin is set inappropriately for input or output) on
as serial, do not have a separate clock signal and microcontrollers. If the data being received matches
derive the timing from the data lines instead. Data what is being sent then you’re probably sending the
transmissions have a data rate (sometimes called wrong data and you need to check your software. QUICK TIP
baud rate) which relates to the number of times a If possible, compare the data that your code sends The quickest check
signal is allowed to change in a second. The receiver with a known working example. that a serial port
and sender must be set to the same data rate is functioning is
otherwise no or incorrect data will be transferred. CHECKING THE DATA to disconnect the
The physical connection must be such that it allows Sometimes you can’t see what a device is receiving, transmit and receive
lines from the rest
the electrical signals to transition fast enough and or you need more insight into what is happening on
of the circuit and
reduce susceptibility to interference. the wires. The next level of debugging is to read
connect them to
the data on the wire with another device and check each other (called a
FIND OUT WHAT THE RECEIVER that it is as expected. There’s nothing to stop you loopback). If the data
IS REALLY RECEIVING attaching another microcontroller and comparing sent out matches
If you can, a good place to start when debugging what it is receiving. However, while this is cheap, if what’s received, you
a misbehaving communication is to get an you’ve used the same receiving code, you can’t be know the device
is at least capable
understanding of what the receiver is actually confident that the same bug won’t affect the second
of sending and
receiving. Add code to log it to memory, or microcontroller too. Some chips have hardware receiving. If not, you
somehow display it (e.g. re-sending it over a serial design faults in communication controllers, so using need to check that
monitoring console, or flash an LED for particular the same device won’t reveal this either. A more the port is enabled.
83
Debugging digital signals
TUTORIAL
robust approach would be to use a logic analyser to at risk of damage. When debugging, you don’t want
Above record and decode the messages and show where doubts as to whether your test equipment is not
SPI capture of master
sending characters the signal is invalid. seeing a fault or, even worse, reporting a phantom
‘hi’, while slave
doesn’t send anything
fault that’s not really there.
(interpreted as 00) EQUIPMENT BUYING GUIDE When choosing an analyser, it’s worth considering
Most modern mixed-signal digital scopes can offer similar features as covered in the last article on
protocol decoding as add-ons. This has the advantage choosing an oscilloscope: memory depth, sample
of integrating with other features; for instance, rate, max signal speed, input isolation, usability of
triggering an analogue capture. Alternatively, logic software and range of protocols supported.
analysers are available as standalone devices.
This author has found Saleae a good choice for a DEBUGGING SPI
standalone logic analyser. Just over ten years ago, To debug a protocol, you need to know what it
when the founders couldn’t find a suitable, affordable should look like first. SPI is perhaps the simplest, so
logic analyser, they built their own, with the first units we’ll look at that first. You’ll commonly encounter
being hand-assembled by the CEO. With a passion SPI where moderate amounts of data have to be
for making test equipment that’s highly usable, their transferred quickly, e.g. for memories, SD cards,
software is powerful, yet and small LCD/OLED
”
simple and clear to use. displays.
To debug a protocol
It works out of the box SPI consists of one
for many protocols, and you need to know what it main, and at least one
”
can easily be extended should look like first Secondary device,
through Python. Data is connected by four
gathered on the device, signals:
and then streamed over USB to be recorded and • SCLK Serial CLocK (generated by the main to
analysed in Linux, Windows, or macOS. As such, synchronise timing)
the memory depth is only limited to the memory of • MISO Main Input Secondary Output (used to
QUICK TIP your computer, which is vastly larger than current receive data at the main)
oscilloscopes. They often have discounts available for • MOSI Main Output Secondary Input (used to
Sigrok is an open-
source project that makers and startups. send data to the secondary)
provides protocol • SS Secondary Select (used to indicate the main
decoding and remote OTHER CONSIDERATIONS wishes to communicate with a device and unique
control of a range of Very low-cost analysers are available, but it’s worth per secondary device).
test equipment. This considering the specifications carefully, and checking
community effort
reviews regarding their reliability. Some Saleae clones The main selects the secondary it wants to
makes it possible
lack input isolation, which puts your PC and circuit communicate with by asserting the appropriate
to decode data
gathered by very secondary Select line. SS is almost always active
low. The main drives the Serial Clock line with pulses
low-cost analysers
or oscilloscopes.
BIT ORDER that indicate when the data is ready to be read. Data
However, unless To further add to confusion, data can be sent most is sent one bit at a time on the MISO and MOSI
someone has already significant bit (MSB) first or least significant bit (LSB) first. lines. Data is transferred to and from the main and
created an interface For instance, the binary value for six is 00000110. This can secondary simultaneously. If there is no data to be
for your equipment, be sent in the order 0,0,0,0,0,1,1,0 (MSB first), or in the order
you’ll have to write sent, the line is left idle, and 0 will be transmitted.
0,1,1,0,0,0,0,0 (LSB) bit by bit. For historical reasons, serial
some interfacing links use LSB. At the end of a transmission, the main will stop the
code first. SCLK and usually deassert the SS.
84
FORGE
DEVICE 1 DEVICE 2
TX RX
RX TX
Left
Example serial port
connection, TX is
connected to RX
When debugging SPI, check: Examining the waveforms should reveal all
• at the start of a transaction that the SS line these errors.
is asserted;
• there are regular transitions on the SCLK line SERIAL INTERFACE
and transitions on the MISO/MOSI lines that ‘Serial’ is a bit of a woolly term. Although the term
vary with the data being sent; serial interface can describe any class of interface
• that the state of the data lines are constant where data is sent sequentially, ‘serial port’ (which
when the clock indicates data is ready to sometimes confusingly is shortened to just serial)
be read; is often used as shorthand to refer to a specific
• on the data sheet that the clock polarity communication link. Some devices will call serial
and clock phase match for the main and all ports RS232 (even when technically they don’t
secondaries. Different devices interpret the meet the RS232 standard), or a UART (universal
clock as active high or active low, and clock the asynchronous receiver transmitter). Serial ports are
data in at the leading or trailing transition of the frequently found on circuit boards to print debugging
clock pulse; information, and used to interface GPS receivers or
• that the bus is running below the maximum 3G and 4G modems. Serial ports can have a range of
clock speed that the devices and cabling can configuration settings, but the vast majority have the
support. If in doubt, try slowing the main clock characteristics as detailed below. If necessary, check
down to see if data transmission becomes the data sheets for the exact settings for the serial
more reliable. port on the device you’re debugging.
Serial ports transmit data on their TX signal and Below
The impact of long
The most common causes of problems on SPI receive on RX. These names are relative to each cables causes signal
are mixed up signal line connections, misconfigured device, so the TX of one device is connected to the transitions to be less
clean, which will show
ports on microcontrollers, or too fast a clock. RX of another. There should only ever be one TX but on an oscilloscope
85
Debugging digital signals
TUTORIAL
Data
0 0 0 1 0 0 1 0 0 1
Data
0 1 1 1 0 0 0 1 0 1
Data
0 0 1 1 1 0 0 1 0 1
86
FORGE
I2C MAIN I 2C
SECONDARY
SDA SDA
1
SCL SCL
1 2C
SECONDARY
• Data is sent to or from the secondary, depending
SDA 2
on if it is a read or write. The sending device
drives the SDA and SCL lines. After each SCL
eight bits, the receiving device acknowledges
reception.
• The end of a transaction is signalled by a Left
Example setup
transition from low to high of SDA while SCL for I2C
is high.
”
You should find details of how to interpret data
you recieve from a secondary in the data sheet. By having some knowledge of these three
protocols, you should be able to diagnose the
”
WITH I2C, DON’T FORGET THE PULL-UPS!
I2C data lines are never driven high by a chip; instead
vast majority of communication problems
they rely on resistors connected to the power supply
to pull the signals up. As such, a common cause 2
I C is unusual as the secondary device can slow
of problems is forgetting to include the pull-up down the main by holding the SCL line low until it
resistors. Other causes of problems include incorrect is ready. Unfortunately, some devices (such as early
secondary address, or interference between SCL Raspberry Pis) do not recognise this clock stretching
and SDA. You can check the address of a secondary correctly, which can result in errors. The other
device, and that it’s responding, by doing a scan likely causes of problems with I2C are a lack of or
of the bus. On Raspberry Pi, this is done with the incorrect pull-up resistors, poor cabling resulting in
i2cdetect command. interference, or (like the other protocols) too fast a
clock speed.
Enable the I2C interface in raspi-config By having some knowledge of these three
protocols, you should be able to diagnose the vast
sudo raspi-config
majority of communication problems you’ll likely
Install the i2c scan tool encounter as a maker. This author used to attempt
to fix communication problems by repeatedly making Below
sudo apt-get install i2c-tools I2C waveform capture.
little changes to code, recompiling, and flashing. Example write of 0xF7
sudo i2cdetect -y 1 followed by read of
Once he got in the habit of recording and reading
eight bytes. Green
Or, for an old 256MB Raspberry Pi communication waveforms, often he was able to blobs indicate start
quickly pinpoint exactly what was wrong, and save condition, and red
sudo i2cdetect -y 0 blobs shows
days of debugging time. stop condition
87
ESP8266 smart light
TUTORIAL
S
ince smartphones have become and are constantly monitored from anywhere
part of our lives, our way of life has and at any time. Everything and everyone always
changed. They have become objects connected in a big way on a network.
which we can no longer separate For some years now, it has been possible to use
ourselves from. In fact, it is often smartphones to replace remote controls via special
the first thing we put in our pocket apps, for example, your TV, air conditioning,
Demetrio Pinna before leaving the house. With a smartphone in DVD players, etc. This prompted us to create a
hand, we can contact anyone, create and exchange simple project to use the smartphone to remotely
Demitrio spends his multimedia content, surf the internet, play games, switch on/off other equipment such as lights,
working days wrangling
work, travel with maps, and much more. The future irrigation systems, temperature sensors, domestic
big computer systems
and his free time ahead of us is full of surprises because this tool appliances, and much more.
playing with little ones. will allow us to do things that were previously We did this with a NodeMCU 1.0 ESP8266
unthinkable, especially with the Internet of Things (ESP-12E) card, an SRD-05VDC-SL-C relay, and
(IoT), where all objects are connected to the internet one smartphone with an app installed that would
Right
The phone app
makes it easy to
send messages to
your device and can
be used for far more
than a light
88
FORGE
”
in the transmission of sends the message used here – the
messages are called to the clients that NodeMCU – is a
”
NodeMCU board. The (or computer), which Arduino IDE to work
user, via smartphone, this case the NodeMCU converts the message with ESP8266 boards
89
ESP8266 smart light
TUTORIAL
• Again, use the floppy disk icon to save Preferences (Settings)), insert:
the configuration. arduino.esp8266.com/stable/package_
• The final part of the app configuration is to set esp8266com_index.json
up the status topic. Again, use the ‘+’ button, Through the Boards Manager (Arduino IDE >
but this time select Text as the type, and Tools > Boards Manager), install version 2.6.3 of the
enter the following: module called ‘esp8266 by ESP8266 Community’.
• Name = STATUS; Close the Arduino IDE and restart it, then enter the
Topic (sub) = outTopicStatus; following options in the tools menu:
Main text size = Medium
Board: "NodeMCU 1.0 (ESP-12E Module)";
• A final click on the floppy disk icon, and you’re
Builtin Led: "16";
ready to start work on the hardware.
Upload Speed: "115200";
CPU Frequency: "80MHz";
WHAT IS NODEMCU 1.0 ESP8266 (ESP-12E)?
Flash Size: "4M (3M SPIFFS)";
The NodeMCU is a mini card that mounts the
ESP8266, a system on a chip (SoC) that includes And select the relevant port.
a WiFi module with integrated TCP/IP stack. It’s a • Finally, download the ‘PubSubClient 2.7’
microcontroller that, due to its small size and low library (PubSubClient-2.7.0.zip) from
price tag, is very versatile in IoT applications, home hsmag.cc/wNUb8f, and unzip it in the
automation, wearable applications, automotive, etc. Arduino-1.8.12 library folder.
To program the NodeMCU, we will use the Now that we’ve got our microcontroller set up,
Arduino IDE by connecting it to the PC via a cable the second half of our project is a relay. We opted
micro USB. First, however, the correct USB driver for an SRD-05VDC-SL-C. It's a relay able to work
must be installed, which the manufacturer indicated with maximum current to the contacts of 10 A,
through the abbreviation on the chip (USB > TTL maximum voltage to the contacts of 250 V, and
converter) placed on the card. working temperature from 25°C to 70°C. The internal
• In our case, the 'SILABS CP2102' chip electromagnet that opens and closes the internal
and the drivers can be downloaded from contacts is powered up at 5 Vcc and is controlled
hsmag.cc/bA91uW. by the high pulses received in the Signal pin. It can
• If Arduino IDE is not installed on your computer, work in NC (normally closed) or NO (normally open).
download it from hsmag.cc/HXA72T. In NC mode, the relay opens the circuit and then
• Start the IDE, and in the Additional Board interrupts the passage of current when a high pulse
Manager URLs field (Arduino IDE > File > from the NodeMCU arrives in the Signal pin. To close
Right
This is the pinout of
our relay module,
but check yours
before wiring it up.
You may need to
adjust our wiring to
match your module.
90
FORGE
”
may make it easier to
Before adding mains power, you need to make develop the circuit
sure that your project is wired together securely
Before adding mains power, Figure 1
The layout for low-
and fully enclosed in an insulating box. You need
you need to make sure to make sure that there’s no chance of fingers, or
voltage testing. Put
this on perfboard or
similar and enclose
that your project is wired anything else conductive, coming into contact with
before applying high
”
the high-voltage parts of the circuit. You can buy voltages
together securely plastic project boxes
and other forms of
enclosure, or make
mains won't flow through the main circuit (only your own.
the terminals on the relay). Remember that some Once everything is
connections on the bottom of the relay board will be secure and safe, plug
connected to the lightbulb voltage as will the screw everything in and reap
terminals on the top. the rewards of your
Let’s start by connecting the ‘-’ and ‘+’ of the labour by controlling
relay respectively to GND (black wire) and 3V3 (red your lighting from
wire) of the NodeMCU, while pin S of the relay will the comfort of
be connected to D1 of the NodeMCU. Connect the your couch.
lamp by carefully following the diagram (Figure 1),
to avoid possible short circuits. Connect it only to
connectors C (common) and NO of the relay, but not
at the power.
At this point, make sure everything is correct
and, only after this check, connect the NodeMCU
to the computer via a micro USB cable. Run the
Arduino IDE, and load the sketch (which you can
91
Rotary encoders: Raise a Glitch Storm
TUTORIAL
Rotary encoders:
Part 04
A
Glitch Storm is an explosive torrent of project in The MagPi #66 (magpi.cc/66). However,
musical rhythms and sound, all generated with bytebeat music, an algorithm generates the
from a single line of code. In theory, you actual samples levels that make up the sound.
can’t do this with a Raspberry Pi running Python – This algorithm performs bitwise operations on a
Mike this month, we throw theory out the window and tick variable that increments with each sample.
MAKER
Cook show you how. Depending on the algorithm used, this may or
may not produce something musically interesting.
Veteran magazine Often, the samples produced exhibit a fractal
author from the old
structure, which is itself similar on many levels,
days, writer of the
What is a Glitch Storm
Body Build series,
plus co-author of 01 A Glitch Storm is a user-influenceable
thus providing both the notes and structure.
Raspberry Pi for
Dummies, Raspberry
version of bytebeat music. We love definitions like
that here at the Bakery: something you have never
T he algorithm contains
Pi Projects, and
Raspberry Pi Projects
for Dummies.
heard of is simple a development of something variables that a user can
else you have never heard of. Bytebeat music was
magpi.cc/mikecook at the heart of the old Commodore 64 demo scene, change in real-time while
a competition to see who could produce the most
impressive graphs and music in a very limited the sample is playing
number of bytes. This was revived/rediscovered
Enter the ‘Glitch Storm’
and christened by Viznut, aka Ville‑Matias
Heikkilä, in 2011. And then JC Ureña of the
03 With a Glitch Storm, three user-controlled
‘spherical sound society’ converted the concept variables – a, b, and c – can be added to this
into the interactive Glitch Storm. algorithm, allowing the results to be fine-tuned.
In the ‘Algorithms’ box, you can see that the
bytebeat algorithms simply run; they all repeat
after a certain time, but this time can be long,
So what is it?
02 Most random music generators work on
in the order of hours for some. A Glitch Storm
algorithm, on the other hand, contains variables
You’ll Need the level of notes; that is, notes are chosen one that a user can change in real-time while the
at a time and then played, like our Fractal Music sample is playing. This exactly what we can
> MCP4921 D/A
converter Figure 1
magpi.cc/ 3V3
mcp4921 Raspberry Pi
GPIO Ref
> 5 × KY-040 rotary 6
CS0 1 16uF
switches, with nuts 24 GPIO 8 2 1K5 L
SCK 3 Aout +
magpi.cc/rotary D/A
G
23 GPIO 11 8 R
MOSI 4 22K
19 GPIO 10 Latch 10nF
> 3.5 mm stereo
MCP 5
jack socket
magpi.cc/ 4921 7
stereopcb Figure 1 Schematic for the
sound-generating circuit
92
FORGE
THE MAGPI
DOWNLOAD
THE FULL CODE:
magpi.cc/pibakery
Figure 2
Algorithms GPIO 21 GPIO 19 GPIO 20
Cable numbering - red wire = pin 1
Bytebeat
CLK DT SW CLK DT SW CLK DT SW
Sample = t * (42 & t >> 10) # "the 42 melody" Rotary switch Push switch Rotary switch Push switch Rotary switch Push switch
Glitch Storm
Sample = t * (t >> a) & (b * t >> 7) & (8 * t >> c) NC 3V3 Gnd NC GPIO 27 GPIO 24 GPIO 17 GPIO 7 GPIO 23 GPIO 18 Raspberry Pi GPIO
Raspberry Pi, we need some extra hardware to D/A converter and associated audio components.
generate the sound samples, and also a bunch of These are built on a board that hangs off
rotary encoders to control things. The samples Raspberry Pi’s GPIO pins. Also on this board
are produced by using a 12-bit A/D converter is a socket that carries the wires to the control
connected to one of the SPI ports. The schematic box. We used an IDC (insulation displacement
of this is shown in Figure 1. The clock rate for connector) to connect between the board and the
the transfer of data to this can be controlled and box, as we wanted the D/A connection wires to
provides a simple way of controlling, to some be as short as possible because they carry a high
extent, the sample rate of the sound. Figure 2 frequency signal. We used a pentagonal box just
shows the wiring diagram of the five rotary for fun, with a control in each corner, but the box
encoders we used. shape is not important here.
93
Rotary encoders: Raise a Glitch Storm
TUTORIAL
Figure 3 Construction
1
Rotary Control
Connector
GPIO
Connector 24
06 The board is built on a 20-row by 24-hole
20 19
20
piece of stripboard. Figure 3 and Figure 4 show the
20 40 39
18 17
38 37
physical layout for the front and back of the board.
16 15
36 35
The hole number 5 on row 4 is enlarged to 2.5 mm
14 13
34 33
and a new hole is drilled between rows 1 and 2 to
12 11
32 31
accommodate the audio jack socket. A 40-way
10 9
30 29
surface-mount socket connector is soldered to the
8 7
28 27
back of the board, and a 20-way socket is soldered
6 5
26 25
to the front. You could miss this out and wire the
4 3
24 23
20-way ribbon cable direct to the holes in these
2 1
21
positions if you want to economise.
22
10nF
20 19
18 17
16 15
- 4921 10 9
route they will take. Here, we don’t want wires
8 7
crossing the 20-way connector, so the upper four
6 5
wires use 30 AWG Kynar wire to pop under the
4 3
connector and out through a track hole, without
1 2 1 1
soldering, on the other side. When putting the
1 24
20‑way IDC pin connector on the ribbon cable,
Figure 3 Front physical layout of the interface board make sure the red end connector wire is connected
to the pin next to the downward-pointing triangle
on the pin connector. Figure 5 shows a photograph
T he knobs control the user variables of the control box wiring.
94
FORGE
Figure 5
Top Tip
Ribbon cable
connector
problems
If you get red
wire in the wrong
pin, you will have
to compensate
by wiring the
encoders
differently. A
revised schematic
for this is on our
GitHub page.
Figure 5 Wiring of
the control board
Figure 6 How to
program the registers
in the D/A converter
find they are written in C. There are two major Control bits 12 bit D/A value Figure 6
differences you need to note when converting
from C to Python. The first is the ternary operation 0 1 1 1 D 11 D 10 D 9 D8 D7 D6 D5 D4 D3 D2 D1 D0 D/A bytes
which in C is a question mark, and the second is First byte Second byte
the modulus operator with a percent sign. See the
notes that accompany the main code about these. v as an
D7 D6 D5 D4 D3 D2 D1 D0 8-bit sample
95
Run your Raspberry Pi code automatically
TUTORIAL
#!/usr/bin/python
import time
S
import sys
o, you’ve written some code for
your Raspberry Pi that runs your
While True:
project. You need to run it every time
print “hello world”
your system starts, but how do you
sys.stdout.flush()
do this? Perhaps the easiest method
time.sleep(1)
is adding a line to the /etc/rc.local
Ben Everard file. This is a Bash script that runs each time the There are a couple of unusual bits in this. The first
computer boots up. It’s quick and easy, but there is the first line – this is known as a shebang, and it’s
@ben_everard are a few drawbacks to it, namely: used to tell the operating system what program to
use to run the script. This is the complete path to
Ben is a former
• If your script outputs any information or the binary for Python. We got this on Raspbian OS.
sysadmin who's spent
longer than he cares errors, where do these errors go? It might be a little different on other Linux distros.
to admit fiddling with • If your script crashes, how do you know, and If you’re unsure, you can run the command ‘which
running services on
Linux boxes
how do you restart it? python’ and it will tell you.
• Can you stop or reload your script easily? The second unusual thing is the call to sys.
stdout.flush(). This isn’t strictly necessary, and it
Fortunately, the operating system used by just tells the operating system to make sure all the
Raspberry Pi computers (Linux) has a mechanism output has made its way through the output buffers
for managing things in the background: systemd. and on to its destination. We found we had a large
This is a service layer that’s widely used to lag between the script running and output making
Above
You can easily access manage all sorts of bits of essential software on its way to the logs if we didn’t use it. In practice,
the status and output your Raspberry Pi or other Linux computer, from you may find that you can live without this in your
of your script from
the command line, databases to window managers. It provides a way programs (or just include it once in a main loop).
either via a screen of controlling software that runs in the background. We saved this in a file called hello-service.py
or a remote session
(such as SSH) Let’s take a look at what this means in practice. in /home/pi.
96
FORGE
”
What we’ve done so far will get the service up
and running, but it won’t automatically start it every
There’s no fussing around
time you boot the system. For that, you need to
trying to find PIDs of enable the service with:
processes in order to stop
”
systemctl enable hello.service
or restart them With this done, you can restart your machine,
and it will automatically start. If you want to stop it
starting automatically, you can disable it with:
Type simple (as opposed to forking) tells systemd
systemctl disable hello.service
that the command will continue to run in the
session it was started. There’s far more to systemd than we’ve looked
The final line tells systemd what command to run. at here, but with these basics, you can get your
Save this unit file as hello.service in your Home code up and running and make sure it’s looked after
directory, then copy it to the systemd directory with: properly as it whirs away in the background.
97
DON’T MISS THE BRAND NEW ISSUE!
JUST £5
SUBSCRIBE FROM ce of one
the pri
> FREE! 3 issues for
> FREE! Delivery to yo
ur door
> NO OBLIGATION! Le
ave any time
Z E R O W
FREE PI ER KIT*
START ption to the print magazi
ne
s
onth subscri
on
With your 12-m
/12m th
magpi.cc * While stocks
last
PG
106
DIRECT FROM SHENZHEN: PG
100
USB-C
POWER MODULE
Get up to 100 watts from BEST OF
BREED
standard power supplies
PG
PG
PG
110 PG 113
112
BENCH FORGE
POWER LEARN & CARVE
Get electrons just the way ORIGAMI Traditions running headlong
you want them An online guide to folding paper into the modern world
When you need to keep it small
BEST OF BREED
ONLYTHE
BEST
When you need
to keep it small
Accessories for your Raspberry Pi Zero
T
he Raspberry Pi Zero and Zero W smoothly, just like they did in the 1980s, was
are diminutively small, as far as priceless. It brought back that feeling I had the first
single-board computers go. This time I used a Raspberry Pi Zero.
author still remembers the day he They couldn’t believe such a small ‘thing’ could
plugged one in, hooked up a monitor, run such complicated software so well. Yeah,
keyboard, and mouse for the first we all know retro games from the 1980s aren’t
time. The OS started to boot up and showed a really complicated to run, but I didn’t want to get
”
lot of scrolling lines of text. After a few quick
configurations, I had a working computer. Not
a microcontroller, but a real working computer, Most of us have come to know and love the
”
running a decent operating system! It’s amazing
Raspberry Pi platform – it’s an essential tool
to think about just how small Raspberry Pi Zero
really is compared to its predecessors – and
maybe even its contemporaries! Even more into all the details! However, I did have a little fun
impressive is the price, which hovers just around when I also showed them that it was running a
the cost of a pizza. keyboard and mouse via Bluetooth, and it had built-
Most of us have come to know and love the in WiFi. It blew their minds, and hopefully I ignited
Raspberry Pi platform. We’ve used it, understand it, a spark of curiosity. Wait until they learn about
and it has become an essentia ltool that we use. I Raspberry Pi 4!
recently had some friends over, and they were In this Best of Breed, we’ll be taking a look at
interested in what I was working on: a Raspberry Pi some of our favourite – and small – Raspberry Pi
Zero running RetroPie. For those of you who don’t Zero accessories. These are all useful accessories
know, RetroPie allows you to run classic video that won’t make your project get too big physically
games on Raspberry Pi. The look on their faces or break the bank. They all fall within the already
when they saw a table with just a Raspberry Pi Zero small form factor of Raspberry Pi Zero. Or at least
sitting there plugged into a monitor, running games close enough!
100
FIELD TEST
Below
A computer in
A
your game pad
s we mentioned in the intro, media centre running on Raspberry Pi, or any other
Raspberry Pi makes a great retro application where you need some basic inputs. Check
gaming system. Yes, the new out the product page to learn more about building VERDICT
Raspberry Pi 4 can emulate a lot your own Raspberry Pi-based gaming system. Adafruit Joy
more advanced gaming systems, Bonnet for
but Raspberry Pi Zero can hold its Raspberry Pi
own on the classics systems from the 1980s. And Gaming on
what’s a gaming system without a few buttons and a Raspberry Pi
joystick? That’s where the Adafruit Joy Bonnet for Zero is easy with
Raspberry Pi Zero comes into play. this Bonnet.
10/ 10
There are times when you want a compact and
portable gaming system, and Raspberry Pi Zero,
coupled with the Joy Bonnet is a perfect match. Take
it on the go when travelling, plug in a hotel TV via a
mini HDMI cable, and you’ve got a pretty robust ZeroSeg
gaming system on a large TV. The Bonnet comes fully A retro-like
assembled and ready to go. Just add a simple case accessory for your
and stow it away in your bag. And if you’re not into Raspberry Pi.
8/ 10
gaming, you can use the Joy Bonnet to navigate a
S
peaking of retro fun, check out the
ZeroSeg from The Pi Hut. It’s a classic, Below
Forwards to the
eight-character, seven-segment display
past with this
add-on board for your Raspberry Pi. It retro display
also includes two handy buttons for
resetting, or any function you may need
for your project. We’ve always loved the classic look
of a red seven-segment display, and we find it kind of
interesting to pair it with the latest tech like Raspberry
Pi Zero or Pi Zero W.
The displays are controlled via a MAX7219CNG,
which handles all the grunt work for your Raspberry Pi
and alleviates the need for a lot of pins. And the best
part about this board is that it handles the data from
your Raspberry Pi in a traditional way, so most
existing code for a seven-segment display will work
without many changes. The Pi Hut has a full code
library and example code to get you up and running
retro-fast with the ZeroSeg.
101
When you need to keep it small
BEST OF BREED
Zero4U
ADAFRUIT $9.95 adafruit.com
T
he tiny size of the Raspberry Pi Zero
means that there’s not much space
for connectors and USB is a bit
limited. For many projects, this won’t
be a problem, but sometimes you need VERDICT
just a few more peripherals. This is Zero4U
where the Zero4U really saves the day. By simply A much-needed
plugging the board into your Raspberry Pi Zero, you expansion for
instantly add a convenient four-port USB hub. your Raspberry
The Zero4U gets its power directly from your Raspberry Pi project, you’ll be ready to go, thanks to Pi Zero.
10/ 10
Raspberry Pi Zero, so you won’t need to add an extra the Zero4U. Be sure to check out the product page
power supply. Now when you go to add a keyboard, over at Adafruit to make sure it’s compatible with your
mouse, or other USB accessories into your tiny specific version of Raspberry Pi Zero.
T
Above
he Raspberry Pi Zero has a lot of No need to skimp
on the USB ports
power for such a small form factor;
Enough horsepower to even run a full Left
A tiny camera for
video camera system. And although a tiny computer
most cameras for Raspberry Pi
ecosystems are small, the Zero Spy
Camera from Adafruit is extra small and makes a VERDICT
perfect companion for Raspberry Pi Zero. The module Zero Spy Camera
itself measures in at only 8.6 mm × 8.6 mm, and the for Raspberry Pi
attached ribbon cable is only 2” (52 mm) long, making Zero
for a compact little camera system. course, you’ll have to figure out a power supply, but A small camera
Because of the small size of Raspberry Pi Zero, and that isn’t too difficult thanks to a convenient USB plug for a small board.
8/ 10
the fact that you don’t need anything other than this on the Raspberry Pi board itself. And if you use this
camera module itself for it to capture video, you can camera with a Raspberry Pi Zero W, you can even add
easily make a very compact security system. Of some wireless connectivity and remote control.
102
FIELD TEST
Inky pHAT
PIMORONI $18.34 pimoroni.com
Left
Displays need not
hog lots of power
J
ust because Raspberry Pi Zero is small Below
Displays and
doesn’t mean you can’t have a big
buttons all in one
display. The Inky pHAT from Pimoroni handy package
is a Raspberry Pi-sized, energy-efficient
e-ink display. It’s available in three
different colour combinations: battery will last a long time compared to a traditional VERDICT
black/white/red, black/white/yellow, and a simple LCD or TFT display. Just keep in mind the refresh of Inky pHAT
black and white. The screen features a 212×104 pixel the screen can take up to 15 seconds, so don’t expect Available in
area, allowing for crisp text and graphics. And, since it to run any animations or videos! multiple colour
is an e-ink display, it’s very sunlight-friendly and a Pimoroni provides a great ‘getting started with Inky combos and at
great choice for any outdoor project. pHAT’ tutorial, featuring lots of code examples and a great price.
10/ 10
And speaking of outdoors, where power can be everything you need to get started. Head on over to
limited, the Inky pHAT only sips about 8 mA power the product page to see more examples of the
when refreshing the contents of the display, so a available colours and the tutorials.
T
he OLED Bonnet Pack for Raspberry
Pi Zero is a great little pack VERDICT
collection of components that
OLED Bonnet
everyone could use. Not only do you Adafruit has been able to get up to 15 frames per
Pack for
get the Adafruit 128×64 OLED Bonnet, second, so you should be able to add some fun little Raspberry Pi
but you also get a Raspberry Pi Zero W animations too! Zero
and enclosure. This pack of parts can do a lot right out Also included is a Raspberry Pi Zero W, which has All you need for
of the box! built-in wireless features and everything else you love a quick project,
The OLED Bonnet includes a very readable 128×64 about the Raspberry Pi ecosystem. And last but not including a
pixel OLED display, along with a five-way joystick and least, the kit also includes a nice little case, allowing Raspberry
two push-buttons. Now you can easily include for a much better hand-held experience, and it Pi Zero!
10/ 10
navigation and inputs to your Raspberry Pi project. provides some protection too! If you don’t have a
Adding an interface with multiple menus couldn’t be Raspberry Pi Zero W yet, this would make a great
easier thanks to the example code and libraries. little bundle to add to your collection.
103
When you need to keep it small
BEST OF BREED
A
t first glance, you might be removing the card. And yes, in other situations this
thinking that you have seen could be a problem, but we find that in a lot of our
smaller cases than the Flirc projects we tend to not remove the card very often.
Raspberry Pi Zero Case, and you’d Another cool feature is the two different tops that
be correct. And if you thought this are included. One allows access to the GPIO pins, and
was supposed to be all about the the other is solid and does not. Again, this can add a
smallest of small accessories for Raspberry Pi Zero, lot of extra security to the Raspberry Pi inside. We can Below
Keep cool
you’d also be correct. But in this case, no pun definitely see a lot of uses for this nicely designed little
without
intended, we bent the rules. Why? Heat. That’s why! enclosure, even if security isn’t your top priority. noisy fans
Raspberry Pi Zero can run a little warm if you are
crunching a lot of numbers, and this case helps
dissipate all that heat. The case is made from VERDICT
aluminium, and it acts as a large heat sink. Other Flirc Raspberry
cases might allow you to add a heat sink, but this one Pi Zero Case
is integrated, and it does a great job. Rugged with
Another nice feature, other than its good looks, is added features
the fact that you have access to most of the ports of and security.
9/ 10
Raspberry Pi Zero (not the microSD card). So, in
situations where you need a little extra security, you
don’t have to worry about someone grabbing and
104
GET
STARTED
WITH
£10
with F
Robots, musical instruments, R
world EE
wide
smart displays and more shippin
g
Inside:
Build a four-legged walking robot
VA IL A BLE
A
NOW hsmag.cc/store
plus all good newsagents and:
REGULAR
USB-C
power supply
Get flexible power from this
universal standard
G
etting electricity into your
projects can be surprisingly
challenging. For low voltages and
small currents, USB has become a
very common standard. It gives you
5 V and, if you’re careful with your
power supply, you can probably get about 2 A. Most
people have a few of these power supplies hanging
around and, if you need to take your project on the
road, then there are lots of rechargeable power banks
Above
Our laptop charger available at different capacities.
supplying a full
20 volts via the
USB-C has the potential to provide much more
USB-C PD module power through something called Power Delivery (PD).
Below When you first plug a USB-C device into a power
The charging module supply, the power supply will send over 5 V. This
is small and easy
to use should be enough to run the power supply circuity
and get everything started. Your device can then
request more power. Not all USB-C power supplies
can supply more than 5 V, but your device can
negotiate to receive up to 5 A at 20 V, if the supply can
handle it. This is potentially a lot more flexible, but
also requires some more sophisticated electronics
than just a power socket.
Fortunately, there are off-the-shelf modules that
help do the hard work for you. We tested out a
PD 3.0 protocol current voltage trigger that came
from Banggood (hsmag.cc/cr0UR2). For £9.36, we
got the board and a USB-to-barrel-jack cable, including
delivery to the UK.
106
FIELD TEST
Left
We can’t explain the
decision to have
a USB port that
outputs more than
5 V – it’s damaging,
and potentially
dangerous
”
and female USB-C ports, the power. In principle,
but they both work in You’ll probably want a more you could remove the
the same way, and you buttons once you had the
robust solution if you’re
can supply power via power profile you want
either one. Having both planning on using the power selected. It would also
”
is handy, as it means you be nice if there were a
for any length of time
can connect it directly digital interface to this so
to either a computer or you could interact with
a power supply. Once the board is powered up, the it from a microcontroller, but we’ve only seen this
three seven-segment displays light up, displaying capability in more expensive boards.
the voltage. There are two buttons on the board: one If you have a spare USB-C power supply, or
requests a higher voltage, the other a lower voltage. USB-C portable power bank, this is a cheap way
These allow you to scroll through the available of accessing its power modes for prototypes,
power profiles. but you’ll probably want a more robust solution if
In this usage, you can select the power you you’re planning on using the power for any length
need for your project and get it to come through a of time.
107
PlatformIO
REVIEW
PlatformIO
Automatically configure your development environment
P
latformIO is a little hard to describe, environments (that help you manage the source
as it falls between the gaps in the code). On top of this, there are also some tools
language we use to describe designed for embedded development such
development tools. It’s not an as remote device management, unit testing,
integrated development environment and debugging.
(IDE), but it is a plug-in for many popular Essentially, it lets you pick your development
IDEs (such as VS Code and Atom). It’s not a environment and turn it into an embedded
framework, but it does package up popular development environment. We tested this out with
embedded development frameworks (such as VS Code, but it will also work with a wide range of
Arduino). According to the documentation: others including Eclipse, Vim, Emacs, and Cloud9.
“PlatformIO is a cross-platform, cross-architecture, There is also a command line version if you want
multiple framework, professional tool for embedded more flexibility.
systems engineers and for software developers who Once it’s installed, you can create new projects.
write applications for embedded products.” However, For each project you select the board and framework
Right that tells us very little about what you’d use it for. you’re using and PlatformIO will scurry off to the
PlatformIO running The best way we can describe it is a wrapper internet and fetch all the bits you need to compile
on Visual Studio
Code gives you that lets you connect different frameworks (which and run it. There’s also a built-in library manager for
plenty of power, but include things like compilers and core libraries), installing the various bits of additional code your
still keeps things
reasonably simple board definitions, and libraries with development project needs.
108
FIELD TEST
popular debugging tools with PlatformIO in a unified more complex than some beginner-focused Below
The thorough
way. As with other parts of PlatformIO, you are development environments, but in return, you get a documentation
presented with a standard interface regardless of what huge amount of flexibility. You can select the makes it easy to
get up and running
hardware you’re using. You can do the standard things development environment you prefer, and PlatformIO with PlatformIO
that you’d expect with a will do the rest. It’s this
”
debugger such as watch flexibility of using the
variables, set breakpoints, You can select the powerful core that stands
view memory, and more. development environment PlatformIO above its
The unit testing competition. Some
you prefer, and PlatformIO
”
framework lets you easily people prefer really
and automatically test will do the rest stripped down
parts of your code on environments like Vim,
actual hardware. It works some prefer more fully
in a broadly similar way to other common unit testing featured tools such as Eclipse, and some prefer
frameworks such as JUnit and PyUnit. You set tests something in the middle like VS Code. For some
that define code that should run, and then create people, it makes sense to use browser-based tools
assertions that define things that should or shouldn’t such as Cloud9. All of these people are catered for.
be true after they’re run. For example, the code may Sure, it’s possible to set up these as embedded
use a temperature sensor and check that it received development environments without PlatformIO, but
back a valid temperature. each time you change the framework of the board
you’re working with, you’ll have to manually configure
your toolchain and that – in our view at least – is the
least enjoyable part of development (other than
perhaps spending hours tracking down a bug only to
find that it was a missing semicolon).
Even if you’re working across different frameworks VERDICT
and toolchains, with PlatformIO, your setup is just a Easy embedded
few clicks away. development
The more powerful features such as remote access in almost any
and unit testing are perhaps a bit less relevant to development
hobbyists, but if you do need them, they’re there to environment.
9/ 10
make your life easier. All in all, PlatformIO is a
fantastic option for C and C++ development unless,
perhaps, you’re a complete beginner.
109
Tenma 72-10480
REVIEW
Tenma 72-10480
Get electrons into your circuits safely and reliably
By Jo Hinchliffe @concreted0g
T
his Tenma benchtop power supply
has a variable voltage output up
to 30 V DC and can supply up to
3 amps, which is a capable range
in terms of average electronics
circuit work, only excluding those
working with high-current consuming devices,
such as larger DC motors. It arrived well-packed and
very quickly from CPC Farnell. Opening the box, we
first noticed a European plug/lead and thought we
might be off to a tricky start, but delving further into
the box, we were relieved to see a UK lead as well.
Apart from the power leads, it’s supplied without any Above
The unit isn’t supplied with any connectors, but different
connecting cables. The output connections on the styles of 4 mm banana jack cables are widely available
front of the unit – positive, negative, and earth – all
”
testing. With a small instruction manual overviewing
the unit, that’s pretty much all there is in the box.
On startup, it defaults to the first memory slot and Setting it on the desk, it feels like a solid unit but
”
doesn’t supply any power to the outputs remains compact and doesn’t eat up much desk space.
The buttons and dial feel like good-quality items, with a
nice positive feel to them. A press of the power button
accept standard 4 mm banana jacks, so many people on the front and it kicks into life, with a small click
will have some cables already. Indeed, we had a and, whilst there is a little fan noise, it’s not a lot and
collection of various leads, including a pair terminated is tolerable even for longer periods of work. Whilst we
with some crocodile clips which were perfect for didn’t have a need to use the earth connection on the
front panel, we did check it for continuity. With the unit
powered down, we used a multimeter set to continuity
mode to check that the unit was earthed, and we
can confirm that the chassis and case, and the earth
connector on the front panel, are all contiguous to the
earth pin on the plug.
On startup, it defaults to the first memory slot and
doesn’t supply any power to the outputs. The output is
enabled and disabled by the output switch. There are
Right five memory slots, with the first four being accessed
The display is clear
and reasonably by pressing a corresponding hardware button labelled
quick to update, M1–M4. The fifth memory slot is only accessible by
with everything
labelled well first selecting the M4 memory slot and then turning
110
FIELD TEST
the dial to switch to M5. When any change is made in supply on startup, as the current draw exceeded
Above
any memory slot, it’s automatically saved. Switching the threshold. Bumping up the supply to 900 mA let We used the power
between any memory slot automatically turns off the the motor start up, and the display quickly settled to supply to experiment
with slightly different
output, so you can’t accidentally fry something by around 500 mA. It’s handy to be able to look at the supply voltages and
switching to a different supply. current consumption of a device, and so this feature constant current
limits for an LED
With a memory slot connected, clicking the can be useful. We spent some time tinkering with
voltage/current button underneath the dial allows you how few mA a particular LED needed to actually be
to adjust the voltage or the maximum current, and bright enough for the task in hand at a certain voltage,
there are left and right cursor arrow keys so you can meaning we could, using the power supply only,
adjust the different units. It’s capable of dialling in optimise a circuit we were looking at.
1/1000ths of an amp and 1/100ths of a volt. The unit We found the display simple but effective. It’s
has a ‘beep’ that confirms button presses, and this pretty quick to refresh and becomes intuitive to use
can be turned on or off with a long press of the ‘OCP’ and read after a short time playing with the supply.
button. We’ve left it on, as it isn’t overbearingly loud The manufacturer’s instructions are reasonably clear,
and is useful to confirm button presses etc. but, as often is the case, they suffer in terms of VERDICT
The unit has overvoltage protection (OVP) and readability at some points. It’s noteworthy that CPC For the price,
overcurrent protection (OCP) built in, which means Farnell has produced a data sheet for the product with this offers a
that if the circuit tries to draw more than it is set the specifications, and for an extra fee the firm also good control of
to, it will disable the output. We checked the OCP offers a calibration service for power supplies. the power for
system by trying to run a small DC motor we knew We found this a great unit to use and it has some your projects.
8/ 10
drew around 800 mA of peak current on startup, nice features for its price point. However, better
before settling to around 500 mA. Setting the current instructions and including a few leads in the box
to 600 mA meant that it would automatically cut the would be nice additions.
111
Origami.me
REVIEW
Origami.me
Paper-folding for beginners
Free origami.me
O
rigami is one of those hobbies
that you can pick up easily and
cheaply. In fact, there’s a pretty
good chance that you already know
one or two patterns. To get started,
you’ll need a sheet of paper. Some
types of paper are better than others, but at least for
simple things, any paper should give you a route into you can find. Looking for an advanced peregrine
the pastime. Couple that sheet of paper with some falcon? There’s one in the Birds and Bats category.
instructions – such as those at origami.me – and There is also a video section of this curated list,
you’ve got a way into the hobby. but since these are on YouTube, it might be easier to
There’s a beginner’s section which takes you search on there. We also find it easier to follow the
through some of the basic folding techniques you’ll word-and-diagram instructions rather than the
need, then a selection of diagrams. Perhaps the videos, but perhaps that’s just us.
most impressive part of the site is the crease pattern This reviewer is certainly no origami master, and
database which collates patterns from all over the he probably never will be, but he had fun trying out a
internet and categorises them by difficulty and few of the designs. Whether you’re looking to
design. Are you looking for an easy toad pattern? entertain yourself for an afternoon, or embark on a
Just go to the Amphibians category, and see what new hobby, you should find origami.me useful.
Above
There’s plenty here
to help you learn
how to fold paper
Left
An easy model of a
cat for helping you
learn origami
VERDICT
‘Getting started’
guides and a
categorised
guide to online
origami.
9/ 10
112
Forge & Carve
F
orge & Carve is a book about heritage
crafts by the people that do them.
Each chapter is written by a practitioner
of a different craft, such as woodwork,
pottery, or blacksmithing. We learn what
the craft is, how it’s performed, and how
that practitioner is surviving in the modern world.
Perhaps the most interesting part for this reviewer
was learning how social media is changing the
market for traditional crafts. Instagram, particularly,
has created a new market whereby sellers can reach
potential customers directly without having to carry
their products around craft fairs.
It isn’t easy to make a living in the modern world
using traditional methods honed through generations
of craftsmen and women, but it is possible. This
book is a message of hope that shows there is still
a place for skilled artisans to make a living, and that
technology can help preserve crafts.
VERDICT
A look behind
the scenes
at what it
means to be a
professional
maker using
traditional skills.
9/ 10
113
ON SALE
17 SEPTEMBER
Make an
ALSO
Music
Printing in ASA
Raspberry Pi
HSMAG.CC / SUBSCRIBE
First Feather
hsmag.cc
“Iron Man and Batman are the eternal
superheroes who are always popular
because they’re normal men who
make stuff with technology”
James Bruton