This is only a preview of the July 2022 issue of Practical Electronics. You can view 0 of the 72 pages in the full issue. Articles in this series:
|
Max’s Cool Beans
By Max the Magnificent
Flashing LEDs and drooling engineers – Part 29
A
s I pen these words, I am
sitting in my home office. For
some reason, my poor deluded
wife (Gina the Gorgeous) persists in calling this the dining room, but that’s absurd
because we never eat in here (there’s no
room because it’s full of my ‘stuff’).
Oh, the guilt!
Sad to relate, I’m being guilted out by the
animatronic robot head that’s sitting on
the table next to my keyboard looking
balefully up at me. I can read its mind. It’s
thinking, ‘Why aren’t you writing about
me telling everyone how wonderful I am?’
As you may recall from previous columns, my friend Steve Manley, who is
based in the UK, and yours truly, who
currently hangs his hat in the US, have
been working on this auspicious artifact.
If the truth be told, Steve has done all of
the work, while I’ve spent most of the time
bobbing up and down like a deranged
Whac-A-Mole character in the background,
offering (hopefully) useful suggestions.
Steve has been using his Fusion 365
3D CAD modelling tool (https://autode.
sk/3kMrIA7) and his 3D printer to great
effect, creating two of these bodacious
beauties – one for him and one for me –
cumulating (as discussed in PE, May 2022)
with me happily holding ‘my head’ in
my hands while chortling ‘my precious’
to myself (and that’s not something you
hear someone say every day).
Oh, the joy!
For your delectation and delight, Steve
employed Fusion 365 to create some
awesome, photorealistic renderings of
his head (I know; this sounds as strange
when I write it as it does when you read
it). Let’s start by perusing and pondering
Fig.1, which shows a view from the back
of the head.
The two round shells (far-side top) are
the back of the eyes, each of which is
equipped with one of our SMAD (Steve
and Max’s Awesome Display) boards.
Since each SMAD boasts 45 tricolor
LEDs, the result is rather spectacular,
let me tell you! (You can see how just
awesome these are in Steve’s YouTube
video https://bit.ly/3MZ9g3q).
Also, as we’ve previously discussed,
each eye is connected to two small servo
motors (servos), which are mounted on
the upper horizontal frame. These servos
allow the eyes to individually pan from
side to side and tilt up and down. Steve
designed a cunning implementation that
allows these two movements to take place
independently
without interfering
with each other. I
continue to gasp
in awe whenever
I see this in action.
Fig.1. Rear view of the animatronic head (Image: Steve Manley)
Practical Electronics | July | 2022
The small circuit board mounted in
the middle of the upper horizontal frame
is connected to the host processor via a
2-wire I2C interface. This board can be
used to control 16 servos (we are using
only seven in this current implementation). Honestly, I have to keep reminding
myself that this is a rendering and not a
real-world photograph.
Now let’s turn our attention to the big
blue base at bottom of this image. In the
foreground on the right-hand side, we see
a larger, meatier servo whose arm is attached to the lower horizontal frame (we
are going to have to come up with some
cooler names for these structural portions
of the design). This servo can be used to
make the entire head pan from side to side.
Finally (for Fig.1), observe the U-shaped
orange bracket that connects the lower horizontal frame with the upper horizontal
frame. The way this bracket is connected
to the lower horizontal frame allows the
head to tilt from side-to side (this is the
motion we described as ‘cocking’ in PE,
March 2022). Meanwhile, the way this
bracket is connected to the upper horizontal frame allows the head to tilt forward and backward. Keep these motions
in mind while we take a look at Fig.2.
The main thing to observe here is the
two servos that are mounted on the lower
horizontal platform whose arms are connected to the upper horizontal platform.
In conjunction with the aforementioned
U-shaped connector and its attachment
mechanisms, driving both of these servos
Fig.2. Front view of the animatronic head (Image: Steve Manley)
45
Fig.3. PCB layout for Joe Farr’s handy-dandy PSU (a) (top) just showing the signal paths
(top) and (b) (bottom) also showing the copper for the 0V/ground (bottom).
HXT900s (https://bit.ly/3kN0DNe). These
are reasonably priced and consistent plastic-geared servos that worked quite well.
I also purchased some metal-geared
Turnigy TGY-50090 servos of equivalent size (https://bit.ly/37pEFNb). These
are very nice. They are more expensive
and maybe a tad noisier than the others,
but they’re the smoothest of all and they
are my preferred choice when it comes
to 9g servos.
I also looked up alternative 55g servos
and picked the Tower Pro MG996R devices (https://bit.ly/3yC8Lsf). This is another metal-geared servo that seems to be
consistent and smooth in operation, and
not too noisy.
Each size or class of servo that I have
evaluated seems to be consistent with respect to their dimensions and were therefore interchangeable. I cannot speak for
other servo brands and models, which may
have different dimensions. I have to say
that finding fully informative data sheets
for servos proved to be quite a challenge.
Got a good idea?
up or pulling them both down causes the
head to tilt up or down, respectively. Alternatively, if one servo is driven up and
the other is pulled down, the head will
tilt to the side.
Just what is a servo?
This is a really interesting question. So
interesting, in fact, that I’m going to leave
answering it until my next column. The
thing is that there’s a lot to talk about
here, including the differences between
rotary motors and linear motors and
stepper motors and servo motors and
AC motors and DC motors and... there’s
even the fact that we have yet to define
just what we mean by the term ‘motor’
in the first place (I hope to surprise you
with the answer).
In the meantime, however, Steve shared
some interesting information with respect
to the servos we used on our animatronic
head. Before we proceed, we should note
that when we see something referred to
as a ‘9g servo’ or a ‘55g servo,’ this isn’t
talking about how much weight the servo
can lift (which is a mistake beginners may
make, not least that ‘lift’ is not the appropriate term to use in this context). Instead,
it refers to the actual weight of the servo
itself. When it comes to how much work
the servo can do (where ‘work’ has a specific meaning in physics), this is where we
move into the concept of torque, which
is another tortuous topic about which we
will talk when next we meet. But I fear
we are wandering off into the weeds, so
let’s return to Steve, who spake as follows:
I used four 9g servos to implement the
pan-and-tilt on the eyes. Also, I used three
55g servos to implement the pan-and-tilt on
the head. In the case of the 9g servos, I started
46
with Longruner KY66s with plastic gears
from Amazon (https://amzn.to/3MU6KeI).
Unfortunately, these turned out to have
inconsistent quality. One or two worked
fine, but the others were either very noisy
or ‘un-smooth’ in operation.
When it came to the 55g servos, my
original choice was Diymor MG996R devices, also from Amazon but with metal
gears (https://amzn.to/3KXMtU6). These
turned out to be just as inconsistent as
the original 9g servos. Plus, the range of
movement for a given input range was
also inconsistent, which meant the pitch
and roll movements of the animatronic
head were lopsided. As a result, I would
not recommend or use these Amazonsourced servos again.
Eventually, I came across HobbyKing,
which is based in the EU and has a wide
range of better-quality servos available
(https://bit.ly/37oeJS3).
I Googled for a good all-round 9g servo
and came up with the popular Hextronic
I don’t know why, but for some reason I can
envision you reading this column saying
to yourself, ‘I have a really good idea for
Steve and Max’s animatronic head, but I
don’t know if I have the energy to email
Max and tell him.’
Well, maybe I can induce you to rouse
yourself out of your comfy chair and stagger over to your computer to share your
cunning concept. I know, let’s have a competition. You will find the details following the next topic, which is...
The return of the PSU
I fear that I am obliged to commence this
portion of our discussions by saying that
I feel like an old fool. ‘But where are we
going to find an old fool at this time of
the day?’ I hear you cry (the old jokes are
the best ones).
Why am I charged with chagrin and
wallowing in mortification? Well, in my
previous column (PE, June 2022), I waffled on about the power-supply circuit my
Fig.4. The assembled PSU.
Practical Electronics | July | 2022
chum Joe Farr implemented on the PIC
Programing and Test board he designed
for your humble narrator. As part of this,
Joe created a handy-dandy standalone PSU
board that I described in loving detail, including showing the printed circuit board
(PCB) layout (Fig.3a).
You may recall that Joe designed this
as a single-sided board to facilitate those
who like to create their own boards at
home (as described in the aforementioned
column – Joe kindly provided the design
files for you to download if you wish to
build your own boards or have them fabricated for you).
The thing is, when I happened to glance
at the layout a little later, I suddenly realised that I couldn’t see any copper connecting the 0V/ground signals together
(look at the lower pins on the capacitors
and the 0V signals on the SK2 connector
in Fig.3a, for example).
I immediately emailed Joe querying
why he had done it this way and asking if
we were supposed to wire these connections by hand. Once he’d picked himself
up off the floor and stopped laughing, Joe
explained that there was no hand-wiring
involved and that he’d simply omitted that
part of the copper for clarity. He also sent
another version of the layout showing all
of the copper (Fig.3b). All of this was so
obvious that I would have realised it had
I paused for thought, which explains why
I was left feeling so silly.
A captivating competition
As I previously noted, the standalone PSU
board was just something we implemented
for fun. As part of this, Joe had five boards
fabricated and he assembled one for me
to play with (Fig.4), which means there
are four bare boards going spare.
Joe suggested that we offer these unpopulated boards as prizes in a little competition. I discussed this with the illustrious publisher of PE, Matt Pulzer, who is
a legend in his own lunchtime. Between
us, we agreed that there should be four
categories (one per board) as follows:
n Best mechanical addition
n Best lighting effect for the eyes
n Most interesting sensor scenario
n Where do we go from here?
I think the first item speaks for itself. In
the case of the best lighting effect for the
eyes, remember that we have 45 individually controllable tricolor LEDs for each
eye (Fig.5), so what awesome effect can
you come up with (all you have to do is
provide a description because it will be
my problem to make it happen). When
it comes to the most interesting sensor
scenario, what we’re thinking of here is
using some sort of sensor to detect what’s
happening in the world around the head
and for the head to respond in some way
(again, you only have to describe this, not
Practical Electronics | July | 2022
implement it). The final category is wide
open – what should do we with this project going forward?
Your mission, should you decide to
accept it, is to email me with your ideas
(you can find my address at the end of
this column). The suggester of whichever
idea most tickles my fancy for each category will receive one of Joe’s unpopulated PSU boards (I’ll email the winners
to request shipping details).
It’s a small world
When I was a kid, I often heard older
people saying, ‘it’s a small world.’ This
expression is used to indicate surprise
when you meet someone you know in an
unexpected place. It may also be used if,
while talking to someone, you discover
that you share a friend or acquaintance.
Well, the older I get, the more I find this
saying to be true.
For example, as part of a project that
I’m currently working on, I recently took
delivery of an OMTech 40W CO2 Laser
Engraver/cutter, model DF0812-40BG
(https://amzn.to/3vQqMRG). This really
is rather tasty. I would like to take this
opportunity to say that the manual that
accompanied this machine was amazingly informative and that it helped me
get up and running quickly and easily.
Unfortunately, I can’t say this because
there was, in fact, no manual accompanying the machine (to be fair, I did
track one down later on their website).
I have a friend (stop laughing, it’s true),
who we will call Rick (because that’s his
name). Rick lives in Birmingham, Alabama, which is about 90 miles south of
the town I call home. Since Rick, who
is recently retired, is great at this sort of
thing, I asked him if he’d like to take a
road trip to help me set things up.
It only took us a couple of hours and a
few trips to a local hardware store to pick
up some bits and bobs, like a 5-gallon
bucket to hold the distilled water to cool
the laser (just one of the things I wasn’t
expecting) before we had the hardware
portion of the operation ready to rockand-roll.
A little research on the web suggested
that the supplied software wasn’t up to
snuff. Fortunately, it was around 6:00pm
on a Tuesday evening, which is the day
my local community makerspace – Makers
Local 256 – is open to the public (https://
bit.ly/3sfTPMc), so we decided to amble
over to see if there was a laser expert
available to provide advice. There was!
He’s going to visit my office next week
and help me with the software part of
Fig.5. One of the animatronic head’s
eyeballs (Image: Steve Manley)
the exercise (I will tell you more about
this in my next column).
The reason I’m waffling on about this
here is that, on the way back from the
makerspace, I regaled Rick with my recent
adventures in PICs. As I mentioned in my
previous column, Joe in the UK had introduced me to the Proton IDE (integrated
development environment) and the Positron PIC BASIC Compilers created by my
new hero, Les Johnson. The reason I say
‘compilers’ (plural) is that Les supplies
different compilers for 8-bit and 16-bit
PICs, but both are included in the £39.99
asking price and the IDE automatically
uses the appropriate compiler based on
the PIC chip you select.
I was going to say that it’s a long time
since I programmed in BASIC, but I just remembered that, as I discussed in one of my
Cool Beans Blogs (https://bit.ly/3KTwHJO),
a couple of years ago I purchased a modern
incarnation of the legendary Commodore
64 called THEC64 (https://bit.ly/3smaoGu),
which features a high-definition output
via HDMI, a classic style joystick, and 64
built-in classic games, plus it allows you
to program in BASIC, but we digress...
The point of all this is that, when I mentioned to Rick that I had discovered the
awesome power of Positron PIC BASIC
Compilers, he immediately responded
that he was a devotee himself, that Les
Johnson was well known to him, and that
they were in regular communication via
the Positron BASIC Community forum
(https://bit.ly/3vRjRHO).
What can I say, except that it really is a
small world? OK, now it’s your turn. Remember that I love to receive your comments, questions, and suggestions. Also,
that I’m looking forward to receiving your
entries to this month’s competition regarding my animatronic head. Until next
time, have a good one!
Cool bean Max Maxfield (Hawaiian shirt, on the right) is emperor
of all he surveys at CliveMaxfield.com – the go-to site for the
latest and greatest in technological geekdom.
Comments or questions? Email Max at: max<at>CliveMaxfield.com
47
|