Professional Documents
Culture Documents
Nuts and Volts 2018-09-10
Nuts and Volts 2018-09-10
TIME NOW
Scan for more details.
IS
Hitec RCD USA, Inc. | 12760 Danielson Ct. Unit E, Poway, CA 92064 | (858) 748-6948 | www.hitecrcd.com
PROTEUS DESIGN SUITE
Advanced PCB features for professional
board design
08 Q&A
Reader Questions Answered Here
Topics discussed this time:
• Humming an Unpleasant Tune
• Computer Mind Tricks
Departments
for long range detection of missiles. They’re also widely
used in military and commercial aircraft radars and
some satellites. These phased arrays are expensive, but
today thanks to new technology and higher frequencies,
phased arrays are smaller and more affordable making 06 DEVELOPING 18 NEW PRODUCTS
them practical for new wireless devices. This article is an PERSPECTIVES 82 NV WEBSTORE
introductory tutorial on this special antenna type you need DIY Biotech: The 45 BENCH & BUILDER
to know about. Ultimate STEM Track? 94 TECH FORUM
07 READER FEEDBACK 97 AD INDEX
Cover photo credit: J.L. Lee/NIST Nuts & Volts (ISSN 1528-9885/CDN Pub Agree #40702530) is published bi-monthly for $26.95 per
year by T & L Publications, Inc., 2279 Eagle Glen Parkway, #112-481, Corona, CA 92883. PERIODICALS
POSTAGE PAID AT CORONA, CA AND AT ADDITIONAL MAILING OFFICES. POSTMASTER: Send
address changes to Nuts & Volts, P.O. Box 15277, North Hollywood, CA 91615 or Station A, P.O. Box 54,
Windsor ON N9A 6J5; cpcreturns@nutsvolts.com.
4 September/October 2018
Subscription Information
Nuts & Volts — PO Box 15277
North Hollywood, CA 91615-9218
Call 877-525-2539 or go to www.nutsvolts.com
Subscribe • Gift • Renewal • Change of Info
Page 26
For more details on subscribing, see our ad on Page 97.
SUBSCRIPTION
6 September/October 2018
If you’re currently into, say, kit from The Odin ($159). This
communications, then you might kit is much more involved than
fear that making the move to DIY the Amino Labs product, but
Biotech means selling your DMM you’ll learn some advanced
and oscilloscope to buy a used techniques such as how to use a
PCR machine. Don’t do it! The micropipette.
more you bring to the table, the In addition to the CRISPR
better. kit, I’ve had good luck with the
Use your 3D printer to fluorescent yeast add-on kit
make an affordable centrifuge. ($80). The Odin’s full Genetic
Buy an old PCR machine in Engineering Home Lab Kit
need of repair and use your ($1,699) is a bit overwhelming.
electronics skills to debug the importantly, a PDF project book. I found it’s a good value, but it’s not
microcontroller. Need to monitor Just wipe the swabs between for the novice. You’d be better off
bacteria growth in agar? Make an your toes, on your kitchen working with the more affordable kits
optical density measurement device countertop, etc., swab the agar, and initially.
with a green LED, a phototransistor, then place the petri dishes in a warm So, stay tuned! I’ll have a few
and an Arduino. Pick up an old Gel place. In a couple days, you’ll see all follow-up articles in Nuts & Volts to
Electrophoresis device on eBay and sorts of bacterial and yeast colonies. gauge reader interest in DIY Biotech.
power it with a low-current 100 VDC You’ll probably notice a distinct odor By the way, if you’re of age and
power supply of your design. as well. want to try your hand at the oldest
So, let’s say you’re convinced to Next, I’d try a kit from Amino DIY Biotech practice on the planet,
at least explore DIY Biotech, but you Labs. I’ve used the Engineer-it Kit then consider the Bro oklyn Brew
have absolutely no experience with ($33) with great success. It’s fun Shop Everyday Beer Making Kit ($40,
microbiology. What’s next? First go and you’ll get to pour your own Amazon). If you can boil water, then
to Amazon.com and pick up a set of agar plates and mix the DNA. The you can brew beer.
premade agar petri dishes. I’ve had kit comes with everything you need. Plus, you can always buy
great results with Evviava Sciences There’s also a Udemy course that’s additional yeast if you want to try
Amazing Bacteria Science Kit ($22.45, linked to the project. your hand at green fluorescent beer.
Amazon). The kit contains 10 agar If you’re ready for more of a NV
plates, some sterile swabs, and, most challenge, then consider the CRISPR
READER FEEDBACK
Music to My Ears Contributing to the Cause
Bryan Bergeron’s editorial in the May/June issue has I have been passing around articles to local ham clubs
really hit home. It was just last year I dusted off my 10 I thought would be of interest from Nuts & Volts issues.
year old stereo amp and large speakers to really hear how I know at least six people have joined the magazine as a
terrible the latest MP3s have become. result of just my feeble efforts. Many more are looking the
Having listened to them for the last several years using mag over and are considering joining Nuts and its sister
only headphones or small speakers on the computer, I was publication, SERVO Magazine, including my 15 year old
blown away concerning all the nuances that I missed in the niece near Seattle who wants to be an EE. I introduced
latest songs and how full the music really seemed. Sad to your mag to her classes.
say, I now miss the fully enveloping sounds during my runs. You are doing a great job as the interest I see locally
However, I can’t wait to get home to really listen once from 16 to 82 year old citizens can attest. You are helping
again. us generate more EmComm volunteers. You folks are
Russ Wizinsky making a bigger impact than the aggregate numbers might
tell. Quality followers will stay subscribers longer. We need
Your comments are much appreciated. I assume/hope radio folk without gray hair ... you are a really important
someone out there at Bose or maybe even Apple is working cog in the national infrastructure.
on a set of tiny earbuds that reproduce the REAL sound that Keep up the great work.
can be had from a pair of old fashioned theater speakers. Jim NB6TE/USN code school, 1967
Bryan Bergeron
September/October 2018 7
Q&A
■ WITH KRISTEN A. McINTYRE
In this column, Kristen answers questions about all aspects of electronics, including
computer hardware, software, circuits, electronic theory, troubleshooting, and anything
else of interest to the hobbyist. Feel free to participate with your questions, comments, or
suggestions. Send all questions and comments to: Q&A@nutsvolts.com.
• Humming an UnpleasantTune
that the amplifier cannot reproduce the higher voltage
parts of the waveform, so the voltage actually just stops
rising. It’s as if the top of the waveform is “clipped”
• Computer Mind Tricks away.
Clipped sine waves — the form of the voltage
variations on the AC mains — are almost like square
Humming an Unpleasant Tune waves, particularly as the clipping occurs lower
Q
and lower down the sine function. Square waves have
When I hook up my Amazon Dot to an external
amplifier, I get a constant hum. I tried using an
expensive audio connector (Monster), but the
hum persists. I’ve heard that ground loops could
be the cause, but I don’t know how to verify there’s a
ground loop. Can you give me some pointers?
Tim Powell
Adelphi, MD
A
Hum like this can often be difficult to diagnose.
It usually comes from the power line’s 50 or
60 Hz electromagnetic interference. This is
compounded by the relatively high impedance ■ FIGURE 2. Harmonic content of a clipped sine
inputs to and high gain of most amplifiers. (Wikipedia CC BY-SA 4.0 by Binksternet).
If you know someone who plays the electric guitar
(like my son does), you can really hear this effect. It’s a lot of harmonic content, which we know from doing
accentuated because of the high gain that guitar players something called a Fourier decomposition. This operation
like to use to provide “distortion.” The high gain actually decomposes a time-domain waveform into its frequency
drives the amplifiers into a state called clipping (Figure 1). components — a series of sine waves at a given phase,
When this happens, the input signal is large enough amplitude, and frequency.
When you look at it that way, you see that there are
many odd harmonics — multiples of the base frequency
by an odd integer (Figure 2). These odd harmonics are
particularly objectionable to our ears (that’s a whole
other thing to discuss sometime), and that’s why we hear
this unpleasant hum. If it were just at 50 Hz or 60 Hz,
we wouldn’t hear it that well. Our ears don’t respond
sufficiently at that frequency.
All of this is well and good, but how do we get rid of
the hum you’re hearing? Let’s first look at the potential
ways we could be coupling that energy from the mains
into the audio amplifier.
One would be stray electromagnetic fields. In a
typical home environment, these fields are present and
significant. If you have an
■ FIGURE 1. A clipped
sine wave. oscilloscope handy, you can
observe this. Just turn the
8 September/October 2018
QUESTIONS and ANSWERS
Post comments on this article and find any associated files and/or downloads at
www.nutsvolts.com/magazine/issue/2018/09.
R2
be eliminated), is to both lower the gain of
the amplifier and lower the input impedance.
We can do this with a resistor network
attenuator at the input to the amplifier J2 OUT
(Figure 3). More current will be required
IN J4
to get an equivalent voltage, thus lowering
the impedance. We can then increase the
n FIGURE 3. Voltage divider based amplifier attenuator.
gain of the amplifier (turn up the volume) to get the
amplification we need. The attenuation will follow the
usual resistor voltage divider equation: actually works?
Jose Hauser
Vout = Vin R2/(R1+R2) Beaumont, TX
A
Another possible way that the hum in getting in is Let’s take a look. It depends on what you mean
what you mentioned: a “ground loop.” I find ground to be by “works.” They all output some data, but
an ill-defined term, so let’s just think of this case as stray whether you can make sense of those data is
voltage differences and currents flowing through the AC another matter.
mains, including the so-called safety ground. These voltage I’ve been interested in this area for a while. A couple
differences can become currents that flow in the wire of years ago, I bought a NeuroSky device and got the SDK
coupling the devices together; in this case, the Amazon to play with sensing brain states. My interest is in sleep. I
Dot and the amplifier. There are numerous causes for a have always had trouble sleeping and was hoping to use
condition like this, including faulty house wiring. some brain state data to drive how to induce sleep using
To break the circuit that may be carrying such currents, binaural beats. I’ve had some success using binaural beats
we can couple with magnetic fields instead. We do this in iOS apps I wrote for myself to help my sleep, and I
with an audio isolation transformer. There are many that wanted to enhance that. Interestingly, a device called the
are targeted at audio frequencies and typical audio system Sleep Shepard Blue independently implemented some of
impedances. RadioShack used to carry these in their stores, my ideas, but not all.
but there aren’t many RadioShacks left. In principle, it was an interesting idea, but what I
I did find them, however, at Jameco on the web for found was that the data coming from the EEG device were
only a few dollars. Keep in mind that the response of a unreliable indicators of my brain state. It was also difficult
transformer will be frequency dependent, so it will tend to to sleep with that thing strapped to my forehead and
roll off the low frequencies and emphasize the high. You earlobe, or at least to keep it on while I was lying in bed
might have to compensate for this using some simple filters trying to sleep.
to get music quality audio back again. Looking around the web for the current state-of-the-art,
It would probably be worth trying the attenuator first, I found that there are some very cheap hacks that can be
since it’s so easy to implement. If that doesn’t work, try the done with EEG based toys. The Star Wars™ Force Trainer
isolation transformer. seems to be a popular device to modify.
It has a NeuroSky EEG board inside that can be used,
Computer Mind Tricks along with the toy headgear. Serial data are output from
Q
a pin on that board, and an Arduino or Raspberry Pi can
I want to get into brain control — especially be used to read the output. I found an Instructables article
for flying drones. I’ve read the sub-$100 EEG that shows how to do it at www.instructables.com/id/
monitors are a joke, and that the best system Control-A-Computer-With-Your-Mind/. That’s a $40
out there is an open source monitor for over solution, but it’s probably not very good. There may only
$1,000. Do you know of an affordable brain interface that be three channels of data, which doesn’t give you much to
September/October 2018 9
QUESTIONS and ANSWERS
work with. device for a cool $800. These higher-end devices want you
NeuroSky also has the MindWave Mobile 2, that may to use saline pads to achieve better skin contact, so the
be a step up from the original MindWave, but I’m not sure. signals will be larger and more consistent.
The website seems to put the emphasis on comfort, as Interestingly, the EMOTIV devices have gyros, an
opposed to more functionality. It’s still around $100. accelerometer, and a magnetometer in them so that head
Stepping up in capability, there are some interesting position and motion will be readable. That could be an
devices by EMOTIV (http://emotiv.com). There is a five- interesting source of data for controlling systems.
channel one for about $300 and a squid-like 14-channel Of course, you can try to build your own. This is harder
from a mechanical perspective than
it is from an electrical perspective, in
my opinion. You’ll need some sort of
instrumentation amplifier that should
be able to detect the differential
signals that are in the microvolt
region and amplify them up to some
reasonable level. Then, they will have
to be digitized. This is where it gets
more difficult since some of them are
below 1 Hz.
A reasonable analog-to-digital
converter would be necessary that is
coupled down to those frequencies,
and then there needs to be a way to
get the data into a computer. With
enough space, that’s not too hard,
but then you also need to create a
low resistance coupling mechanism
for the sensing wires to your head.
You need to mount all of this on that
mechanism.
Lastly, the computer will want to
do some sort of frequency analysis to
try to classify the signals. It’s doable,
but it will be a fair amount of work to
package it reasonably.
Another idea might be to get
several of those Star Wars Force
Trainer devices and increase the
number of channels using several
NeuroSky boards and more coupling
points on the head. That could be a
way to get something that works like
the EMOTIV device implemented
cheaply.
It’s hard to say if all of this
is enough to get good data for
controlling a drone. I tend to
be skeptical of getting anything
interesting from an EEG that
corresponds to fine motor control.
I think that the position and motion
controls on the EMOTIV devices will
be more interesting and useful. NV
10 September/October 2018
Romi
Versatile robot platform with
integrated battery compartment,
Balboa motors, and wheels; several
add-on board options available
Programmable balancing
robot kit that can stand
itself up and drive
around on two wheels
...and more
Everything from Zumo
mechanical parts and Complete integrated Mini
jumper wires to motor Sumo robot on a tracked
drivers and voltage chassis, featuring a
regulators variety of sensors
Finding the right parts for your robot can be difficult, but you also don’t want to spend all
your time reinventing the wheel (or motor controller). That’s where we come in: Pololu
has the unique products—from A-Stars to Zumos—that can help you take your robot from
idea to reality.
Using ELSIE
Begin by downloading the current version of
ELSIE (2.82 as of mid-June 2018) from Tonne Software
(www.tonnesoftware.com). Follow the install wizard’s
instructions, then run ELSIE. Begin by clicking New
Design.
Now it’s time to tell ELSIE what kind of circuit you
want. This is the filter’s topology describing the general
arrangement of the filter components. (Filter basics were
covered in the previous column.)
Since we’re designing a broadcast-reject filter for
160 meter reception, we need a high-pass response. n FIGURE 1. The third-order AM broadcast-reject filter
ELSIE gives us two choices for high-pass filters: capacitive schematic and the design parameters used or calculated
input and inductive input. by the ELSIE program.
A capacitor in series with the filter at the input
(capacitive input) blocks any DC and low frequency show the general behavior for each family.
signals, so select that topology. For our filter, we need a very sharp rolloff that passes
Next, we must select from the many types of LC filter signals with little attenuation at 1.8 MHz, but with lots of
circuits called families — each with a slightly different attenuation at 1.6 MHz — the highest frequency of the AM
type of response. For example, the Butterworth family broadcast band at which full-power stations are permitted.
has a very flat response but a gradual roll-off between the (Above 1,600 kHz in the US, AM stations are limited to
passband and the stop band. The Chebyshev family allows 10 kW during the day and 1 kW at night. These smaller
some variation in the passband and stopband in trade for a stations are less likely to cause overload problems than the
steeper rolloff. full-power 50 kW transmitters.)
Bessel filters have a constant time delay through the Chebyshev would be a good choice, but the Cauer
filter in the passband. If you click the ? button next to family is even better at creating the necessary steep rolloff.
Butterworth in the Family section, a pop-up window will The tradeoff is that attenuation of the Cauer filters varies
quite a bit in the stopband. That’s okay, as long as we
maintain the minimum required attenuation. So, select
What is Q? Cauer as the filter family.
Now, the program needs some performance
Q is the symbol for “quality factor” and for inductors specifications entered at the right-hand side of the screen.
(L) and capacitors (C), it represents the losses in the How much attenuation (Stop Band Depth, AS, in dB) is
component. Q is the ratio of the component’s reactance (X) enough for our filter? In my experience, 40 dB is enough
to its resistance (R). The resistance accounts for all losses in to keep even nearby AM stations from clobbering a
the component, such as for skin effect, dielectric losses, and modern receiver. For Ripple Bandwidth (FC), enter “1.8M”
other parasitic effects. (1.8 MHz) as the lowest frequency of the filter passband.
The highest frequency at which we want our 40 dB of
Q=X/R attenuation, “1.6M” (1.6 MHz), is the Stopband width (FS).
Filter Order (N) can be thought of as the number of
A perfect L or C has zero resistance, so its Q is infinite. resonances created by pairs of L and C components. The
A perfect resistor, R, has no reactance, so its Q is zero! higher the order, the more components are required to
Typical values of Q for capacitors used in RF circuits are create the circuit. Start by entering a filter order of 3 to see
around 1,000. Inductors have Q values of 250 and below. if we can meet our design goals.
Try different values of Q for the components in your
design and watch for the effect in the simulated filter Viewing the Filter Response
responses.
To set up the program’s calculations and display
September/October 2018 13
PRACTICAL TECHNOLOGY FROM THE HAM WORLD
14 September/October 2018
Check your settings whenever you
change filter order.) This response
(Figure 3) is much more useful.
Attenuation varies by about 3 dB (1/2
S-unit) across the 160 meter band,
and we just meet our design goal with
-40 dB of attenuation at 1.59 MHz.
Click the Save tab to hold on to this
design version before proceeding.
Imagine doing this in the “good
old days” before the desktop PC
became a commodity! For each
design, detailed calculations would
have to be worked out with a calculator or n FIGURE 4. The schematic of the fifth-order filter after standard 5%
series component values are substituted for exact calculated values. Filter
slide rule at numerous frequencies, then
performance is substantially unchanged from the exact value version.
plotted on graph paper if reviewing the full
response was necessary. Today’s process
takes seconds and allows a lot of “what if” experimentation no tuning to provide useful performance.
that was impractical before.
Testing a Real Filter
Standard Value Components After publishing this design in QST (January 2016
The schematic shows all the component values are issue), I received an email from Scott Roleson KC7CJ who
in a reasonable range. Nevertheless, I don’t think your built a very nice version of the filter, shown here in Figure
local component vendor will have, say, 538.436 pF 5. He used a sturdy die-cast aluminum box, even making
capacitors in stock, nor do you want to have to adjust the PCB (printed circuit board) from scratch. The capacitors
variable capacitors. Now is the time to redesign the filter are silvered-mica with a 5% tolerance. For the inductors, he
using standard fixed-value parts. This will degrade filter used miniature encapsulated components.
performance a bit, but remember that we can continue to Roleson created an interesting way of bypassing the
work with the design. filter. Using individual SPDT subminiature toggle switches
Return to the Design window and click the Nearest at the input and output avoided a multi-pole switch that
5% tab. You’ll be presented with several options, including might have allowed unwanted signals to “leak” from the
changing all the components to the nearest standard value filter’s input to the output through internal capacitance.
in the 5% series. A piece of aluminum rod has a hole in each end that slips
Other options include just changing the capacitors or over the switch handles so that both are moved together
inductors, assuming you’ll wind the Ls
or tune the Cs. You can also change
just the capacitors or inductors, and
the program will re-calculate the
remaining values exactly so that you
can tune up the filter yourself.
Let’s take the easy way out
and select the first option to use all
standard values. Return to the Design
tab, then check the schematic shown
in Figure 4. How about performance?
Viewing the frequency response, not
much has changed.
We have a little more variation
across the band (now 4 dB), but
attenuation at 1.6 MHz is still the
same, only failing to reach 40 dB
below 840 kHz by less than a dB. This n FIGURE 5. KC7CJ’s homemade version of the BCI filter.
design can be built with off-the-shelf components requiring
September/October 2018 15
AM broadcast-reject filter. His version is receive-only and
uses components rated for low power. The commercial
filter is rated for 300 watts and can be installed in the
output of a regular transceiver.
Stopband Attenuation
In Figure 6, you can see there are deep notches
in the filter’s stopband. (Compare the as-built filter to
the predicted performance in Figure 3 — an important
verification step.) That’s okay — we selected a filter family
(Cauer) that obtains a steep rolloff by placing notches at
strategic frequencies. However, it’s not realistic to give
the attenuation of those notches (51, 63, and 58 dB
right-to-left) as the filter’s ability to reject AM broadcast
n FIGURE 6. The input-to-output amplitude response (S21) (BC) signals.
of KC7CJ’s filter. The vertical scale (shown in blue at the The stopband attenuation of this filter is measured
upper left) is 10 dB/division. The reference level at the top at the maximum of the two peaks in the stopband, 39
of the graph is 20 dBm. The frequency range is from 1 kHz
dB of attenuation at about 750 kHz. Did this amount of
(given as “0” where a low-frequency artifact is shown) to 10
MHz at 1 MHz/division. “MC” refers to a Master Calibration attenuation satisfy the original design specification for 40
file having been applied to the measurement. The VNA dB at 1.6 MHz? There is plenty of attenuation at 1.6 MHz
output (TX level) has been attenuated by 10 dB. due to the notch placed there but across the entire BC
band, we just barely missed by about 1 dB. Pretty good,
nevertheless.
Insertion Loss
A close look at the filter’s response shows that
the shape is very close to what ELSIE predicted, right
down to the passband ripple between 1.8 and 4
MHz above the filter’s cutoff. Roleson’s filter rolls
off a little higher than expected, hitting 10 dB of
attenuation at 1.8 MHz. Since this is a receive-only
filter, that extra 7 dB of attenuation at 1.8 MHz (we
only wanted 3 dB) isn’t a serious deficiency and the
filter will work fine.
As the response flattens out, we can see there
is about 3 dB of attenuation between 4 and 5 MHz.
Similar to how we measure stopband attenuation,
n FIGURE 7. The frequency response of a commercial BC-reject this “worst case” attenuation in the filter’s passband is
transmitting filter. Graph scales are the same as for Figure the filter’s insertion loss.
6. S21 is the filter’s input-to-output response; S11 (Return In Figure 7, you see a very different filter response
Loss) shows the power reflected by the filter at its input and (the blue trace) for the commercial filter. Because it’s
represents input impedance. The filter’s internal construction is expected to be used at 100 watt power levels or higher,
shown in the inset.
insertion loss must be minimized. From the inset photo
of the filter components, you can see that larger toroidal
— simple! Inside the filter, Figure 5 shows the short piece inductors are used. These have far lower resistance than
of 50 Ω coax that routes signals around the filter in the the molded components used in the receive-only filter that
BYPASS position. are wound with very fine wire.
I set up my vector network analyzer (VNA) to measure The commercial filter’s insertion loss is less than
his filter’s input-to-output attenuation from 1 kHz (referred 0.5 dB from about 2.2 through 10 MHz. The tradeoff is
to as “zero” frequency) through 10 MHz. Along with the steepness at which the response rolls off. While the
Roleson’s version of the filter, I also tested a commercial commercial filter has very good attenuation (70 dB) at
16 September/October 2018
PRACTICAL TECHNOLOGY FROM THE HAM WORLD
September/October 2018 17
PRODUCTS
■ HARDWARE
■ SOFTWARE
NEW
■ GADGETS
■ TOOLS
COAXIAL SURGE
PROTECTORS
F airview Microwave, Inc., has
recently introduced a new family
of coaxial surge protectors that were
developed to protect wired and
wireless communications equipment
September/October 2018 19
The Mercury T2P offers the ability from classic to modern sounds to
to capture and decode DisplayPort create music in any genre. First-time
Auxiliary channel messages, including synth users get instant gratification
configuration messages, enabling DP from this easy-to-use instrument
connectivity troubleshooting. with 100 presets and an easy-to-play
Power Delivery 3.0 protocol keyboard with selectable scales and
capture is also available as a licensed an arpeggiator.
option. This mode provides full While UNO Synth is
analysis and decoding of all PD monophonic, its two independent
packets over the CC link including oscillators can be tuned differently to
Source/Sink communication, generate interesting pad-like interval
Authentication, Firmware Update, and sounds and octaves. Pulse-width
Alt-Mode commands. modulation of each oscillator offers
advanced modular-style timbres from
For more information, contact:
a higher torque alternative to their classic synths.
Saelig Company
www.saelig.com popular precision spur gear motors. The UNO Synth keyboard also
These motors come equipped doubles as a step-edit control for
with relative quadrature encoders for its built-in 100-pattern sequencer.
closed feedback loop speed control Sequences can be programmed
3/8” X-RAIL or position control applications. You in real time or in steps (with
GUSSET can also just supply power to the modulatable synth parameters per
When my wife and I moved into our current home a few years back, it didn’t
have a doorbell. We live on a quiet cul-de-sac, so it really wasn’t a problem
as we had few callers. After a while, I installed a wireless doorbell that lasted
about three years. Recently, after writing the series of articles on “A Digital
Analog — When a PIC Can Replace a 555,” I decided to make one using a PIC.
maximum power applied to it will be about 1.26W with a add an external power transistor if you need lots of volume.
4.5V supply. Note: The RMS voltage of a 0V based/50% If you look at the board layout in Figure 2, you can see
duty cycle square wave is that the speaker connections are quite close to both the
battery pins as well as Q3. This was done deliberately to
Vrms = Vpk ÷ √2 keep the high current path of the speaker away from the
rest of the circuit.
Refer to https://masteringelectronicsdesign.com/how- Note that the current for the speaker does not go
to-derive-the-rms-value-of-pulse-and-square-waveforms for through Q1. This was done because I didn’t want the high
more details. current to be switched by Q1. My first design had the
The PN2222 can drive a larger speaker if you need current go through it, which created a problem. Due to
more volume. I used the PN2222 instead of a newer
transistor (such as the 2N3904) because the PN2222
can handle more collector current: 1A vs. 200 mA. R5 is
present because there is very little volume until you reach
about 2.5V driving the base resistor.
If you use a more powerful speaker, you may want
to decrease the value of R5, or eliminate it completely by
replacing it with a jumper. If you need more sound output,
a larger speaker will work, but I would not use one less
than 8Ω.
I tried a speaker I have with taps for 40Ω, 20Ω, and
10Ω. The speaker (about 30 years old with no power rating
on it) is 5” x 7” and was quite loud using any of the three
taps, with the 10Ω tap being the loudest. I recommend
that you use a diode across the speaker input since most
speakers present an inductive load.
You can also use a higher voltage supply for just the
speaker. You’ll still need a lower voltage for the PIC; it will
operate anywhere between 2.5V and 5V. You’ll need to be
careful that you don’t cause the PN2222 to dissipate too ■ FIGURE 2.
much power. Its spec is about 0.6W. Of course, you can
■ FIGURE 1.
September/October 2018 23
■ FIGURE 3.
above the board. Since jumpers 0, 1, and 2 are
not installed, I’m using sequence 0.
Software
The software is very much table-driven.
There are three tables that the program uses:
Here’s the list showing the Morse code notes for Upon power-up, the program first initializes the
sequence 1: hardware and then reads the switches. It inverts the state of
the switches and doubles the value since each entry in the
Sequence_1 ; .---- Sequence table is two bytes, and saves it for processing.
dw MC_NOTE, DOT The main loop of the program starts by turning on Q2
dw REST, DOT which latches Q1 on so that even if the doorbell switch is
dw MC_NOTE, DASH released, the power will stay on. Next, it uses the stored
dw REST, DOT switch value to determine the address of the sequence to
dw MC_NOTE, DASH play. After playing the sequence, it turns off Q2 allowing
dw REST, DOT power to be removed from the processor if the switch has
dw MC_NOTE, DASH been released.
dw REST, DOT The program will execute the main loop up to three
dw MC_NOTE, DASH times as long as a doorbell switch is closed. If the switch is
dw REST, DOT still closed after the third time, the program lowers the CPU
dw 0 frequency and executes a one instruction loop forever — or
until the switch is released and power is removed from the
Each list contains two values for each note to be PIC.
played: the low byte of the address of the note from the The Parts List doesn’t include the batteries (I’m using
previous table, and the length of the note. The length is three AA cells), printed circuit board (PCB), or housing.
essentially the number of milliseconds to play the note. The The battery, speaker and Sw0-3 are set up to use .1” pin
DOT is defined as an EIGHTH and a dash is 3*DOT. headers and sockets if you wish, but they aren’t necessary
The note lengths are definitions. Only the EIGHTH (and also are not in the Parts List).
I purchase most of my parts from Digi-Key
Description Value Name Quantity since I typically send a check with my order
Battery Holder BC3AAW-ND 1 so that shipping is free. If you use this service,
C1 10 nF 399-4148-ND 1 please be sure to include any applicable state
taxes.
D0, D1, D2, D3 1N914 1N914BCT-ND 4
Both the schematic and board layout were
Q1 2N3906 2N3906D26ZCT- 1 done using DipTrace (www.DipTrace.com).
ND
There’s a free version available on their website
Q2 2N7000 2N7000TACT-ND 1 which will handle this circuit quite easily.
Q3 PN2222 PN2222ATACT-ND 1 So, there you have it. A simple,
R1, R3 47K 47KQBK-ND 2 customizable doorbell. Now, it’s your turn to
chime in! NV
R2 10K 10KQBK-ND 1
R4 5K 3352W-502LF-ND 1
R5 4.7K 4.7KQBK-ND 1 If you would like to build this project and want
R6 560 560KQBK-ND 1 a single board, you can email me at k3pto@
Spk1 8 ohms 102-3544-ND 1 arrl.net. If you want three boards, you can
U1 16F18313 PIC16F18313-I/P- 1 order them directly from OshPark: oshpark.
ND com/profiles/K3PTO.
September/October 2018 25
BUILD IT YOURSELF
As the last notes of the song ring out, it’s only seconds before the next song
starts. You’re the band’s keyboard player and a bead of sweat is on your brow
as you quickly glance at the set list, pick the instrument settings, remember to
transpose, tweak the volume, set the keyboard splits, and then begin to play.
You make it but only just!
A look from the impatient
drummer says it all! As the
song continues, your mind
wanders to how you wish it
was all easier ... how you’ve
always wanted to add some
strings and bass to the song
but can’t ... the frustration
of only having two hands ...
(cue dream sequence).
Performance mode, the display is in large font. between the two is inter-woven in real time.
The MIDI controller contains a Song Manager and
Note Processor with supporting memory and timer. The
Logically Speaking — A memory stores notes and song configuration data. The
Dynamic Duo timer controls beats and song position.
Figure 5 shows the logical system diagram, consisting The user interface has buttons and a display, plus
of a user interface and MIDI controller. Communication a metronome with speaker, headphone output, and
associated volume control. The metronome
is used to give vital timing cues when using
backing.
Musically Speaking
— A Best Buddy
The musical diagram in Figure 6 gives
an overview from a musical perspective and
summarizes the ‘dream’ of the project. To
a musician, the Box makes life much easier
and presents exciting possibilities.
Internally, the Box contains song
settings and recordings. Each song has
four tracks on separate MIDI channels. For
each track, you can set the level, transpose,
instrument, and playable range.
In Performance mode, the language
of the Box is simply ‘songs,’ ‘sections,’ and
‘start/stop.’ Having the configuration of a
Design Challenges of a
Real Time MIDI System
So, how do we turn this logical and musical overview
into a reliable high-performance system? The stakes are
high because system failure mid-performance could be
very embarrassing!
This is a real time system with a demanding spec: The
notes a musician plays must be processed seamlessly and
without delay, applying range and transpose logic, echoed
out on selected channels, and possibly recorded. At the
Round-robin
Scheduling with
Interrupts
The type of scheduling used to manage tasks in
the MIDI controller PIC is called round-robin with
■ FIGURE 12. Spreading the load with parallel processing. interrupts. This is a scheme that balances the need
for simplicity against the demands of immediate real time
processing.
The main loop shown in Figure 11 can be thought
of as a spinning wheel, where each task on the wheel is
traversed in series (round-robin).
The ISR handles received and transmitted bytes,
routing them to and from associated buffers. The tasks are
simple and so critical that they are handled immediately in
the ISR.
The ISR also sets a flag when the timer ‘ticks,’ plus sets
the song position variable. However, the actual processing
of the tick occurs in the round-robin loop.
September/October 2018 33
Ref Des Name Value Notes
23LCV512 512 Kb SPI Serial SRAM with 23LCV512 Probably good idea to have an associated
Battery Backup DIL socket in case RAM ever needs replacing
(although it shouldn't).
74LS04N Hex Inverter DM74LS04N
B1 Horizontal Lithium Battery PCB Check pin spacing to ensure it fits with PCB
Mounted Holder for CR2032 holes.
Battery
C1 Capacitor 33 pF
C2 Capacitor 33 pF
C3 Capacitor 100 nF
C4 Capacitor 100 nF
C5 Capacitor, Non-Polarized 10 µF Important that it's bipolar because it needs
Bipolar electrolytic to cope with reverse voltage.
C6 Capacitor 100 nF
C7 Capacitor 100 nF
D1 Diode 1N4148
D2 Diode 1N4148
D3 Diode 1N4148
D4 Diode 1N4148
FOOTSWITCH Footswitch Microcontroller PIC12F683_P Recommend an associated DIL socket so that
this chip can be reprogrammed if necessary.
METRONOME Metronome Microcontroller PIC12F683_P Recommend an associated DIL socket so that
this chip can be reprogrammed if necessary.
MIDI MIDI Controller Microcontroller PIC16F648A_P Recommend an associated DIL socket so that
this chip can be reprogrammed if necessary.
MIDI_SENSE LED-3R_Orange 3 mm Round
PLAY LED-3R_Green 3 mm Round
R1 Resistor 220
R2 Resistor 1K
R3 Resistor 470R
R4 Resistor 4K7
R5 Resistor 4K7 MIDI Replay
R6
R7
Resistor
Resistor
10K
2k2
Parts List
R8 Resistor 220
R9 Resistor 220
R10 Resistor 220
R11 Resistor 220
R12 Resistor 220
R13 Resistor 220
R14 Resistor 220
R15 Resistor 100
R16 Resistor 470
REC LED-3R_Red 3 mm Round
UI Header 6-pin
VO1 Optocoupler 6N138
X1 Piezo Transducer PCB Mount Low Profile. Diameter, pin spacing, and pitch are all
Requires an external oscillator important, so it can fit on PCB. Also get one
circuit to operate as a buzzer or without internal oscillator because we are
sounder. Dia 29.7 mm; Ht 7 mm; generating the waveform from code.
Pin Pitch 15 mm
XTL1 20 MHz Crystal
Volume Potentiometer A1M LOG ALPHA
MIDI IN socket 5-Pin DIN Chassis Panel
Mounted Female Socket 180
Degrees
MIDI OUT socket 5-Pin DIN Chassis Panel
Mounted Female Socket 180
Degrees
Enclosure (Optional) Die-cast Aluminium Enclosure Hammond Diecast Aluminum The 1590XX Hammond enclosure is a great
Stomp Box Enclosure size for this project. Note that drilling of the
Size: 1590XX (145 x 121 x 39 box needs VERY careful measuring to get a
mm)" good result.
4 x PCB Spacers PCB Round Spacer Outer Diameter: 6.3 mm; Inner Dimensions are just suggested and are not
(Optional) Diameter: 4.2 mm; Overall critical.
Length: 10m
34 September/October 2018
MIDI and the Horror of Stuck Notes
September/October 2018 37
■ FIGURE 18. A close-up in Edit mode.
Seamless Transitions
— The Smooth
Operator
Foot-switch presses don’t change a song
section immediately. Rather, they tell the Box
that after the current section is finished playing,
the clicked section is the next section to play. It’s
■ FIGURE 19. Load testing. more like a pending section change. As long as
you have set the track durations accurately, this
will result in beautifully smooth transitions between
sections.
The sections are either looped or normal (not
looped). When a looped section ends, it will either
loop again, or if there is a pending section change,
playback will hop to the new section. Normal
sections will either stop when the end is reached or
hop to a pending section change.
This makes operating the Box in Performance
mode extremely simple. The only thing to worry
about is telling the Box which section to go to next.
You can tell it at any convenient point during the
currently playing section.
Learning
playing with them,
changing things, and
finally formalizing
The Dead 9V Battery be putting out usable light down to about a quarter volt.
This is way below where a rechargeable battery would be
Flashlight ruined. I went with an on-off-on switch because an on-off
I’m sure that by now, most of you have come across a version wouldn’t have the option of driving the 3V ultra-
circuit called a “joule thief.” This is a simple self-oscillating bright white LED directly. You could also build two circuits:
voltage booster which most people build to use with either one to use the resistor; and one not using the resistor for
an AA or AAA battery. Any “dead” 1.5 volt battery will when the battery is below four volts.
do, where the voltage has dropped to about 1.0-1.1 volts I find that once the 9V battery is reading 3-4 volts
or lower. The fact is that you can use a good battery as when using the resistor and LED, it can be used without
well, and probably every one of the small flashlights on the the resistor to drive the LED. At this point, the internal
market that use only one AAA or one AA battery is using a resistance of the 9V battery is high enough to limit the
joule thief circuit. current, so no external resistor is needed.
This will be a great way to use the dead AA and AAA Also, I’ve measured these currents at around 10 mA,
batteries I end up with from battery-operated things around which is not even close to the 30 mA max current, or even
the house. So, what can one do with all those dead 9V the recommended 20 mA for longer life for these LEDs.
batteries? These are generally down to about six volts Remember that it’s the heat generated by the LED that
and seem to be useless since they are rather low current eventually kills it. Two ways to limit the heat buildup are to
batteries even when new. either drive the LED intermittently — as is done when using
The circuit I want to discuss here is one that would the joule thief circuit — or limiting the DC current to below
be a great project for a newbie to learn about
soldering on. All that is needed is an ultra-bright
white LED, a 220-330 ohm 1/8-1/4 watt resistor,
a “dead” nine volt battery, battery holder, and
something to put it all in. You can add an on-off
switch or even an on-off-on switch.
A word of warning here for those who
use rechargeable batteries: Do NOT use a
rechargeable battery in one of these flashlights.
It will be dead when you take it out because the Schematic 1:
simple version of these circuits will use the battery Dead 9V battery
down to below a half volt. Being one of the more flashlight.
efficient projects I’ve built, this circuit will still
40 September/October 2018
Post comments on this article and find any associated files and/or downloads at www.nutsvolts.com/
magazine/issue/2018/09.
the only other method I’ve used is to tie them all with
another piece of wire. Then, of course, as soon as I do Photo 5: Joule thief in box with solder islands hidden.
that, I realize I need to connect another lead or two to
the tied and soldered bunch of leads. find that pre-tinning them removes those sharp edges. Plus,
The material I’ve found that works really well is it makes a nice island of solder that can be reheated to
something we all throw away or recycle. This past week, melt only a section of the whole island, thus making it very
I noticed that my wife had recycled a plastic wrap box easy to add wires or leads.
(Photo 3). Photo 4 shows two soldering islands cut from the
It wasn’t very flat, so I removed it to take it apart plastic wrap cutting strip.
and flatten it. I noticed that the metal cutting edge was This project didn’t really need these soldering islands
still attached to the box so I removed it to place it into a since only two leads and one piece of wire from the
different recycling bag. inductor are the most connected together. However, it did
In looking at it, I wondered if I could solder something make soldering them together much easier than getting
to it. So, instead of recycling the cutting strip, I tested it the leads of the transistor and LED lined up and then tied
and found that soldering to it worked very well. I decided together by the inductor wire and soldered together.
to make a night light out of a joule thief circuit using two The inductor was then bent back to be above the
small pieces of this material as soldering islands. transistor and LED before installing it in the small plastic
These islands made soldering multiple wires to the box. Positioning the parts as well as the entire circuit was
same point very easy, even though they were not attached not critical either in relation to each other or in the box.
to a board. Also, while the ends of this material are sharp, I I completed this project with a small switch and two
battery clips: one for an AA battery and the other for an
AAA battery in parallel so that either size battery could be
used without needing a converter case for the AAA battery
to resize it to a AA battery.
A small amount of “liquid tape” was used to keep the
battery clips and the circuit from moving around. The liquid
tape can be removed if needed to service the circuit in the
future, and it’s strong enough to hold up to normal use.
Photo 5 shows the finished joule thief night light in a
box with the soldering islands hidden under the inductor.
Photo 6 shows the bottom of the box with the
soldering islands visible.
test out some part-saving ideas. blocking diode. I figured I’d use another LED to do the
Generally speaking, the more parts we try to save, blocking since I could then get light out of it as well. This
the more complex a circuit becomes. This was definitely saved the expense of the DPDT switch but added a minor
the case with this combined project. It’s no longer super cost for the second LED. This saved a little money probably
simple, but it’s not all that difficult either. at the expense of a shorter battery life.
I’ll explain a bit first, and then show the photos of the You’ll also notice that I removed the AAA battery
two different approaches. I’ll include the schematic as well. holder. This was because I found that the AAA battery will
The first circuit used two switches: an on-off-on single work in a double-A battery holder. It’s not as secure, but
pole switch for the 9V dead battery side of the project; as a night light it doesn’t need to be. As a flashlight for
and a double-pole-double-throw (DPDT) switch for the two children, I’d keep the AAA battery holder.
AAA and AA battery holders. This powers the joule thief With an on-off-on switch, I found another way to
circuit and also disconnects the 9V battery section to the hook up the double- and triple-A holders. Use the center
off joule thief circuit. In this circuit, the two battery holders connector of the switch for the output to the joule thief
are connected together in parallel so only one battery at a circuit, and then each battery holder could attach to the
time can be in a holder; refer to Photo 7. switch on either side and could be selected to supply
In the second circuit, I used two LEDs to separate the power separately.
9V battery from the joule thief circuit. This was necessary In this way, all three batteries could be installed. As
because I removed the DPDT switch and replaced it with one starts to get too dim, the weak battery could be turned
a second on-off-on switch. This meant there was no way to off and then one of the other batteries could be switched
separate the 9V from the joule thief circuit via the common in. Check out Photo 8.
positive lead of the LED. By adding a second LED in series Schematic 2 shows the two LED AA and AAA battery
with the first LED, this LED could be
used as a blocking diode, restricting the Schematic 2: Two LED version
current path from the 9V battery to the of the dead 9V/dead AA/AAA
joule thief circuit. battery nightlight.
The joule thief circuit is now
connected to the second LED in the
series and so it drives both LEDs. This
means that the joule thief circuit had
to boost the voltage to ~ 6V to turn on
both LEDs in series. The only reason the
joule thief stops at 3V is because that’s
when the LED turns on and stops the
voltage increase of the oscillator. So, the
oscillator boosts the voltage to what is
needed to turn on both LEDs.
By removing the more complex
and expensive switch, I had to add the
September/October 2018 43
Screenshot 1. Two LED trace battery 1.1V.
Introducing the
1(:39-U
0LQL&LUFXLW%RDUG+ROGHU
'(6,*1('
In G )25 29(5
V PrInt
no W o
t
F
Pa
F
n l
erInG U
e 7+(('*(
Fron n eI Nr &20321(17
s i g
D e N IT – WE MACH E IT %2$5'6
G Model
YOU DESI re s
220
e n c lo s u
s to m P a n e ls &
Cu
c tu ri n g
• M a n u fa w a re
aD S o ft
• F re e C Innovative H
Holding
olldi
o din
ngg SSolutions
olutio
ol utiio
ut ons
n
h ip p in g q u ir e m e
n ts
• F re e S rd e r r e
o
• n o M in
im u m
800-759-7535
u il t in 5 Days
• B
www.frontpanelexpress.com
44 September/October 2018
USB
Bench and Builder
Stuff to keep your
Add USB to your next project--
It's easier than you might think!
USB-FIFO USB-UART USB/Microcontroller Boards
electronics hobby
RFID Readers Design/Manufacturing Services Available
Absolutely NO driver software development required!
www.dlpdesign.com
interesting!
START CREATING!
www.sdp-si.com 516-328-3300
September/October 2018 45
Ready Player 2:
CC3200 Wi-Fi
& IoT MCU
The February 2018 issue article, “Build the IoT Sump Pump (or Pretty Much
Anything IoT)” generated curiosity about some of the tools utilized to create the
device. It’s time to ready Player 2 and penetrate deeper into the utilization of some
of the software and hardware features that come with CC3200 Launchpad and
Code Composer Studio (CCS).
46 September/October 2018
Post comments on this article and find any associated files and/or downloads at www.nutsvolts.com/
magazine/issue/2018/09.
September/October 2018 47
Figure 4. Open
Perspective.
Figure 5. Open Perspective dialog. I2C SCL and SDA are on pins CC_GPIO_10 and
CC_GPI_11, respectively, so you need to make sure the
jumpers J2 and J3 are put in place. The sensor address pins
are configured for the 0x41 I2C address.
Now it’s time to fire up CCS. You can close the
Getting Started tab. Click on the Open Perspective button
(see Figure 4) located in the upper right corner.
A menu will pop up with a choice of different views.
We mostly switch between Edit and Debug views.
Figure 7. CCS Simple. Typically, CCS switches automatically. However, if you
would like to go back to edit
mode, select CCS Edit or CCS
Simple as shown in Figure 5.
To demonstrate this feature,
we’ll do an example. Go to Project
→ Import CCS Projects... First, the
Import Wizard will open up. Click
on the Browse button and navigate
to i2c_demo in the ..\example
folder. Hit Finish. Refer to Figure 6.
Go to View and select Project
Explorer. Once Project Explorer
pops open, you should see the
i2c_demo folder. Expand it to
see project files and double-click
on main.c. Now, go to Open
Perspective (from Figure 4 above)
and select CCS Simple. You should
have a display resembling Figure 7.
To clear your workspace,
minimize the windows that you
48 September/October 2018
no longer need. Also, move and
arrange windows for ease of use.
Once your screen is organized to
your satisfaction, you can begin to
edit source files and compile.
This example should compile
straight out of the box. However,
before we proceed, we should
check the project properties and
make sure they are appropriate
for our demonstration. These
projects are a carryover through
many CCS releases and sometimes
adjustments are needed. Following
are the changes we had to make
to compile CC3200_SDK v1.3.0
i2c_demo under CCS v8.
Right-click on the project name
in the Project Explorer and select
Properties. Select the General tab
and make sure the latest compiler Figure 8. Compiler version.
version is selected; see Figure 8.
Now, select the ARM Compiler tab and if flag --float_ calls driverlib low level functions to open, close, read, and
support=fpalib is set, click on Edit Flags and change fpalib write peripheral.
to none (Figure 9). Click OK, Apply, and Close. Pinmux.c - Configures pins and peripherals.
Go to Project and click on Build Project. The console
will open and if successfully compiled, you should get the Unpack your CC3200, remove the jumper on header
confirmation “Build Finished” as seen in Figure 10. P1 between Vcc and pin P58 if installed, and make sure
Before we proceed with the i2c_demo, let’s explore jumpers J2 and J3 are populated. Connect your LaunchPad
what this code does. to your PC, and the onboard LEDs will come to life.
The application communicates with the user (Terminal In CCS under View, select Other. A new menu pops
Emulator) over UART. It accepts commands to read/write up. Type “target” in the search box and select Target
registers on a specified I2C device and displays results on a Configurations as shown in Figure 11.
terminal.
For Terminal
Emulator, we
used the free
application PuTTY.
The source code
of interest is in the
following files:
Main.c - Figure 9.
Initializes the Compiler
board, reads flags.
commands via
UART, processes
I2C commands,
writes results to
UART.
i2c_if.c/
uart_if.c - I2C/
UART interface
API wrapper that
September/October 2018 49
Figure 10. Build
finished.
Figure 13.
Stellaris
In-Circuit
Debug
Interface.
50 September/October 2018
Figure 14. Debug
perspective.
many bytes we
want to read.
As you can
see in Figure 18,
the command
returned two
bytes: 0x0B and
0x90.
To calculate
the temperature in
Celsius, we right-
shift this number
by 2, convert it
to a decimal, and
divide by 32:
Figure 15. Load program.
0x0B90 => 0000 1011 1001 0000 > 2 =
0000 0010 1110 0100 = 740(10)
September/October 2018 51
www.poscope.com
- USB - PWM
- Ethernet - Encoders
- Web server - LCD
- Modbus - Analog inputs FIGURE 18. PuTTY terminal.
- CNC (Mach3/4) - Compact PLC
- IO
Conclusion
The IoT sump pump device design featured in the February issue initiated
several requests for additional details. So far, we’ve explained CCS installation
and set-up, and how to use the temperature sensor on the CC3200 LaunchPad.
Stay tuned for Part 2 as we further explore two more items of the device
design: How to adopt a third-party project to work with your environment; and
how to upload your code to the external Flash memory. NV
- up to 256 - up to 32
microsteps microsteps
- 50 V / 6 A - 30 V / 2.5 A
- USB configuration
- Isolated
THE MOST COMPLETE PROGRAMMING TUTORIAL!
PoScope Mega1+ • Everything you need to learn to program PIC® micro-
controllers is included in this package
PoScope Mega50
• Learn the fundamental concepts of programming,
including program flow, loops, coding techniques, binary
manipulation, device-to-device communication, user
interface design, in-circuit debugging, and more!
• Includes all the necessary the software, compiler,
$99.99 trainer board, cable, tutorial with exercises and sample
Academic and bulk pricing available
code!
Check out our other popular products
-up to 50MS/s for PIC® developers including:
PBP3
-resolution up to 12bit
U2 Programmer
-Lowest power consumption
-Smallest and lightest PBP3 Compiler
-7 in 1: Oscilloscope, FFT, X/Y, Recorder, Prototyping Boards
Logic Analyzer, Protocol decoder, Signal
PICBASIC PRO™ Compiler Experimenter Boards
generator
www.melabs.com
Contact us at info@melabs.com
52 September/October 2018
By David Goodsell
Can You
Trust Your
Voltmeter?
BUILD YOUR OWN
Sometimes I wonder which of my portable
Or … you can build your own reference out of
digital voltmeters I can trust — the B&K, parts in your junk box. Figures 2 and 3 show a simple
breadboard I made in an hour or so and the schematic.
Fluke, or Amprobe. Usually, they’re The only component I didn’t have on hand was the
AD584.
pretty close but it bugs me not knowing There are two grades of AD584s for hobbyists — J
and K — which specify the accuracy of the outputs. J is
whether they are right on the nose. +30 mV and K is +10 mV for their 10.00 volt outputs.
The IC in the breadboard is the K version and the spec
sheet lists a max error of +3.5 mV for the 2.500 volt
Of course, I’m just being picky because I output. You can see that the measured error is a lot less
seldom need more than three or four digits of — only +1.0 mV. That’s one part in 2,500. Good enough
for most measurements!
accuracy, but it sure would be nice to know
the answer. Fortunately these days, there are
a number of very accurate voltage reference
circuits that you can build or purchase for a few
dollars. A ready-to-use unit made by Agilent
is shown in Figure 1. It puts out 2.500, 5.000,
7.500, and 10.00 volts and costs less than
$20 on eBay. The actual precisely-measured
voltages are recorded on the side label, good
to six digits. The heart of it is a laser-trimmed
Analog Devices AD584 voltage reference IC.
56 September/October 2018
HP redesigned their HP3456A voltmeter to replace three defective ROMs with one larger memory chip.
FIGURE B. Old HP3456A (serial #18467) with three defunct FIGURE C. Newer HP3456A (serial #19178) with redesigned board
ROMs. and a single ROM.
had been replaced. Big surprise! Board #A4 had been other words, a precise frequency would produce a precise
completely redesigned by HP. No more three ROMS, voltage, every time.
just one big one. Hopefully, it won’t die like the others. A few millivolts was not a very useful calibration
Figures B and C in the sidebar show photos of HP’s board source, so developers fabricated an integrated circuit type
redesign. structure that had an array of thousands of tiny junctions
The final chapter to this story is better than the all in series, all adding up. It took 20,208 tiny junctions to
beginning. The fellow who sold me the original non- produce one volt and almost 300,000 to make 10 volts.
working unit gracefully refunded my $99 and told me to Figure 9 shows a microscopic view of an early one volt
keep it as a door stop. All in all, it turned out for the better. version. If you look closely, you can see the serpentine
array of junctions, although the whole chip was only about
3/4” wide.
SERIOUS MEASUREMENTS
The Figure 7 cert for the 39 year old black beauty was
1.01928 volts. However, some Weston cells were known
to lose a small amount of voltage over the years; about 30
µV/year: -30 µV x 39 years = -1560 µV (1.56 mV). Quite a
bit!
With my newly acquired and calibrated HP3456A in
hand, Figure 8 showed the actual loss and it was much,
much less: 1.019280V - 1.019165V = 115 µV, i.e., a 0.115
mV loss in 39 years. Amazing! Maybe the lower loss was
because of the brand-new condition of the cell and benign
storage in a warehouse all that time. Who knows?
WRAPPING IT UP
While it might be fun to have your own world-class
super-precision Josephson instrument in your basement,
taking delivery of liquid helium each month might make
FIGURE 11. The value of the DC output of this simplified array the neighbors wonder.
diagram is locked to the frequency of the input microwave power.
In lieu of that, you can easily build or buy a perfectly
good IC voltage reference and set your mind at ease about
the accuracy of your meters. At least you’ll know for sure
which meter you can trust. NV
This is the first in a series of questions to encourage readers to think about electricity
and electronics in ways that, perhaps, they had not before. My intent is to improve
understanding on how electricity behaves and how it can be made to do what we want.
These kinds of questions rarely show up on high school or even college exams, yet
they demonstrate an understanding of electronics beyond the formulas. I hope these
questions help people get a real feel for how electricity works.
T
urn on a light switch. Assuming that you’re the wires, metal parts of the light fixture, and the closed
living where electricity is available and switch) or stop electricity (like the surrounding air, plastic,
someone has paid the electric bill, the light and ceramic parts of the light fixture, etc.).
will come on. Turn it off and the light goes off Conductors (like wires) allow electricity to flow with
again. Electricity seems to be smart enough little pressure. Insulators (like air) stop the flow of electricity
to light the light bulb, while leaving the rest of completely. Using conductors and insulators, electricity is
the apparatus — the switch, wires, fuses in the channeled to pass through the device that we want to use
fuse box, and pole transformers, etc. — alone. power to generate light: the light bulb.
The light bulb must have something that these other
#1: How does electricity know to light the bulb devices, wires, switches, transformers, etc., do not.
while leaving everything else dark? For devices to use power from electricity, they must
neither completely stop nor freely allow the flow of
The light bulb must be different than the rest of the electrical charges. For the most part, we can think of three
equipment. What differences cause electricity to ignore all different types of things:
that equipment but have such a pronounced effect on the
light bulb? 1.) Devices or materials that stop electrical charges
If everything is working as it should — other than the from moving.
light bulb — all of the other equipment must either conduct 2.) Devices or materials that allow electrical charges to
electricity (pass charges with very little restriction like move freely.
3.) Devices or materials that restrict but
not prevent electrical charge flow.
Here, the bulb is on, yet the wires to the light remain dark
and cool.
PC Oscilloscopes
Includes serial bus decoding (18 protocols), spectrum analysis, mask limit
US$ 1155 - 3025
testing, arbitrary waveform generator, software development kit (SDK) and
segmented memory all standard, with free software updates and 5-yr warranty.
learn more: www.picotech.com/A130 or 800-591-2796 ©2018 Pico Technology LTD. All rights reserved. Pico Technology, PicoScope and FlexRes are registered trademarks of Pico Technology LTD.
September/October 2018 61
Meet the Microbitx:
A Simple to Build, Yet
Challenging All-Band
Transceiver Kit By Steve Jackson
generator.
Farhan has named this combination of
devices “the Raduino.” Generic firmware for
the Raduino comes preinstalled, and more
enhanced versions can be found on user
websites.
The Silicon Labs’ SI5351 frequency
generator has greatly reduced the complexity
associated with building multiple band
transceivers.
By including just one 25 MHz crystal to
serve as the frequency reference, the SI5351
can digitally generate oscillations in the range
of 8 kHz to 160 MHz. To paraphrase Farhan,
the SI5351 has reduced the complexity of
multiband transceivers to a relatively trivial
matter.
5. Up-conversion schematic for the Microbitx transceiver. Neither Ubitx nor its predecessor (the
Bitx40) would have been possible at their low
Farhan believes that by referring the Ubitx users to the price were it not for the Si5351.
general user community for support, everyone will benefit The Ubitx uses an up-conversion, double superhet
from the combined knowledge and experience of the design (Figure 5) to the first intermediate frequency of 45
world’s most competent Bitx users. MHz, eliminating the need for large band-pass filters. At 45
MHz, the roofing filter is 15 kHz wide.
On the Technical Side The signal is down-converted to 12 MHz where an
Ubitx is a state-of-the-art design (Figure 4), with eight-crystal filter (Figure 6) is used for both CW and SSB.
economy playing a role in each decision. Farhan has The eight-pole filter in the second intermediate frequency
sought throughout Ubitx’s design to balance cost with is 2.3 kHz wide.
reliability. The receiver front end has a 0-30 MHz low-pass filter
The control center for Ubitx is the Arduino Nano which is used to keep out signals from FM broadcast
microcomputer which is coupled with an Si5351 frequency stations; refer to Figure 7. This design utilizes a doubly
balanced diode mixer which is made up of two
matched Bat54SL diodes. No amp is required here
because sensitivity at this point is adequate.
Ubitx uses four intermediate frequency
amplifiers which don’t require transformers; each
one has a gain of 16 dB.
Generic 2N3904 transistors are used throughout
the transceiver with four 2N3904s serving as
push/pull drivers to the finals section which uses
inexpensive IRF510 field-effect transistors.
Following the finals are four filters which are in
6. Eight-pole filter schematic for the Microbitx. place to prevent harmonic distortion on the output
signal.
64 September/October 2018
Operator Interface
Another feature of the Ubitx which is
not usually found in low power radios is the
comprehensive and well-conceived operator
interface. Ubitx operators can access a host of
menu options simply by depressing the tuning
encoder. These options include a receive
incremental tuning (RIT), dual variable frequency
oscillators, a CW keyer, calibration, and many
others. Most of the menu options have logical
defaults which are easily overridden.
To enter CW mode from single side-band
mode, the operator need only press his CW key.
The Raduino will return to SSB mode when it
senses that the operator has stopped keying.
The Ubitx kit comes with a completely built
and tested main board, Raduino, and all the
peripherals and parts. It doesn’t include a speaker, a
power supply, or an enclosure.
Building the Transceiver
Instructions for building the Ubitx transceiver
are found on Hfsigs.com. A note to new builders:
The Ubitx build does require soldering. Some prior
experience with kit building and schematic reading
will be very helpful. Ubitx can be assembled by
following the wiring diagrams shown in Figures
8. Farhan’s wiring diagram for the Microbitx.
8 and 9. Or, if the builder prefers, Farhan has placed
more detailed instructions on
his website.
As you build Ubitx, be very
careful that the main board
doesn’t get exposed to static
electricity. Even the smallest
charge of static electricity can
destroy a board’s circuitry.
Included with the kit is a
1N4007 diode which is to be
connected across the power
connector to prevent damage
from short circuits and other
spikes in power. Unfortunately,
the 1N4007 diode doesn’t
provide adequate protection.
Every builder should place
a two-amp fast blow fuse in
the positive line of the power
supply. It’s much better to take
the time to add a fuse than to
stand by helplessly while your
www.embeddedARM.com
TS-4900
Computer on Module
WiFi and Bluetooth Enabled
1 GHz i.MX6 Computer Module
Single or Quad Core
TS-7970
Single Board Computer
1 GHz i.MX6 ARMCPU
Single or Quad Core
Up to 2 GB DDR3 RAM
4 GB MLC eMMC Flash
Choose your own adventure. WiFi and Bluetooth
Shield
as the basis for the shield? The standard that makes the
most sense is HDMI. After all, it’s purely digital and lends
itself to FPGAs (field-programmable gate arrays). However,
Embedded Micro has an HDMI shield and it would be silly
to reproduce their efforts.
How about VGA? It’s really not too tough to
If you have read my previous Nuts & Volts implement the VGA standard on an FPGA, and most
monitors and televisions have a VGA input. Plus, VGA is a
articles in the FPGAs for the Hobbyist tried and true project for FPGAs. I have a better idea! Let’s
go with an old friend: the ubiquitous NTSC standard.
series, you already know that I’m a big You may recognize it as the yellow RCA jack
fan of Embedded Micro’s Mojo V3 FPGA (composite video) or mini-DIN (S-video) on the back
of your television. NTSC is an old analog standard and
Development Board. Embedded Micro offers it’s certainly not the easiest to decipher or implement
on an FPGA, but almost every video input device in the
a handful of expansion shields for the Mojo US includes it as an option. Come on, this will be fun!
(Disclaimer: This was extremely frustrating at times.)
V3. However, at the time I wrote this article, Okay, how do we do it? Like I said before, the NTSC
there was no video shield available. Well, I standard is not simple to implement on an FPGA (more
on that to follow), but thankfully there are already devices
don’t know about you, but that sounded like a on the market that do a lot of the heavy lifting. The device
we’ll use is the Analog Devices AD723 RGB-to-NTSC/
great project to me! So, let’s go on a journey PAL Encoder. This device accepts analog RGB and digital
to design a video shield for the Mojo V3. synchronization signals as inputs and generates the
September/October 2018 69
Post comments on this article and find any associated files and/or
downloads at www.nutsvolts.com/magazine/issue/2018/09.
appropriate analog NTSC signal as both composite and nice to have two frame buffers so that we can page flip.
S-video output. That requires 600 KiB of storage, which leads us to a 1 MiB
As a tradeoff between color depth and ease of RAM device. Long story short, I settled on the Alliance
construction, I decided on an eight-bit 3-3-2 RGB color AS7C38096A 1M x 8-bit 10 ns SRAM. See Figure 1 for the
palette. What does that mean? Well, it means there are shield schematic.
three bits for red, three bits for green, and two bits for
blue, totaling 256 colors. (As a side note, the reason
that blue only gets two bits is because the human eye is Construction
less sensitive to the color blue.) The RGB input must be Fair warning here! If you don’t like soldering SMT
between 0-714 mV, which we can easily achieve with a (surface-mount technology) devices, then I have bad news:
binary-weighted resistor DAC (digital-to-analog converter). The entire shield — except for the expansion headers and
Okay, so we’ll generate an NTSC signal, but I think output jacks — is SMT. It’s really not that bad, honest! The
we need more. Wouldn’t it be nice to have some video hardest part to solder is the 14.31818 MHz color burst
memory to play with? Although the Xilinx Spartan-6 on the oscillator (U2). It’s lead-less and the footprint isn’t exactly
Mojo V3 has a bunch of onboard Block RAM (64 KiB), it’s huge, but with a little bit of patience it doesn’t take much
not enough for a reasonable frame buffer. No problem! fuss.
We’ll just add external RAM to the shield! We need that PRO-TIP: Be careful when soldering the SRAM. It has
video RAM to be fast, but it also needs to have enough many fine-pitch leads and it’s very easy to bridge them
capacity. while drag soldering (this may or may not have happened
Let’s target a resolution of 640x480, which is to me). If you have the ability to reflow solder, then this is
equivalent to VGA. At one eight-bit byte per pixel, we all mostly trivial.
require 300 KiB of storage. I personally think it would be There’s no preferred sequence to solder the shield.
70 September/October 2018
Figure 2. Completed NTSC shield.
Figure 3.
Prototype NTSC
shield.
interlaced, which means each field contains every other those black lines. That leaves 484 active video lines per
line of a frame and a complete frame is constructed by frame. Since we’re going to be working with digital logic,
displaying alternating fields. it’s a lot easier to round that down to 480 lines.
The fields are labeled as either an odd field or an even What about horizontal resolution? Some quick public
field. The field rate is 59.94 Hz, making the frame rate math: For a 29.97 Hz frame rate and 525 vertical lines, we
29.97 Hz. Each field contains 262.5 lines, which consist of have about 63.56 µs per line. However, approximately 10.9
video and synchronization signals. I think I heard another, µs of each line consists of the horizontal synchronization
“huh?” Yes, fields contain half lines and when added signal, leaving 52.66 µs of active video. To generate 640
together, the entire frame is 525 lines. This does actually horizontal pixels in that time, we would need a 12.15 MHz
make sense once you see how the electron beam traverses pixel clock. To keep the math easy, we round that up to
the screen in Figure 4. 12.5 MHz and black out the extra pixels. Figure 6 shows
So, our NTSC picture has a vertical resolution of 525 the profile of an active video line with the appropriate
lines, which is not too bad for an old analog signal! Not synchronization signals.
quite. Some of those lines are vertical synchronization Alright! We squeaked a 640x480 resolution out of
signals which consist of a series of pre-equalizing pulses, NTSC! Well, sort of. I know, you’re getting sick of the curve
vertical synchronization serrations, post-equalizing pulses, balls. Although it’s true we can output that many active
and blank lines. Figure 5 should clear all that up for you. pixels, the unfortunate reality of NTSC video is that there
There are at least 20 vertical synchronization lines in are areas of a picture that may or may not be shown. The
each 262.5 line field, which leaves 242.5 active video lines two basic restrictions are the action-safe area and the title-
per field, or 485 active video lines per frame. To be honest, safe area. Long story short, we will use action-safe because
half lines are a bit frustrating to deal with, so let’s make you should be able to see that region on most modern TVs.
72 September/October 2018
By the NTSC specification, the action-safe Figure 6. Horizontal
synchronization and
area is defined as 93 percent of the total picture. active video.
Because we are running a 12.5 MHz pixel clock
and generating 658 active pixels, this results in 612
action-safe pixels. To make the math easier, let’s
shrink that to 600 horizontal pixels.
We need to retain the 4:3 aspect ratio of a
standard definition television. This leaves us with a
vertical resolution of 450 lines, which is exactly 93
percent of 484 vertical lines! Our final resolution is
600x450, which is a bit non-standard. That’s okay! If
you look at past video game systems and computers
that output NTSC, they all ran at non-standard
resolutions.
SRAM Interface
Enough with that cryptic NTSC video standard!
Time to move on to the SRAM, which is a bit easier
to manage. I suggest you follow along with the
device’s datasheet while reading this section. The
SRAM Chip Enable (#CE) signal is hard-wired low
on the shield to enable continuous selection. This
simplifies the SRAM controller logic and because
of this, a read operation depends entirely on the
Output Enable (#OE) signal. Data is available 10 ns after the current horizontal sample and vertical line in a pair of
an address change. However, it’s not valid until 4.5 ns after registers (h_count_ff and line_ff).
#OE transitions low. Let’s look at some important sample and line numbers.
The write operation is a little different. The address For horizontal synchronization:
must be stable for 0 ns before Write Enable (#WE)
transitions low. Yup, zero setup time! The #WE signal must • Front Porch: 19 samples / 1.52 µs
then be held low for 8 ns and the address
must continue to remain stable for 2 ns C1, C2, C3, C5, C7, C10, C11 0.1u 445-14600-1-ND
after #WE transitions high. This translates C4 27p 399-9341-1-ND
to a minimum write cycle time of 10 ns. C6, C8 10u 478-8150-1-ND
The exact details of the SRAM controller
module will be outlined later in the article. C9 0.01u 445-14599-1-ND
J1 MD-40SM CP-2240-ND
Verilog Design J2 RCJ-014 CP-1403-ND
We are done with the hardware! Time L1 68u 445-15774-1-ND
to talk about the Verilog logic. The NTSC R1, R3, R6 510 311-510ERCT-ND
module (ntsc.v) consists of a pixel clock
R2, R4, R7 1K 311-1.0KERCT-ND
(pixel_clock.v) and a sync/pixel generator
(ntsc_sync.v). The pixel clock divides the R5, R8 2K 311-2.0KERCT-ND
50 MHz Mojo V3 clock by four and emits R9, R10, R11 75 311-75ERCT-ND
a 20 ns tick at 12.5 MHz. This keeps the
sync/pixel generator synchronous with the R12, R14, R16 374 311-374FRCT-ND
Mojo V3 master clock. That’s pretty simple! R13, R15, R17 301 311-301FRCT-ND
Unfortunately, the sync/pixel generator is a
U1 AD723ARU AD723ARUZ-ND
bit more complicated.
The sync/pixel generator outputs the U2 ASV-14.31818MHZ-EJ-T 535-9310-1-ND
current pixel coordinates as well as the U3 AS7C38096A-10TIN 1450-1067-ND
horizontal and vertical synchronization
Stackable Headers Embedded Micro Digi-Key Part #s
signals. To accomplish this, it keeps track of
September/October 2018 73
pixels each) on the screen. The pattern linearly
increases the red and blue values on the horizontal
axis (four blues for each of the eight reds) and
increases the green value on the vertical axis (eight
greens). The color bar test is rather simple: Each of
the eight full-scale RGB values are displayed as a
series of eight vertical bars on the screen. The video
portion is done!
Let’s take a look at the SRAM controller
(sram_ctrl.v). The controller accepts a read or write
command and executes via a finite state machine.
Although the SRAM is capable of 10 ns operation,
the state machine takes 60 ns to complete either
operation. I know, that’s rather slow, but it simplifies
Figure 7. NTSC test module output. the coding. The Verilog logic should be self-
explanatory.
To test the SRAM, I wrote a series of test
• Sync Tip: 59 samples / 4.72 µs routines (sram_test.v). The first test is a data bus test (data_
• Half Line: 397 samples / 31.76 µs bus_test.v), which tests each data bus line (DQ0 to DQ7).
• Full Line: 794 samples / 63.52 µs The pseudo-code is:
• Active Region: Samples 165 to 764 (x = 0 to 599) / 48 µs
write DQ0 (0x01) to 0x00000
verify DQ0 at 0x00000
For vertical synchronization: repeat for DQ1 through DQ7
• Pre/Post-Equalization Pulse: 29 samples / 2.32 µs The next test is an address bus test (addr_bus_test.v),
• Vertical Serration: 59 samples / 4.72 µs which tests each address bus line (A0 to A19). This test is a
• Pre-Equalizing Pulses: Lines 0 to 5 bit more involved:
• Vertical Serrations: Lines 6 to 11
• Post-Equalizing Pulses: Lines 12 to 17 initialize A0 (0x00001) through A19 (0x80000)
with 0xAA
• Half Line: 18 (even) and 525 (odd)
• Field End: 524 (even) and 525 (odd) write 0x55 to 0x00000
• Active Region: Lines 58 to 507 (y = 0 to 449) verify A0 through A19 unchanged
write 0xAA to 0x00000
By convention, we’ll start each frame with line one, write 0x55 to A0
which is the first line of the odd field. The vertical line verify 0x00000 and A1 through A19 unchanged
write 0xAA to A0
register increments by two to generate the interlaced video repeat for A1 through A19
signal. You may notice that the vertical line register actually
counts to 526 lines. This is a simple hack to solve the half The final test is the device test (device_test.v), which
line problem. verifies that each address can hold both a zero and a one
The synchronization signals are enabled and disabled bit. This test is fairly straightforward:
based on the horizontal sample number and vertical line.
Additionally, the active video signal (active_video) indicates write 0x00 to 0x00000
write 0x01 to 0x00001
that the sync/pixel generator is in the active video region. repeat through 0xFFFFF
Therefore, the pixel coordinates are valid. verify 0x00000 through 0xFFFFF
To test the NTSC module, I wrote a test module (ntsc_
write 0xFF to 0x00000
test.v) which implements a font ROM test (font_test_gen.v), write 0xFE to 0x00001
a palette generator (rgb_332_palette.v), and a color bar repeat through 0xFFFFF
generator (color_bars.v). The font ROM test prints all 256 verify 0x00000 through 0xFFFFF
characters in the included 4 KiB font ROM, which is based
on the classic Code Page 437 VGA 8x16 pixel character The results of the tests are displayed on the Mojo
set. If you’re a DOS veteran, you will remember it well! V3 LEDs (*LED0 *to LED2) and the final test complete
The test prints the characters in a 64x4 matrix at indication is indicated on LED7.
the top of the screen. Next, the test module outputs the
complete 256-color palette in a 32x8 block pattern (16x16
74 September/October 2018
Testing miniature computer using the NTSC shield as the video
sub-system!
Several Verilog test benches are included to verify the I’d like to acknowledge Dr. Pong P. Chu’s book,
operation of the video and SRAM test modules. The NTSC FPGA Prototyping by Verilog Examples. The book was
test benches generate a BMP file to simulate viewing the instrumental to me understanding how to implement a
output on a television screen, as seen in Figure 7. The SRAM controller. The book also provided insight on how to
code converts the eight-bit 3-3-2 RGB color to a 24-bit implement a video controller. Although Dr. Chu references
RGB color to prevent having to deal with indexed palettes the VGA standard, it was helpful for me to translate it to
in the BMP file. the NTSC standard. Until next time, have fun! NV
Conclusion
There are some issues with the
NTSC shield design. At this point,
ALLELECTRONICS.com
Surplus & New Parts & Supplies since 1967
there is no way to turn on and off
the video signal via the FPGA since
the AD723 enable is hard-wired.
Order Online or Toll Free 1-800-826-5432
The same is true for the SRAM, as 25FT CATEGORY WATERPROOF AUDIO
we discussed earlier. Additionally, 5E PATCH CABLE TRANSDUCER
the NTSC sync/pixel generator Snagless molded RJ45, These transducers produce
depends on a lot of combinational 350Mhz, UTP, Pure Bare sound by conducting
logic. This can be tightened up with Copper stranded 24AWG, Blue vibrations into the surface
more registers and it’s something I’m CAT# CB-525 they are attached to.
2
$ 50 10 for $2.25 each Connect to an audio source and press it
planning on fixing in the future. 100 for $1.85 each against the nearest table, wall or cardboard
each
There are also some issues with box and hear surprisingly good sound re-
the video output. You will notice 0.95" SPHERICAL MAGNET production. Waterproof and heat resistant,
dot crawl on the composite output they are ideal for marine, RV, sauna or golf
0.95" (24.5mm) spherical magnet, cart. 2.4” diameter. 8 Ohm, 20 Watt.
when looking at the color bars. This possibly neodymium, with a fairly
is normal at the boundary between strong pull. Black in color with a
CAT# AT-20
2 for $
2900
two different colors, but it can be
distracting.
shiny metallic finish.
CAT# MAG-162 1
$ 50
each
36" MICRO-USB CABLE -
Another issue is pixel jitter. 4-OUTLET POWER STRIP VERY SPECIAL PRICE
This happens because the AD723 WITH 10 FT. CORD We just received a bunch of
is operating asynchronously from these Micro-USB to USB
Compact, power cables, and we'd like to
the Mojo V3. To fix this, the NTSC distribution strip with move them. One of
shield would have to be redesigned 15A circuit breaker/ the most popular
lighted power switch.
to send the 14.31818 MHz color charge and sync cables for smart phones,
Heavy-duty 10' tablets, cameras and other portable devices.
burst oscillator to the Mojo V3. 14/3 power cord with Connects to USB port in cars, computers
Clock domain crossing logic would space-saving right-angle and chargers. 3' overall length.
be needed to synchronize the two plug. Keyhole slots in rear to
CAT# CB-427
allow wall or desk mounting.
1
$ 50
systems. You know what? I’ll leave 10 for $1.25 each
that as a fun project for you!
So, what can we do with this
9.25" x 1.60" x 1.20" high. cULus. $
CAT# PST-40 7 95
each
each
100 for $1.00 each
92 PIECE ASSORTMENT OF
thing, anyway? Well, you already have HIGH-VOLTAGE TASER GEARS, PULLEYS, AXLES ETC.
a 256 font ROM at your disposal. COMPONENT Large set of 92
It wouldn’t be too tough to write Converts 3.7 Volts to approx- various sized
a video interface for the Mojo V3 imately 18,000 Volts. The main plastic gears,
serial port. With the 1 MiB SRAM, component in a taser/ stun gun, racks, wheel set,
it creates quite a spark and a loud pulleys, belts and
you could certainly make a video crackling noise when the probes axles. A lot of stuff
game system on the Mojo V3. Oh, I are within 1/2" inch of each other. at a nice price!
forgot to mention! The NTSC shield is 1.35" x 1.55" x 0.31". The output CAT# GR-53
9
leads have pointed probes attached.
compatible with the Embedded Micro $ 95
SDRAM shield. Put a soft processor
core on the FPGA and design a
Warning: Operate carefully!
CAT# HVS-01
$
950 each
set
September/October 2018 75
Mass Confusion By C. A. Hamilton
vmetrix@comcast.net
The End
of the Kilogram
as We Know It
This November, in Versailles, France, representatives from 57 countries are
expected to make history. They will vote to dramatically transform the international
system that underpins global science and trade. This single action will finally realize
scientists’ 150 year dream of a measurement system based entirely on fundamental
properties of nature. Photo Credit: J.L. Lee/NIST
The International System of Units, informally known as the metric system — the way in which the
world measures everything from coffee to the cosmos — will change in a way that is more profound
than anything since its establishment following the French Revolution.
•
It will be a turning point for humanity.
•
E
very day, scientists and engineers use measurements So, let’s talk about the volt. The volt is a derived unit
in design and research, but most of us give little which means that once the kilogram, meter, second, and
thought to the basic definitions of our measurement ampere are defined, the equivalence of mechanical and
system, and fewer still know that in the next year those electrical power dictates the definition of the volt. See the
definitions are in for some major changes. Take the volt, for formal definition below.
example. The creation of the metric system in 1790 was the first
Readers of this magazine ought to know the definition time that scientists had the idea that measurement units
of the volt, but I’ll bet that most don’t. I graduated with should be connected with constants of nature. At the time,
three engineering degrees and at the time, I could not have the Earth itself was seen as the best constant of nature. So,
told you the definition of the volt. Last year, at my 50th the second was defined as 1/86400 of a day, the meter
college reunion, I gave a seminar in the EE Department on was a best estimate of 10-7 of the distance from the equator
electrical metrology. Most of the EE professors and many to the north pole, and the kilogram was taken as 10-3 of the
students were present. I asked, “Who knows the definition weight of a cubic meter of water.
of the volt?” … Silence. Since neither the surface of the Earth or a box of water
make useful working standards, the formal definition of the constants that are more fundamental than the details of the
meter became the distance between two scratches on a Earth. With the invention of atomic clocks, the second was
platinum iridium bar, and the kilogram became the mass of the first quantity to be redefined in terms of a fundamental
a cylinder of platinum-iridium. Both these artifact standards constant and is now defined as the duration of 9 192 631
have been preserved for more than a century in a vault at 770 (fcs) oscillations of the Cesium atom.
the BIPM (Bureau International des Poids et Mesures) near In 1983, the invention of lasers allowed the speed of
Paris. light to be defined as c = 299 792 458 m/s thus defining
Beginning about 1900 with the development of the meter.
quantum mechanics, it became clear that nature has
Figure 2. This
apparatus
compares
electrical and
mechanical power
and is generally
referred to as a
watt balance (BL ≈
50 Vs/m).
September/October 2018 77
knowledge of the magnetic field or the coil geometry. labs for almost four decades. After many redesigns and
In force mode, a current I is applied to the coil to millions of dollars, the goal of three parts in 108 is clearly in
produce a force IBL to exactly balance the gravitational sight. Independently designed experiments that are going
force Mg (g = acceleration of gravity) of the unknown on now around the world should soon confirm the viability
mass. So, we have: of a quantum-based mass standard. If all goes as planned,
Mg = IBL or M = IBL / g the kilogram redefinition will occur in November of this
year.
Assuming the product BL has not changed between Looking at the big picture, over the last seven
the two modes, we can substitute the measurement of BL decades, the legacy artifact standards (meter, kilogram,
to get: second, and ampere) have been used to measure the
M = (I V) /( S g ) constants of nature with ever greater accuracy; in each
or case, reaching an accuracy limited by the stability of those
MgS = IV (Mechanical Power = Electrical Power) legacy standards. Going back to the original idea that our
measurement system should be based on the constants of
V, S, I, and g can all be quantum-based measurements nature, the obvious path is to assign defined values to the
as described above. The equation above shows that this electron charge e, Planck’s constant h, the speed of light c,
apparatus equates electrical and mechanical power, so and the cesium oscillation frequency ƒcs (or some similar
it’s commonly called a Watt Balance. As a result from the quantum frequency).
Josephson equation for voltage of the volt, when we place With those four definitions soon to be formalized, all
a known mass on the balance, the experiment boils down the quantities mass, distance, time, energy, power, voltage,
to a measurement of Planck’s constant h in terms of the current, and resistance will be measured in units derived
kilogram, meter, and second. from fundamental constants.
Conversely, by defining the value of h together with For metrologists, this is an earth-shaking change, but
already defined values of c and ƒcs, the kilogram becomes since the values of the fundamental constants will be
a quantum-based unit wholly derived from the definitions chosen to align the old and new measurement systems,
of e, h, c, and ƒcs. most of us will not notice the difference.
Needless to say, driving the uncertainty of this mass
measurement below three parts in 108 is a daunting task •
that has been pursued at NIST and other national standards THE PROJECT
As a science project in do-it-yourself physics, it’s fun
to imagine other ways to make a mass measurement by
equating mechanical and electrical energy; something
simple that might achieve 1% or better accuracy. My
first thought was to use a DC motor to lift a mass M at a
constant speed S.
Assuming no losses, we can equate the electrical
power into the motor to the mechanical power of lifting M,
so we have:
IV
P = IV = MgS and M =
gS
I gave this a try, but unquantifiable losses in the
motor and particularly the gear head made this method
unacceptable.
From the point of view of universal elegance, the
motor lifting experiment — as well as the watt balance
experiment described above — fall short because both
measurements must be performed in a measurable
gravitational field. If we were traveling in a space ship to
A Better Way
The gravity and gear head problems can be avoided if,
instead of lifting the mass, we measure the energy required
to spin a mass. Physics 101 tells us that the energy of a
solid spinning cylinder is:
(π2 / 4) MD2 ƒ2
September/October 2018 79
Figure 6. The schematic of the PCB in Figure 5
only pin 13 sets the count at 16369, yielding a time delay article downloads.
of 5.856 s. My motor was harvested from a defunct CD drive.
At the lower right is U4 — the VT integrator that I turned up the brass cylinder on my mini-lathe. Suitable
is started and stopped by relay K12. Switch S4 selects disks in brass (~$20) or steel (~$5) are available from
resistive feedback through R31 for simply amplification, McMaster Carr. To run the experiment, you’ll also need
or capacitive feedback through C31 for integration. In a ±15V DC power supply, a digital voltmeter, and a
integration mode, the U4 output ramps up at a rate frequency counter or oscilloscope.
proportional to the voltage input. Button B3 shorts the
capacitor and resets the output to zero.
I designed the circuit using parts available in my shop, CALIBRATION
but if you buy it all, the total will be about $60 plus the The circuit of Figures 5 and 6 has five modes of
PCB. The PCB and its layout files are available with the operation: four calibration modes and one run mode. In
mode 1, we’ll calibrate integrating amplifier
U4 by applying a 10.00V reference voltage
input for a precise time and then adjust the
gain so that Vout equals exactly 0.1VT. The 10V
reference voltage and Vout are both measured
with our voltage standard: an Agilent 34420
six-digit voltmeter.
In mode 2, we calibrate the motor voltage
by correcting out the component of motor
voltage caused by the motor resistance. With
25 mA applied to the motor, we prevent the
motor from spinning so that the motor voltage
is I Rm where Rm is the resistance of the motor.
Trimpot VR30 is then adjusted to subtract
the voltage I Rm from the input to the integrator.
Figure 7. Motor current as a function of motor voltage. This ensures that the part of the motor
voltage associated with resistive loss is excluded from the
80 September/October 2018
Cylinder Diameter (D) m 0.0351 0.0351 0.0351 0.0351 0.0351 0.0351 comparator U3 trips off. This
Applied Current A 0.0209 0.026 0.0317 0.0317 0.0317 0.0399
sets the spin-up stop point at a
known frequency ƒs, measured as
Friction Current A 0.01 0.01 0.01 0.01 0.01 0.01 described previously.
Effective Current (I) A 0.0109 0.016 0.0217 0.0217 0.0217 0.0299 Mode 5 is the main
Measured VT V-s 35.9 21 14.6 25.8 30.2 19 measurement mode — what we’ve
Max RPS (F) Hz 23.81 23.2 21.7 29.4 32.26 30.3 been getting ready for. Press the
reset button to zero the integrator
Calc Mass Kg 0.227 0.205 0.221 0.213 0.207 0.204
and the start button to start the
Table 1. Experimental Results. spin-up and the VT integration. When the rotation rate ƒ
reaches the set point ƒs, latch U3 will turn the motor and
integrator output Vout. the integration off. The DVM will read the 0.1VT product —
In mode 3, we measure the motor voltage as a the last data point needed to calculate M.
function of motor current when the motor is running at Table 1 is a spreadsheet showing experimental
constant speed. Since there is no other load, all the motor data and the resulting mass calculation for a range of
current is used to overcome friction. drive currents I and cut-off frequencies ƒs — all of which
In Figure 7, we can see that the current required to should produce the same result. The scatter of the results
overcome friction varies only from about 9 to 11 mA over in Table 1 is a measure of the uncertainty of the mass
the range from 0 to 7V So, in a spin-up from 0 to 7V, we determination.
can compensate for friction by subtracting 10.0 mA from The average of the five measurements shown is 0.213
the measured motor current. Kg. I would expect it to be slightly high because I havn’t
In mode 4, we set the integration stop point to accounted for the mass of the rotating parts in the motor
occur when the rotation rate ƒ is at a precise value. With which add about 1% to the total moment of inertia. My
7V applied to the motor, adjust VR11 slowly CW until kitchen scale gives the mass of the rotating cylinder as
0.210 Kg.
Mass Experiment Parts List This little science project tries to give an inkling of
the complexity of metrology research. It
4 TL071IP U3,U4,U5 Operational Amplifier touches a multitude of areas in physics,
1 AD620ANZ U2 Instrumentation Amplifier electrical engineering, and metrology
1 LM7171BIN U1 Op-Amp 100 mA including energy, power, and moment
2 AGN20012 K12,K40 12V DPDT Relay of inertia calculations, op-amp circuit
1 LT1460GCZ-10#PBF U6 10.00V Reference design, DC motors, error correction,
1 LS7210 U7 comes with PCB Programmable Timer and uncertainty analysis — a perfect
3 LEDs 11,12,40 Red LED combination for a physics or EE lab
1 H21A1 OC1 Slotted Optical Switch experiment.
2 2N3904 Q15,Q40 NPN Transistor
The idea of a fundamental
measurement of mass using a motor and
4 EVQ-11A04M B1,B2,B3,B4 Tactile Switch
a spinning flywheel was chosen because
3 1N914 D12,D30,D40 Diode
it’s doable with modest hardware and
1 MFR-25FBF52-49.9 R3 Resistor 49.9 ohms 1% effort. I’m sure that NV readers will
2 MFR-25FBF52-1k R12,R64 Resistor 1K see a multitude of refinements and
1 MFR-25FBF52-4.7k R61 Resistor 4.7K improvements — that is the stuff of
4 MFR-25FBF52-15k R1,R11,R13,R14 Resistor 15K metrology.
3 MFR-25FBF52-10k R2,R41,R42 Resistor 10K 1% Refinement of the much more
5 MFR-25FBF52-47k R15,R40,R50,R51,R62 Resistor 47K 1% complex watt balance is a process that
2 MFR-25FBF52-100k R30,R31 Resistor 100K 1% continues in multiple national standard
1 Digi 496-2316ND C40 Capacitor 0.01 µF laboratories around the world and is
11 Digi 478-3192ND Bypass at op-amps Capacitor 0.1 µF homing in on a mass uncertainty of
3 Digi 399-4390ND C1,C12,C64 Capacitor 1 µF three parts in 100,000,000 — roughly
3 Digi 493-1548ND C31,C40,C50 Capacitor 100 µF
the weight of a fly’s wing relative to the
kilogram. When that happens, the metric
1 Jameco 2217781 M1 DC Motor
system will finally be defined in terms
1 McMaster Carr 7786T12 Flywheel Flywheel, Steel of the speed of light, the charge on an
A limited supply is available in the NV webstore and comes with the electron, the Planck constant, and the
1 PCB
LS7210* (U7). Gerber files are also available in the downloads. Cesium frequency. NV
September/October 2018 81
Musical Kits
Altura Theremin
MIDI Controller Kit Macchiato Mini Synth Kit
82 September/October 2018
To Order Visit
store.nutsvolts.com
or call
1-800-783-4624
September/October 2018 83
■ BY LOU FRENZEL W5LEF OPEN COMMUNICATION
W hat do you think of when you hear the term antenna? Do you picture a cell phone
tower, an old TV antenna, a vertical whip antenna used for CB radio, or a wire
antenna used by hams? Or, something else completely?
Antenna Types
Different types of antenna elements are used to make
up an array. Those commonly used in phased arrays are the
dipole and patch; refer to Figure 1. The dipole is a basic
half wavelength conductor fed at the center. A patch is
usually a half wavelength copper square on a PCB. Other
antenna types have been used. The spacing between the
antenna elements varies with the design but is generally a
little more or less than a half wavelength.
Remember the relationship between frequency (f) Figure 1. Common antenna types: (a) half wave dipole; (b) patch.
and wavelength (λ):
September/October 2018 85
THE LATEST IN NETWORKING AND WIRELESS TECHNOLOGIES
Post comments on this article and find any associated files and/or downloads at
www.nutsvolts.com/magazine/issue/2018/09.
MIMO
Phased array antennas can also
be used for multiple input multiple
output (MIMO). MIMO is a technique Figure 6. The Anokiwave AWMF-0139 IC contains four antenna modules.
that transmits the same data with multiple These ICs are mounted on the back of the PCB with the patch array on the
antennas over the same path in the same front.
bandwidth. This does two things.
First, each signal takes a slightly different route to the For example, the 256-element array could be arranged
receiving antennas. The result is less fading and greater to provide four 64-element arrays or sixteen 16-element
data reliability. Second, MIMO multiplies the data rate by arrays. With beam steering capability, the signal path can
a factor that is determined by the number of transmit and be optimized for best performance.
receive antennas. Common configurations are 2 x 2, 4 x 2, Also, 5G cellular radios operating in the millimeter
4 x 4, and 8 x 8, where the first number is the number of wave bands will use MIMO to give gigabit data rates. The
transmit antennas and the second number is the number of big hurdle is putting a phased array into a smartphone
receive antennas. handset. Initially, two antennas will be used and later will
A multi-element phased array can be partitioned into be increased to four. MIMO is also widely used in Wi-Fi
sections making it suitable for some MIMO applications. routers. NV
88 September/October 2018
SAVE 20%
INSPIRATION ■ INNOVATION ■ IMPLEMENTATION ■ COMMUNIT Y
Use Code
September 25-27, 2018 Servo20
Santa Clara Convention Center, Santa Clara, CA
Take Your
INSPIRATION ■ INNOVATION ■ IMPLEMENTATION ■ COMMUNITY
Career to
the Next Level
2018 Features Expanded Plus!
Opportunities: ■ Pre-Conference Workshop
■ 25 sessions designed specifically on Big Data
for engineers ■ A 1-Day Deep Dive into AI
■ 9 sessions on building your ■ 6th Annual Pitchfire Start-up
robotics business Competition
■ 60+ sessions that meet the ■ VC Office Hours at the
needs of the entire industry Start-Up Incubator
■ Demos from leaders in the
robotics industry
A Camera for the Raspberry Pi get it?). Without its IR filter, this camera images visible and
reflected infrared light. Meaning it’s a terrific camera for
My final challenge in designing the Raspberry Pi flight detecting the chlorophyll of green plants. I then discovered
computer (after collecting and storing sensor data) was just how easy it is to take and store camera images on the
to add a camera and store its images. So, I did an online
search for Raspberry Pi cameras and found the camera and Figure 1
code. Best of all, I found that a second kind of camera for
the Raspberry Pi is available, one called a NoIR camera.
This is a camera without the infrared-blocking filter (no IR,
90 September/October 2018
APPROACHING THE FINAL FRONTIER
Post comments on this article and find any associated files and/or downloads at
www.nutsvolts.com/magazine/issue/2018/09.
Figure 2
Now all I had to do is create a
case for the bare NoIR camera —
preferably one that will let a servo
rotate the camera as well. So, I
applied my beginner-level 3D design
skills to the task of designing and
printing a camera case and rotator.
If successful, this would let a single
camera-servo combination replace
multiple cameras.
My Results
After some hair pulling, I finally have the Raspberry
Pi-based near space flight computer recording both sensor
data and pictures on its SD card. Figure 5 is a screenshot
showing the contents on the Pi’s SD card after a practice
mission.
It’s been a real challenge getting to this point. As I
said last time, the Raspberry Pi and PICAXE work a lot
Figure 4 differently from each other. This has frustrated me at times
because of things like library importing and configuration
Figure 5
A folder and the contents of a file are shown on this monitor. On the left is the open file with the GPS, weather station,
and Geiger counter data. On the right is the folder of the image files recorded by the camera. All I need to do now is
insert a thumb drive into the Pi and copy all the files on to its SD card. I now know how to get the flight data from the Pi to
my PC for further analysis.
92 September/October 2018
Drone License
I’ve mentioned a few times in my column that I have a drone I like to fly (Blade Chroma). I’ve been learning how
to use it as a platform to do amateur science along with photographing my house and my vacations. Many readers
know that in August 2016, the FAA made a pilot’s license for drones (the Part 107 Remote Pilot) available to the
public. Now, every drone pilot making money with his or her drone must first pass this test and receive their license.
Well, in early July, I passed my test (90% of 60 questions) and got my license! I learned the material for free (but
had to pay for the test) and I suspect that many Nuts & Volts readers would like to do the same. So, let me share the
online — and best of all — free materials that I used to learn everything and prepare for the test. Please know that I am
not affiliated with these people nor am I receiving compensation from them. I’m just a happy client.
First of all, a big thanks to Tony Northrup for his excellent free FAA Part 107 sUAS and drone certification study
guide. It’s a great two hour video lecture. However, he did make a mistake at the end. Humid air is less dense than dry
air. Therefore, on humid days your drone props will not be as effective.
Second, hats off to the 3DR (3D Robotics) company. They have over 100 free practice questions online that you
can use to test your knowledge. Some of the questions looked a lot like the questions I got on my test.
Next is Rupprecht Law P.A., which is a law firm with a drone law specialty. Jonathon’s emails asked some very
tough questions that really test just how much you understand about Part 107 and reading sectional charts. Sectional
charts can be a complex mess in some places and you’ll want to get proficent at reading them. If you need help with a
future drone business, this law firm is there to help you.
Finally, being no slouch in making the skies safe for air travel, the FAA has put out a Part 107 study guide. Be sure
you read it as you are prepare for your test.
Tony Northrup
https://northrup.photo/free-faa-part-107-suas-drone-certification-study-guide
3DR (3D Robotics) Company
https://3dr.com/faa/drone-practice-tests
Rupprecht Law P.A
https://jrupprechtlaw.com/part-107-knowledge-test.
FAA Part 107 Study Guide
https://www.faa.gov/regulations_policies/handbooks_manuals/aviation/media/remote_pilot_study_guide.pdf.
Parallax Board of Education Full Kit BOE Full Kit $98.90 0603ZD98
48W Soldering Station
USB version with Stamp and USB Cable. Parallax 7.5V Power Supply $8.95 Temp. Controlled
$15.25
310oF~840oF
happens; too high a field does deg C at reasonable currents like a transistors. Why? Because the reverse
no harm. Make sure the field you few milliamps. This works pretty well temp curve cancelled the xistor
generate is in the same direction as for silicon diodes like the 1N400x temp curve. So, we built several little
the magnet or you’ll wipe out any and the 1N914. It also works well for circuits to monitor the temp. So, a
remaining magnetism and possibly the base-emitter junction of a silicon series circuit that lets a low current
reverse its polarity. planar transistor (almost anything in through your diode, monitored with
Robin Hartley a TO-92) — especially if you short out a sensitive meter, will give a value for
New Zealand the base-collector junction. I haven't different temps.
tried it, but I think it doesn't work as Caution! Some diodes are
#4 I'm not sure that time is the well for point-contact germanium sensitive to light, so take that into
cause of loss of magnetism of diodes like a 1N34 (which might account. The 1N914 and 4148 were a
permanent magnets. They normally include your “crystal” diodes). common device. Never messed with
lose their magnetism by three Joseph Feng the gallium devices. Just be cautious.
methods. San Jose, CA They are easy to let the smoke out.
1. Heat. Good luck in your endeavors.
2. Physical shock. #2 I’m not certain what you mean Tom Sides
3. Exposure to opposing magnetic by “crystal diodes” but most modern Phoenix, AZ
field. semiconductor diodes can be used
I have two large toroidal magnets as temperature sensors. A standard [#7181 - Jul/Aug 2018]
which sit on a tube with opposite silicon diode will have a forward Smooth LEDs?
poles facing each other. The top voltage drop, usually stated as “0.6V” What makes some LED
magnet ‘floats’ about 2 cm above or “0.7V.” However, it varies with replacement bulbs dimmable,
the bottom one. They have been like temperature. Typically it will drop while others are not? Some of the
this on my workbench for at least about two millivolts per degree C. By replacements I have purchased do not
10 years and there is no discernible measuring that drop and calibrating dim very smoothly. They seem to dim
difference in the distance between at two extreme temperatures, the in steps and then just turn off before
them, so I don’t believe they have lost current temp can be determined. lowering to where I need them to be.
any of their magnetism. The diode should have its The previous incandescents dimmed
The magnets weigh about 100g cathode connected to ground and the much more smoothly down to a
so the force required to hold the anode should have a resistor to the soft glow. Is there a different (maybe
floating magnet against gravity is positive supply. The voltage measured more expensive) type/technology
about one newton. I have no idea between the junction of the resistor / that would more closely emulate
where the energy to do this for 10 anode and ground will be the forward the incandescents? I’m using an X10
years has come from and I have not voltage to measure. controller for the dimming. Could this
found a physicist who can provide a If by crystal diode you mean be the problem?
satisfactory answer. I will keep asking! the old “cat’s whisker” crystals (e.g.,
Mike galena), I suspect they will have much #1 Different bulbs behave
via Internet lower voltage drop. However, it will differently, so you have to try some
probably still show a temperature options. There are some test results
[#5185 - May/June 2018] sensitivity, so may work. Silicon on the X10 Forum that you might find
Measuring Heat With Crystal diodes work pretty well. useful. X10 dimmers dim in 16 levels,
Diodes For an indepth explanation so some bulbs may not dim smoothly.
I have a bunch of crystal diodes with lots of math and theory, look Bruce Robin
in my junkbox that I want to use to here: https://www.eetimes.com/ Naples
measure heat. I seem to remember a document.asp?doc_id=1279718.
circuit for it some years back. Anyone William Cooke #2 I can’t answer specifically what
have a simple circuit or explanation of Clarksville,TN is different about dimmable LED
how it should work? lamps, but will note that the type of
#3 Texas instruments always dimmer is important. You need to use
#1 Theoretically, the forward- encouraged its engineers to use a dimmer specifically designed for
biased voltage drop is about -2.2 mv/ a diode in the emitter of their LED lamps.
September/October 2018 95
>>>YOUR ELECTRONICS QUESTIONS ANSWERED HERE BY N&V READERS
I have had good luck with Lutron Bill van Dijk bars, etc., due to the timing between
CL dimmers that are made specifically Carp, Ontario your camera’s shutter and the TV’s
for LED lamps. These are not X10; screen image refresh.
I have not seen any X10 dimmers [#7182 - Jul/Aug 2018] 2. Install a stand-alone DVD
for LED lamps. Also note that X10 TV Image Capture recorder between your cable box and
light controls generally only work What’s the best way to capture TV, or connect the recorder to your
for incandescent lamps; they need images from my TV? I’m looking to TV’s video out jack using a suitable
a bit of current flowing through the do something like a computer “print interface cable. What you’ll do is
filament to work correctly. screen.” record the program to the DVD (use
For LED lamps, I have used the DVD-R discs) and use the machine to
relay based X10 switch WS13A with #1 This would be most easily finalize the recorded DVD (make it
good success. It also works with CFLs. accomplished using an HDMI splitter playable on other DVD drives) when
Dan Koellen AI6XG and an HDMI-capture device used the recording is complete.
Roseville with your computer. Then, play that DVD on your
HDMI-capture devices can computer’s DVD drive; use the
#3 An LED is a beautiful dimmable be external (to the computer) for computer’s playback program (i.e.,
device; lower the current, and the PC or Apple machines, or can be Media Player for Windows) to
output brightness goes down. This implemented as a pluggable card get to the screen to capture; then
can be done through simple resistors, for use with a PC desktop machine PAUSE the playback. Use the image
or through PWM (Pulse-Width (assuming that the machine has capture feature of the player to take
Modulation). That is the good news. an unassigned motherboard PCIe a snapshot of the video image, then
In order to use an LED as a house connector available). save it to your disc. Be aware: The
incandescent lamp replacement, Connect the splitter to the resolution of the DVD-recorded
something needs to be done to make television program source — e.g., a material will be no better than the
that possible. First of all, the voltage cable box. Using an HDMI cable, video signal (Composite, S-video,
is WAY too high; it is AC (the LED connect one of the splitter outputs HDMI) fed to the recorder.
prefers DC), and we need to feed to the television set. Using a second After you’ve screen captured your
it the correct current. So, a power HDMI cable, connect the remaining images to your computer, use your
supply module is included to convert splitter output to the HDMI-capture Image Editing utility to clean up, etc.,
the 120 (or 220) volt AC to some device. the images for your use.
small DC current appropriate for the Record the program material Now then, there’s a more
LED used. using the software provided with the expensive way to do it. It involves
Herein lies the problem. This PS HDMI-capture device. See Newegg et installing a video capture card into
module is designed to deliver x mA to al., for available devices. your PC. Like the DVD recorder
the LED more or less regardless of the Peter A. Goodwin option, you’ll have to patch the video
input. When you adjust the input, the Rockport, MA signal from the cable box or TV’s
PS module tries to compensate to the Video Out into your video capture
point where it no longer can — often #2 There are two inexpensive ways card.
resulting in a flickering light. These are to do a print screen from a TV screen: This way, you can watch TV
the now non-dimmable LED bulbs. 1. Put a digital camera on a using your PC and — using the Video
To make this “house” LED bulb tripod and set it up in front of the Capture Application Software —
dimmable, a radically different PS screen — ensure the TV screen fills capture a snapshot in (more or less)
module must be built. It must sense the viewfinder and ensure the flash real time. Also, you can record the
that the input has changed (due to is off. When you want to capture program — while you’re watching it —
the dimmer setting), and adjust the something, just take a picture of the to your PC and edit/manipulate the
LED current accordingly. Not easy to screen. recorded material at your leisure.
do and, of course, more expensive. After that, connect the camera to The big advantage is your
Several designs have been your PC via USB cable and download captured images will (typically) be the
marketed; some better than others. In the screen capture. Be aware: The screen resolution of your computer’s
most cases, even with a “dimmable” resolution of the photographed display (or at least much better than
LED bulb, a special dimmer is image will be limited by the screen the inexpensive options above).
required. It is a mess, and most still resolution of the TV screen AND Ken Simmons
don’t work perfectly. don’t be surprised if you get screen Auburn, WA
96 September/October 2018
ADvertiser INDEX
Accutrace .................................. 99
Alan’ Electronic Projects ........... 45
All Electronics Corp. ........... 75, 84
■ LOOK FOR ■ SEARCH FOR ■ FIND Find your favorite advertisers here! Autonomous DoD Summit ........ 84
ACTUATORS DESIGN SOFTWARE MISC./SURPLUS DLP Design .............................. 45
Hitec RCD USA, Inc. Labcenter Electronics All Electronics Corp. Electronix Express .................... 93
BATTERIES/ DEVELOPMENT MOTORS / MOTOR ExpressPCB ............................. 10
CHARGERS PLATFORMS/TOOLS CONTROL Front Panel Express ................. 44
Hitec RCD USA, Inc. Technologic Systems Hitec RCD USA, Inc.
ROBOTICS Hammond Manufacturing ......... 17
BUYING ELECTRONIC EDUCATION Electronix Express Hitec RCD USA, Inc. .................. 2
SURPLUS ME Labs Hitec RCD USA, Inc.
All Electronics Corp. PoLabs Keyways ................................... 45
Pololu
Labcenter Electronics ................. 3
CIRCUIT BOARDS EMBEDDED SYSTEMS SDP/SI
Accutrace Saelig Co. Inc. ServoCity Lemos Technologies ................. 45
ExpressPCB Technologic Systems MakerFaire ............................... 21
TEST EQUIPMENT
PCB Fab Express
Saelig Co., Inc. ENCLOSURES Electronix Express Measurement Computing ........ BC
Front Panel Express PoLabs ME Labs ................................... 52
COMPONENTS Hammond Manufacturing Saelig Co., Inc.
PanaVise .................................. 44
All Electronics Corp.
EVENTS TOOLS PCB Fab Express ..................... 68
Electronix Express
Autonomous DoD Summit PanaVise
Octopart Pico Technology ....................... 61
Maker Faire PoLabs
Saelig Co., Inc. PoLabs ..................................... 52
RoboBusiness TRANSFORMERS
DATA LOGGING Hammond Manufacturing Pololu ........................................ 11
Measurement Computing LCDs/DISPLAYS RoboBusiness .......................... 89
Pico Technology Saelig Co., Inc. WIRE, CABLE AND
CONNECTORS Saelig Co., Inc. ......................... 59
DESIGN/ MICROCONTROLLERS All Electronics Corp. SDP/SI ...................................... 45
ENGINEERING/ REPAIR / I/O BOARDS
SERVICES ME Labs WIRELESS PRODUCTS ServoCity ............................ 45, 98
Accutrace Technologic Systems Lemos Technologies Technologic Systems ................ 67
ExpressPCB Technologic Systems
September/October 2018 97
ea ea ea
(408)748-9600
ITAR I SO 9001:2008 UL Approved
Bring your Pi to Work!
Measurement Computing now offers
DAQ HATs for Raspberry Pi®
MCC Raspberry Pi measurement HATs were designed to bring high-quality
measurements to the ubiquitous low-cost computer. MCC DAQ HATs are the
perfect solution for adding professional quality DAQ capabilities to the Pi platform.
Perfect for:
• Embedded system design
• Industrial IoT
• End-of-line test
• Remote monitoring
• Edge Computing
• Validation/verification test
1 YEAR
www.mccdaq.com/DAQ-HAT
Contact us
1.800.234.4232
©2018 Measurement Computing Corporation, 10 Commerce Way, Nor ton, M A 02766 • info @mccdaq.com