0% found this document useful (0 votes)
19 views

circuit-cellar-363-2020

The document discusses the evolution and significance of box-level embedded computing systems, highlighting their role alongside single-board computers (SBCs) in modern applications. It emphasizes the advantages of these systems, such as reduced integration complexity and immediate usability for developers. Additionally, it touches on the design considerations for specialized equipment like power rail probes, which are essential for accurate measurements in electronic systems.

Uploaded by

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

circuit-cellar-363-2020

The document discusses the evolution and significance of box-level embedded computing systems, highlighting their role alongside single-board computers (SBCs) in modern applications. It emphasizes the advantages of these systems, such as reduced integration complexity and immediate usability for developers. Additionally, it touches on the design considerations for specialized equipment like power rail probes, which are essential for accurate measurements in electronic systems.

Uploaded by

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

 


2 CIRCUIT CELLAR • OCTOBER 2020 1363

1111Uel63 October 2020 IISS111521-06011

OUR NETWORK QRCUIT CELLAR® (ISSN 1528-0608) Is publish~ monthly by:

KO< Media Corp.

( • drcuit cellar f iI[. ftHxpress PO Box 417, <Mse City, VA 23924

Periodical rates paid at <Mse Oty, VA, end additioiKll offiCI!S.


One-)'l!llr (12 issue<) sub<criptlon ralr! US and possessions
$50, Canada $65, Foreign/ P!JW $75. AI SIJbscription orders
VOICE•t COIL payable in US funds only via Vtsa, MasterCard, inWIKltional
postal money order, or check drawn on US bank.

~ LinuxGizmos LOUDSPEAKER SUBSCRIPTION MANAGEMENT

Ll S INOUil•Y
SOURCEBOOK OniiM "-llllt .._...........,, circuitcellar.com/ac00101t
Renew I Change Address/E-mail 1 Check Status

CUSTOMER SERVICE

1!-tu•: customerservlce4Pclrcuitcellar.ccm
All Electronics Corp. 77 Phone: 434.533.0246
Mlolt Circuit Cellar, PO Box 417, Chase City, VA 23924
CCS, Inc. 77
Postmaster: Send addross changos to
congatec, Inc. 25 OmJit Cellar, PO Box 417, Chase Oty, VA 23924

EasyOEM 13 NEW SU!lSCRII'HONS

drcuitx:ellar.ccm/SIJbscription
Micro Computer Control Corp. 77
ADVERTISING
IAR Systems, Inc. C3
Contact: Hugh Heinsohn
Newhaven Display International, Inc. 11 Phone: 757-525-3677
Fu: 888-980-1303

PCBWay 9 E-mail: hheinsohnOclrcultceller.ccm


Advertising rates and terms available on request.

Pico Technology 17 NEW PRODUCTS

SlingShot Assembly 43 E-md: [email protected]

Technologic Systems, Inc. C4, 77 HEAD OFFICE

KO< Media Corp.


University of Cincinnati Online 67 PO Box417
Cha~ City, VA 23924
Phone: 434-533-0246

NOT A SUPPORTING COMPANY YET? CDPYRIGitT NOTICE

Contact Hugh Heinsohn Entire contents copyright 11:) 2020 by KCK Media Corp.
([email protected], Phone: 757-525-3677, Fax: 888-980-1303) All rights reserved. Circuit Cellar Is a registered trademark
of KCK Media Corp. Reproduction of this publication In
to reserve space in the next issue of Circuit Cellar. whole or in part without written consent from
KCK Media Corp. Is prohibited.

THE TEAM
DISCLAIMER
PRESIDENT EDITOR-IN-CHIEF ADVERTISING COORDINATOR
KCK Media Corp. makes no warranties and assumes no
KC Prescott Jeff Child Nathaniel Black responsibility or liability of any kind for errors In these
programs or schematics or for the consequences of any such
CONTROLLER SENIOR ASSOCIATE EDITOR ADVERTISING SALES REP. errors printed in Circuit Cellar®. Furthermore, because of
Chuck Fellows Shannon Becker Hugh Heinsohn possible variation in the quality and condition of materials and
workmanship at r!!ader-os~mbled projects, KCK Media Corp.
TECHNICAL COPY EDITOR PROJECT EDITORS disdaims any responsibility for the sofe and proper function
FOUNDER
of reader-assembled projects bas~ upon or from plans,
Steve Ciarcia Carol Bower Ken Davidson descriptions, or irlormation published in Circuit Cellar®.
David Tweed
GRAPHICS The irlormation provided in Circuit Celar® by KCK Media
Grace Chen Corp. is for educational purposes. KO< Media Corp. makes
no claims or warrants that readers have a right to build
things based upon these lde1ts under pat:l!nt or other
relevant intelectual property law In their jurisdiction, or
that readers have a rl!lht to construct or operate any of
COLUMNISTS the devices described herein under the relevant patent or
other intellectual property law of the reader's jurisdiction.
Jeff Bachiochi (From the Bench), Bob Japenga (Embedded in Thin Slices), The reader assumes any risk of Infringement liabifity fu r
Robert Lacoste (The Darker Side}, Brian Millier (Picking Up Mixed Signals), constructing or operating such devices.
and Colin O'Fiynn (Embedded Systems Essentials} © KCK Media Corp. 2020 Printed In the United States
circuitcellar.com 3

The Box as a Component

E mbedded system design is a broad


landscape. For a large segment of
applications, microcontrollers are the
main computing and control element-a
key focus for Circuit Cellar obviously. But when you
move above that realm, into the so-called mid- and
It's difficult to get one's arms around all the
variations in today's box-level systems. In this issue's
Datasheet section, we focus narrowly on the "embedded
PC" segment, but it truly is a vast arena that's hot with
design activity. Beyond the generic embedded PC type,
there are flavors of box-level systems of all kinds-
high-end ranges of embedded computing, single-board vehicle computers, vision systems, AI/IoT processing
computers (SBCs) have been the traditional center of systems, systems targeted for railway applications,
gravity. By center of gravity I mean that all the elements digital signage boxes and more.
of a system needed to revolve around the SBC. Because Box-level systems are often being used and upgraded
most systems needed a variety of functions beyond the in much the same ways that SBCs have been. When
SBCs, an SBC would often need to be in some standard new levels of processing and memory are available,
form factor, and connect with compatible I/0 boards, system developers can swap in a new box. Connectivity
DSP boards or whatever over some sort of standards- has become simpler too in these days where IP-based
based parallel bus-or serial buses in more recent Ethernet networking is a straightforward way for box-
times. This meant choosing a bus architecture, a card level subsystems to communicate and interoperate with
cage and an SBC, plus any additional I/0 to fulfill your each other.
system requirements. Another advantage of box-level systems is that they
In some high-end systems-or legacy systems- off-load whole phases of engineering from your system
such slot-card style systems are still popular. But as development process. Instead of integrating hardware
levels of chip and module integration progressed, such and OS software yourself, it's already done for you.
systems no longer made sense for many applications. Meanwhile, environmental testing-for temperature,
Instead, what's emerged are a myriad of box-level vibration and so on-are done by box-level system
systems. These complete system boxes provide a vendors (although not always, and not always to the
complete, tested and enclosed computing solution that same extent). Again, to be clear, SBCs and box-level
eliminate complex integration for customers. Because systems are the stars of what I call the mid- to high-end
they are often sold as turn-key "ready-to-run" systems, of embedding computing. In the more deeply embedded
system developers can begin creating their application realm, MCUs and embedded processors remain the king
software to run on these systems immediately. of the castle.
What's interesting is that box-level systems haven't The bottom line is that box-level embedded computing
replaced SBCs by any means. SBCs are still vitally systems have evolved to the point where embedded
important in lots of mid- to high-end embedded system developers can think of them as components. Like
computing applications. That said, I'd argue that box- nearly every other advance in electronics technology,
level systems have become-alongside SBCs-a second these solutions let you move up a level in your perspective
set of gravity in the embedded computing world. and focus more on broad concerns like your application
At one time, these box-level systems were mainly software, user interfaces and so forth. Circuit Cellar will
sold as fully custom offerings, built for specific customer continue to follow this exciting area of technology. e
needs. But around 10 years ago, give or take, these box-
level embedded computers started to become standard
catalog products. In fact, SBC vendors were among the
leaders of this new trend. Fast forward to today, and
you see that box-level systems as a product category
has exploded-driven by many traditional SBC vendors
as well as companies specializing in such systems.
4 CIRCUIT CELLAR • OCTOBER 2020 #363

DATASHEET

50 Embedded PCs
Integrated Solutions
By Jeff Child

56 Embedded in Thin Slices


LoRa (Part 7)
Building a Prototype LoRa Device
By Bob Japenga

60 From the Bench


White Hot: Measuring
Color Temperature
Using an Arduino Mega
By Jeff Bachloch/

68 The Darker Side


An Introduction to Stub Filters
A Wire to Nowhere
By Robert Lacoste

TECH THE FUTURE

7 The Future of Modular Edge


Processing
Three Real-World Intelligent
Infrastructure Applications
By Dan Demers

75 : PRODUCT NEWS 78 : TEST YOUR EQ


ci rcuitcellar. corn 5

6 Building a Power Rail Probe


An Exercise in Low-Noise Design
By Andrew Levido

14 Design
Device
a Wireless Tracking

Smart Antenna Choices


By Geoff Schulteis

18 AController
Review: VS Plus Drone Flight

Hands-On Evaluation
By Raul Alvarez-Torrico

26 Code Size vs. Memory Footprint


And Why They Matter
By Steve Graves

30 Balancing a Ball on a Touchscreen


Using a PID Controller
By Gregory Kaiser and Samuel Feibel

SPECIAL FEATURE

35 Smart Cities Leverage loT


Building Blocks
Chips, Systems and Services
By Jeff Child

TECHNOLOGY SPOTLIGHT

44 Raspberry Pi Roundup
A Bounty of HATs and Clones
By Jeff Child

~ @editor_cc .:31
' a•
@cirtuitcellar cirtuitcellar
W hy would someone spend
several thousand dollars on
a probe just for power rails?
The reason is that standard
passive oscilloscope probes are not really
transients with a time constant of longer than
a few tens of milliseconds.

ADC NOISE
If we are interested in measuring the noise
suited to the task. Let's see why. In probing a on the power rail, the displayed noise will
power rail with an oscilloscope, you probably include that introduced by the oscilloscope's
want to do one or more of three things: (1) analog-to-digital converter (ADC), your chosen
look at the level of ripple and noise on the rail; attenuation path and the input probe. There
(2) chase fast spikes or switching artifacts or is not much you can do about the ADC noise
(3) look at load transients such as over- or (except buy a more expensive oscilloscope),
under-shoots, settling times and so forth. but the attenuation path and probe noise are
These are all usually millivolt-level signals things we can control. With most oscilloscopes,
riding on top of the DC rails, with periods the lowest noise is achieved when you switch
ranging from nanoseconds to seconds. in the SOn input termination. This is not
You might try to use a standard passive practical with power rail measurements, since
probe with your oscilloscope switched to son would impose a significant load on the
DC coupling, and rely on the vertical offset power supply, and the SOQ input is usually only
controls to center the waveform on screen. rated to :!::SV to limit the power dissipation in
Unfortunately, you will find that at millivolt- the termination resistor.
per-division resolution, you are limited to just A dedicated power rail probe is designed
a volt or two of offset range, so you may not to overcome these limitations. It presents a
even be able to get a 3.3V rail on the screen, relatively high-impedance load to the power
let alone a 12V rail. rail, and provides a means to inject a DC offset
If you flick the AC-coupling switch, you to the signal, so the DC coupling can be used
will be able to get the trace on the screen with high vertical sensitivity. It should have a
with millivolt resolution, but you will have very wide bandwidth, from DC to at least the
just introduced a high-pass filter with a -3dB oscilloscope's bandwidth, be compatible with
cut-off at a few tens of Hertz. You therefore the son input and should introduce as little
will not be able to make much sense of load additional noise as possible.
ci rcuitcellar. corn 7

The commercial units I could find seemed frequency path. I started the design with the
to be specific to each manufacturer's low-frequency path. This can be an ordinary
proprietary active probe interface, and were summing amplifier followed by an inverting
integrated into the oscilloscope's on-screen stage to restore the polarity of the output
user interface. I wanted to see what would signal, as shown in the schematic (Figure 1).
be involved in rolling my own version of a This circuit pretty much designs itself,
power rail probe, so I did a quick survey of because we know the input impedance must
the available units to come up with a basic be 50kQ, and the feedback resistor R2 must
specification for mine. be the same for a gain of -1. If we assume a
split SV supply (±2.SV), then we can choose
1. It should be able to null out DC offsets of R2 to be SkQ for a gain of -10, giving an offset
±20V, and be safe to connect to ±60V. range of ±25V, which is nicely in line with
2. A DC input impedance of SOkQ seems to be our specification. Since we are connecting
the de-facto standard. R2 directly to the wiper of the potentiometer,
3. I aimed for an attenuation of 1:1.2 or the input impedance we will see on the
better, and flat to <ldB over the range DC offset summing input will only be SkQ at the
to lGHz. extremes of the potentiometer.
4. It should accommodate an active signal In the middle, the impedance will be SkQ
range of ±lV, and be designed to operate plus the two "halves" of the potentiometer
into a SOQ load. resistance in parallel, reducing the gain from
5. I set myself an ambitious target of the probe -10 to something less than that. For the SkQ
contributing no more than 10% additional pot I used, the gain of the offset branch is
noise beyond a typical oscilloscope's noise reduced to -8 at the center point. This means
floor. we will have slightly increased sensitivity at
lower offset voltages. This is by no means
DESIGN a bad thing, and the alternative of adding a
This design turned out to be an interesting buffer between the pot and R2 is not desirable,
exercise in low-noise design, and included a because it will add more noise to the circuit.
little bit of AC circuit analysis into the bargain. I Because we are adding a high level of
think it might be interesting to walk through the offset on purpose in this circuit, for once we
highlights of the design process step by step. do not have to be too concerned about the
I did not think a low-noise active circuit input offset voltages or bias currents of the
with a bandwidth in the gigahertz range was op amps we will select. This also means we do
a practical proposition. Instead, I looked at not need to add resistors in the non-inverting
splitting the probe into two parallel signal inputs of the op amps, and can connect them
paths-an active, low-frequency path that directly to our circuit ground. Similarly, for
deals with the DC offset, and a passive, high- the inverting amplifier, we just select R4 = RS

Jl J2
Cl
R6
In 10 Ou1 SW IA

~ C5:1
l OOn
RI l PI
V• • OV•
V-
50k
V• - 81
c~
J-82 47~
R3

Oft>«
....~ .,..._...,.--.~vv......._.~
10V -::::-
·~
u R7 DP.t r-
2
10, 10 DAV99V :
GND
I

~
I
I
I
L .
V- I

Re LEDl
V<
J-a•
OUl
I ~
200 .... SWl8 c1: eel
1P2
I 0 \J..

47~ lOOn+
lOV -:;-

FIGURE 1
Full schematic for the power rail probe. The DC path is a simple summing amplifier followed by an inverting stage. The AC path is a direct connection. The two paths are combined
via Cl and Ll. R6 and R7 ensure a flat frequency response.
B CIRCUIT CELLAR • OCTOBER 2020 #363

impedances, there is a corresponding parallel


a} b)
c c combination that will have the same overall
behavior when viewed from the terminals.
Figure 3 shows how this looks for our circuit. The
series C5 + R5 and L5 + R5 combinations become
parallel Cp 11 Rp and Lp 11 Rp combinations.
At DC, our series circuit will look like an
impedance of R5, since the capacitor C5 is
essentially open, and the inductor L5 a short.
Similarly, at very high frequencies, the series
FIGURE2
The circuit on the left is a simplified
for a gain of -1. We will choose these values circuit will also look like an impedance of R5,
view of how the low and high a little later, since they will affect the noise because the inductor L5 will be essentially
frequency paths combine. The performance of our circuit. open and the capacitor C5 essentially a short.
functionally equivalent circuit on the We can now look at the high-frequency It is not obvious from the series circuit what
right is instantly recognisable as a path. Since we don't have to worry about the impedance will be at resonance.
classic LC notch filter. the DC offset, this path is just a direct This is where we need to look at the
connection between the input terminal and equivalent parallel circuit. We can see here that
Cl. Figure 2a shows a simplified view of at resonance, when the lp 11 Cp combination is
how the low-frequency active path and the presenting an infinite impedance, the end-to-
passive high-frequency path come together. end impedance will be the parallel combination
The capacitor C and the load impedance RL of the two resistors. If we want the gain to
form a high-pass RC filter, and the inductor be flat across the spectrum, this should also
l similarly forms a low-pass RL filter with RL. be equal to R5 • Substituting Rp = 2R5 into the
This is functionally equivalent to Figure Zb, series-parallel transformation equation for Rp
which you may recognize as a classic LC notch given in Figure 3, and using the expression
filter. A steep notch appears in the frequency above for the resonant frequency, a little
response at the resonant frequency given by: algebra delivers the expression:
1
Rs= {&
fo = 21t./LC vc;
The depth of the notch is determined by Now we can choose some values. Let's
the Q of the filter. Naturally, we do not want start by choosing C to be lOOnF, which doesn't
this notch in our frequency response, so we seem like too much of an additional capacitive
need to lower the Q of the filter by adding load, given that power rails are generally
some series resistors R5 to the circuit, bypassed by many lOOnF capacitors. A value
to provide some damping (Figure 3). We of lOOnF will form an RC high-pass filter with
also need to preserve the symmetry of the a corner frequency of around 31.8kHz.
branches, so each branch must have the same We want to choose the inductor l such
resistor value. that the corner frequency of the Rl low-pass
These series resistors reduce the gain filter is considerably higher than this, but not
of the circuit in each branch, in that they so high that we create an unnecessary op amp
form wideband voltage dividers with the design challenge. Choosing lMHz, for example,
load resistance RL. How do we choose these gives us an L value of 7.91JH. Rounding this up
resistors for a flat frequency response? The to a sensible value like l01JH gives a corner
answer is not immediately obvious, but we frequency of around 796kHz, which should
can make this easier by exploiting the series- work fine. We can now finally calculate Rp,
parallel transformation property of complex which turns out to be lOQ-a nice, round value
impedances. This simply says that for every that gives us an overall gain through the probe
series combination of real and imaginary of 1:1.2, exactly our design brief.

FIGURE3
The RC and RL series combinations
on the left can be converted to their
parallel equivalents, as shown on
the right, via the transformation
equations. This transformation helps
us understand the impedance of the Series Parallel
network at resonance.
ci rcuitcellar. corn 9

voltage or current noise density by the square


NOISE 101 root of the bandwidth to get the root mean
Before we can we can select the op amps square (RMS) voltage or current.
for the circuit, let's look at the noise issues While we are on the subject of noise,
involved. This op amp selection will be driven another important thing to keep in mind is
largely by the need to add the lowest possible how noise in a circuit adds. Since noise is
amount of noise to the measurement. Low- random, as long as the noise sources are
noise design is a whole field in itself, but let's not correlated, the two sources don't add
recap on some "Noise 101" basics. The three arithmetically, but rather, as the square root
main sources of noise we need to consider in of the sum of squares:
modern electronics are Johnson noise, shot
noise and 1/f or "flicker" noise. en= ~e;l +e:2 + ...
Johnson noise is essentially the thermal
noise caused by the movement of electrons With these two points covered, let's get
with temperature. For example, a 10kQ back to Johnson noise. The voltage noise
resistor lying unconnected on your bench at density of Johnson noise in a resistor is given
room temperature will develop a noise voltage by:
across its terminals of 1.31JVRMS• if measured
with a voltmeter with 10kHz bandwidth.
This brings us to an important point
about noise. If we want to calculate a noise where k is Boltzmann's constant and T is the
voltage or current, we must always specify temperature in Kelvin. At room temperature,
the bandwidth over which we are concerned. this can be reduced to: en = 127 x 10·12 in
Because we don't always know what the band units of "V/...fHz". We will use this equation
of interest is when specifying components, later to calculate the noise produced by the
we tend to talk about noise densities, which resistors in our circuit.
is a measure of the noise voltage or current The two other sources of noise are
per unit of bandwidth. Noise densities are generally specific to semiconductors. Shot
expressed in terms of voltage or current noise is the noise produced by the discrete
per square root Hertz. You just multiply the nature of charge when charges are acting

PCBWay is a lead1ng PCB manufacturer m Shenzhen speciahztng tn PCB protolyptng and


PCBWay
- assembly serviCe , and havmg been loved by over 1M engmeers around the world for tt
comprehensive advantages

•m• n-- - - - - -
-
lnsumt Ouo1e

Tumaround ltme can be as short as 24 hours

CIJ.!.fii
-
Pr~ee ts as low as 10 PCBs for only 5 USD
10 CIRCUIT CELLAR • OCTOBER 2020 #363

density and a current noise density referred


to as the op amp input, and an fc figure as
described earlier.
As shown in Figure 4, the noise model of
an op amp looks like a noise voltage source
en in series with the op amp input, and noise
current sources in driving current out of the
input terminals. These currents will create
noise voltages across the source resistance
as seen by the input terminal. There will also
be a Johnson noise component in the source
Noiseless resistance itself. The noise that appears at
OpAmp the op amp output terminal will be the sum
of these three sources multiplied through the
op amp gain. If there is noise on the op amp
power rails, this too will affect the overall noise,
as seen at the op amp output. I will ignore this
for now, but check whether this is reasonable
FIGURE4
once we have designed the power supply.
The noise model of an op amp has a voltage noise source in series with the input, and sources forcing current
noise out of the input pins. Op amp noise is specified in terms of these noise densities and the frecuency fc, COMPONENT SELECTION
at which the flicker noise begins to dominate. We now need to choose the op amps. In
this case our primary requirement is for low
noise. We also need a bandwidth well above
independently, as they do in semiconductors the 796kHz corner frequency of the LC filter-
(but not in conductors). 1/f or flicker noise is say SMHz or higher. We want to operate from
an artifact of the materials used and methods low voltage supply (:1::2.5V), and U2 needs to
of construction of the devices. be able to drive a volt into a SOQ load.
Johnson and shot noise are called "white One candidate is the Texas Instruments
noise," and have equal energy in every unit (TI) LMP7731. This has a GBW product of
of bandwidth. Flicker noise is "pink" noise 22MHz, swings almost to the rails with a SV
and has equal energies in every decade supply, and has excellent noise figures with
of bandwidth. If you plotted the energy of en = 2.9nV/..JHz, in = 2.2pA/>/Hz and fc = 3Hz.
flicker noise versus frequency, we would see Quiescent current is 4mA, and it costs less
the same energy in the 1-10Hz decade as than $2. The only shortcoming is that its
the 10-100Hz or 100Hz-1kHz decades. The output drive capability is not enough. Another
amount of energy therefore falls off with the candidate is TI's TLV2460. This has a GBW
inverse of frequency-hence the 1/f name. product of 6.4 MHz, good output swing, SOmA
In a semiconductor device such as an op drive capability, quiescent current of 1mA,
amp, there will be a white-noise component costs under $2, but has slightly worse noise
that is flat with frequency, and a pink-noise figures of en= 11nVNHz, in= 0.13pN..JHz and
component that will fall off at 1/f. The point f c =150Hz.
where the 1/f noise has the same value as Given that we have control over the
the white noise is designated fc. This figure is values of the resistors around the inverting
used if the frequency of interest is low enough amplifier, which will help us reduce the noise
that 1/f noise becomes important-as we shall in that stage, we will use the TLV2460 for
see later. the inverting amp, and the LMP7731 for the
We don't need to concern ourselves with summing amp.
the detail of all the noise sources in op amps, We can calculate the noise in the
since manufacturers specify the total noise in summing amplifier by adding up the various
terms of three parameters-a voltage noise noise sources, as shown in Figure 5. At
the inverting input of U1 we will see three
sources of noise-the amplifier voltage noise,
ABOUT THE AUTHOR the amplifier current noise reflected across
And rew Levido ,(P'a-n""'
dr_e_w_.l.e-
-vi""'
d,....
o@.,..---
m-a-;,il,.....c-o-m..,......arned a bachelor's deg ree in the source resistance, and the Johnson noise
Electri cal Engineerin g in Sydney, Australia, in 1986. He worked for many of the source resistance itself. The source
years in R&D for power elect ronics and t elecommunicati on companies, resistance is simply the parallel combination
before moving into management roles. Andrew has maintained a hands-on of R1, R2 and R3, which is around 4.2kQ.
interest in electronics, particularly embedded systems, power electronics and Because the gain of the stage is 1, the output
analog design. Over the years, he has written articles for vari ous electroni cs voltage noise will be same as the input noise.
publications, and provides consulting services as t ime allows. Remembering that we add noise as the
root sum of squares, the total voltage noise
ci rcuitcellar. corn 11

density at the summing amplifier output can


be calculated to be 12.7nVNHz.
The calculation for the second stage is
similar, but this time we also have to add the
noise produced by the first stage. In this case,
we will choose the resistors R4 and RS to each
be 1kQ, so the source resistance is only 5000,
thus reducing the noise in this part of the
circuit. Again, the gain of the stage is 1, so the
output noise will equal the input noise. Doing
the math gives us a voltage noise density of
17.0nVNHz. The only other contributor to bound is 1.25MHz. Crunching the numbers FJGURE 5
the low-frequency path noise will be the lOQ gives a noise voltage of 19.01JVRMS· When calculating the noise in an
resistor, which will contribute just 0.4nVNHz. We have not, however, taken the 1/f inverting amplifier, we add the root
This is negligible and can be ignored. Note noise into account at this stage. In our case, sum of squares of the amplifier input
that we can't make this simplification in the bandwidth of interest straddles fc so we can't noise voltage, the voltage produced by
high-frequency path, as we shall see later. ignore it. The 1/f noise of the TLV2460 will the input noise current in the source
resistance, and the Johnson noise
dominate, because its fc is 150Hz, compared
produced by the source resistance
NOISE AT OUTPUT to 3Hz for the LMP7731. The equation for
itself-all multiplied through the op
Now, to calculate the noise voltage at the calculating the noise voltage where the amp st:lge gain.
output of the low-frequency path, we need to bandwidth of interest straddles fc is:
specify a bandwidth. The lower limit is DC, so
that is easy. You might think the upper limit v, = e"~(f;, - J; + fcln(J, I J;)
should be the -3dB bandwidth of the LC filter
(796kHz), but the reality is that the LC filter Instead of just multiplying the noise
is far from a brick-wall filter, so there will be density by the square root of bandwidth fh
noise energy at higher frequencies. It turns - f1 we now have an extra logarithmic term
out that we must adjust this upper frequency that accounts for the 1/f noise. For obvious
by a factor of n/2 to account for the gradual reasons, we can't plug OHz into this equation
roll-off. This means our upper frequency for the lower limit. So, we choose a suitably

Working together to design


the ideal display for your
application. Let's get started
on your next project.

~~
.. ~
•T::." ..,

l!l.. . ~
12. CIRCUIT CELLAR • OCTOBER 2020 #363

FIGURE6 oscilloscope noise floor to lOS~V, well inside


The finished PCB assembly. The input the 10% figure we set ourselves.
is at the top, with the output and
controls at the bottom. The whole
assembly slides into an aluminum RF
POWER SUPPLY
screened case (not shown). The op amps we have chosen work over a
voltage range of 1.8 to S.SV and 2.7 to 6.0V,
respectively. The TLV2460 must be able to
drive 20mA into son, at which point it can
swing to ±400mV of the rails, so we need a
minimum supply of :!:1.4V and a maximum
of about ±2.SV. Adding up the quiescent and
load currents of the two op amps, we reach
a total of about 25mA. The alkaline AA cells I
looked at had a capacity of 3,000mA-hours at
2SmA, for a nominal life of 120 hours, which
should be enough.
Two cells in series for each rail would give
a voltage range of :1:3.0 to :1:2.0V over the
discharge life of the battery. Adding a diode
drop to each rail will reduce this range to
nominally :1:2.4 to :1:1.4V, which is pretty close
to what we need. The only downside is that
at low battery voltages, the maximum offset
we will be able to inject will reduce to :U4V. If
this is a problem for you, you can adjust the
value of R2.
The noise calculations above assumed
a perfectly noiseless power supply. If there
low frequency, say l~Hz, and again use were noise in the supply, it would appear at
1.2SMHz for the upper limit. This gives us the amplifier outputs, attenuated by the op
a revised noise voltage of 21.2~V which just amp's power supply rejection ratio (PSRR).
tells us that the 1/f noise contribution is small This is typically in the order of -100 dB at
but not negligible. low frequencies, but gets a lot worse at high
Finally, we need to calculate the noise frequencies. The ops amps we chose have a
voltage due to the high-frequency path. In the PSRR of around -3SdB at lMHz.
same way as before, we need to extend the Alkaline AA battery noise data is not easy
lower frequency cut-off from the -3dB value to find, but what I could find suggested a
of 31.8kHz by a factor of n/2 to 20.3kHz. The noise density in the order of 0.2nV/VHz and
upper bound in frequency is our design limit of an fc of around 1kHz. After -3SdB of PSRR
lGHz. The only contributor to this noise is the attenuation, this is less than O.OlnV/v'Hz,
0.4nV/v'Hz Johnson noise in the 10n resistor. which confirms we were justified in ignoring
Calculating this gives a voltage noise in the this noise in our analysis discussed earlier.
high-frequency path of 22.5~VRMs-not too I added a battery-voltage-monitoring circuit
different from that for the low-frequency path. U3 in Figure 1, using a BU4828G voltage
If we add these two together, using the detector (Rohm Semiconductor). When the
root of the sum of squares, of course, we get supply voltage falls below 2.8V (:1:1.4V),
a final noise figure of 30.9~VRMS· The noise LEDl lights up. This embellishment is not
floor of a good oscilloscope will be in the strictly necessary, but does make for a more
order of lOO~V - 300~V at lmV per division. practical instrument.
Adding our measurement noise to that of
the lower end of the range will increase the CONSTRUCTION AND RESULTS
I laid out a simple, two-layer PCB as
For detailed article references and additional resources go to: shown in Figure 6. The high-frequency path
pww.clrcultcellar.com/artlde-materlals is a straight son controlled-impedance trace,
running down the center of the board under
the batteries. The rest of the layout is not
super critical. It is important, however, to
RESOURCES enclose the circuitry in a well shielded case to
prevent stray noise from being coupled into
the circuit. I used a shielded aluminum case
from Hammond Manufacturing. It was the
most expensive component in the project.
circuitcellar.com 13

To use t he probe, simply connect to your


oscilloscope via a SOQ BNC-to-BNC cable,
and switch to SOQ input term ination. For
the best resu lts when using the probe, it
should be connected to the circuit through a
shielded cable soldered directly to t he circuit
in question. Term inate t he braid close to the
core (across a bypass capacitor is a good
place). Don't use a passive probe for critical
measurements.
So, how did it work out in practice?
Real-life components have tolerances and
parasitics, and the physica l co nstruct ion
also inf luences their actual performance.
Measuring the gain over the 8 decades of
frequency shows a fairly flat r esponse from
DC to just under l OOMHz, which is the limit not catastrophic. If I switch-in t he 20MHz FIGURE 7
Measured ga 1n o~~er tre frequency
of my measu rement capabilities (Figure 7). bandwidth limit, the noise floor drops to
range I could measure With my setup.
There is a dip centered on 160kHz, which 96 ~VRM S• and with the probe connect ed, the
Tre gain is nat to Within !dB. Tre
tells us t hat the matching of the damping noise increases to 108~VR MS• which is much slight d1p at tre resonant frequency of
resistors to the capacitive and inductive more in line with what I expected. around 160kHz IS due to the non-ideal
impedances is not perfect. This error is This suggests the noise is mostly in the nature of real-life components.
less than ldB at its worst point, just on the 20-200MHz range, and most likely relates to
design target. Given that I used standard the imper fec t shield ing of the enclosure. I
components, this is not a bad result. might try to address this in a future itera ti on
The noise f loor of my 200MHz oscilloscope of the design, but to be frank, I am happy
in the lmV-per- division range is around enough with this result, given t he type of
1551.JVRMS• and adding th e power rail probe work I do, and the fact that total cost of par ts
increases this to around 200~V RMs- not icea bl y is well under $100.
worse than my ca lculations suggest, but
Portable trackers offer a very particular set of
problems for designers. In this article, Geoff
takes a quick look at the design requirements of a
portable tracking device, the choice of embedded
antennas and some of the points to consider when
designing a product where the performance of the
antenna in situ could determine the commercial
success of the product.

D
es1gmng portable trackers In selecting an antenna, you will need to
means facing some unique consider the ground plane requirements and
challenges, including selecting proximity loading of lossy bodies (such as
the right antenna solution. By the human extremities), to be sure that the
their very nature, it is difficult to design for design allows enough space for the antenna to
Global Navigation Satellite System (GNSS) radiate effectively. You may want to consider
frequency bands. Particularly in small devices, the different forms of antenna as well, which
where a whole host of issues can arise during could be a flexible printed circuit, ceramic or
development. Here, we consider the factors an FR4 surface mount chip antenna.
that make a successful design for a tracking
device. ANTENNA DIRECTIONALITY
Portable trackers need to be small enough The antenna within a portable device needs
to be easily carried around and are often to be as omni-directional as possible, so that
used in applications where they are attached it can send and receive signals from anywhere
to another item, or they may be used as a in its environment (Figure 2). This might pose
portable or wearable device for a living being a difficulty because it means that the RF
such as a pet, a child or an adult person. design will need to mitigate interference that
This means that the design needs to be neat could affect the antenna from any direction.
and discrete, because the whole idea of the Choosing the right antenna and arranging
tracker is to provide an inobtrusive way to the components correctly within the device
monitor location. This means that the device becomes particularly important. We have
is likely to be small, and the antenna that sometimes seen trackers where the RF
drives it should also be small (Figure 1). If the functionality has been compromised by the
antenna is to be embedded into the PCB, its operating environment, so it is important
location needs to be planned right from the to design the RF circuity correctly and carry
very earliest stages of product design. out tests to be sure how the final device will
There are plenty of antenna options perform.
available, including choices of network: LTE, Portable trackers are generally small, so
Bluetooth, WLAN and so on, and the satellite the space on the PCB will be limited and the
options of GPS, GNSS which can pinpoint the antenna may be placed very close to other
location for navigation, mapping, gee-tracking components. Components such as batteries
and fitness trackers. For a design example and power regulators are known for creating
using a Bluetooth radio, see the sidebar "Design electrical noise, which could interfere with the
Example: Smart Bike Lock" on p.17. antenna signal. Some antennas are designed
ci rcuitcellar. corn 15

to support eo-location with noisy components


Wrist mounted we;moble exoomole ror Bluetooth aoolicatlon
and other antennas, but others require strict
"keep out" areas, which will be specified in the
datasheet for the antenna. Designers need to
be very aware of how the layout of the other
components will affect signal transmission and
reception. One way to be sure is to submit your
Gerber file for verification by an RF expert,
before proceeding too far with the design.
There are also human factors to consider.
Some trackers are used to track goods, such
as shipping containers or pieces of luggage.
However, if the device is a fitness tracker or
one that is going to be used to track pets or
livestock, it will be placed directly on the body.
The challenge is that the body reflects and an easy way to keep track of their new puppy. FIGURE 1
absorbs radio signals. This could potentially One good way to help keep a tracking device Wearable devices with small PCBs
prevent the device from operating in the real charged is to make it compatible with one of have limited space to provide
the wireless induction chargers. clearance between the antenna and
world, even if it performs perfectly in a test
other components.
chamber.
Designers therefore need to consider CERAMIC OR CHIP ANTENNA?
the environment where the tracking The latest tiny chip antennas for GNSS allow
application will be used and create their even small devices to receive signals from
designs accordingly. Here are some effective over 20,000km away. In RF terms, they have
solutions: some designs use antennas with taken strides pastthe traditional ceramic patch
ceramic housing to isolate interference, or antenna. A ceramic patch antenna will usually
some even use flexible antennas that can be provide superior performance in open space,
inserted within textiles and clothing. These with plenty of ground plane, however, they
can be effective ways to ensure that a tracker require a large antenna footprint. They are
functions correctly when placed against the also relatively cheap, but it is unlikely that your
body it will be tracking. design brief will be able to dedicate enough
space to accommodate one of these, and the
RANGE AND POWER smaller ceramic patch antennas are limited by
Consider the effective operational range their efficiency and rarely collect enough RF
for the device you are building. A tracker energy to perform as well as the larger ones.
should be able to send and receive signals This means that smaller patches measuring
continuously as it moves around. If the device less than 17mm x 17mm will typically be
can easily be moved out of range, it has failed unable to achieve omni-directional gain. This
in its mission. It is not easy to guarantee the will limit their performance in devices that are
range for the antenna within a small tracker, not operating parallel to the source radiation,
particularly when it is integrated alongside in this case, the sky. They are also moderately
other components, as discussed earlier. Real- difficult to amplify without allowing signal
life use scenarios can be difficult to predict
and may reveal oversights in otherwise
theoretically "correct" solutions. The best way 1
to overcome this is to use an extensive range
of testing scenarios to discover the realistic
operational range of the tracker.
For an antenna to maintain a reliable signal
in large, noisy environments, it will inevitably
draw more power than devices operating in 5
smaller controlled spaces. Also, the volume
and frequency of the data transmitted has a
direct bearing on battery life. ----------..... _---...
The battery needs to be large enough 6
3
to keep a device operating for a reasonable
period of time, and there should be a clean
way to replace or recharge it. If the means of 2
providing power are not user-friendly, it can be
a frustrating user experience. Nobody wants to
have to remove and charge their dog's collar FIGURE2
every night when all they were hoping for was A flexible antenna for GNSS showing antenna radiation in all six spatial directions
16 CIRCUIT CELLAR • OCTOBER 2020 #363

noise to impact the performance of the device. but it does limit their usefulness for trackers,
In small tracker designs, a surface-mounted wearables, handheld and other devices that
antenna will have a smaller footprint, and will require an antenna with low directivity to
usually outperform a ceramic patch at a lower perform well for a quick time-to-first-fix.
cost (Figure 3). There are many satellite frequencies
Ceramic patch antennas need line of sight within GNSS and many devices support
to the sky, which means they need to be multiple systems, but it becomes difficult
pointed upward wherever possible. Most cars to achieve sufficient performance across
and drones operate parallel to the horizon so varying wavelengths with small ceramic patch
this may not be an issue in those use cases, antennas. If the device is smaller than 25mm2,
ceramic patches will only effectively operate
FIGURE3
on narrow frequency bands. In contrast, a
The Sinica SMD (surface mount device) surface mount antenna can work effectively
antenna fur 1559-1609 MHz measures on wide frequency bands. This may not pose
7.0mm x S.Bmm x 0.4mm. It is a low- a design issue. If the device is to operate
prufi le antenna with the performance parallel to the horizon, on a single frequency,
of a ceramic patch. a small ceramic patch antenna may provide
sufficient performance.

ANTENNA GROUND PLANE


Due to the size of the satellite wavelengths,
an embedded patch antenna will require
a greater than normal ground plane size,
typically upward of 60mm x 60mm. Surface-
mount antennas allow more flexibility, and
FIGURE4
some overcome this by operating on the
M20047 is a 1.584GHz general purpose
integrated trace RF antenna.
corner of the PCB, whereas the ceramic
patch antenna must be placed in the center
of the ground plane for omni-directionality.
It is important to select the most appropriate
antenna for your design and minimize the
challenges of RF integration.
The ground plan functions like a runway
for transmissions to and from the antenna,
reflecting signals into and away from the
antenna to minimize interference and optimize
the radiation pattern. For fixed antennas,
the Earth's surface functions as the ground
FIGURE 5 plane, reflecting radio waves into and away
This shows the antenna keep from the antenna. For portable antennas, the
out area on the PCB. ground plane must be part of the PCB itself.
This can become a real issue when designing
small GNSS tracking devices. Space confines
and proximity to other components can
compromise the efficiency of a ground plane.
Figure 4 shows the M20047, a 1.5B4GHz
general purpose integrated trace RF antenna.
In order for the ceramic antenna to be
effective, a ground plane needs to have a
radius of at least a quarter wavelength of
ABOUT THE AUTHOR the radio waves the antenna is tuned to. For
Geoff Schulteis is RF Antenna Application Specialist with Antenova, Americas. GNSS and GPS, which broadcast at either
For more informa t ion about antennas and th eir integ rat ion, please see 1575.42MHz or 1227.60MHz, this means a
www.antenova.com. ground plane with a radius of around Scm.
This space needs to be planned in your design
early on. It can be problematic if it is not
considered early in the design process.
For detailed article references and additional resources go to: The antenna uses the host PCB ground to
-w.circuitcellar.com/article-materials effectively radiate. As such, a GND plane must
be placed on the host PCB on at least two
RESOURCES layers. In the example shown in Figure 5, the
Antenova I www.antenova.com only area void of GND is the antenna keep-out
ci rcuitcellar. corn 17

area. The solder mask is removed to make the


copper visible.
If it proves tricky to allow sufficient space Design Example: Smart Bike Lock
for the antenna and its ground plane, it
may help to consider the options of surface- The antenna choice is crucial in the design of the bike lock because
mounted antennas and flexible printed circuit the Bluetooth low Energy (BLE) radio is the only way to communicate
(FPQ antennas. It is crucial that the layout of with the smart phone a pp that monitors the lock. In a real-world design
your PCB does not affect the ground plane. along those lines, the design required the Bluetooth signal to be as
This is a particular issue in GNSS tracking strong as possible, to maintain the connection between the bike and
devices, where space is at a premium and the smart phone so that the users can monitor the security of their bike
components need to be close to one another. from a distance.
BLE solutions typically use a chip antenna eo-located on a radio
REAL-WORLD TESTING module, but this may not be a reliable solution. Depending upon how
The ground plane will allow effective signal
the antenna is integrated, it may work next to a plastic surface but not
transmission and minimize interference, but
on a metal one. The challenge was to work within the small dimensions
the antenna may still receive reflections from
glass and buildings in the surrounding area, of the host PCB and accommodate the antenna in close proximity to the
which could compromise functionality. lock mechanism and the bike itself. The antenna was shielded below the
Portable tracking devices are particularly electronics, but the integration did not allow a eo-located antenna on
vulnerable to this. They may be carried into the BLE radio module.
all sorts of environments, including potentially The antenna was therefore located away from sources of interference
hostile ones, but they still need to be capable on the main board, where it could be protected from knocks and bumps
of transmitting and receiving reliably, so we during day-to-day use. For the design, the engineers chose Antenova's
would recommend that designers keep this in Weii ceramic antenna, which measures just l.Omm x O.Smm x O.Smm,
mind and plan a test program accordingly. G with the matching network tuned for the application. This achieves good
efficiency-good enough to operate at a range of a few hundred feet.
It uses an antenna topology known as magnetic-dipole, which remains
very stable and on-frequency in this application.

The NEW PicoScope® 6000E Series


r~,

Smarter scopes for faster debug

,_-
•' • e: · t • •

By
Raul Alvarez-Torrico

Over the past year, Raul has written several articles about drone
design. Here, he offers a product review of CUAV Tech's VS Plus drone
flight controller and its associated NEO V2 GNSS module. Raul dives into
specifications and functions of these devices in great detail, then shares
the results of some flight tests using the products.

T
his is a product review article for I received the VS Plus flight controller and the
the VS Plus drone flight controller NEO V2 GNSS module from CUAV Tech for free,
and the NEO V2 Global Navigation to test and evaluate. This review reflects my
Satellite System (GNSS) module- personal experiences and opinions about these
both manufactured and distributed by CUAV products, in the context of the type of drone
Tech. The VS Plus flight controller is promoted applications I normally do as part of my day
by its manufacturer as an advanced drone job: advising undergraduate college students
flight controller aimed at academic research with drone autonomous flight projects.
and commercial applications. It is based on
the Pixhawk FMUvS open hardware design TECHNICAL SPECIFICATIONS
standard, and is modular, consisting of a core CUAV Tech is a Chinese company working
plus a separate carrier board. It is compatible since 2012 in research and development,
with PX4 and ArduPilot firmware, supporting production and salesofunmanned autonomous
a number of vehicle types and configurations. vehicle (UAV) applications and system modules,
The accompanying NEO V2 GNSS module such as flight controllers, digital radio link
can concurrently process signals from GPS, systems and global positioning devices. One
Galileo, GLONASS and BeiDou global satellite of their most recent products is the VS Plus
positioning systems, and includes a digital flight controller, designed in collaboration
compass. with the PX4 autopilot team. CUAV Tech is
In this review, I begin by describing a "silver member" of Dronecode-the non-
the flight controller and GNSS module's profit organization governed by the linux
specifications and functionality in detail. Next, Foundation that oversees the development
I some introductory concepts about of four open-source projects in the PX4
Hardware-in-the-Loop (HITL) simulation, ecosystem: PX4 autopilot, MAVlink, MAVSDK
to put in context some HITL tests I carried and QGroundControl.
out with the VS Plus. I also flight log The VS Plus is based on the Pixhawk
analysis review as a tool to assess aircraft FMUvS (Flight Management Unit vS) open
performance. Finally, I the results of hardware design standard, and uses Pixhawk
some field flight tests I made with the VS Plus standard pinouts to interface with external
and the NEO V2 GNSS module, both installed devices. It comes out of the box pre-installed
in a test quadrotor. with PX4 firmware, but is also compatible
ci rcuitcellar. corn 19

with ArduPilot firmware. Figure 1 shows the flight controller cores announced by CUAV
VS Plus core module (in silver) attached to its Tech in May, 2020.
carrier board (in black). The detachable core The NEO V2 GNSS module has a U-blox
contains the flight controller's main hardware MBN, 72-channel GNSS receiver and an
components (microcontrollers (MCUs) and iSentek IST8310 digital compass (Figure 4).
onboard sensors), and the separate carrier The MBN sub-module is a dual-mode parallel
board contains the interfacing connectors to GNSS receiver than can concurrently process
external devices. signals from GPS/Galileo and GLONASS
That modularity gives you the choice of

-
either using the core with one of the of-the-shelf FJGURE 1
carrier boards from CUAV Tech, or designing a VS Plus core and standard carrier
custom one. CUAV Tech made available an open boand
carrier board reference design that can be used
as a starting point to design a custom one.
The main processor in the core module is the
STMicroelectronics STM32F76S MCU that runs
at 216MHz and contains 2MB of flash memory
and 512KB of RAM. This improves computation
power in comparison with previous flight
controllers, such as the Pixhawk V3x, also made
by CUAV Tech.
The core module implements multi-sensor
redundancy by combining five sets of sensors.
It has two TDK InvenSense integrated
circuits-the ICM-20689 and the ICM-20602-
each of which contain both a 3D accelerometer VS Plus Core
and a 3D gyroscope. Additionally, it has a
Bosch Sensortec BM1055, which also contains Main FMU Processor: STM32F765
a 3D accelerometer and 3D gyroscope. An 32 Bit Arm• Cortex•· M7, 216MHz, 2MB FLASH, 512KB RAM
iSentek Technology IST8310 3D compass and
10 Processor: STM32Fl00
a MEAS Switzerland MS5611 atmospheric
32 Bit Arm• Cortex•· M3, 24MHz, 8KB SRAM
pressure sensor (altimeter) complete the set
of onboard sensors (the MSS611 is sold by On-board sensors:
TE Connectivity). The flight controller reads 3 x Accei/Gyro: ICM-20689, ICM-20602, BM lOSS
the multi-channel sensor data in real time, 1 x Magnetometer: IST8310
and switches to a redundant sensor whenever 1 x Barometer: MS5611
there's a failure in the previous one, thus Interlaces:
improving safety and reliability. 8·14 PWM outputs (6 rrom 10. 8 from FMU)
Figure 2 summarizes the hardware 3 dedicated PWM/Capture Inputs on FMU
specifications for the VS Plus flight controller. Dedicated R/C Input for CPPM
Additional key characteristics worth Dedicated R/C input for PPM and S.Bus
mentioning are: a secondary input/output Analog / PWM RSSI input
processor (the STMicroelectronics STM32F100 S.Bus servo output
MCU); two battery monitoring systems; 5 general purpose serial ports
support for high-accuracy, centimeter-level, 4 12C ports
Real-Time-Kinematic (RTK) positioning, 4SPI buses
with the use of corresponding modules and 2 CAN buses with serial ESC
support for LTE telemetry and video links- 2 battery monitoring inputs
which provide a much wider coverage area
than conventional ones. Power System:
The core module has a built-in damping Power: 4.3-5.4V
system that separates the sensors from the U5B Input. 4.75-s.25 V
main board and provides high-performance Servo Rail Input: Q-36 V
shock absorption. This reduces signal noise Welcht and Dime nsions:
in the sensors due to mechanical vibration, Weight: 90g
making unnecessary the use of external anti- Dimensions: 85.5"42•33 mm
vibration systems (Figure 3). The VS Plus fully
adheres to the PX4 official standard, to ensure Other Characteristics:
compatibility and interoperability with other Operating temperature: - 20- 80 •c
hardware and software products in the PX4
ecosystem. Available VS Plus carrier boards FJGURE2
are also fully compatible with the new X7 VS Plus summary of specifications
ZO CIRCUIT CELLAR • OCTOBER 2020 #363

FIGURE3 or GPS/Galileo and BeiDou global satellite


VS Plus built-in damping system positioning systems. This feature ensures
much better positioning accuracy in urban
canyons or any environment with weak GNSS
signal reception. It has an update rate of 10Hz
(maximum), a cold start acquisition time of
26 seconds and a hot start acquisition time of
1.5 seconds.
The NEO V2 module incorporates a safety
switch, a buzzer and RGB status lights,
otherwise separately added to the drone. I
received from CUAV Tech a kit containing the
VS Plus core and standard carrier board, the
NEO V2 module, an HV_PM power module,
a PW-Link Wi-Fi telemetry module, an IlC
expansion board, a USB to UART converter
and some additional accessories.

HITL SIMULATION
Hardware-in-the-loop (HITL or HIL) is a
simulation mode in which a real hardware flight
controller runs regular PX4 firmware to control
a computer modeled vehicle inside a simulated
environment. In contrast, Software-in-the-
Loop simulation (SITL) is the mode in which
FIGURE4
the PX4 flight stack is run typically on the same
NEO V2 GNSS receiver and compass
module
computer on which both the modeled vehicle
and virtual world are running. The benefit of
HITL over SITL simulation is that HITL allows
testing most of the actual PX4 autopilot flight
code on the real hardware. PX4 supports HITL
simulation for multi-rotor drones with jMAVSim
and Gazebo simulators.
SITL and HITL simulation are great tools,
not just for development, but also for teaching
and learning. For instance, they are useful for
autonomous drone application development.
You ea n write, test and debug your autonomous
flight code right in front of your development
computer, without needing to go outside with

FIGURES
VS Plus Hffi simulation running
ci rcuitcellar. corn 21

a real drone until it is absolutely necessary. flying the simulated drone with the real radio
This is particularly helpful when you integrate control system connected to the hardware
other technologies-such as computer vision flight controller, and it worked well.
and cloud data connections-to your drone In my previous article [1], I discussed
application, and you need to do indoor tests the installation procedure of the PX4 SITL
simultaneously with your autonomous flight simulation environment for developing
code. autonomous flight applications with
I tested the VS Plus in HITL simulation by the MAVSDK-Python library. The same
running some MAVSDK-Python autonomous environment works for HITL simulation.
flight code examples I had on hand. For If you are interested in autonomous flight
example, it ran well with the write_my_initials. application development, check that article
py program example from my previous article for a quick introduction to the subject. Once
uwriting MAVSDK/PX4 Drone Applications" you have the simulation environment correctly
(Circuit Cellar 361, August 2020) [1]. Figure 5 installed, the procedure for running an HITL
shows a screen capture of the HITL simulation simulation is as easy as for SITL when using
running. As I sometimes do with new drone the jMAVSim simulator.
builds, I also made a couple of HITL tests It is somewhat more involved for HITL with

--·
I•

--- .. -. .._.._

---·
-..---·---
_____,..
__, ..
_....,. ..... --
x:M---
~

l : ~~"";""---
P-lt'""' l
1:- ....,.
_.J ~

-·- --
FIGURE6
Plot examples from a flight log review
22 CIRCUIT CELLAR • OCTOBER 2020 #363

you assess how well your aircraft is performing.


Figure 6 shows plot exam pies of data logged
by a Pixhawk flight controller. Of the many tools
for log analysis, one of the most commonly
used is Flight Review. This is a free online tool
available on the cloud that doesn't need local
installation and makes it easy to analyze flight
logs and share the results over the web. You just
need to go to the cloud application web address
ps: rev1ew. x .10, pload your flight log,
analyze the data and, if you want, share the
link with others. Flight logs are also handy
when asking for help in the official PX4 support
channels. Other flight log analysis applications
include pyulog, pyflightAnalysis, FlightPiot,
PX4Tools, MAVGCL and Plotluggler [2].
Understanding flight log plots isn't
difficult, if you have basic knowledge of how
FIGURE 7
the Gazebo simulator. For HITL simulation a drone works and what roles are played by
Test quadrotor with the VS Plus and
NEO V2 module
to work, you typically connect the flight sensors and actuators in the system, along
controller with the USB cable to the computer with a basic understanding of the main control
running the simulation, so the flight controller algorithms involved, such as PID. But even if
can connect to the virtual environment. You you know how to interpret the data graphs,
can use a stand-alone flight controller with it will take a while until you understand what
nothing else connected to it, or one in a finished values are acceptable in each case, and which
drone build. The file run_hitl_simulation.md plots are better to look at when dealing with
included in this article's materials details the specific problems, such as frame mechanical
steps for running HITL with both jMAVSim vibration. The PX4 site has good introductory
and Gazebo. The file is available via a link on information on how to analyze flight log plots
Circuit Cellar's article materials webpage or and identify common problems. On the Circuit
via down load from Circuit Cellar's article code Cellar article materials webpage for this
and files page. If you've tried SITL before, article, I've provided links to PX4's website
running HITL is almost the same. pages containing more detailed information
about flight reporting and flight log analysis.
FLIGHT LOG ANALYSIS
Pixhawk flight controllers store flight FIELD FLIGHT TESTS
logs on a Micro SD card. These flight logs Figure 7 shows the quad rotor drone I used
can be later analyzed to assess the drone's with the VS Plus for my flight tests in the field.
performance and help debug issues. The It has the following hardware:
flight logs are stored in Ulog format and
contain data from sensors, actuators, control • An SSOO frame
algorithms, the radio control system, power • Generic 2212/920KV brushless motors
system, processor and memory and the data • DYS 30A 2-SS Electronic Speed Controllers
logging system itself. Some examples of data (ESCs)
stored in log files are: altitude, roll/pitch/ • DJI 9450 and Gemfan 1045 propellers
yaw angles and angular rate, local position • A generic 5,000mA-hours, 3S, 30C Lithium
(X, Y, Z) and velocity, manual radio control Polymer (LiPo) battery
inputs, actuator control and outputs, raw • A FlySky FS-I6S radio control transmitter
acceleration, angular speed and magnetic field paired to a FS-IA10B 10-channel receiver
strength, vibration level, GNSS uncertainty, • A PW-link Wi-Fi telemetry module
noise and jamming, thrust and magnetic field • The VS Plus flight controller with the NEO V2
(for correlation), power system, health report GNSS module
(estimator watchdog), RC quality, CPU and
RAM, sampling regularity of sensor data and I also made a couple of flights with another
logged messages (warnings, errors). quadrotor with the same type of hardware,
When a flight goes wrong, log analysis is except for a DJI F450 frame.
a great tool that can potentially help us find For my first flight tests with the VS Plus, I
issues in the aircraft build quality, as well as used the HV_PM (High-Voltage Power Module)
hardware failures, flight controller wrong that was included in the kit I received from
parameter configuration or even issues with our CUAV Tech. This power module supports
piloting skills. But even if nothing goes wrong 3S-14S batteries and voltages between 10-
and your aircraft flies well, log analysis can help 60V. However, from the very beginning I had
ci rcuitcellar. corn 23

an interesting issue with this power module. instantly. Of course, in reality, the battery
After take-off of the quadrotor, the "low- wasn't getting discharged that fast, otherwise
battery" warning was being triggered in my external LiPo alarm would have been
QGroundControl less than a minute into flight, triggered as well. It was just that, for some
even though the batteries were fully charged. reason, the flight controller was apparently
Looking at QGroundControl's GUI, I noticed getting erroneous readings from the current
the "battery voltage" indicator was dropping and voltage sensors in the power module.
from 12.6V to 10V in just 3-4 seconds, and I got rid of the adapter cable and did a flight
the "remaining-battery" indicator fell from test again. The flight time improved to around
90% to 10% in just 8-10 seconds, making 4-6 minutes, before the warning signal sounded
QGroundControl emit audible "low-battery" again. It then appeared that the cause for the
warnings. I tested the quadrotor with three early warnings was that the voltage and current
different batteries, which I knew were fine sensors in the HV_PM power module were not
because I had used them previously with working well with the 35 batteries. I was also
other quadrotors of similar configuration told that, apparently for a 35 LiPo battery, a
without any issues-and got the same results. current of around 15A was normally expected
Additionally, I had an external LiPo battery for the kind of quadrotor configuration I
alarm connected, which never got triggered had, instead of the 22A I was getting in the
by the apparent low-voltage condition. I was flight logs. From past logs from other similar
flying with PX4 firmware, but I also changed quadrotors, I found that currents between 13A
to ArduPilot to check if the issue was specific to 15A were typical.
to PX4. I got the same instant "low-battery" It was suggested that I try using a LiPo
warnings with ArduPilot as well. battery with more cells, so I did tests with
45 batteries; the drone flew well but with a
USER GROUP HELP bit of oscillation. Perhaps it would have been
The CUAV Tech user group channel at PX4's fixed by tweaking the default PID calibration,
Slack workspace helped greatly to determine but I didn't go that route. I always tend to use
the cause of the issue. The first hint I was 35 batteries with quadrotors of this size and
given was that perhaps the power cable configuration, anyway.
connecting the battery to the power module Instead, I replaced the HV_PM power module
was too long. And it was-around 15cm in with a regular 25-85 Pixhawk 1 power module,
length-because of an adapter I was using to and the flight time increased easily up to 8-10
connect my T-connector batteries to the XT60 minutes with the default battery configuration
connector in the HV_PM power module. From in the flight controller. This default configuration
my own flight logs, it also was brought to my causes the flight controller to do conservative
attention that apparently, the power cable estimates of the remaining battery power and
length was causing a considerable voltage available flight time. So, after tweaking these
drop, which in turn was causing more current battery parameters a bit, the flight time rose a
to be sourced from the battery. little more.
Referring to the gray curve in Figure 8, In retrospect, perhaps the HV_PM module
you'll notice that the current sourced when could work well with higher-voltage batteries,
the quadrotor is hovering is around 22A on but I didn't test it with more than 45 ones.
average-with a peak as high as 52A! And I had never previously encountered any issue
the measured battery voltage (the dark- like this before, and it took me some days to
blue curve) drops from 12V to lOV almost understand what was happening. As you know,

Power - Battery voltage [V]


50 - - Battery voltage filtered [V)
- Battery current [A]
40 - Discharged amount [mAh / 1001
- Battery remaining (0 =empty, 10 =full)
SV
30 - FIGURES
3.3 V
V5 Plus "power" plot from a flight log
}\ ,.....-"'\ /\.... /\
20
"' .A.
review. lh is graph is representEd

I ~
\ here in the same fonmat that it's in
10 the PX4 cloud application. But some
V

= /
.......
~ ....... V -- l notes about the axis units are needed .
The Y axis displays both units of
0 Voltage M and Current (A) . The Xaxis
2:10 2:15 2:20 2:25 2:30 2:35 2:40 shows time in Minures: Seconds.
Z4 CIRCUIT CELLAR • OCTOBER 2020 #363

The PMU has its own dedicated MCU,


a 100MHz 5TMicroelectronics 5TM32F412
running CUAV Tech's Impedance Temperature
Tracking {ITT) algorithm. According to the
manufacturer, it accurately measures voltage
and current in real time, and uses CAN bus
communication and the UAV CAN protocol to
send power consumption data to the core.
The manufacturer says its ITT algorithm
corrects measurement errors caused by
impedance changes at different operating
temperatures, to maintain consistent high-
precision voltage and current measurements.
FIGURE9 failure is a master that treats roughly but By adopting the UAV CAN dig ita I communication
VS plus drone fiight test teaches well. Figure 9 shows the quadrotor protocol, attenuation and interference errors
during a flight test. are avoided. These can be present in regular
power modules that feed the flight controller
CAN PDB CARRIER BOARD with voltage and current measurements in
Figure 10 shows an optional carrier board analog format. To accurately calculate power
for the VS Plus core, also made by CUAV Tech. consumption, the PMU's MCU samples voltage
The CAN PDB carrier board is a combination of and current at a rate of more than 100Hz.
a baseboard for connecting external devices, These data are then passed to the flight
a Power Distribution Board (PDB) and a Power controller. The PMU can accurately measure
Management Unit (PMU). The PMU part of the currents between 0-180A.
CAN PDB has a Universal Battery Elimination CAN PDB supports input voltages from
Circuit or UBEC (which is really just a voltage lSV to 62V, which roughly correspond to LiPo
regulator) based on an Analog Devices LT86455 batteries from 45 up to 1S5, and the power
65V, 8A step-down regulator that provides a SV, distribution board supports up to 180A of
8A output, and a Texas Instruments TP554561 continuous current [3]. The baseboard has 13
60V, SA step-down regulator that provides a output channels and several connectors for
12V, 4A output. Both outputs are convenient telemetry, radio control input, GNSS module,
to power external devices, such as off-board ADC, I2C, CAN, UART, and the SV and 12V
sensors and actuators, cameras, wireless high-current outputs, among other things.
transceivers and companion computers. The PDB power lines are built with 95cm2
Because of their specifications, they are even of copper sheeting, which also acts as a
more convenient for external devices that heatsink, helping reduce heat caused by the
consume relatively higher power. lines' internal resistance when high currents
circulate. The CAN PDB carrier board is
compatible with the VS Plus core and the new
For detailed article references and additional resources go to: X7 flight controller cores from CUAV Tech.
-w.circuitcellar.com/article-materials Because of their voltage and current specs,
References [1] and [3] as marked in the article can be found there. CAN PDB can be suitable for big drones
carrying high payloads. CUAV Tech also sent
me a CAN PDB carrier board to test, but
RESOURCES I wasn't able to do a flight test because of
Analog Devices I www.analog.com global health emergency restrictions due to
the COVID-19 pandemic.
Ardupilot I https:f/ardupilot.org
Bosch Sensortec I www.bosch-sensortec.com
CONCLUSIONS AND FURTHER
TESTS
CUAV Tech I www.cuav.net The kit I received came well packed in a
fine box. From an aesthetic standpoint, the
Dronecode I www.dronecode.org VS Plus core, the standard carrier board and
CAN PDB carrier board, and the NEO V2 GNSS
iSentek Techno logy I www. isentek.com module seem well crafted and robust, with a
PX4 Autopilot I https://px4.io nice-looking finish. When powered, both the
flight controller core and GNSS module emit
STMicroelectronics I www.st.com an elegant, halo-like status light surrounding
their bodies.
TE Connectivity I www.te.com After changing the original power module,
I had no further "low battery" sudden
Texas Instruments I www.ti.com warnings, and the flight controller performed
ci rcuitcellar. corn 25

well in the next flight tests. The sensor's FIGURE 10


triple-redundancy gives confidence such that, CAN PDB <:ilrrier board
in the event of an accelerometer or gyroscope
failure, there are still two additional redundant
ones the flight controller can use to maintain
control of the aircraft. This highly reduces the
probability of a crash due to multiple-sensor
failure. This kind of reliability is important,
for instance when your aircraft carries
expensive remote sensing equipment, such as
professional video cameras, high-end LIDARs
or high-resolution thermal cameras. Likewise,
it is important when the drone has been given
a highly sensitive task and can't afford a enthusiast always eager to try new things,
failure that would lead to a subsequent crash. perhaps you should take a serious look at the VS
Currently I'm planning to test the VS Plus Plus. It could be just the type of reliable flight
with some autonomous flight applications that controller you are looking for. e
integrate computer vision for object detection
and tracking. I tested the VS Plus mainly with
PX4, because it's the platform I generally use
for autonomous flight development, but I
flashed it with ArduPilot firmware as well and
made a couple of flight tests. The configuration ABOUT THE AUTHOR
process is equally easy with both platforms. Raul Alvarez-Torrico has a BEng in electronics and is the f ou nder of
With a price tag of around $3S8 for the TecBolivia, a company offering services in physical comput ing and educational
complete kit (flight controller core plus standard robotics in Bolivia. In his spare time, he li kes to experiment with wireless
carrier board, GNSS module, power module, sensor networks, robotics and artificial int elligence. He is also co mmitted
Wifi telemetry module and accessories), the to publishing articles and video tutorials about em bedded syst ems and
VS Plus is not cheap. But whether you work with programming in his native language (Spa nish), at thei r company's site
drones professionally, or you are a drone www.TecBolivia.com. You may contact him at [email protected].
C
onsider these two questions: 1. 3GHz Intel Sky Lake processor, a database
Are "footprint" and "code size" lockup that requires 100 CPU cycles is lOx
the same thing? 2. And, is either faster than a database lockup that requires
relevant in the current age? 1,000 processor cycles.

Answer 1: No. Code size is a subset of STACK SIZE


footprint. In the context of an in-memory Stack size in embedded/real-time
database system, "footprint" consists of: operating systems is quite limited. For
example, the default stack size with VxWorks
• Code size is just 20KB. Unlike Windows and linux, the
• Stack memory used stack does not grow dynamically. If the stack
• DRAM used for anything other than raw data size is exceeded, the program fails. This ties
directly back to function call depth, but also
With respect to code size, we must have influences how much, and how, information
an all-encompassing view. We're not the only is passed between functions, which is a
embedded database vendor that boasts about consideration that must be considered when
a "small footprint." That said, eXtremeDB the database system is designed. This is a key
from McObject might be the only embedded differentiator between an embedded database
database that has no external dependencies. that was written for embedded systems, and
For purposes of this discussion, it means an embedded database that is merely capable
that using the eXtremeDB core in-memory of running on embedded systems. Figure 1
database does not cause the application to illustrates the function call stack.
link in the C run-time library for things like It should be obvious, but for an in-memory
malloc/free, string operations and so database, DRAM is storage space. Any
forth. A claim of "small footprint" is hollow memory that is used for anything other than
when the application is forced to link a raw data limits the amount of raw data that
megabyte of the C run-time library. can be stored in any given amount of DRAM.
In addition to storing raw data, memory is
Answer 2: Yes, these terms are relevant. used for meta data (data about the data),
Code size matters. We can ascribe two things indexes and database internals.
to a small code size: The function call depth Let's use some real numbers to Illustrate.
and the number of CPU instructions for any Suppose that in-memory database "A11
given operation. A core embedded database imposes 100% overhead on the raw data. That
engine with a code size of 150KB is going to means that 20MB of DRAM will be required to
require fewer function calls, and each function store 10MB of raw data. In-memory database
call is going to require fewer CPU instructions "B" only imposes 30% overhead, so it only
than another embedded database engine requires 13MB to store the same 10MB of raw
with a code size of 1.5MB. Whether you're data. In an embedded system like a portable
executing on a 200MHz Arm processor or a media player that only has 32MB of memory
ci rcuitcellar. corn 'D

FIGURE 1
Top of stack An illustration of tl1e Call Stack function
r
Local Variables • Ca ll Stack is a stack that contains
a collection of stack frames.

Ret urn Address • A Stack Frame, also called


Func1 (Arg1, Arg2 .. .) --< an activation record, contains
information about a function call.
ArgN
... • When the prog ram runs, the call stac k
Argl contains at least one stack frame,
which is for the main function. A stack
>- frame is created whenever a f unc tion
Local Variables is called.

• Arguments are inserted into a stack


Ret urn Address frame from right to left.
Func2 {Arg1 , Arg2 ... ) --<
• A Stack Point Register (register 1) is
ArgN used t o mark t he current "top" of
... the stack .
Arg t
'-
Call Stack

to begin with, that is a meaningful difference! simply means that ifthe column(s) queries are
eXtremeDB is an example of an in-memory only the indexed column(s), then the query
database type "B" in this comparison. The results can be obtained by only scanning the
relationship of code, static data, stack and key. There is no need to follow the pointer to
heap is illustrated in Figure 2. the data record and the amount of logical I/0
For its part, eXtremeDB employs several is reduced by one-half. But this optimization
techniques to minimize the overhead. The only makes sense for persistent databases,
first-and biggest-influencer is index types because of the speed of storage media.
and how indexes are organized. eXtremeDB Following a pointer in memory to the
offers a wider variety of index types than other data record takes just nanoseconds, whereas
database systems, but the most commonly following a pointer to a track and sector on
used are hash and b-tree indexes. By their a solid-state disk can be as low as l~s, and
nature, hash indexes use less memory (and generally on the order of 10 milliseconds for
are faster) than b-tree indexes. By far, the a hard disk drive. The use of precious DRAM
most common type of index is the b-tree to store redundant key values is unjustified
index. To understand the disadvantages of a
b-tree you need to have at least a high-level
understanding of their organization.

A I-TREE INDEX
Heap rl In-memory
database lives
here
As shown in Figure 3, a b-tree is an upside-
down tree, with the "root" node at the top. Each
!
node has many slots where the number of slots
is a function of the size of the node (in bytes)
and the size of the "payload.u Simplistically,
number-of-slots = node size I payload. Each slot
t
StackN
contains (1) a pointer to a node with key values
that precede the key value in this slot, (2) this
key value, and (3) a pointer to the actual data
Data
record that is being indexed.
As you can see in the illustration,
b-trees are normally partially empty (up
to 45% empty), so there's built-in space FIGURE Z
inefficiency. The key value exists in the slot Code This shows the relationship of the
code, the static data, the stack and
so that database systems can implement an
the heap.
optimization called a "covered query,n which
15877542
15877542
Servo control is just one area where microcontrollers
shine. In this article, see how these two Comell
students designed and built a ball-balancing platform
based on PIC32 MCU, using a resistive touchscreen
and servomotors attached to a gimbal mount. A PlO
control algorithm is used to balance the ball.

W hile it may seem a simple


task, balancing on one foot
is no small feat. It requires a
constant cycle of observation
and adjustment. Getting an electronic device
In this article, we present a ball-balancing
platform that uses a touchscreen and a
Microchip PIC32 microcontroller (MCU) to
keep a steel ball bearing stable on its surface.
A proportional, integral, derivative (PID)
to perform a similar task in just a few weeks control algorithm and two serves are used.
is not easy and takes quite a bit of tuning- This project was designed to inspire interest
just as it takes us time to learn to balance as in control theory and its applications, and to
children. motivate deeper thought about the physics at
play in this system. Our end result is shown
in Figure 1.

PHYSICAL ANALYSIS
A ball rolling on a perfectly flat plate is
technically metastable, since, if there are no
forces applied, the ball will remain static.
mgsin(O) mgsln(O) 5 (B) 5 Of course, this assumption is terrible, and a
a - - -1 - =-- 2- = ?IJsln .. 708 real ball sitting on a real plate is going to fall
m+RT m+~m
off unless we do something about it. A ball
rolling on a tilted platform roughly follows a
linear relation between angle of the platform
and acceleration along the surface (Figure :Z).
The no-slip condition makes this linearizing
assumption possible, because we essentially
FIGURE2 assume that each rolling direction is totally
Illustrated here is a free body diagram of an isolated direction of the ball on an angled plate, and an equation independent.
of predicted motion. In this analysis, m represents the mass
ci rcuitcellar. corn 31

of the ball, I is the moment of inertia of a approximately 32-degree range of motion in


rotating sphere, and a is the acceleration the short direction, and 36 degrees in the long
of the ball parallel to the surface. At small direction. Placing the pivot mechanism at the
angles, sin (8)=8, so we show a linear relation center of the plate, while easy to build, did not
at the end between angle and acceleration. allow for rotations outside of this range. This
We tilted the platform over a range of about mechanism has the only 3D-printed part: a
±15 degrees, or about ±0.3 radians, which cross-shaped connector that joins the top plate
gives a maximum error of approximately and pedestal.
l.So/o due to the small angle approximation. We first laser cut the acrylic and glued
Given a relatively heavy, 1" steel ball, we together all the supports, noting the order of
knew we needed servos that could hold their operations for attaching the pivot mechanism.
position with the mass of the ball (0.07kg) at The pedestal and cross piece were assembled
the servo arm's maximum distance from the first, and the servo joint attachment points
pivot (Bcm). This meant we needed serves (shown in red in Figure 3) were glued to
that have about 0.56 kg-cm torque, which the top plate separately. Then the center
translates to around Boz-in. The serves we supports were attached to the top plate, while
chose had a 4.8V stall torque of 9.4kg-cm simultaneously joining them to the cross piece.
or over 125oz-in. Although we planned to The ball joint attachments to the serve motors
run on SV power and thought we might be were then easy to attach to the top plate and
underestimating the maximum torque on were snapped onto the servos mounted to the
the motor, this was plenty strong. The main bottom plate at their minimum or maximum
trade-off is between strength and precision extent. To do this, we first zeroed the serves
of the motors. As it turns out, our serves and then set the angle of the platform to our
were extremely strong for this task, causing desired zero angle.
a precision issue in the tuning stage. The success of this project was heavily
dependent on the care with which the
MECHANICAL DESIGN
The main pieces of the platform were the
base plate, pedestal, top plate, serve and pivot
hinges, and the servo mounting brackets. By
securing the serves to the base plate, we
hoped that the structure was rigid enough to
handle rapid movement. When starting this
project, the biggest decision to make was
to first choose a resistive touchscreen. The
dimensions of that piece of hardware largely
determine the rest of the design, and it is
the most unique item on the supply list. Our
project used a medium-sized, rectangular, 7"
diagonal resistive touchscreen overlay from
Adafruit [1], and we cut our top plate to match
its dimensions (165mm x 105mm).
From here it makes sense to do a bit of
math to answer the following questions: How
far off the table does the plate need to be
to accommodate two serves and the table's
full range of motion? How powerful does each
serve have to be to accelerate the ball when
it is moving quickly toward the edge? A good
estimate can go a long way-even if it means
the design is tweaked at the end.
The resistive touchscreen sits on an acrylic
plate, which is mounted to a base using a
partially 3D-printed Cardan joint (Figure 3).
This allows the plate to pivot around its hinge
in two directions independently. Each direction
is controlled by a serve motor, which is
attached to the underside of the plate with a
ball socket connection.
We used 1/8" acrylic for all pieces, and
attached them with acrylic cement. In FIGURE3
our implementation, the platform had an CAD drawings of the acrylic pieces, fully assembled
32. CIRCUIT CELLAR • OCTOBER 2020 #363

mechanical integration was performed. Tightly essentially a potentiometer. The value read by
fitting each joint to the servo motors, and that pin changes based on where you press
making sure the pivot point didn't wobble, both on the screen. The fourth pin is left to float,
yielded better performance in the final design. since it must be used for the other direction's
touch. By performing this process for one
ELECTRICAL DESIGN direction and then the other, the position of a
The main electrical components include a point of pressure on the screen is located [3].
Microchip PIC32 MCU [2], two serve motors, the The serve control used a standard pulse-
resistive touchscreen and a serial connection to width-modulated (PWM) signal. The Tower
a separate computer monitor for the tuning Pro MG995 took a 50Hz pulse with an on
step (see the schematic in Figure 4). time between lms and 2.5ms. The serial
The touchscreen generates a voltage connection to a computer and monitor was
proportional to the X (long dimension) and Y purely a convenience for tuning parameters.
(short dimension) position of an input touch. This is highly recommended to make tuning
Using Adafruit's touchscreen control chip to less time consuming.
receive data proved time consuming, but By watching the acceleration of the ball at
there were several options for making the job maximum tilt, we estimated that we needed
easier. The touchscreen uses four pins to set at least a 1kHz sampling rate for an accurate
the voltage of strips of conductive material reading of the ball's position. Because we can
that line the outer perimeter of the screen. only measure the ball's position in one direction
By holding a SV potential across the screen at a time, this means that each direction must
in one direction, the voltage read by one of be sampled at that 1kHz frequency. We then
the perpendicular pins makes the screen update the servo position as fast as possible.

330 330 330

"'a: •33V

U4 9
VOD
GPBO GPAO
CPBl GPAl
GPB2 GPA2
GPBJ GPA3
GPB4 GPM
GPB5 GPAS
CP!l6 GPA6
GPB7 GPA7
SCK
l~
SI so
•cs
20
AO INTA
19
Al INTB
A2
10
' RESET vss

MCP23Sl7
l.JO
~ ON::. CS

PGD= RBO
~ PGC• RBl
~
TFTCS

JlO

~
~
PECS

_L ~~n ••0
~ LED
FIGURE4 +JJV
Full schematic, including our attilched
hardware, of parts of the development
board [4] created by Sean Carrell for
ECE 4760 [5]

1\da~ulr TFT LCD DosfJIIIY


ci rcuitcellar. corn 33

PROGRAM STRUCTURE
The program structure runs on two threads
and one interrupt service routine (ISR), with
a few other helper functions. The meat of
the functionality is in the ISR, which runs at Setpoint +
2kHz and toggles between reading the X and
Y positions. After each read, the PWM signal
to the corresponding servo is also set. The
two scheduled threads are for writing output
to a screen or exchanging serial information p,
with our command structure. Both of them
p, = a p, _, + (1 - a)p ,
can be implemented in many different ways,
depending on what is convenient. We used
code and explanations from Bruce Land's
MCU design class [5] to use Adam Dunkels'
Protothreads library [6] for the high-level FIGURES
design of our code structure. The P!D control loop with filtered raw position data from the touchscreen
Our main () function sets up the analog-to-
digital converter (ADC) ports, output compare
units (for generating PWM signals), and sets
up our first read from the touchscreen, before
jumping into the infinite cycle of writing to/ ABOUT THE AUTHOR
reading from the screen and the serial port.
The ISR then handles cycling through the
actual control loop.
Two helper functions called rea dXp rep ()
and readYprep() set the ports that control
Samuel Feibel is a graduate student pu rsuing a M.Eng. in Mechanical and
the touchscreen to their appropriate values Aerospace Engineering at Cornell University. Email: o
for a read in one direction versus another.
Following the touchscreen specifications, one
pin must be set to logic high, one to low and
one is set as an input, so that its value nfloats"
and does not affect the reading. The fourth
pin is then read by an ADC on the PIC32.
The PID controller is a feedback loop that
tries to minimize the error between the input
and a desired input. The "proportional" term
With the right tools
applies a correction that is linearly related to designing a microprocessor can DP. ~~~
the error. The "derivative" term is essentially
a damping term and serves to slow down Okay, maybe not easy, but certainly less complicated . Monte
the signal when it is moving too quickly. This Dalrymple has taken his yea rs of experience designing embedded
means that oscillations around the zero-error architecture and microprocessors and compiled his knowledge into
point caused by the proportional term will one comprehensive guide to
be smoothed out over time. The "integral" processor design in the real
term simply corrects for steady-state error. world.
We did not need an integral term, since the
system was never settled enough to measure
a steady-state error for which to correct.
During one control cycle, the ISR first reads Monte demonstrates how Verllog
the position of a touch, shifts by an offset value hardware description language
we determined to be at the "edge" of our screen's (HDL) enables y ou to depict,
sensitive area, and then scales to convert to a
simulate, and synthesize an
position in units of O.lmm. This step allowed
us to check that the positions were being read electronic design so you can
correctly. The error is calculated by subtracting reduce your workload and
the read position from our pre-set desired increase productlviry.
position, and is low-pass filtered to make these
position reads less jittery. We used an exponential
filter to low pass the output, and found that even
after heavy filtering, the error did not lag enough
to matter, because the ball did not move fast
enough to make it inaccurate (Figure 5).
34 CIRCUIT CELLAR • OCTOBER 2020 #363

RESULTS
Tuning the parameters takes a while, so
once you get to this step go ahead and settle
in. We achieved some starting values for each
direction independently by attaching a thin
railing to the platform, which constrained the
ball to a single direction of linear motion. The
derivative coefficient and the proportional
coefficient, along with a parameter that
changes the strength of the low-pass filter
on our error calculations, was performed
through a serial connection to a PC. After
getting the X direction tuned to a reasonable
level, we tuned Y, and then combined them by
removing the railing constraints.
Our video demonstrating the device in
action can be accessed by scanning the QR
code in Figure 6. With our best tuning on our
best run, we were able to balance the ball
for about 44 seconds. In about 24 seconds,
each servo performed around 46 direction
FIGURE6
A QR link to a demonstration video of our device's capabilities. The video is also posted on Circuit Cellar's,
changes, matching the observed orbit around
article materials webpage. the setpoint. Visually, it was balancing better
than a human could if constrained to a pivot
This filtering was done to desensitize point.
the system, given our very coarse servo During those runs where stability was not
positioning {discussed in the Results section} ideal, a few issues could account for the lack
and slow update speed. The servo signal of steadiness:
was running at 50Hz, but the update in the
ISR took place at 2kHz. Because of that, the • Minor looseness in the joints could couple
position data needed to be slowed down so the X and Y directions of motion, throwing
that the servos updated with the most recent off the algorithm.
accurate data over the last update period. • The servos map to rotations, and don't
To calculate the derivative term, we stored linearly map to the angle of the platform,
five values of the error-the four previous especially at high angles.
values of the error, and the current error. Of • TheY-dimension of the board was about 2/3
the different ways to calculate the derivative, as large as the X-dimension, and therefore
we opted for subtracting the most recent error had a harder time stabilizing the ball.
from the oldest, multiplying by derivative gain • The servos would only react to a change in
and adding that to the output signal. PWM on time of around 0.06ms to O.OBms.
After uploading this version of the Since servos like ours have unpredictable
program, dragging a finger across the screen behavior outside the range of about 1ms to
causes a reaction in the motors, which should 2.Sms of on time, this means we effectively
not go outside the ranges set. If this is not had about 25 or so positions over 180
the case, fixing the safety parameters before degrees. This was further clamped to
putting the ball on the platform is a good about 10 distinct positions with which the
idea. Watching your delicate device-or more PID algorithm could work. Buying precise
harrowingly, HEARING your device break itself servos that can react to smaller changes
due to an overzealous servo-is not a required in PWM signal would make this platform
step and should be avoided. much more effective.

For detailed article references and additional resources go to: CONCLUSION


w.circuitcellar.com/artide-material This project was fun to make, impressed
References [1] through [7) as marked in the article can be found there. our peers, and taught us a lot. It has an
exciting amount of movement, involves
interesting dynamics, and has great potential
for improvement. While the PID control setup
RESOURCES was adequate for getting the results we
expected, the dynamics of a ball on a plate
has been explored in more detail by similar
groups of students employing more complex
control algorithms [7]. G
Huge opportunities exist today for implementing systems that build Smart
Cities. From controlling energy waste to Smart Lighting and traffic control,
loT technologies including sensors, AI platforms, cloud services analog ICs
and wireless connectivity products all have roles to play in Smart Cities.

I
n some ways, Smart Cities can be thought of as the and ensures social distancing at the same time. The Smart
ultimate form of the lnternet-of-Things (loT) at work. Entrance Counter solution is a miniaturized, discrete radar
While loT implementations in factories and agriculture board (20mm x 15mm) that accurately and anonymously
can be fairly large scale, Smart Cities are inherently counts people with one single 60GHz radar sensor and
large-scale deployments often involving diverse public and integrated software (Figure 1). A traffic light system informs
private networks and stakeholders. Sub-segments of the whether an entry is allowed or not.
Smart City include traffic control, public security, waste lnfineon Technologies says its Smart Entrance Counter
management, Smart lighting and more. solution is a closed system. On one hand, it prevents
Serving the needs of Smart City system developers, a overcrowding, on the other hand it enables businesses to
wide range of technologies have emerged over the past keep their operations running. And most importantly, due
12 months, all useful for various large and small elements to the use of radar technology, personal data are 100%
of Smart City networked systems. These range from box- protected. The system counts a person, but does not know
level AI solutions and sophisticated loT cloud services, to who it is, says the company.
chip-level solutions for implementing LoRa wireless edge Infineon expects volumes for this kind of solution
nodes and battery-powered loT devices. Meanwhile, new to amount to 90 million units globally. Infineon's Smart
concerns related to COVID-19 have increased the urgency Entrance Counter solution with XENSIV 60GHz radar sensor
for implementing many kinds of Smart City applications. is contactless and can easily be installed on the side or
ceiling of an entrance or exit. It can be implemented in all
SMART ENTRANCE COUNTER kinds of building types, such as public buildings, retail and
There's no doubt that the COVID-19 pandemic has created grocery stores, restaurants, schools or corporate spaces-
needs for special kinds of Smart City solutions. Governmental for example, cafes, offices and the like.
regulations all over the world have driven an urgent need
for solutions to secure social distancing in public buildings in SECURE CONTACTLESS TRANSACTIONS
order to support slowing down the spread of COVID-19. With Large-scale contactless payment capability was already
that in mind, lnfineon Technologies developed a system that a key technology for Smart City applications, in mass
counts people while entering and leaving buildings or rooms transportation, for example. But new requirements for social
36 CIRCUIT CELLAR • OCTOBER 2020 #363

Radar 1/0 board

Radar FF board
•) b) (Reference Hardware Platform}

FIGURE 1
Infineon's Smart Entrance Counter solution (a) is a miniatl.Jrized, discrete radar board (b) (20 mm x 15 mm) that accurately and anonymously counts people with one single 60GHz
radar sensor and integrated software.

distancing have amplified these demands. contactless, such as paying for parking,
And the worldwide impact of COVID-19 makes accessing offices or campuses and using
contact-free transactions a necessity. Serving other essential city services-all touch-free.
such needs, in June NXP Semiconductors NXP's MIFARE product portfolio is used
announced its new MIFARE DESFire EV3 IC, in Smart City installations worldwide. The
a chip that provides advanced security and new MIFARE DESFire EV3 IC builds upon
seamless integration of mobile services for a the portfolio's heritage of powering mass
new era of security and connectivity in smart transit ticketing. An extensive set of security
city services (Figure 2). features in the MIFARE DESFire EV3 IC provide
As the third evolution of NXP's proven more ways to protect data and help ensure
contactless MIFARE DESFire portfolio, the privacy. The IC hardware and software are
latest IC is backward compatible and offers certified to Common Criteria EAL 5+, and the
enhanced performance with a greater IC supports a broad choice of open crypto
operating distance and improved transaction algorithms. A card-generated MAC helps to
speed. In combination with its advanced securely authenticate transactions, and a
security features, the new IC delivers faster, new Transaction Timer feature helps mitigate
more secure transactions that are truly man-in-the-middle attacks so it's harder for
an attacker to interfere with the transaction.
Meanwhile, the MIFARE DESFire EV3's new
Secure Unique NFC (SUN) messaging feature
offers a more secure method for maintaining
data confidentiality and integrity. Each time a
card, phone or ticket is tapped with the SUN
featured enabled, a tap-unique authentication
message and crypto-secure URL are generated
that can be sent to a server for verification,
which makes taps unclonable.
Support for MIFARE DESFire EV3 will be
integrated into NXP's MIFARE 2GO cloud
service, which manages digitized MIFARE
product-based credentials and helps
streamline mobile integration via NXP's
ecosystem. With this, Smart City services
FIGURE2 can be seamlessly deployed to NFC-enabled
The MIFARE DESFire EV3 IC chip enables secure transactions that are truly contactless, such as paying fur smartphones, wearables and other mobile
parking, accessing offices or campuses and using other essential city services-all touch-free. devices.
ci rcuitcellar. corn D

For simplified deployment, each MIFARE


DESFire EV3 IC is pre-configured with keys
to enable delegated application management,
which supports seamless, over-the-air
updates to already deployed smart cards using
NFC-enabled smartphones. In addition, NXP's
upcoming MIFARE Plus EV2 IC will provide a
drop-in replacement for upgrading existing
MIFARE Plus and MIFARE Classic product-
based installations for higher security.
®
loT PASSENGER COUNTING
Mass transit passenger counting had
already been a popular emerging technology.
But, as with so many other things, the COVID-19
era brings the importance of this capability to
FIGURE 3
the forefront. Eurotech's passenger counters, digital I/0 interfaces can be used to directly The DynaPCN 10-20 is a compact,
already installed on urban and intercity bus communicate with intelligent doors or flow low power, autonomous device based
lines, allow accurate real-time passenger control systems, guaranteeing optimal on non-contact stereoscopic vision
monitoring, remotely and onsite. functionality at all times. For example, it can technology. It has been specifically
Eurotech's technology was selected by stop counting when the doors are closed. designed for passenger counting
above the doorways in buses and
Thales as a supplier of embedded hardware and trains.
loT software for the CAVE project »Automatic LoRa FOR CONNECTIVITY
Counting of Passengers" in some of the Grand Because of the inherent spread-out nature
Paris Express' metro lines. In addition to of Smart City network implementations,
using the power-over-Ethernet (PoE) version LoRa has emerged as a popular wireless
of Eurotech's DynaPCN passenger counter, the connectivity technology for these applications.
solution is based on ESF (Everyware Software Over the past couple years, the release of LoRa
Framework) for the onboard software for data (long range) chip solutions have accelerated
collection and remote configuration, and EC as technology providers race to keep pace
(Everyware Cloud) for the ground software to with demands. loT networks based on the
enable Societe du Grand Paris to securely access LoRaWAN specification have been deployed in
passenger counting information and to use this 100 countries. for more on loRa as a solution
data internally or by sharing it externally. for Smart Cities, see the sidebar "LoRoWAN:
The DynaPCN 10-20 is a compact, low A foundational Network for Municipal loT
power, autonomous device based on non- Solutions" on p.41.
contact stereoscopic v1s1on technology In an example of a recent LoRa device,
(Figure 3). It has been specifically designed in August STMicroelectronics (ST) added a
for passenger counting above the doorways in QFN48 package to its STM32WLE5 wireless
buses and trains. It can also be used to count system-on-Chip (SoC) portfolio. The
people as they enter or leave buildings or STM32WLES combines ST's STM32l4 ultra-
any area with restricted access. Stereoscopic low-power microcontoller (MCU) technology
cameras capture images of the area below and Semtech SX126x sub-GHz radio IP
the device. Thanks to the integrated high optimized to meet local radio-equipment
luminosity infrared LED indicators, it can regulations worldwide (Figure 4). The chip's
operate in any type of lighting condition. single-silicon-die integration helps save
The extended temperature range capabilities bill-of-materials (BOM) costs and simplifies
allow integrators to use the device in a wide system designs. ST targets the device for use
range of climatic conditions. in connected, smart devices for applications
The DynaPCN 10-20 analyzes the height, in metering, city management, agriculture,
shape and direction of any object passing the retail, logistics, smart buildings and
field of view. If the object is recognized as environmental management.
a person entering or leaving, the incoming The STM32WLES's new 7mm x 7mm QFN48
and outgoing counters are incremented package option makes it suited to a simplified
accordingly, along with time and date two-layer board design that further eases
information. Data transfer is made via an manufacturing and reduces BOM costs. The
Ethernet interface. The onboard insulated STM32WLES supports multiple RF-modulation
38 CIRCUIT CELLAR • OCTOBER 2020 #363

schemes including LoRa spread-spectrum put LoRa infrastructure technology into place.
modulation as well as the (G)FSK, (G)MSK Feeding such needs, Semtech announced
and BPSK used by various sub-gigahertz a collaboration with Nesten, a developer of
long-range protocols including proprietary specialized blockchain and IoT-based solutions
protocols. Users have flexibility to apply their for optimized communications networks. The
desired protocol stack, whether created in- effort supports the continued roll out of the
house, sourced externally or chosen from Nesten's LoRa-based node platform.
off-the-shelf software such as the LoRaWAN Following the successful 2019 deployment
and wM Bus (wireless M-Bus) stacks that are of its first-generation G1 wireless node based
available from ST and authorized partners. on Semtech's LoRa devices and the LoRaWAN
ST has engineered the integrated RF stage protocol, Nesten has increased the integration
to address global markets while improving of its LoRa-based wireless infrastructure in
performance and easing manufacture. Features several key markets throughout the US and
include dual low-power (14dBm) and high-power abroad, and has begun mass production of
(22dBm) transmitter modes with highly linear its node platform to empower individual loT
performance from 150MHz to 960MHz, spanning management.
the sub-lGHz unlicensed frequency range, Nesten's G1 node is a wireless gateway
which ensures technical compatibility with RF enabling loRa, Wi-Fi, GNSS and Bluetooth-
regulations in all world markets. Sensitivity based data communication in real time.
down to -148dBm helps to maximize RF range. Nesten recently announced the deployment
Only a single crystal is needed to synchronize of more than 270 Gl nodes throughout the
the high-speed external (HSE) clock and the Dallas metropolitan area, with additional
radio, delivering a further savings in BOM. loRa-based infrastructure deployed across
The new QFN48 package extends the major markets in the US, including Houston,
STM32WLE5 portfolio, which also includes Georgia, California, the New York, New Jersey
devices in a Smm x Smm BGA73. Three different and Washington, D.C. suburbs, as well as select
flash-memory density options are available per markets in Canada, Mexico and South Korea.
package, offering a choice of 64KB, 128KB or Nesten's consumer-based deployment
256KB, and all devices feature a high proportion model enables end users to deploy their own
of user-assignable GPIOs. All feature ST's ultra- flexible LoRa-based applications built on the
low-power MCU technologies, including dynamic Gl node, and operate and maintain their own
voltage scaling and proprietary adaptive real- IoT network without the associated costs
time ART Accelerator that allows zero-wait traditionally found with telecom carriers.
execution from flash. leveraging the end user and blockchain as the
cornerstone of each LoRa-based deployment,
LoRa INFRASTRUCTURE Nesten is also able to provide extensive data
In order for loRa wireless connectivity to protection and privacy. Several loT use cases
be deployed on a large scale, cities need to currently utilize Nesten's open-source LoRa-
based infrastructure. These applications exist
within a wide variety of vertical markets,
including smart parking, personal emergency
detection and pet tracking and geolocation,
home security and more.

LoRa EXPRESSWAY APPLICATION


In an example of LoRa technology in
action, in August Semtech announced that
Korea Expressway Corp. (KEC) has built a
network based on Semtech's LoRa devices
and the LoRaWAN protocol for its expressways
as the first stage in its ongoing four-year IoT
deployment plan in the country (Figure 5).
Beginning in 2019, KEC deployed 78 loRa-
based gateways over 306km of expressway.
FIGURE4 Woojoo Telecom, a systems integrator and SK
The STM32WLES l.oRa SoC combines ST's STM32L4 ultra-low-power MQJ technology and Semtech SX126x Telesys, a loRa-based gateway manufacturer
sub-gigahertz radio IP optimized to meet local radio-equipment regulations worldwide. and network server provider, were selected
ci rcuitcellar. corn 39

as operators for this project, conducting


communication tests on roads and in tunnels
to establish the high-quality loT network.
Currently, the network offers many strategic
functions including parking space and trash
bin fill monitoring at rest areas, and real-
time condition tracking for shock-absorbing
barriers and guardrails.
In the coming years, KEC plans to expand
the LoRa-based network's applications to
include landslip detectors, road-freezing
sensors, electronic displays, fire extinguishers
in tunnel and expressway lights. By continuing
to migrate applications from legacy 3G/LTE
connectivity to LoRaWAN, KEC expects to reduce
operating cost by up to $2 million per year. LoRa
devices and LoRaWAN networks cover hundreds
of uses cases essential to city and often
countrywide infrastructure, says Semtech. FIGURE 5
These deployments increase efficiency and cost two platforms is enhanced with APis, which Korea Expressway Corp. built a
savings for those government entities providing means smart product/utility companies and network based on Semtech's LoRa
public infrastructure such as nationwide solution providers can benefit from a unified, devices and the LoRaWAN protocol for
its expressways as the first stage in
expressways, and LoRa devices represent an customized provisioning, management and its ongoing four-year loT deployment
ideal technology and connectivity backbone. maintenance environment. plan in the country.
Monogoto offers global coverage in all
CELLULAR loT PLATFORM major markets, including their innovative
Implementation loT over existing cellular ucellular suitcase" and the ability to roam
infrastructure is a popular option for Smart into private networks like CBRS in the US for
City system developers. To smooth the service in remote places. With its multiple
way, in July Cloud of Things announced cellular profile container, the Monogoto
a collaboration with Monogoto, a cellular Secured loT SIM has a globally redundant
provider implementing cellular connectivity footprint in more than 170 countries and 2G,
alongside secure private LTE networks. The 3G, 4G and LTE CAT-Ml connectivity federating
two firms rolled out a global offering to more than 550 cellular networks. Supporting
smart product manufacturers that reduces standard UlCC (triple form factor), eUICC and
complexity and risk, and speeds time to iUICC, the Monogoto loT SIM card guarantees
market with advanced services supporting compatibility to any loT device/use case.
secure edge-cloud deployments. The first joint offering from the two
The Cloud of Things' DeviceTone loT Suite, companies is an end-to-end prototyping
which includes its patented CloudSwitch package, which includes the DeviceTone
technology, has been integrated with Genie, a ready-to-run device launched in
Monogoto's global cellular connectivity June, and made available on the Microsoft
platform using the Monogoto loT SIM Azure loT marketplace, and Monogoto's kit,
(Figure 6). This makes it simple to spin up which includes zero code service creation for
and scale connected systems, including rapid flow formation and global loT cellular
automatically and securely registering end- connectivity. Designed specifically for the
points to the network, whether those end- connected field service market, the DeviceTone
points are fixed or mobile, on land or at sea, Genie Starter Kit that comes with a full featured
are indoors or outdoors and include single or loT environment and with a Monogoto SIM and
multiple sensors. complementary support services.
This means that Smart City system
developers can take full advantage of a GPS: A CRITICAL ASSET
real-time operating system using a single Because Smart City networks are deployed
network with security embedded merged on large scales, many of their applications
with a single platform based on Microsoft depend on GPS location and timing to ensure
Azure's worldwide infrastructure that can ongoing operations. This can include power
connect to any cloud. The combination of the utilities, financial services, mobile networks,
40 CIRCUIT CELLAR • OCTOBER 2020 #363

BlueSky GNSS Firewall Software Release 2.0


Assets • Dev iceTone M~~ag~ BJs nwss Appl cat•ons
includes improvements developed by Microchip
• oevtc.lone
cen as a result of participation in an industry live-
sky testing event hosted by the US Department
of Homeland Security (OHS} Science and
Technology Directorate and open to all providers.
Microchip's participation in the OHS-hosted
GPS Testing for Critical Infrastructure (GET-
0} events, with scenarios including spoofed
signals, has helped the company to identify new
~ Iona solutions to prevent signal disruptions. The Blue
Gate..ay
Sky GNSS Firewall Software Release 2.0 release
improvements are based on the result of the
20191ive-sky testing and other input.
FIGURE6 Microchip's BlueSky GNSS Firewall
Designed specifical~ for the connected transportation and more. As a result, GPS Software Release 2.0 is provided as part of
field service market, the DeviceTone has become a critical asset in Smart City a subscription service and is installed on the
Genie Starter Kit comes with a full implementations. To protect that asset, in BlueSky GNSS Firewall device. When connected
featured loT environment.
June Microchip Technology announced the to Microchip's TimePictra management
release of a major software update for its software, critical infrastructure operators
BlueSky GNSS Firewall product, providing also can monitor and analyze GNSS signals in
a higher level of resiliency against GPS cities, across geographic regions, throughout
vulnerabilities for systems dependent on GPS ,a country and even globally.
signal reception.
Microchip's BlueSky GNSS Firewall BUCK-BOOST DC-DC CONVERTER
Software Release 2.0 performs real-time Smart metering is key subsegment of
analysis to detect jamming and spoofing Smart Cities. An ability run battery-operated
for protecting reception of the GPS signal smart metering devices is vital in today's
and hardening response and recovery to applications where data-collection via IoT
avoid signal disruption (Figure 7). BlueSky is the only practical option. That means
GNSS Firewall Software Release 2.0 includes devices that can operate for at least 10 years
charting and advanced threshold settings of without changing batteries. Along these
Global Navigation Satellite System (GNSS} lines, in September Texas Instruments (TI}
observables such as satellites-in-view, rolled out what it claims is the industry's
carrier-to-noise, position dispersion, phase first DC-DC buck-boost converter to combine
time deviation and radio frequency (RF) programmable input current limit and
power level to simplify system turn-up and integrated dynamic voltage scaling to extend
deployment. battery life by at least 50%. The TPS63900
maintains the industry's lowest quiescent
current (IQ}, 75 nA, with 92% efficiency at
l01JA and delivers up to three times more
output current than competing devices, says
TI (Figure 8).
It can be challenging for engineers to
design for low IQ while providing enough
output current to send signals between
connected smart grid applications and a
network via commonly used radio-frequency
standards, such as narrowband IoT (NB-IoT},
Bluetooth Low Energy (BLE} and long-range
and wM-Bus. The TPS63900 helps engineers
conserve energy in wirelessly connected
applications that run on batteries.
The TPS63900 integrates dynamic voltage
FIGURE 7
Microchip's BlueSky GNSS Firewall Software Release 2.0 performs real-time analysis to detect jamming and scaling to deliver power while keeping the
• spoofing far protecting neception of the GPS signal and hardening response and necovery to avoid signal system at the minimum voltage required
disruption. to operate efficiently, maximizing battery
ci rcuitcellar. corn 41

life and reducing required maintenance


for industrial applications. This feature Extend battery life by 50% with the
enables design engineers to optimize power
architectures for ultra-low-power sensors
industry's lowest 10 buck-boost converter
and wireless connectivity ICs, supporting
applications that can operate for at least 10
years using the primary battery. For example,
the buck-boost converter can be paired with
TI's MSP430FR2155 in security sensors or
wireless loT sensors to monitor the vibration
of water pumps for predictive maintenance
and help drive down costs. The TPS63900
is now available in a 2.5mm x 2.5mm wafer
small outline no-lead (WSON) package.
FIGURES
AI SYSTEM FOR SECURITY The FLEX AloT Dev. Kit features rich 1/0 The TPS63900 maintains the industry's
Security is another area of Smart City and two PCie slots (xB) to support add-ons lowest quiescent current (IQ), 75nA,
development where technology can make like accelerator cards (Mustang-F100-A10 with 92% efficiency at lO>JA. It
helps engineers conserve energy in
a difference, and specifically technology and Mustang-V100-MX8) or PoE cards (IPCIE-
wi relessly connected applications that
combining AI and loT. Exemplifying this trend, 4POE) to enhance performance. The Mustang- run on batteries.
in July IEI Integration introduced the FLEX F100-A10 is a PCie-based accelerator card
AloT Dev Kit equipped with 9th Generation LGA using the programmable Intel Arria 10 FPGA
1151 Intel Core/Xeon processor, Intel Q370/ that provides the performance and versatility
C246 chipset and DDR4 memory (Figure 9). of FPGA acceleration. The Mustang-V100-MX8
The FLEX AloT Dev. Kit is specifically designed is a PCie-based accelerator card using an
for edge learning inference computation and Intel Movidius VPU that drives the demanding
features modularized, rich interconnectivity. workloads of modern computer vision and AI
Various input/output interfaces are provided applications.
for engineers to integrate cameras, sensors The FLEX AloT Dev Kit's Mustang
and motion control equipment to fast respond accelerator card can be used for analyzing
to accidental event. multiple streams of video data and handling

LoRoWAN: A Foundational Network for Municipal loT Solutions


Like many industries and organizations, municipalities utilities can partner to rapidly deploy and expand their loT
have the opportunity to transform their operations and initiatives. Easy LoRaWAN gateway deployment and cloud-
service delivery by making smart technology investments based network management allow for multi-service utilities
and building successful partnerships. The process of (water, gas, electric) to deploy service and safety applications
becoming a usmart City" is supported by the evolution of at a low cost and in a collaborative fashion. Beyond utility
Internet of Things (loT) products and services which has metering and service monitoring, municipalities can rapidly
become a global market with significant activity in most deploy LoRaWAN solutions for waste management, smart
countries and regions. parking, environmental monitoring, asset tracking, pest
As municipalities explore opportunities to deliver city- management, public safety and more.
wide loT services, they are in a unique position to partner Additionally, municipal leaders should consider that
with first-movers in their region to deploy and manage short-term measures taken in response to global crises
smart city solutions on a common and open network often lead to changes that last for decades, making today's
architecture. Partnering with water utilities, for example, technology decisions as important as ever. The COVID-19
provides municipalities with a unique opportunity to create crisis has made access to reliable, real-time environmental
a shared network infrastructure capable of supporting a data an absolute necessity. Contactless data collection
wide range of commercial and citizen-facing applications. not only supports a wide variety of business reentry
LoRaWAN networks designed for water metering are initiatives, but it will be a key component of driving long
among the most capable. They are high-density, built term operational efficiencies, improving service delivery,
with abundant capacity and secure. With a carrier-grade implementing sustainable practices and ultimately
LoRaWAN network in place to support Advanced Metering achieving a higher quality of life for citizens.
Infrastructure (AMI) deployments, municipalities and
,....---....,..--......
- Contributed by Senet, www.senetco.com
42 CIRCUIT CELLAR • OCTOBER 2020 #363

b)

FIGURE9
FLEX AioT Dev Kit (a) equipped with 9th Generation LGA 1151 Intel Core/)(eon AI Inference Sy$lem
pnocessor, Intel Q370/C246 chipset and DDR4 memory. The FLEX AioT Dev. Kit is
specifically designed for edge learning infenence computation (b).

real-time tasks such as age, gender and face Electronics, announced a partnership with
identification. The data collected can be used industrial AI specialist ONE Tech to provide an
in precision marketing, VIP customer service end-to-end, integrated loT and edge analytics
and customer flow analysis to further provide solution aimed at optimizing the performance
relevant product information through digital and use of city assets.
signage display to improve product sales and The joint loT with Edge AI platform
inventory control. combines lOT's BLE and 6loWPAN wireless
In addition to face identification, the interconnectivity devices, sensors and MRAM
solution speeds up the characteristic non-volatile memory data storage with
recognitions of vehicles such as license plates, ONE Tech's loT Platform and Micro Al. ONE
vehicle models and colors. It can be applied Tech's platform and AI deliver performance
in services like traffic steering analysis, illegal optimization, security and analytics for
parking/helmet detection and trajectory connected devices and assets (Figure 10).
tracking. Furthermore, vehicle license plate The combination results in an end-to-end loT
analysis can be deployed on highways for ecosystem-from node-to-edge-to-cloud-
electronic toll collection, and can provide that is well suited for a variety of Smart City
enhanced security by establishing a database applications, including connected community,
of suspicious vehicles. water and waste management, and energy
and asset management.
MORE AI AND SMART CITIES According to IDT, the loT with Edge
late last year, Integrated Device AI platform is a good alternative for loT
Technology (IDT), a subsidiary of Renesas developers who do not want to develop
their own cloud platform, nor want to use
other major cloud platform solutions. Such
RESOURCES development requires expertise in configuring
wireless modules, sensors and other connected
devices. The platform is designed as a ready-
to-go solution that configures and provisions
sensor and wireless products, allowing loT
developers to easily scale and customize the
platform to the unique requirements of their
applications and devices.
Securing connected assets and optimizing
their performance are the most critical aspects
of managing Smart City environments, says
ONE Tech. By avoiding unexpected asset
downtime, increasing the productivity of
field teams and protecting all data, cities can
Texas Instruments I maximize their return on investment for all
ci rcuitcellar. corn 43

FIGURE 10
The joint loT with Edge fJJ. platform
delivers performance optimization,
security and analytics for connected
devices and assets. The combination
c 20 (J 7 0 results in an end-to-end loT
ecosystem-from node-to-edge-to-
cloud-that is well suited for a variety
of Smart City applications .
... •
Sin fti"CJkO

J-

their public service projects while redirecting enables you to store big data and apply AI/
any savings to other critical initiatives. machine learning (ML) to perform advanced
Using the loT with Edge AI service, users analytics and gain deeper insights. You can
can activate and manage any IDT/Renesas monitor real-time location and performance
device. It lets you define workflows for for all your loT connected assets and
automating business processes and create orchestrate an end-to-end digital experience
real-time event notifications. The platform for your Smart City loT deployment. G

V sllngS1ot
....... L Y

NOT YOUR
AVERAGE SLINGSHOT
44 ORQIIT CELLAR • OCTOBER 2020 #363

Raspberry Pi Roundup
A Bounty of HATs and Clones

The MCC 1n is 1 bio-dllnnel, high-speed DAQ HAT for making SOJnd and vibralian
meiiSUI'8Tienls fhm lEPE sensors like aa:eleramet!rs and microphones. Up ID ~ MCC HATs
a111 be stadced onto one Raspberry PI.

T he popularity of the Raspberry Pi


product line of open-spec SBCs
is truly astounding. In surveys
of LinuxGizmos's readers, we've
found that year after year Raspberry Pi
SBCs are the most popular open-spec SBCs.
In other words, HATs can be plugged right
onto the Raspberry Pi's connector.
With all that in mind, the real story about
Raspberry Pi can arguably said to revolve
around HAT products, rather than the SBCs
themselves. Every month, new HAT products
(LinuxGizmos.com is Circuit Cellar's sister have emerged targeting an impressively wide
website). Raspberry Pi's targeted audience set of functions and application needs. In fact,
has traditionally been DIY builders, makers, such new products are so frequent, that you'll
electronics hobbyists and the like. But the notice that many of the product s covered in
open-spec nature of Raspberry Pi has led to this article were released as recently as July
huge interest among professional engineers and August.
for two reasons.
First, board vendors have been able to MACHINE CONDITIONING HAT
develop clones of Raspberry Pi SBCs, that Exemplifying these trends, the latest
either match their functionality or simply Raspberry Pi offering from Measurement
offer the same connector scheme. Second, the Computing is its MCC 172 IEPE Measurement
emergence of Raspberry Pi add-on boards, HAT for Raspberry Pi released in May. Well
called HATs, has resulted in the development suited for machine condition monitoring and
of a wide variety of add-on functions that edge computing applications, the MCC 172 is a
professional engineers need for all kinds two-channel, high-speed DAQ HAT for making
of applications. HAT stands for "hardware sound and vibration measurements from IEPE
attached on top," a hardware specification sensors like accelerometers and microphones
for add-on modules for the Raspberry Pi (Figure 1). It features two, simultaneous,
model B+ SBC. HATs have several advantages 24 bit analog inputs, with sample rates up to
compared to older add-on modules for the 51.2KS/s per channel.
Raspberry Pi, such as no soldering required. Up to eight MCC HATs can be stacked
ci rcuitcellar. corn 45

onto one Raspberry Pi. MCC offers a variety is no need for additional power supplies, only
of DAQ HATs that enable users to configure a single 5V/2.5A USB power supply is required
multifunction, Pi-based solutions with analog for both the Raspberry Pi and the HAT.
input, output and digital I/0. The open- For a quick and easy audio system setup,
source MCC DAQ HAT Library of commands the board is compatible with the main Linux
in C/C++ and Python allows users to develop distributions such as Raspbian, Volumio,
applications on Linux. The library is available moOde Audio or JustboomPiayer. Dual-channel
to download from GitHub. Comprehensive bridge-tied load (BTL) or single-channel
API and hardware documentation are also parallel bridge-tied load (PBTL) configurations
provided. for Multi room, TWS, or subwoofer applications
The MCC 172 header plugs into the 40-pin are also possible.
general purpose I/0 (GPIO) connector on a user-
supplied Raspberry Pi SBC. The MCC 172 was
tested for use with all Raspberry Pi models with
the 40-pin GPIO connector. Multiple MCC 172
HATs can be synchronized to a single sampling
clock. The clock is programmable for sampling
rates between 51.2KS/s to 200 samples/s.
HAT configuration parameters are stored
in an on-board EEPROM that allows the
Raspberry Pi to automatically set up the GPIO
pins when the HAT is connected. The MCC 172
is powered with SV provided by the Raspberry
Pi through the GPIO header connector. The
trigger input (terminal TRIG) is used to delay
an input scan until a specified condition is met
at the trigger input.

AUDIO AMPLIFIER HAT FIGURE 2


While Raspberry Pi is aimed at hobbyists
The KIT_40W_AMP_HAT_ZW board is a fully self-contained Raspberry Pi audio amplifier HAT board. The
and nmakers,n the rich variety of HATs
board is compatible with Raspberry Pi Zero Wand Raspberry Pi 3 and 4.
available has attracted professional
embedded system developers that want to
take advantage of what's available. Some
such HATs include products that are aimed at
users and makers. In an example along those
lines, in May Infineon Technologies released
what it claims is the world's first fully self-
contained Raspberry Pi audio amplifier HAT
board (Figure Z).
The board (KIT_40W_AMP_HAT_ZW) offers
high definition audio at boom box power levels
in a small form factor. The Infineon proprietary
multilevel technology ensures minimum size
and consumption, state of the art power
efficiency and HD audio quality for Raspberry
Pi users and makers. Infineon markets the
product for systems such as active speakers
with wireless music streaming.
The board is compatible with Raspberry
Pi Zero W and Raspberry Pi 3 and 4 SBCs.
It leverages the MERUS multilevel class D
amplification enabled by the MERUS MA12070P
amplifier, which allows for filter-free amplifier
design that does not need to use a filter-coil at
the output filter. This significantly reduces the
BOM cost and enables PCB area reduction. The
board furthermore scores high output power
in small form factor up to 40W instantaneous
FIGURE 3
peak power at 4Q. The solution offers best- The Indoor Air Quality HAT for Raspberry Pi features an on-board calibrated Renesas ZMOD4410 sensor that
in-class efficiency and playback time up to 20 measures the concentrations of total volatile organic compounds (TVOCs) from parts-per-billion to parts-
hours with a 6700mA-hour power bank. There per-million and measures estimate carbon dioxide (eC02) levels.
46 CIRCUIT CELLAR • OCTOBER 2020 #363

pHAT FOR GNSS applications that require accurate positioning


Once again illustrating the diverse under challenging conditions.
ecosystem of Raspberry Pi add-on boards The U-blox receiver supports a few serial
available, in July SparkFun launched ZED-F9R protocols. By default, SparkFun chose to use
GPS pHAT, a high precision, sensor fusion the Raspberry Pi's serial UART to communicate
GPS board with impressive configuration with the module. With pre-soldered headers,
options. It embeds U-blox's Automotive no soldering is required to stack the pHAT
Dead Reckoning (ADR) technology. SparkFun on a Raspberry Pi, NVIDIA Jetson Nano,
says the ZED-F9R module provides a highly Google Coral or any SBC with the 2x20 pin
accurate and continuous position by fusing connector header. The board breaks out a few
a 3D IMU sensor, wheel ticks, a vehicle 0.1"-spaced pins from the U-blox receiver.
dynamics model, correction data and GNSS A Qwiic connector is also added in case you
measurements. Sparkfun follows its pHAT (for need to connect a Qwiic-enabled device.
partial HAT) approach, which doesn't support
all the specs of the official Raspberry Pi HAT. AIR QUALITY SENSOR HAT
The ZED-F9R module is a 184-channel Some Raspberry Pi HAT manufacturers
U-blox F9 engine GNSS receiver, meaning it can have been keen to leverage the technologies
receive signals from the GPS, GLONASS, Galileo of sensor vendors. In an example along those
and BeiDou constellations with approximately lines, in August, Avnet launched a Renesas-
0.2-meter accuracy. Such accuracy can be sensor-based Indoor Air Quality HAT for
achieved with an RTK navigation solution Raspberry Pi called the AES-RHSEN-ZM44-G
when used with a correction source. Note that (Figure 3). The HAT features an on-board
the ZED-F9R can only operate as a rover, so calibrated Renesas ZMOD4410 sensor that
you will need to connect to a base station. measures the concentrations of total volatile
The module supports concurrent reception of organic compounds (TVOCs) from parts-per-
four GNSS systems. The combination of GNSS billion to parts-per-million and measures
and integrated 3D sensor measurements estimate carbon dioxide (eC02) levels. These
on the ZED-F9R provide accurate, real-time are important indicators for monitoring indoor
positioning rates of up to 30Hz. air quality. All sensors are electrically and
Compared to other GPS modules, this pHAT chemically (gas) tested with lab calibration
maximizes position accuracy in dense cities or data stored in each ZMOD4410 sensor's built-
covered areas, says the company. Even under in nonvolatile memory.
poor signal conditions, continuous positioning In addition to the ZMOD4410 sensor, the
is provided in urban environments and is also HAT incorporates a Renesas HS3001 high-
available during complete signal loss (such precision relative humidity and temperature
as short tunnels and parking garages). The sensor, along with software-controlled status
ZED-F9R is a solution for autonomous robotic LEDs. Connection points are also available
to measure the ZMOD4410 active current
consumption, which is useful when integrating
the sensor and its software into products
powered by extended life batteries.
Potential applications for the board
range from air/health monitoring systems,
smart home appliances, smart thermostats,
smart speakers and smart fans to smoke
alarms, vacuum cleaners, garage openers,
security systems, HVAC controls, air purifiers
and building automation. The ZMOD4410
indoor air quality platform is available in
four software configurations providing
various sensor behaviors targeting unique
applications indoors.
Avnet provides a pre-compiled test
application that runs on the Raspberry Pi
operation system and can measure TVOC
and eC02 out of the box. The application
is built with Renesas' proprietary licensed
algorithms. For production purposes,
FIGURE4
customers may obtain the algorithms directly
The Cl'i-A150WR is a Raspberry Pi-based industrial panel PC with a 15" touch-panel display. Leveraging the from Renesas under terms of their software
compact Raspberry Pi 3 SBC, the ComfilePi Cl'i-AlSOWR inherits the Raspberry Pi 3's 1.2GHz 64 bit quad- license agreement.
core Arm Cortex-A53 processor, a Broadcom VideoCore IV GPU and 1GB of RAM.
ci rcuitcellar. corn 47

PANEL PC FOR RASPBERRY Pi in industrial and laboratory systems, can


In July, Comfile introduced the ComfilePi be found on embedded systems. Sequent
CPi-AlSOWR, a Raspberry Pi-based industrial Microsystems won Kickstarter funding for a
panel PC with a 15" touch-panel display. Mega-RTD HAT that can be stacked to provide
Leveraging the compact Raspberry Pi3 the Raspberry Pi with up to 64 RTD channels.
SBC, the ComfilePi CPi-A150WR inherits the Shipments are due in October.
Raspberry Pi 3's 1.2GHz 64 bit quad-core Arm Sequent's next Raspberry Pi offering,
Cortex-A53 processor, a Broadcom VideoCore listed on its website now as "coming soon,"
IV GPU and 1GB of RAM (Figure 4). The new, is a Raspberry Pi stackable card for industrial
larger version has the same capabilities automation under the product code MEGA-IND
as its predecessors with smaller screen (Figure 5). The board will be the company's
sizes: the 7" CPi-A070WR and the 10.2" CPi- second-generation industrial automation
A102WR. All models in the series now support card, and is designed to bring to Raspberry
AdvancedHMI software, based on the .NET Pi all the necessary inputs and outputs to
framework, which uses the popular Visual implement complex industrial automation
Studio design environment. AdvancedHMI projects, says Sequent.
enables the creation of HMis that are not The MEGA-IND features four optically
possible with other off-the-shelf packages. It isolated digital inputs with status LEDs, four
creates a true, fast executable for the Linux- OV - 10V or 0 to :!:lOV analog inputs and four
based ComfilePi. optically isolated 4-20mA inputs. You also
The CPi-A150WR's display is a 24-bit calor get four optically isolated open drain 24V/4A
LCD with a resistive touchscreen, and the outputs, four 0-lOV analog outputs and four
controller itself provides 22x ESD-protected 4-20mA analog outputs. The card provides
GPIO lines, 3x USB 2.0 host ports, lx RJ-45 TVS protection on all inputs.
Ethernet port, lx 12C port, lx RS-485 port, a Other features of the MEGA-IND include
1x RS-232C port and a battery-backed RTC. RS485 and CAN ports, 24VDC power supply,
It also features stereo audio output as well on-board hardware watchdog and on-board
as a piezo buzzer. Wi-Fi is also possible using resettable fuse. The board provides a real
an external USB dangle. This 15" ComfilePi time clock with battery backup, pluggable
requires a 12-24VDC 21W power input. The connectors, support for eight-level stacking
CPi-AlSOWR is housed in a flame-retardant with all mounting hardware included. Command
ABS enclosure with an IP65 water resistant line and Python driver support is provided.
front panel, and is specified for an operating
temperature range of oac to 70°C. PICO-ITX WITH RPi EXPANSION
While Raspberry Pi SBCs typically run the Some embedded board vendors have
Linux operating system, the ComfilePi can taken advantage of Raspberry Pi's open
be programmed in almost any language, specifications to create their own SBCs that
including C, C++, Java, JavaFX, Javascript,
python, C#, vb.net and even emerging
languages such as Rust, D and Nim, as well
as .Net Core 2.0 applications. (Android and
Windows 10 loT are not supported.) Due to
the built-in Broadcomm VideoCore IV GPU,
the ComfilePi can even render real-time
3D graphics. CODESYS can be used on the
ComfilePi by installing one or more of the
CODESYS Raspberry Pi Control Modules.
CODESYS is a development environment
for programming controller applications
according to the international industrial
standard IEC 61131-3. Made in South Korea
by Comfile Technology, ComfilePi products are
available now from the distributor Saelig.

1/0 CARDS FOR RPi


For its part, Sequent Microsystems makes
a variety of Raspberry Pi-compatible I/0
boards serving diverse applications. In July,
the company Kickstarted a stackable HAT
called the Mega-RTD. Resistance Temperature
FIGURE 5
Detector (RTD) sensors, which are used for This Raspberry Pi st.ackable card for industTial automation, called the MEGA-IND, is designed to bring to
highly precise temperature measurements Raspberry Pi all the necessary inputs and outputs to implement complex industrial automation projects.
48 CIRCUIT CELLAR • OCTOBER 2020 #363

For mass storage you get an eMMC with 8GB,


16GB or 32GB storage and a microSD slot.
The basic version can be upgraded if
required, says ICP. Dual GbE or other display
connectors like LVDS or Display Port are
optional. The ND108T operates from a 12V
power supply in a temperature range of 0 to
60°C and complies with the CE/FCC Class B
standard. Operating system support includes
Board Support Packages (BSPs) for Yocto
Sumo and Android 9 Pie, both with Linux
Kernel 4.14.98.

BOX-LEVEL RPi SYSTEM


Support for Raspberry Pi appears to
have even infiltrated the box-level embedded
FIGURE 6 system realm. As reported by Circuit
The Uno-220 system is an loT gateway designed to be powered by a bring-your-own Raspberry Pi 4 Model B Cellar's sister website LinuxGizmos, in July,
SBC. The Uno-220 exposes all the ports on the RPi 4 and adds a custom HAT add-on with serial and GPIO Advantech launched what appears to be its
connectivity. first Raspberry Pi-compatible system. The
$90, lOOmm x 70mm x 33mm Uno-220 loT
gateway is designed to be powered by a bring-
include Raspberry Pi expansion support. That your-own Raspberry Pi 4 Model 8 (Figure 6).
opens the door to, for example, more rugged The Uno-220 exposes all the ports on the RPi 4
SBC offerings that can work with the same and adds a custom HAT add-on with serial
HATs as Raspberry Pi SBCs. Along exactly and GPIO connectivity. The system ships with
those lines, in August ICP (Industrial Computer an 8GB microSD card that is preconfigured
Products) Germany released an i.MX8M- with a Raspberry Pi OS based AdvRaspbian
based Pico-ITX SBC that it's positioning as an stack. AdvRaspbian is said to offer plug-and-
industrial replacement for a Raspberry Pi SBC. play installation with the Raspberry Pi 4. The
The 100mm x 72mm board serves up a source code is also available on GitHub.
l.SGHz NXP i.MXBM in either quad- or dual- External access is provided for the new
core versions. Memory options include 1GB, RS-232/485 port with auto direction control
2GB or 4GB LPDDR4 SDRAM with 1600MHz and a terminal block interface. There are
clock rate. There's a standard Mini-PCie also 4x GPIOs and inside the box is a real-
with PCie and USB signal. A Raspberry Pi- time clock with battery installed on the HAT.
compatible 40-pin header with GPIO signal is TPM 2.0 is available on request. Standard
available as an expansion slot along with an options are wall- and stand mounts, while
API library. DIN-rail mounting is optional. The system
In the basic version, ND108T comes with ships with all necessary screws to integrate
HDMI 2.0 with 4K resolution, GbE, 2x USB 3.0, the Raspberry Pi.
lx USB 2.0, lx RS-232/422/485 and audio line- The aluminum-built loT gateway is
out and mic-in. A USB 2.0 OTG and a UART are protected per IP40 specs, supports 0 to soac
available for programming and debugging. temperatures, and provides 10-95% RH at
40°(, non-condensing humidity resistance.
The enclosure's improved heat dissipation and
RESOURCES electrostatic discharge protection provides
Advantech I www.advantech.com the optimum protection for Raspberry Pi
SBCs, according to Advantech.
Avnet I www. avnet. com
Hilscher I www.hilscher.com FPGA-BASED RPi ZERO CLONE
ICP Germany I www. icp-deutschland.de As discussed earlier, the open-spec nature
of Raspberry Pi makes it ripe for board
Infineon Technol ogi es I www. infineon.com developers to design clones of the SBCs. Along
Measurement Computin g I www.mccda q.com just those lines, in August Trenz Electronic
launched its open-spec ZynqBerryZero, a
Renesas Electronics I www.renesas.com pseudo-clone of the Raspberry PI Zero SBC
Saelig I www.saelig.com with a Zynq-7010 Arm/FPGA SaC, a microSD
slot, dual micro-USB, mini-HDMI, CSI-2 and
Seq uent Mi crosystems I www. seq uentmicrosyst ems.com
40-pin GPIO (Figure 7).
Sparkfun I www.sparkfun.com In 2017, Trenz Electronic rolled out its
Trenz Electroni c I www. trenz-electronic.de ZynqBerry SBC from, which combines a Xilinx
ci rcuitcellar. corn 49

Zynq-7010 FPGA SaC with a Raspberry Pi. Now,


this new ZynqBerryZero (TE0727) SBC takes a
similar approach, but this time imitating the
Raspberry Pi Zero. The 65mm x 30mm SBC
offers a 40-pin GPIO header that can load
Raspberry Pi HATs that support the Zero.
The ZynqBerryZero trades out the Zero's
lGHz, Armll-based Broadcom BCM2836 for
the Zynq-7010, which combines dual 667MHz
Cortex-A9 cores with an FPGA with 28K logic
cells, compared to 85K for the Zynq-7020. The
SBC comes with 512MB DDR3L DRAM, 16MB
flash and a microSD slot. The SBC's coastline
ports are limited to a mini-HDMI Type-C port,
dual micro-USB 2.0 ports, an OTG port and a
port for JTAG/UART debugging and SV power
input. The 0 to 70°( tolerant board is also
equipped with a 40-pin header with 26x GPIOs
and a MIPI-CSI-2 camera connector.
FIGURE 7
loT GATEWAY FOR RPi The ZynqBerryZero is a pseudo-clone of the Raspberry PI Zero SBC with a Zynq-7010 Arm/FPGA SoC, a
microSD slot, dual micro-USB, mini-HDMI, CSI 2 and 40-pin GPIO.
loT gateways are yet another area that
has embraced the Raspberry Pi phenomenon.
With that in mind, in July Hilscher released its
Raspberry Pi based netPI Real-Time Ethernet
gateway. The netPI series is based on an
industrial-ready, customized Raspberry Pi 3
design made to run any custom applications in
edge automation (Figure 8). The model RTE 3
comes with Hilscher's multiprotocol netX SoC
additionally implementing all popular Industrial
Ethernet networks. With their powerful RPi 3
1.2GHz quad-core Arm CPU, the platforms are iiii
--.. --
••••
D
ready-made for any demanding Cloud, Industry iiii
4.0 and Industrial loT (lion application.
The model netPI RTE 3 includes two extra
.. 11
Industrial Ethernet ports extra to connect to
systems such as PROFINET, EtherNet/IP and
others, as supported by netX. An expansion
slot at the unit's bottom accepts extension
modules made for sensor/actuator level
communications such as RFID, digital 1/0s,
others or your own custom boards.
To meet EMC standards EN 55011 and
IEC 61000, netPI is housed in a robust metal
chassis and uses two additional PCB layers
compared to a standard Raspberry Pi 3 SBC.
The radio antenna extends beyond the chassis
for improved wireless coverage. A hardware
Real-Time Clock with a supercapacitor
as backup power source is supported. A
a . .~
nonvolatile auxiliary ferroelectric memory
(FeRAM) guarantees high endurance for data
to be rewritten billions of times (Model RTE 3).
The netPI hosts an AppArmor-secured Yocto
Linux build. By design, the system software
complies with the IEC 62443 cybersecurity
standard for automation and control systems.
docker
User access is granted via web browsers over FJGURE8
https-secured connections. The device boots The netPI Real-Time Ethernet gateway features an industrial-ready, customized Raspberry Pi 3 design made
secure and allows system updates with Hilscher to run any custom applications in edge automation. The model RTE 3 comes with Hilscher's multiprotocol
integrity-checked software only. G netX SoC additionally implementing all popular Industrial Ethemet networks.
Gone are the days when box-level embedded computers, also llntNIII
as Embedded PCs, were stridly custom-built offerings. Today, several
vendors offer extensive produd lines of embedded PC of all
and configurations, and for diverse applications including i
system monitoring, energy system control and ······~-

For its system that enables bats and wind turbines to coexist, Fleximaus chose the KBox A-150-APL
embedded PC from Kontron. The KBox A-150-APL embeds an Intel Pentium Quad Core N4200 processor.
By Jeff Child,
Editor-in-Chief

F or many years, the mid- to high-end


of embedded computing revolved
around single-board computers
{SBCs). But a decade or so ago, a
new class of computing solution emerged-the
notion of an enclosed, integrated computing
that are marketed as application-specific
systems-aimed at vehicles, digital signage,
railway systems, vision system and so forth.
It gets murky because many of the systems in
this article can and are used in transportation,
for example, so there is that kind of overlap.
system to which system integrators could An example of an embedded PC application
link their interfaces. Many such systems is a system developed by Fleximaus that
used to be common as custom-built units, allows bats and wind turbines to coexist
but vendors shifted to offering them as off- {Figure 1). The Fleximaus solution is based on
the-shelf products. These systems are called intelligent software that is able to evaluate
a number of names including industrial the environmental conditions detected by rain
PCs, rugged stand-alone box systems and and temperature sensors and use this data to
embedded PCs. These systems are attractive effectively control the wind farms in order to
to system developers that want a high-level of drastically reduce the dangers for hunting
integration to start with-so that don't have bats. An essential technical component of the
to deal with making different SBCs and 1/0 solution is an industrial PC with integrated
boards work together, for example. soft PLC. For the embedded PC, Fleximaus
Attempting to keep this Datasheet chose the KBox A-150-APL from Kontron.
roundup focused was a challenge because According to Fleximaus, the KBox A-150-APL
box-level embedded computing has grown was selected because of its fanless, rugged
into a broad category of products. With that design, which guarantees an extended service
in mind, the representative products included life and high system availability. Other factors
in this article's product gallery is restricted to in the selection included KBox's compact
embedded PCs in the literal sense of systems design, its wide range of interfaces and its
with PC-architecture computing (lntel or expansion options. The KBox A-150-APL
AMD processing) and Windows OS support. embeds an Intel Pentium Quad Core N4200
The gallery also excludes box-level systems processor. G
ci rcuitcellar. corn 51

Fanless System Embeds 8th System Blends CPU and GPU Embedded Computer Features
Gen Coffee Lake Computing lU Height

The BOXER-6641 from Aaeon AOLINK Technology's Matrix series EPC-T4286 from Advantech is an
offers a range of processors from the MVP-5100-MXM is an integrated fanless embedded computer designed for self-
Bth Generation Intel Core and Xeon embedded computer featuring Intel service applications. As the newest
processor family (formerly Coffee Core i7/i5/i3 processors and embedded member of Advantech's EPC-T series,
Lake), from Celeron G4900T and GPU for industrial AI applications. The this embedded computer features a
Pentium G5400T up to Xeon E-2124G system includes a comprehensive I/0 highly-functional small lU-high form-
(up to 71W). The system provides up to set to collect sensor measurements and factor design. Powered by a 9th Gen.
32GB of ECC or non-ECC ODR4 2666MHz allow data-driven actions to be taken in Intel CPU platform, EPC-T4286 combines
RAM and support for two hard drives. a timely manner. high computing performance with
diverse 1/0 ports, making it well suited
• i3/i5/i7/i9 processor for A1 model • 9th Gen Intel Core i7/15/i3 LGA for applications in self-service kiosk
(max. TOP up to 65W) processor terminals.
• ... or i3/i5/i7/i9/Xeon processor for • Dual SOOIMMs sockets for up to
A2 model (max. TOP up to 71W) 32GB DOR4 • Intel Core i CPU
• DOR4 ECC or Non-ECC SODIMM, Up • Up to 4x additional OP 1.4 from • Thin compact design with 44.2mm
to 64GB MXM, 2x OP++, DVI, VGA, 3x GbE, in height
• Intel GbE LAN x 4 (i211 x3 + i219 x1) 3x COM, TPM2.0 • Thin barebones system with multi-10
• Intel AMT (A2model) • 3x USB 3.1 Gen 1, 3x USB 2.0 ports
• HDMI x 2 dual display • 2x 2.5" SATA, M.2 2280 • Suited for environments with OC-in
• USB 3.2 gen 1 x 8 (A2 model) • Front accessible I/0 and adaptive design
• BIOS selectable RS-232/422/485 x6 Function Module 2.0 options • Easy and installation for additional
• Wide range DC 10V to 35V input • Slots for Mini PCie, M.2 3042, peripherals
2x USIM • 6x COMports, 6x USB ports,
AAEON • Embedded GP/GPU computing 3x LAN ports,
www.aaeon.com options built-in • 1x 2.5" shock-resistant drive bay
• Waii/VESA/Rack mounting kits
ADLINK Technology
www.adlinktech.com Advantech
www.advantech.com

DATASHEET URLS:
AAEON http://data-us.aaeon.com/DOWNLOAD/2014%20datasheet/Systems/BOXER-6641.pdf
ADllNK Technology www.adlinktech.com/Products/Download.ashx?type=MDownload&isDatasheet=yes&file=l815%5cMVP-5100-MXM_Series-20200304.pdf
Advantech https:/ /advdownload.blob.core.windows.net/productfile/PIS/EPC-T4286/file/EPC-T4286-Series-System_DS(OB1020)20200903164229.pdf
52. CIRCUIT CELLAR • OCTOBER 2020 #363

Embedded PCs

Apollo Lake Fanless Box Coffee Lake System Offers Fanless Box Sports AMD
Targets Industrial loT Flexible 1/0 Design Ryzen ¥1000/RlOOOs

LYNX-6110 from American Portwell Axiomtek's eBOX640-521-FL is The ASB200-918 series from lbase
Technology is a compact, fanless and powered by the 9th/8th generation Intel Technology is based on the IB918
cable-less PC adapting a low power Core i7/i5/i3 and Celeron processor with 3.5" form factor SBC supporting AMD
Intel Apollo Lake processor. Developed the Intel H310 chipset (Coffee Lake). Ryzen SoCs (V1605B/V1202B/R1606G/
to meet heavy industrial standards, This embedded system features a wide R1505G). The fanless ASB200-918 runs
the rugged design enables it to work choice of front-accessible I/0 interfaces two simultaneous HDMI 2.0a displays
in harsh environment. Providing for easy cabling and maintenance. It at Ultra HD 4K resolution (3840 x 2160)
basic I/0 interfaces in a palm- also has a flexible I/0 window for ease of with a frame rate of 60 fps. Measuring
sized box, the system is suitable for customization for versatile applications 240mm x 162mm x 42mm, it is
industrial automation, smart factory, and customer requests. equipped with rugged components.
edge computing and IIoT gateway
applications. • LGA1151 socket 9th/8th gen Intel • AMD Ryzen Embedded V1000/R1000
Core i7/i5/i3 on board
• Intel Celeron N3350, 2 cores, • ... and Celeron processor (Coffee • 2x DDR4 50-DIMM, Max. 32GB,
1.1GHz/2.4GHz, 6W TOP Lake) supports ECC
• 4GB onboard LPDDR4, 2400 MT/s, • Supports 2x COM, 6x USB and 8 • Supports 2x M.2 sockets (E-Key/
non-ECC; up to 8GB (optional) channels of digital I/0 M-Key, NVMe)
• 32GB onboard eMMC 5.0 flash; • Two 2.5" SATA drive bay • 2x HDMI (2.0a), 2x Intel Gbit LAN
up to 256GB (optional) • M.2 Key E 2230 for Wi-Fi • 4x COMports, external GPIO
• Expansion 1x M.2 Key E 2230 for • Front I/0 connectivity design • 4x USB3.1, 1x USB2.0
wireless module • 12/19 to 24 VDC power input via • 12V (-10%) to 24V (+10%) DC-in
• Display 1x DP v1.4 4096 x 2160 at DC-Jack • Operating temperature 0°( to 45°(
60Hz • Flexible I/0 window supported
• USB 2x USB 3.0 Ibase Technology
• Ethernet 2x 10/100/1000 GbE Axiomtek www.ibase.com.tw
• Power input 12-30VDC (+/- 20%) https://us.axlomtek.com
• Operation temperature 0°( to 50°(

American Portwell Technology


www.portwell.com

DATASHEET URlS:
American Portwell Technology ....ww.portwell.com/pdf/iot/LYNX-6110.pdf
Axiomtek https://us.axiomtek.com/Download/Spec/en-US/ebox640-521-fl.pdf
!base Technology ....ww.ibase.com.tw/englishfProductDetaii/EmbeddedComputingj/lSB200-918
ci rcuitcellar. corn 53

Embedded PC Serves Up Apollo Lake Industrial PC is Comet Lake System Targets


9th Gen Core Processors LYE Certified Industrial Edge

Kontron's KBox B-202-CFl offers lanner's lEC-7242 is an industrial The Helix 500 from Onlogic brings
high performance with maximum environment gateway IPC driven by Intel desktop processing performance into
expandability and low noise level Apollo lake CPU, is CE, FCC and PTCRB a fanless, silent mini-PC. Powered by
(maximum 34 dB(A)). The embedded certified for LTE or Wi-Fi. It is designed Intel Comet Lake Core processing,
Box-PC with Intel Core 9th generation for IoT/IIoT edge, wireless security Helix 500 can accommodate up to
processors, with up to eight processor and multi-site management solution 64GB of RAM, has room for dual SSDs
cores, provides a performance boost deployment in commercial, enterprise (including NVMe options) and features
with constant power dissipation. This and public sector applications. Power available VPU accelerators, including
enables the KBox B-202-CFl to handled consumption ranges between 5.4W to Intel Movidius and Google Coral.
computationally complex processes and 13.5W.
large amounts of data. • Intel Comet lake Core i3/i5/i7/i9
• lntel Apollo lake CPU processors
• Up to 9th Gen Intel Core i7/i5/i3 • FCC/CE/PTCRB certification for LTE • Intel Q470 chipset; Intel UHD
• Raid functionality with up to or Wi-Fi Graphics 630
4 storage devices • 2x GbE RJ45, 1x RS232/422/485 • Up to 64GB DDR4 50-DIMM
• 2x PCie expansion slots for graphics COMport (non-ECC)
or network cards • 2x USB 3.0, 1x DisplayPort, 1x HDMI • 6x USB 3.1 Gen 2 ports,
• low noise design • 1x M.2 3042 B+M Key socket with 2x USB 3.1 Gen 1 ports
• Removable 2.5" SSD duaiSIM • 2x Gbit lAN ports, 3x DisplayPorts
• EN55032 Class B certified • 1x Mini-PCie socket with dual SIM • lx 12V to 24V, 4-pin DC jack
• Operating temperature 0°C to 45°C • Onboard lPDDR4, max 8GB and • 2x M.2 2280 slots (NVME PCie x1/
• Size: 190mm x 120mm x 190 mm onboard 64GB eMMC SATA)
• TPM support • Operating temperature: 0 to 50°C
Kontron • Size: 154mm x SO.Bmm x 210 mm
www.kontron.com Lanner
www.lannerlnc.com On Logic
www.onlogic.com

DATASHEET URLS:
Kontmn www.kontron.com/products/systems/embedded-box-pcjkbox-b-series{kbox-b-202-cfl.html
l.anner www.lannerinc.com/products{i ntelligent-edge-appliances/embedded-platform/ lec-7242
Onlogic https://'iJ:iltic.onlogic.com/resources/manuals/Onlogic-Helix-Pmduct-Manuai-Vl. pdf
54 CIRCUIT CELLAR • OCTOBER 2020 #363

Embedded PCs

... ·--· ..
"• ", ·o ~HHH •
I 1 • .

Fanless Computers Blend GPU Industrial PC Boasts Embedded Box: PC Offers


and lntel Gen 10 CPU Six: Gbit Ethernet LANs Wide Temp Range

Sintrones' ABOX-5210G Edge AI GPU The Pl-50030 from WIN Enterprises WINSYSTEMS' SYS-ITX-N-3900 is
Computing is powered by Intel Gen 10th is a fanless, high-performance an industrial embedded computer
10 Cores Xeon, i9 CPU with 10x GbE networking system based on the Intel based on the Intel Atom E3900 Apollo
with Nvidia GeForce GTX GPU. It can 7th Gen Core Processor. With six Gbit Lake processor family. It uses less
provide high computing performance Ethernet LANs and 4x USB 3.0 and 2x than 12W for fanless applications
on graphic processing by harnessing USB 2.0 ports, it is well suited for small and performs reliably in industrial
the power of its GPU. The fanless box call centers that demand quiet, but operating temperatures ranging from
computers feature dual hot swappable high performance. Network expansion -200 to +600C. It includes a SODIMM
SATA storage RAID 0,1,5. is through PCie interface modules, M.2 socket supporting up to 8GB of DDR3
and Mini PCie technology. system memory and internal mounting
• Intel Gen 10 Cores Xeon W-1290TE/ support for one 2.5" SATA HDD/SSD.
i9-10900TE • Intel 7th gen Core processor
• Nvidia Geforce up to GTX 1660 GPU • DDR4 SODIMM up to 32GB • Intel Apollo Lake E3950/E3940
• Supports 1408 CUDA Cores • Support for three independent processor
• Bx GPI, 4x GPO and displays • 2x 10/100/1000 Mbps Ethernet ports
3x RS-232/422/485 • Rugged and fanless embedded • DisplayPort and VGA outputs for
• 1x M.2 B key, 1x M.2 A-E key system dual displays
• 2x Mini PCie expansion slots • 4x PoE + 2x LAN, Sx COM, 4x USB • Up to 8GB DDR3-LV RAM
• Dual hot swappable SATA storage 3.0, 2x USB 2.0, 1x M.2x NVMe slots, • 2x USB 3.0, 1x serial port,
RAID 0,1,5 16-bit DIO audio output
• Operating temperature.: • lx PCie X16 or lx PCI, 2x Mini PCie • lx MiniPCie Socket with
-40°C to 70°C • Quiet fanless operation mSATA support
• 10x Gbit Ethernet RJ45 • Wi-Fi antenna • lx M.2 Socket, with E key, type 2230
• 1x SATA 3.0 ports and lx Micro SD
Sintrones for storage
• Operating temperature:
-20°C to +60°C

WIN SYSTEMS
ms.co

DATASHEET URLS:
Sintrones IMNW.si ,:rones.cor"' f datasheels/ABOX-52 lOG.pdf
WIN Enterprises IMNW. win-ent. com/i mag es/sto •i es/down load/catasheets/M B-50030_v2_DS. pdf

WIN SYSTEMS https ://resources.wi nsystems. eo m/da:asr eets/sys-i t:x- n-3900-ds. pdf
56 CIRCUIT CELLAR • OCTOBER 2020 #363

Embedded in Thin Slices

By
BobJapenga

R
ecently I was in a meeting with 12 the MachineQ network using a development
young professionals. We met over kit and the example software. For testing,
Zoom, and some of us gathered 30 we will be using the off-the-shelf MachineQ
minutes before the meeting began loRaWAN gateway. As I did with building a
in order to share what's happening in our device and gateway for The Things Network
lives. One of the young men was excited about {TTN), I want to emphasize the prototype
working on a Raspberry Pi loRa concentrator nature of what I did. That's because I don't
{gateway). His company makes sensors and I want to mislead you into thinking: "Wow!
was excited to see that his company is now That part is all done and all I need to do is
getting into loRa sensors. concentrate on my specific application."
That's what we've been discussing in the Au contraire. Using this hardware and
past six articles. This month we wrap up our software will get you going for a proof-
not-so-deep-dive into loRa. We are going to of-concept prototype, but it is a long way
look at building a prototype loRa device for from a certified, ready-to-build-and-deploy
product-especially in terms of the software.
We all have used example software that was
little more than 10% of the finished product-
all-the-while hoping that we could use that
example software and be done with it.
In addition, I am a little concerned about
the robustness of the off-the-shelf gateway
I was using from MachineQ. Two days ago,
I disconnected the Ethernet cable from the
gateway at my router and put the cable
into a different port. The gateway stopped
connecting for 36 hours until I powered it
down. I was already told there were problems
with Wi-Fi in this area. This does not bode
well for 24/7 unattended operation.

REMOTE RESET WOES


As a side note, we experienced this several
years ago with an off-the-shelf cellular modem.
We were in the midst of a feeding frenzy in
FIGURE 1
The MQSparl<. development kit comes with four Grove sensors for measuring temperature, sound, distance/ Ontario when solar energy suppliers were
speed and orientation. knocking on doors asking homeowners if they
ci rcuitcellar. corn S1

could rent their roofs to install solar panels.


Canada was recognizing that it needed to supply
more electrical energy than its infrastructure
could provide, but did not want to invest in
the fossil fuel infrastructure [1]. The provincial
government was paying an outrageous amount
for homeowners to put electricity onto the grid
using photovoltaics {$0.802/k.W-hour! [2]). I
pay just over $0.09/k.W-hour for fossil fuel
generated electricity.
Many companies were tripping over each
other to get solar panels on every possible
roof as fast as possible. We rushed out a
modification of a design of a solar power
energy monitor for one of our clients that
used an off-the-shelf cellular modem powered
by USB. Once a few were in the field, we found
that some modems would stop communicating
and require a reset. We quickly installed a
fix to allow us to remotely power-cycle the
modem. Ever since then something equivalent
to this has been part of virtually all of our
designs that incorporate complex (software)
off-the-shelf systems. Basically, we don't trust
suppliers to create robust devices. You just
cannot send technicians to the field to reset
thousands of devices. So, if you are using
anyone's off-the-shelf gateway in a place that Serial EEPROM; a Semtech SX1276 LoRa radio; FIGURE2
cannot be easily reset, consider providing the and variety of I/0 (ADCs, DACs, USB, serial The ST LoRa Development kit that
I uS€d consists of two boards. The
ability to remotely reset it or power cycle it. ports, discrete I/0, 7 LEDs, two pushbuttons
main board (B-L072Z-LRWAN1)
Getting back on track, this month we will and more). There is a battery holder on board
(bottom) and the X-NUQEO-IKS01A2
look at the hardware and the software 1 used to for 3 AAA batteries. However, as shipped, the daughterboard (top).
put together one LoRa node on an off-the-shelf battery is not connected. You have to cut a
LoRaWAN gateway on the MachineQ network. jumper to connect the battery. Unfortunately,
you then forfeit the ability to use the USB
THE HARDWARE for loading, debugging and monitoring the
The LoRa device: For the LoRa device, software. Ouch! Very unfriendly for real
MachineQ offers two development kits: The development. I decided to buy a USB battery
MQSpark is the simplest and comes with four charger for a phone and use that for my range
Grove sensors for measuring temperature, testing. I was impressed by the supported
sound, distance/speed and orientation development toolchains: Kell, IAR Embedded
(Figure 1). There are literally hundreds of Workbench for Arm, GCC-based IDE's like
Grove sensors [3] for you to experiment Eclipse, and Arm embed. I used the Keil IDE,
with. Robotics, motion, environmental and
proximity sensors are available to rapidly
prototype your new design. The device plugs
into a USB port for power and communications.
It uses the Arduino IDE for development.
All that said, I chose to use the other U'l.WII'
IIAA1'
offering: the STMicroelectronics (ST) LoRa
Development kit, which is for those who ""
ac:
want to design their own sensor and require STM32L''' U'·Tiol
more advanced software and hardware. use
This kit consists of two boards. The main
board (B-L072Z-LRWAN1) and the X-NUCLE0-
1KS01A2 daughterboard (Figure Z).
T-
CIPIOoi!IW

MCO
s-o OliUoNI
Main board: Also known as the Discovery I!IOOTII
kit for LoRaWAN, Sigfox and LPWAN
protocols, this main board contains a Murata
CMWX1ZZABZ-091 module (Figure 3). This
module contains an ST Arm Cortex MO+ Core FIGURE 3
with 192KB of flash, 20KB of RAM and 20KB of Murata CMWXlZZABZ-091 module
15877542
15877542
Centuries before the science of color temperature was understood, blacksmiths
already knew how to read the temperature of a heated piece of metal by its
color emissions. In this article, leff es the math and science behind
color temperature. He then details his project that uses a color-lighHo-digital

w
sensor to measure the color temperature of a light source.

11 0 0
hite assnow,U white chocolate," White K = °C + 273.27
wedding dress,u "white lightning"
and "white diamondsu are common so absolute zero = OK
descriptions of items in our world that
include the descriptor "white." You can probably think of many ... and freezing = 273.16K
others. Some of these describe a whitish hue, while others
don't connote a color at all. The most truthful might be 0 White As a black-body radiator's temperature rises, it gains
hot." While today we might use this to describe someone that energy and will emit radiation beginning at the low end
is udrop-dead gorgeous,u according to Merriam Webster, this of the electromagnetic spectrum. Figure 1 is a good
was first used as meaning "being at or radiating white heat.n illustration comparing radiation type and temperature for the
If you've ever sat by a campfire or gazed at a candle, you have electromagnetic spectrum [2]. We experience this emission as
experienced heat through radiation and colors associated with color once its wavelength enters the visible spectrum: 400nm-
the flame. 700nm. A blacksmith heats a piece of steel in his forge to
Before we can discuss temperature and color, we need to affect its malleability. While it's not a perfect black body, the
begin with the "black-body radiato~ [1]. This is a theoretical physical properties of the metal change with temperature,
object that can absorb all radiation that falls upon it. Radiation and he can estimate its temperature by its color emission
is the emission or transmission of energy in the form of alone (Figure :Z) [3].
waves (or particles) through some medium. This includes: We can therefore define the color temperature of a light
electromagnetic radiation, such as radio waves, microwaves, source in terms of the absolute temperature of a black-
infrared, visible light, ultraviolet, x-rays and gamma radiation body radiator or "chromaticity." Chromaticity is the quality
(y). At absolute zero-the coldest temperature possible-no of color, independent its brightness or luminescence.
heat is generated in a black body. Absolute zero is -273.15°C Chromaticity consists of two independent parameters, often
(Celsius) or -459.67°F (Fahrenheit). Science often uses the K specified as hue (h) and as colorfulness (s). Colorfulness is
(Kelvin) temperature scale to make more sense. alternatively called saturation or chroma. A color space
ci rcuitcellar. corn 61

FIGURE 1
Penetrates EarUfs
Aunosphere?
y --.-. ·. -- Shown here is the frequency/
wavelength /color temperature of the
electromagnetic spectrum of energy
[2]. Note those areas of protection by
our atmosphere.
Radrabon Jypc Radio MicrOONave Infrared Visible u ltraviolet x -ray Gamma ray
10, 10 .. 0.5• 10 ... 8 10 10 17
V\lavelenylh (m, 1tr 10 10

A pproXJmate Scale
of wavelength


Buildrngs
11~
}) ~I
Hun-.ans Bu ne rftre s
-P
Needle Pomt Pro rozoans
AC ~
Mol ecules AlOrns Aromlc N uclei

Frequency (Hz)

~mpe ra iU re of
ObJeCts at w hrch
thrs rad rauo n rs the
most rmense
waveleng dr emnted 10000 ,000K
-1o.ooo,ooo •c

chromaticity diagram (Figure 3) defines all the expected colors. However, if the source
visible calor based on these parameters [4]. were lacking some frequency, the resultant
Note: Temperature calor has been indicated perception would be skewed. The missing
within the calor space. Green and violet fall frequency cannot be reflected, and so the
outside the black body path or Planckian result will be lacking. We have two options for
locus (see physicist Max Planck), with green a light source-the sun or an artificial source.
(secondary) being a combination of primary You've most likely noticed the temperature
yellow and blue, and violet (secondary) being calor is the opposite of the way we think of
a combination of primary red and blue. temperature and the visible calor spectrum
(as red = hot and blue = cold). With calor
ADDI11VE I. SUBTRACTIVE COLOR temperature, red is of a lower temperature
This has to do with the source of the and therefore cooler than blue. The sun's
calor. If the source is projected, the three effective temperature, defined by the total
wavelengths used are RGB (red, green, blue) radiative power per square unit, is about
and are additive. If the source is reflected, 5,800K. During sunrise, the tangential angle
then the pigments used are CMY {cyan, of light passes through more atmosphere,
magenta, yellow) and are subtractive. Note: scattering the shorter-wavelength blue light
Many of us were taught early on that the three from our view. As the path becomes a more
primary colors were RYB (red, yellow, blue).
Figure 4 shows the computational effects of
each system.
These are the hues of chromaticity. The
other aspect of chromaticity-colorfulness,
saturation or chroma-has to do with its
intensity. If our brains receive equal signal
strengths from all three types of cones (calor
photoreceptors) in our eyes, then we would
perceive white light. If these cone outputs
were reduced from maximum to minimum,
the resultant perception would be a fade to
black. Likewise, if some other mix of cone
outputs were perceived as, say, green, and
these outputs were reduced to minimum
while remaining in the same proportions, the
perception would be a fade to gray.
We assume that a (white) source
illuminating a subject is perfect. A perfect
white source would give the expected result. FIGURE2
The subject under observation would absorb/ A blacksmith uses tlle col or emissions given off by a heated metal to estimate its temperature [3]. This is
reflect the wavelengths, and we would perceive key to being able tororm and temper it.
62 CIRCUIT CELLAR • OCTOBER 2020 #363

direct angle, this scattering can be seen off- will have on photographs or digital images.
axis as blue skies. The calor temperature does not take into
Figure 5 shows how the source calor consideration the spectral distribution of a
temperature can vary between the sun visible light source, and is not a reliable means
and artificial lights. The calor temperature of selecting suitable filters or creating look-
value of a light source refers only to the up tables for calor balance corrections. While
visual appearance of the source. It does not different light sources may be described as
necessarily describe the effect this source having the same calor temperature, without
proper white balance, spectral output cannot
determine the correct adjustments for calor
temperature balance. So, let's look at one
0.9 possible sensor that will allow us to get a feel
for the spectral content of light exposed to it.
0.8 TCS3472
The TCS3472 is one of many sensors
manufactured by ams, a global leader in the
0.7 design and manufacture of advanced sensor
solutions. It consists of three sets of four
filtered sensors protected by an IR filter.
0.6
Three of the four filtered sensors have calor
500 filter RGB. Sensor values and control registers
are available via an FC interface.
0.5
The amount of light falling on each set
y of silicon photodiodes is measured by an
integrating analog-to-digital converter (ADC),
0.4
one for each calor. All ADCs operate in parallel,
so all ADCs use the same integration time. The
device covers a wide signal range. For low-
0.3
level signals, higher programmable gains and
longer integration times can be used. At the
0.2 other extreme, higher-level signals will require
lower gains and shorter integration times.
The integration time period is chosen as
0.1 a multiple of 2.4ms. A saturated device will
present a count of 1,024 for each period. So,
you want to make sure the total count (for any
sensor) I number of periods is less than 1,024.
0.3 0.4 0.5 0.6 0.7 0.8 This is an analog saturation check. A sensor's
X total value is held in a byte register pair, and
therefore is limited to a maximum of 65,535.
It is possible to have no analog saturation,
FIGURE 3
The OE (International Commission on Illumination) 1931 color chromaticity diagram was the first to
but choose a high number of integration
demonstrate the link between wavelengths in the electromagnetic visible spectrum, and physiologically
periods, where the total count is greater than
perceived colors of human col or vision. Note the plot of chromaticities of black-body light sources of various 65,535. This is a digital saturation check. You
temperatures [4]. would need to adjust gain and/or number of
integration periods to keep the results high
FIGURE 4
On the right is the RYB (red, yellow,
blue) plot of colors we learned to mix
with crayons in kindergarten. The
pigments limit/filter any light reflected
to our eyes. On the left is the RGB
(red, green, blue) plot of a monitor
reproducing calor through the additive
process of Iight sources. In the center
the CMYK (cyan, magenta, yellow,
black) plot shows how a printer mixes
inks in a process similar to crayons.
While equal parts of CMY equal K
(black), it's a waste of colored inks to
make black, so when black is needed,
RGB (Additive) CMYK (Subtractive) RYB (Subtractive)
a separate black ink is used.
ci rcuitcellar. corn 63

enough to provide good resolution, without Outdoor Indoor


going into analog or digital saturation. sou rce sou rce
The register set for the TCS3472 is
presented in Figure 6. You'll note that the 8,000 K Snow, water
COMMAND register is not really a physical b lue sky
register, but rather a pointer used to access
registers OxOO-OxlB and alternately clear an
interrupt. Besides pointer data, the COMMAND
byte also enables/disables the auto increment 6,500 K Large shadows
blue sky
of the pointer register function.
The device has an interrupt output
that can be triggered by a clear channel
Average d ay
conversion count that is less than or greater light, central
Xenon
than minimum and maximum values you flash
latitud es
program into registers Ox04/5and Ox06/7. This 5,500 K
interrupt can be further limited by requiring Noon su nlight Blue bulb
a number of consecutive out-of-range counts f lash cube
from 1 to 60, programmed into register OxOC.
Average day light,
The status of a conversion is found in register
Northern Hemisphere
Ox13. Channel counts follow in registers Ox14- Fluorescent
0x1B. The only interrupt that can be generated 4,500 K "Warm w hite"
is the out-of-bounds interrupt, and it is not tubes
used in this project. Note that the external dear flash
LED is controlled via this interrupt output, and Early morning bulbs
it can be enabled and disabled via the AIEN bit late af te rnoon,
in the ENABLE register (OxOO). and evening
You must set a number of registers to control su nlight Photofloods
the operation of the TCS3472. There are timing
and amplification areas of configuration. First Photo lamps
3,000 K
is the general timing of the device. Assuming
Househo ld
the device has been enabled (AEN, WEN, POW), 150/200W
it will continuously idle and sample the sensors. 60/40W
The idle or wait time is set by the wCycl es or 25W
WTIME. Each cycle adds 2.4ms to the operation.
The cycle values are two's complement values
2,000 K Cand le light
(inverts all bits and adds 1). Therefore, to set
the minimum wCycl es equal to 1 {2.4ms),
FIGURE 5
OxFF must be written to the WTIME register
This chart shows how the sun (outdoor source of light) and various types of artificial lights 0ndoors) produce
(Ox03). The CONFIGURATION register (OxOD)

___
calor temperatures from a reddish (relaxing) tint to an bluish (intense) tint. In their art, photographers use
holds the WLONG bit that, when enabled, will these subtle tints of white light to produce an emotion.
multiply the WTIME by 12. The maximum
WTIME will be approximately 7 seconds. This AllORESS RoalVII<AME
~
11/W
w .....,_........,_
.,_ MGIITEA fUNCllOfl RU ff VALUE
c.oo

-
allows the device to remain in idle condition c.oo
for a large percentage of time, lowering the
IWXI £NAIIlE
......_
1\W
,.,.
-
a.Dt AGIIC-
average current of an active device by a factor IIIG3 W'llloiE 1\W
'~'~"'-
a..._ ..... _ .... byto
IW'f

of 5. However, device current is only 0.3mA to ALn MY IWXI

begin with.
111111 Al.Ill MY a...-to.r-1'111•""" c.oo
OIIDII ~ A.W Clool - . . . . , _ . . . . . 01100
The integration time has a similar register 011111
o.oc:
Qffi4 A.W cao.. ............. -N11..,.. IWXI

~--··
(ATIME Ox02). You set the integration time PEAS MY 0.00
Qd) oor.m MY ~ 111100
in periods of 2.4ms. If you wanted to set the 01111' CONTROl MY
_.,
OllfWU 01100

--a----
integration time to 50ms, you would use an 01112 tO R tO
aCy cl e count of 50ms /2.4ms = 20.8 (or 21 01113 STATW R o.--.. c.oo
Oat• COATN.. R 111100
periods). The two's complement of 21 (Ox15) 111115 COATAH R aoor .... ...,_ ClliOO
is 235 (OxEB). There is no multiplier for the 01111 IIDIITN.. R
.....-~ IWXI

__
integration time. However, you can adjust the 01117 -TAH A --¥1¥0 IWXI
!loll OQAW_
gain of the sensor amplifiers, which is similar
to a multiplier, without actually adding any
Olllt OOATAH "
R
a.--~t.,w
a.--.,....,.,..
......
Odl
0.00
0111A IIOATN.. R _ _ l'oil;ll..,.. IWXI
more time to the conversion. 01118 BOATAH A c.oo
You can see that if all the timing registers
FIGURE 6
are set to maximum, one sample period would These are the PC registers of the TCS3472x. Note: the first data byte of a write wi 11 be a COMMAND byte,
be WTIME = OxOO (614ms), WLONG = 1 (times which sets the pointer to a register of interest. Additional data bytes are stored beginning at the pointer. A
12) 614ms x 12 = 7.4 seconds, plus ATIME = read will produce data, also beginning from that pointer.
64 CIRCUIT CELLAR • OCTOBER 2020 #363

OxOO (614ms) 7.4 seconds + 0.614 seconds = 8.014 seconds. to increase this pointer automatically after each register
Reading the resultant registers prior to this time would access. Using a COMMAND value of OxAO will set the pointer
provide the data for the previous sample only. to register OxOO and enable auto increment. Since the device
uses registers Ox00-0x1B, we will need to read Ox1C (28)
USING THE SENSOR registers values. Listing 1 shows the basic Arduino code
Since the TSC3472 is an I2C device, it can be easily needed to read all of the registers in the TSC3472x.
interfaced using a 3.3V Arduino (or a SV Arduino with some In Listing 1 we've collected 28 registers, and they are in
level shifting on the I2C pins). I'll begin this project with an 8YTE ARRAY[ J. Displaying these requires the majority of
Arduino MEGA. A library for the TCS3472 is available, but I programming, and will therefore not be listed here. However,
won't use it for this project. Instead I'll break it all down into Ustlng 2 shows a typical display of the output from this function.
visible function calls. There are actually two phases for each register. The first gives
Let's begin with reading all of the registers. To do this raw register info, register name and hex value found there. The
we'll need to write a command to the device. As we discussed second breaks this down-where necessary-indicating any
previously, the COMMAND byte sets up the pointer to the special bit significance.
register we want to communicate with (either to read from A check of the value in the ID register (Ox12) tells me the
or to write to). It also instructs the device whether or not values are good. This device is actually a TSC34725 (a version

11 This example code is in the public domain. (Listing 1 continued)


String SignOn = "TCS3472 Probe 5/20/2020";
#include <Wire.h> int o = 0;
byte I2CADDRESS = Ox29; if (Wire . re quest From( I 2CADD RESS ,
#define RB OxOO REGISTERCOUNT)) // re quest byte s fr om
11 repeat same address slave device
#define AI Ox20 {
11 auto increment address while ( Wi r e.available ())
//define SF Ox60 //special function 11 slave may send less t han req uested
byte TYPE = AI; {
byte REGISTER= 0; int c = Wi re.rea d() ;
int REGISTERVALUE = 0; 11 receive a by te as ch ar acter
const i nt REGISTERCOUNT = OxlC; BYTEARRAY [ o] = c;
i nt CHARACTER; o++ ;
unsigned int BYTE ARRAY[ 255 ];
const unsigned long I 2CCLOCK = 400000;
11----------------------------------------- }
// setup() else
1/----------------------------------------- {
void se tup() Se r i al • p r i nt l n C" Nobody There ! " ) ;
{
Wi re.be gin(); }
11 join i2c bus (addre s s opt ional for // -----------------------------------------
ma ster) // writei 2C(int c )
Wi re.set Clock(I2CCLOCK); 1/ -----------------------------------------
Serial.b egin(ll 52 00 ) ; bool ean writ ei 2C(by t e c)
I I start serial f or output {
Se r i al . pr i nt l n (S i gnOn ) ; byte COMMAN D = OxBO I TYPE I ADDR;
} bool ean q = f al se ;
//----------------------------------------- Wi re.beg i nTr ansmis s ionC I 2CADD RESSl ;
// loop() 11 t ransmit to dev i ce
/1----------------------------------------- Wire.write(C OMMAN D) ; // sends one byte
voi d loop ( ) wh i le( c)
{ {
r eadi2CCl: c-- ;
di splayAll Regi ste rs( ); Wi re.wri te CBYTEARRAY[REGI ST ER + c ] );
} I/ send s one byte
/ /----------------------------------------- }
// re adi2C () ifCWire.endTr an smi ssio n() == 0)
/1----------------------------------------- 11 st op tran smi tti ng
void r eadi 2C( ) {
{ q = t ru e ;
AODR = 0; }
i f Cwrit ei 2C ( 0)) return q;
{ (continued}

I..ISTlNG 1
The basic Arduino code needed to read all the registers in the TSC3472x
ci rcuitcellar. corn 65

that uses an I2CAddress of Ox29 and runs AUTOMAGICAL


off 3.3V). Note that some registers are not To make the magic happen, we need to
used (or at least have not been defined). make changes continuously to the Gain and
With the displayAllRegisters() function Integration Time, and look for that point
working, we can expand this program by just before the system reaches saturation.
adding a menu to allow us to choose alternate Previous discussion showed both analog and
functions. digital saturation. It was identified that if the
The next function that will be useful is to Integration Time exceeded a count of 63 (63 x
change a register's contents. Only the first 2.4ms = 151.2ms), unsaturated sample could
registers OxOO-OxOD are R/W (read/write} occur up to the maximum counts of 65,535.
registers. Six of these are byte oriented, and For Integration Times less than 64 counts, the
four are word oriented. A sub menu will allow maximum counts allowed were substantially
you choose which of these you want to change. less. Using these rules, we can determine if
saturation occurs for a conversion.
----Change Register----
0 - OxOO Enable
1 - Ox01 Integration Time OxO - Enable States value= Oxl b
2 - Ox03 Wait Time Interrupt is Enabled
3 - Ox04/5 Low Threshold Wait is Enabled
4 - Ox06/7 High Threshold Sensor is Enabled
5 - OxOC Persistence Power is Enabled
Oxl - Integration Time value Ox ec
6 - OxOD Configuration Integration Time = 48.00ms
7 - OxOF Control Ox2 - not implemented = Ox34
Ox3 - Wait Time value= Ox9
Menu selection? Wait Time = 592.80ms
Ox4 - Clear Interrupt low t hres hol d v alue CLSB) = OxO
When a choice is made here, you get to Ox5 - Clear Interrupt low t hres hol d v alue (M SB ) = Oxd e
enter a value for the byte or word register Clear channel low threshold= 56 832
pairs. REGISTER and REGISTERVALUE Ox6 - Clear Interrupt high t hr eshold value CLSB) OxO
variables are used to update a single register Ox7 - Cl ear Interrupt high t hresho ld va lue CMSB) = OxO
in the TSC3472x. Clear channel high thre s hold = 0
Ox8 - not i mpl emente d OxO
Ox9 - not impl ement ed = OxO
The Main menu below gives you total Oxa - not i mplemented = OxO
control ofthe device at your fingertips. We can Oxb - not impl emente d = OxO
stop, start and compare conversions to find Oxc - Int errupt Persist ence Fil ter value = OxO
the optimum settings for any light condition. Consecuti ve additional Max/Mi n th r esholds = 0 time s
Oxd - CON FIGU RATION valu e = Ox2
----TC53472 Probe---- Wait multipli er= 12
1 - Read and display all I2C registers Oxe - not i mplement ed = OxO
2 - Change an I2C register Oxf - CONTROL value = Ox3
3 - Get a raw sample Gain = 60
OxlO - not i mplemen t ed OxO
4 - Toggle external LED
Ox11 - not impl emented = Ox1
5- +Gain Ox1 2 - I D value= Ox 44
6-- Gain TCS347 2115
7 - + Integrate Time Oxl3 - STATUS value = Ox11
8 - - Integrate Time Interrupt is Set
9 - Sample and auto adjust Sampl e i s Valid
Ox 14 - Cl ear Data value CLSB) = Ox69
Menu selection? Ox 15 - Clear Data value CMS B) = Oxc
Cl ear channel raw dat a = 3177
Note that while complete control of all Ox 16 - Red Data valu e CLSB) = Oxee
Ox17 - Red Data value CMSB ) = Ox 5
registers is available, the main menu has
Red c hann el raw da t a = 1518
shortcuts that allow adjustments of the Ox1 8 - Gr een Data valu e CLSB) = Ox2
two main parameters that you will want to Oxl9 - Gr een Data value CMS B) = Ox5
change. The Gain sensor and its Integration Gr een channel raw dat a = 1282
Time can be altered directly via single-keys Ox la - Blu e Data valu e Cl SB) = Ox2 a
commands. I added a command to toggle the Ox lb - Blue Dat a value CMSB ) = Ox4
on-board LED light source that can be used Blu e c hannel raw data = 1066
for reflective measurements. Command 3
retrieves a sensor sample using the present I..IS'TlNG 2
configuration. The final Command, 9, makes The output of the display.AI/Registers() function, which includes a bneakdown of the register bit status. Note:
fine tuning and sampling automatic. All numbers are in hexadecimal and pneceded by Ox.
66 CIRCUIT CELLAR • OCTOBER 2020 #363

FIGURE7 The previous configurations changes have been


Shown here is tne resultant display
done to optimize the conversion values for the
(SSD1306) for a sample oftne mom ing
sky prior to the sun breaking the
best possible accuracy when calculating the
horizon. There is very little light 0-ux), lux (intensity) and calor temperature (surface
with a reddish color temperature of temperature in Kelvin). The intensity of light
approximately 4,3821<. hitting the sensors (RGBC) can be translated
into a value that closely matches the human
Since we want to determine the point eye, by totaling the adjusted red, green and
just before saturation occurs, my algorithm blue conversions and applying a device factor.
begins with minimum Integration Time and You can see that as long as the color outputs
maximum Gain. If saturation occurs, then we stay in proportion to one another, the lux has
must turn the Gain down a notch, since the virtually no effect on the Color Temperature,
Integration Time is already at its minimum. which is essentially a ratio of blue to red
Gain has four steps-60, 16, 4 and 1. Once values.
we have a conversion with no saturation, So far, we've needed a PC connected to the
the Gain is now valid, and we can ramp up TSC3472x to get a conversion. Heltec makes
the Integration Time until saturation again a DIP-style Arduino with an integrated 4x20
occurs. graphic display for around $10 that is based on
The Integration Time has 256 steps 1-256 the Espressif Systems ESP8266. The ESP8266
cycles (where 0=256). It could take a few has Wi-Fi, which we won't be using here, but
seconds to try all possible steps. As each otherwise it is perfect for this project, as you
step increases the Integration Time, the will quickly see. I did use Adafruit's support
conversion time also increases. While you for its SSD1306 display, because Heltec's
could shorten the potential number of steps library doesn't have good text support. No
by using a different algorithm, I will keep this special changes to the Arduino program are
as simple as possible and just increase by a necessary, beyond that of the display support.
single step until saturation occurs, and then However, I want to make this simple and the
back off 1 step (count). We should now be menus will have to go. Well ... not really.
at the maximum Gain and Integration Time I want to use two functions in conjunction
without going into saturation. with the display. I want the user to be able
to start an automatic conversion, and also
LUX a. COLOR TEMPERATURE have control over the LED. To do this, I need a
lux and calor temperature calculations can couple of push buttons and a way to convert the
be performed on any unsaturated conversion. button push into a simulated menu selection.
This was done in the getUserlnput()
routine that collects keyboard input.
Normally, execution is waiting here for you to
enter characters (menu choice). I added two
ABOUT THE AUTHOR
d i g it al Re ad () tests-one for each button.
Jeff Bachiochi (pronounced BAH-key-AH-key) A button press (grounded input) forces exit
has been writing for Circuit Cellar since 1988. of the get User Input() routine, returning
His background includes product design and the character "4" (Toggle external LED) or "9"
manufacturing. You can reach him at: (Sample and auto adjust). Other than how
j eff.bachiochi @imaginethatnow.com or at : these buttons produce virtual keyboard input,
nothing else changes.
www.imaginethatnow.com. Although the display is graphic in nature,
you have control over every pixel on the
screen. I am using it as a four-line-by-20
character display. Sign-on messages are
produced on the first two lines, and the second
Additional materials from the author are available at:
two lines are used to show the progress of
www.ci rcu itcellar.com/a rticle-materials
the conversion process. This should end up
with a display as shown in Figure 7 when
References [1] and [3] as marked in the article can be found there.
the conversion is complete. To produce text
RESOURCES characters, the library routine is responsible
for providing the character glyph (picture) of
Adafrui tI www.adafruit.com each character, as well as where to place the
ams I www.ams.com character within the display's screen.
The SSD1306 uses separate display
Espressif System s I www .espressif.com
and buffer spaces. This allows the user to
Heltec Au tomation I https://heltec.org completely draw a screen in the buffer space
PacTec En closures I www.pactecenclosures.com before transferring it to the display space.
ci rcuitcellar. corn 67

Updates therefore look instantaneous. The buffer remains


intact, and you may continue to add to it or clear it in
preparation for new text (or graphics).

PORTABLE
Up to this point we've received power from the USB port,
while attached to the PC. We added buttons to make it a
stand-alone device, but we must do something about power!
The Heltec device not only has a battery input, but also-
because everything works on 3.3V-a single cellli-lon battery
is a perfect mate. The Heltec Wi-Fi Kit 8 also has a Li-lon
battery charger built in to truly make all of this work with 11no
strings (or wires) attached."
I mounted the Wi-Fi Kit 8 in a PacTec enclosure (Figure 8).
I wanted to be able to aim the sensor independently from
the display, and found an itty-bitty book light that looked
like it would work well. The four-wire sensor cable had to be
replaced with a couple of pieces of flat cable that I zipped FIGURES
down to two conductors wide. These could be fed through I used one of the enclosure boxes from PacTec that I already had. Although it was
the sensor arm quite nicely, without any pinching to the a little large, once I added buttons and the Li-Ion battery (which fit nicely in the gv
wires. battery box), it was fine.
To test this rig out, I got up before sunrise to make an
early morning reading before the sun broke the horizon. Look
back at Figure 7 for this sample. You'll note the Lux value Picking out a perfect shade of white is a nightmare come
is less than 1 and the calor temperature is 4,382K. This is to life. Pure white? Off white? Simply white? Benjamin Moore
just what I would suspect for sunrise. A clear, mid-day sky has more than 35 shades of white! The shade of white (or
produced a high calor temperature of 5,732K. You get a good other calor) you apply to your walls will greatly influence the
sense of the many shades of white while driving at night. The way you feel in that room.
range in calor temperature for various styles of headlights is Remember to wash your hands! Too much to do, too
3,000K to more than 12,000K! little time. e

University of l(~
CINCINNATI IONLINE
W
elcome back to "The Darker wavelength is the propagation speed of the
Side." As electronics designers, signal along the wire, divided by the frequency
we all know what a wire is of the signal. On a wire, or more exactly on
and how it works, right? If we a so-called transmission line comprising the
connect a wire from A to B, a current can flow wire and the accompanying current return
between these two points. If we then disconnect path, the propagation speed will be close to
the wire from B, no current can flow. The wire the speed of light in free space, c, which is
becomes useless because one of its ends is 300,000,000m/s.
open. Now, imagine that we delay this signal by
True? Well, not always. If you don't know half the wavelength. We get the same sine
why, then keep reading because this will signal, but with an opposite phase. What
be my topic this month. More precisely, my happens if we then sum the original signal
goal is to explain what a stub filter is, and and its copy delayed by A./2? Naturally, they
how to build one. I will also show you that will cancel out, and the result will be zero-a
you may inadvertently make such a filter, for null signal.
example with an improper printed-circuit I'm sure you've followed me up to this point,
design. This may jeopardize the performance right? So, you will also easily understand that,
of your project, at least if you are using high rather than delaying by 'A./2, we would get the
frequencies or fast digital circuits. same result if we delayed the signal twice-
Finally, and as usual, I will not use math each time by 'A/4. Now look at Figure 2 for an
to convey these principles, but rather words easy way to do it. The signal is coming from
and small experiments. So, the good news the left, and is virtually split into two parts.
is that this article should be easy to read. Half of it continues to the output on the right,
The downside is that my explanations will whereas the other half goes into a wire that
approximate. Anyway, I hope that you will introduces a A./4 delay. Assume that there is
catch the important points. I will provide a reflector at the end of this wire. The signal
some resources for further reading, if you will then be reflected back on the same wire,
want to dig more deeply into the subject. will be shifted again by A./4 on its way back,
and will be merged with the original signal. As
SINE+SINE =0
Let's start with a very simple mental
in my example above, this adds the signal and
a copy shifted by half a wavelength, and we
experiment (Figure 1). Assume that you have should get zero.
a sine-shaped signal propagating on a wire. You may wonder how to actually make
Such a signal has a given wavelength, usually such a signal reflector, but long-time readers
noted as A. (the Greek letter, "lambda"). This will remember an article I wrote several years
ci rcuitcellar. corn 69

ago called nTime Domain Reflectometryn


(Circuit Cellar 225, April 2009). When a
signal propagates on a transmission line and
encounters an impedance mismatch, part of
it is reflected back to the source because it
can't go anywhere else. And, ifthe impedance
mismatch is 100%, then the full signal is
reflected back. There are two easy ways to
make a perfect impedance mismatch: An SUM = O
open circuit (infinite impedance) or a short
circuit (OQ impedance). The difference is the
phase of the reflected signal-an open circuit
reflects without any phase change, whereas a
short circuit inverts the phase.
Let's summarize. Figure 2 seems to show
that if we have a transmission line and add a FJGURE 1
wire connected to nowhere (open circuited), The sum of two sine signals cancel out if one is shifted by half a wavelength.
we may cancel the signal if its length is
equivalent to a quarter of the wavelength. Is
it for real? You bet it is! Such a short wire to
nowhere-or more precisely, a transmission
line with open end-even has a name. It is Reflector
called a nstub.u (in phase)
QUCS TO THE RESCUE
Why not start to check if it is working
using simulation software? Here, I propose to
use QUCS (Quite Universal Circuit Simulator),
a very good, free and open-source circuit A/4 A/4
simulation software. Don't hesitate to
down load it and reproduce the example shown

- - -..} suM~o
in Figure 3. It will take you no more than half
an hour. QUCS can do plenty of things, but
in particular, it can model transmission lines
and run so-called S-parameter simulations.
I selected a signal source, P1, from the
tool box, connected it to two SOQ transmission FJGURE 2
lines in series, and plugged the other end A shift of half a wavelengtn can be made with a quarter wavelength stub, ended by a perfect reflector.
to another source, P2 (Figure 3). This may
seem awkward, but for an S-parameter
simulation, all ports should be connected to
signal sources. The system then simulates
the propagation paths from one source to the
other. For example, the propagation from P1
to P2 is noted 521, or 5[2,1] in QUCS' syntax.
Finally, I added a 37.5mm, open-ended
transmission line as illustrated, making a
T-shaped circuit. I then gently asked QUCS to
--• ----••
calculate 521 with a signal frequency ranging
from 100MHz to 8GHz, and to plot it with a
decibel scale, thanks to a short equation that
I
-- -•
~ .1-
P1
-
Zo600Mt
"""""
IJnol
Z~OIIM
L•IOO,.,
-
P2

z~a..

converts volt ratios to dBs.


The resulting graph is depicted on the
bottom of Figure 3. What do we see? For
low frequencies, the transmission is OdB,
--
+

-- ....
which means no loss. Not a surprise, since
even a wire with an open stub does transmit
electricity. However, what happens at a
frequency of 2GHz? The transmission is close
........, ........
---11011
to 0 (-40dB, which means that only 10-40/10 = FJGURE 3
1/10,000 of the power is transmitted). Why is Here is a QUCS simulation of an open stub (line 3, 37.5mm long). The response shows a null in the
this happening at 2GHz? Simply because the transmission close to 2GHz.
70 CIRCUIT CELLAR • OCTOBER 2020 #363

open stub is 37.5mm long, and that 37.5mm the frequency continues to increase. There
is a quarter of the wavelength for 2GHz1 !..= are other frequencies where the attenuation
c/f = 300,000,000 m/s I 2,000,000,000Hz = is very high, precisely at 6GHz, 10GHz and
0.15m, divided by 4, or 37.5mm. A word of every 4GHz thereafter (although not shown in
caution here: QUCS assumes by default that the Figure 3 graph). I'm sure you will easily
the propagation speed is c. On a real cable it discover why.
will be a little lower, maybe 80% or 90% of c, Here's the trick:
but you get the idea.
So, such an open stub in fact makes a 3 X 2 X f../4 = f.. + 2 X 'A./4 ...
band-reject filter. It passes the signals, except
close to 2GHz where the attenuation is very Up to now, I have used open-circuited
high. If you look again at Figure 3, you will stubs, which are reflecting the signal in
see that there is something interesting when phase. In contrast, what would be the effect
of a short-circuited stub? Well, nearly the
same, but with a twist. A short-circuited stub
Reflector introduces a 180-degree phase shift to the
(phase inverted) 'A. reflected signal. A cancellation of the signal

...
is still possible, but this time with a 'A./2 long
.. stub rather than 'A./4 (Figure 4). Two times
(\j\_; 'A./2 is 'A. so the propagation back and forth
.. .. ..
is in phase, and the short-circuited reflector
inverts the phase. Therefore, the sum is zero
CXX)
.
.. again .
I modified the QUCS simulation to show
you what happens with a short-circuited stub.
)\/2 Figure 5 is exactly the same design as the
one we previously discussed, but now with
a short to ground at the end of the 37.5mm
stub. The first null is no longer at 2GHz but at
4GHz, because half the wavelength is 37.5mm
at this frequency, as expected. The signal is
now canceled at 4GHz, 8GHz and so forth. The
simulation also shows you an important point.
With a short-circuited stub, there is also a zero
transmission at a frequency of OHz, meaning
for DC signals. That's clear if you look again
at the design. The stub is a short circuit, so
no DC current can flow because it is short-
FIGURE 4 circuited to ground.
A null can also be achieved with a phase-inverting reflector like a short circuit, but this time with a half-
wavelength stub. TO THE LAB
Simulations are nice, but wouldn't it be
preferable to see an actual experiment? With
that in mind, I went to my company's labs

~·: -
and switched on our Keysight Technologies
@
N5230A vector network analyzer. This nice test
.,_ instrument is, in fact, doing exactly the same


I -• --
as the QUCS simulation described earlier. It
injects a signal of varying frequency into a

- -• P1
,._,
"""""""
U.1
z·~a.
device under test, and plots its transmission

-•__--•
Z•~Oin l•IClO ... and reflections on a graph. For a quick
I «; ;... demonstration, I simply interconnected two of
its ports with a short coaxial cable, and added
l!9!!!!!!'n ':'
._ .... ~~ a SMA T adapter, ended with a 3cm SMA/SMA
dBS21 odiiCSfl.lll

--
il
d8S11001115{1,IJ) adapter, to simulate a 37mm open transmission
line (Figure 6). I pressed some buttons, and
voila! The result is shown in Figure 7. Very
dose to the simulation isn't it? Cool, so that's
actually real! Here the first null was measured
•• at a frequency of 2.0GHz, and the second at
FIGURE 5 6.16GHz. This is not exactly 6GHz as expected,
A QUCS simulation of a short-circuited stub. See the zero transmission at OHz as expected. probably due to some parasitics somewhere.
ci rcuitcellar. corn 71

OK, I must admit that I am a bit lucky to


have such expensive test equipment on hand.
So, I wanted to find a way for you to reproduce
the same experiment with equipment you will
have on your bench, or that you could buy
for reasonable prices on eBay. And this is
indeed easy! The key is to get far down in
frequency. Going to lower frequency means
longer wavelengths, and therefore longer
cables as stubs.
What wou Id you need to do the experiment?
First, you will need a long length of coaxial
cable to make a long open-ended stub. The
longer the better. I found a lOm long cable
on my bench, so it should cut frequencies of
wavelength close to 40m ('M4 = lOm), which
means f = cf'A. =7.5MHz, or, more exactly,
around 6MHz. That's because the propagation
speed in the cable is not the speed of light,
FIGURE 6
but rather 80% of it. Next, you need a signal
This open-drcuited SMA T adapter implements a short open stub.
generator able to go up to 6MHz. If you don't
have one, building one is a nice exercise!
Finally, you will need a way to measure the
transmitted signal, and the easiest way is
to use an oscilloscope. It could be a very
cheap one, because lOMHz of bandwidth is
enough. On my side, I used a Keysight 33521A
generator and a Keysight DSO-X 3024A
oscilloscope, but they are truly both overkill
for this job.
Now, switch on the equipment, start with
a frequency of OHz and slowly increase the
frequency. Take a piece of paper and plot the
transmitted power versus frequency, and you
will find a null at 6MHz! The plot can be done
manually or, if you are lucky, by switching
the frequency generator to sweep mode as I
did. This allows you to get the plot directly
on the oscilloscope, if you trigger it carefully.
Looking again at Figure 8, the scope shows
the envelope of the transmitted signal from 0 FIGURE 7
to 20MHz. Two nulls are clearly visible, close Here is the actJ.Jal measurement of an open stub on a vector network analyzer.
to 6MHz and 3X6 = 18MHz, as expected.

PRINTED CIRCUIT BOARDS


I talked about the effects of open-
circuited wires or coaxial cables, but the same
phenomenon exists for any kind oftransmission
line. In particular, it will happen if you design
a PCB and leave a short copper trace open-
ended. This might or might not be an issue, as
we will see in a minute, because it all depends
on the signal frequency and trace length.
Another simulation may be welcome here.
Rather than using QUCS again, I switched to
another and a bit more complex tool: Sonnet.
This software is neither open source nor
free, but a free, limited Sonnet Lite version
is available from Sonnet Software's website.
Unlike QUCS, Sonnet is not a circuit simulator, FIGURE8
but rather an actual electromagnetic The same experiment can be done using far simpler equipment, here at 6MHz using a lOm-long coaxial
simulator. It uses a so-called planar or 2.50 cable as a stub.
72 CIRCUIT CELLAR • OCTOBER 2020 #363

..._ 0
.._..
---
0

\(\(
<>-
..
I
·5

~
g · 10

· 15 I
-~ ..• ID

I
I

I

IdB I
·20

·25

-30
0
I
2 3 4 s e • • 10

...........___ ~r- (OIU)

FIGURE 9 model. The design to be simulated must be 1.6mm thick FR4 PCB. (See my previous article
Sonnet Lite can simulate PCB modeled as parallel dielectric layers, with on the subject: "Microstrip Techniques,"
structl.lres like this open-circuit. metal structures between each layer. This is Circuit Cellar 223, February 2009.) The length
20mm stub, showing a first more limited than a full 3D simulator, but far of the open-ended trace is 22mm.
transmission null at 1.82SGHz. faster in terms of calculations. This is good I then ran the simulation, and a couple
enough for PCB simulations. of minutes later, I got the nice plot shown in
The example I made with Sonnet Lite is Figure B. Very close to the theory again! Here
shown in Figure 9. On the far left you can see the first null is at 1.825GHz. Since the open
the layer structure- a 1.6mm FR4 substrate trace is 22mm long, we would expect a null
and air on top of it, with a full ground plane on for a wavelength of BBmm, so a frequency of
the bottom layer. I then drew two rectangular 3.4GHz. However, the propagation speed on
copper traces on the top side of the PCB-one a FR4 substrate is far lower than the speed
from port 1 to port 2, and one open-ended of light. The ratio is, in fact, the square root
stub. The traces are 3mm wide, which is a of the so-called effective dielectric constant
good width for a SO.Q transmission line on a of the trace. With such a trace on FR4, this
ratio is close to 1.8, and this explains why a
22mm trace is equivalent to a quarter wave
at 1.825GHz.
[l .m The Sonnet simulation also shows that the
other nulls, higher in frequency, are lower

TOPB ..
il
and lower in terms of attenuation. This effect
is dearly visible in the graph in Figure 9, and
is due to the losses in the substrate, well
fR~

GND
simulated by the tool. Finally, such a simulator
can represent the currents on the traces at
any frequency, using a calor grading scheme.
What's happening at the null frequency of
1.825GHz is shown in Figure 10. This figure is
helpful for understanding that the incoming
and reflected signals are canceling out at the
junction point, with a quarter wavelength
exactly equal to the trace length.
Once again, don't hesitate to download
Sonnet Lite, and try to reproduce this example
for yourself. You will learn a lot, even though
you will probably need to spend time learning
the software through the available tutorials.
Cl u or .lrdg mou~• to roadoot dolavalue;
"
MURPHY, UNFORTUNATELY
FIGURE 10 Stubs, intentionally designed using open-
An analysis of the current through each copper trace allows us tn visualize the cancellation of the waves at or short-circuited transmission lines, are
the junction point at a precise frequency. actually used to build radio-frequency filters,
ci rcuitcellar. corn 73

and now you know how. Several stubs, well will be an open-ended trace. It will therefore
designed and with proper separation between act as a stub, and will cancel out signals with
them, can be used together to implement frequencies for which its length is a quarter
far more complex responses than the basic ofthe wavelength. And, do you know what will
examples I've illustrated. This may bring us a happen? Murphy's Law states that everything
little too far for this article. that can go wrong will go wrong. So, for sure,
That said, I would like to share with you that the frequency that will be canceled will be
you may also build stub filters unintentionally. exactly the frequency you want to use. And
How? Imagine that you design a kind of your design will simply not work-all because
2.4GHz transmitter-maybe Bluetooth-using of a short open-circuited trace.
an IC and some passive components around What would be a good solution? Simply
it. You must design two variants of your avoiding any open-circuited stub on any high
product, using two different kind of antennas. frequency line. Figure 11b shows a possible
Say one is ended with a SMA connector, and way. Here I added two OQ resistors, RlO and
the other is a dipole ended with a differential Rll. These two components are positioned
flex cable. Maybe you would design a PCB like exactly at the Y junction between the two
the one illustrated in Figure 11a. Warning- intended paths. Of course, only one of them
this is not an actual design, just an illustration will be populated. Therefore, there will be
for this article. Here the transmitter circuit no open-circuit line at all, and no Murphy-
is supposed to be on the lower left, and the related risk. For the lowest possible risk, it is
antenna trace goes simultaneously to the indeed a good practice to share a single pad
SMA connector, Jl, and to some components between the two components, RlO and Rll,
feeding the flex cable connector, 12. That's as illustrated, thus avoiding even a lmm stub.
clever, because, depending on the need, you
will solder either Jl or 12 and its passive WRAPPING UP
components, so you will have only one PCB Here we are. As always, I have only covered
and two versions. Right? the basics, and with simplified explanations.
Wrong! This would be a very, very bad Stubs can be used to make any kind of filters or
idea, and I'm sure you now know why. impedance-matching networks, especially at
Imagine that you populate only the connector, high frequencies. Stubs can also be the source
ll, and leave J2 and the small accompanying of serious headaches for the incautious PCB
passive unpopulated. OK, but the trace going designer. So, knowing what they are about is
from Jl to the pads planned for R7 and R9 crucial. This is true not only for high-frequency

FIGURE 11
(Left) A wrongly designed 2.4GHz transmitter PCB. (Right) A greatly improved version, avoiding stubs on the RF trace
74 CIRCUIT CELLAR • OCTOBER 2020 #363

designs, but also for high-speed electronics.


A fast, digital signal with nanoseconds-
long transitions should be treated with
the same care as a radio-frequency signal
in the gigahertz range. Put simply, a PC
motherboard with its multi-Gbps PCI express
links will never work with uncontrolled stubs
or bad PCB routing! And even if you are not
designing PC motherboards, I'm sure that you
encounter fast digital transmissions often.
For example, USB is replacing RS-232 links in
many systems-and the frequency range is
not exactly the same.
To close, I can't resistthe pleasure of showing
you an old test instrument that is actually
based on a stub-like structure (Figure 1Z). It
is a Hewlett Packard HP 532A frequency meter
from the 1960s, borrowed from my colleague
YannickAvelino. (Hewlett Packard later became
Agilent and then Keysight). How does such a
frequency meter work? At the bottom of the
device, there is a transmission line. Here it is
made with a waveguide, but this is the same
as a wire transmission. The transmission line
is ended by a diode detector, clearly visible on
the right side.
On top of this transmission line, there is
a vertical tube, which is an adjustable cavity.
This cavity is the waveguide equivalent
of a short-circuited stub. Its length can
be adjusted, thanks to a precision helix
associated with a calibrated dial. The use
is then straightforward. The user injects a
signal of unknown frequency and turns the
knob, while looking at the power measured
by the diode detector. At a given position,
FIGURE 12 the signal on the detector will be drastically
This HP532A frequency meter is actually an adjustable short-circuit stub. attenuated. At that precise point, the cavity
length corresponds to half a wavelength, and
the dial directly indicates the corresponding
frequency-up to 26GHz! Who said that
ABOUT THE AUTHOR
microwaves have to be complicated?
Robert Lacoste lives in France, between Paris and I hope that you liked this small introduction
Versailles. He has 30 years of experience in RF to stubs. I encourage you to read the articles
systems, analog designs, and high speed on Circuit Cellar's article materials webpage.
electronics. Robert has won prizes in more than 15 More importantly, I urge you to play with
international design contests. In 2003 he started a stubs, using either simulators or actual
consulting company, ALOOM, to share his passion experiments. Don't be afraid. It will be fun,
for innovative mixed-signal designs. Robert's and you will learn a lot! e
bimonthly Darker Side column has been published
in Circuit Cellar since 2007. You can reach him at
[email protected].

For detailed article references and additional resources go to:


www.circuitcellar.com/article-materials

RESOURCES
Keysight Technologies I www.keysight.com
Sonnet Software I www.sonnetsoftware.com
c·rrcuitcellar.com 75

PRODUO NEWS

Module Speeds Medical Ventilator Designs


Trinamic Motion Control, now part of Maxim Integrated, has announced the
TMC4671+TMC6100-TOSV-REF design board, a BLOC serve driver capable of 12V to
36V with up to 6A RMS to accommodate medical ventilator and respiratory system
design. The reference design shows engineers how to build medical ventilators
using readily available components, bypassing the longer lead times of traditional
components. To shorten design cycles, the open-source module features a session
border controller connector in Raspberry Pi style and space for a pressure sensor
add-on board.
The reference design board includes a Hall sensor interface and connectors
for an optional pressure sensor add-on board. As a result, important pressure
data can be directly visualized on a Raspberry Pi with touch screen using the free
firmware developed by Trinamic for the reference design board.
Thanks to the embedded TMC4671 serve controller IC, the module generates a
pulse-width modulation (PWM} frequency and a current controller clock of 100kHz
independent of the microcontroller. The complete TMC4671+TMC6100-TOSV-REF
reference board is available now through Trinamic's distribution channels. All
hardware, firmware and software are open source under the MIT license.

Trinamic Motion Control 1 www.trinamic.com

Automotive Grade Step-Down DC-DC Converters


Dialog Semiconductor has announced the DA913X-A product family, a new line of highly efficient, high-current, automotive-
grade, step-down DC-DC (Buck} converters. The highly integrated DA913X-A devices require fewer external components than
competing solutions, enabling a low system BoM cost and a reduced
solution footprint. The devices operate at efficiency levels above 90%,
reducing the thermal design challenges for powering high-current
rails in a wide range of automotive systems, including infotainment,
navigation, telemetry and Advanced Driver Assistance Systems
(ADAS).
The DA913X-A family is comprised of three devices configured
as single- or dual-output buck converters. The DA9130-A operates
as a single-channel, dual-phase buck converter, delivering up to a
lOA output current. The DA9131-A integrates two single-phase buck
converters, each delivering up to SA output current. The DA9132-A
also integrates two single-phase buck converters, each delivering up
to 3A output current. The DA9130X-A devices are AEC-QlOO Grade 2
qualified and are available in a 3.3mm x 4.8mm a 24-pin FC-QFN
wettable flank package. Industrial/commercial grade versions are
also available.

Dialog Semiconductor 1 www.dialog-semiconductor.com

Buck Boost DC-DC Converters Deliver 300W


TDK has announced the addition of 12.5A 300W rated models to the i7C
non-isolated DC-DC converter series. With an input range of 9 to 53Vdc, the
output can be adjusted from 5 to 28V. The i7C topology enables a seamless
transition from buck (voltage reduction} to boost (voltage increase}
operation. The series is well suited for generating additional high-power
outputs, from existing 12, 24, 36 or 48V system voltages.
Efficiencies of up to 96% minimize power losses, allowing the product
to operate and deliver high useable power in demanding thermal
environments, says TDK. Under light load conditions, the i7C's control
techniques significantly reduce power dissipation. All models are certified
IEC/UL/EN 62368-1, 60950-1 and carry the CE mark for the Low Voltage and
RoHS Directives.

TDK-Lambda I www.us.lambda.tdk.com
76 CIRCUIT CELLAR • OCTOBER 2020 #363

PRODUO NEWS

Software for STM32 MCU Condition Monitoring


STMicroelectronics (ST) has released a free STM32 MEMS microphones, a 240x240 calor TFT-LCO module and
software function pack that lets users quickly build, train on-board STLINK-V3E debugger/programmer. The budgetary
and deploy intelligent edge devices for industrial condition price for the Discovery kit is $76.00, and it is available from
monitoring using a microcontroller Discovery kit. Developed in www.st.com or distributors.
conjunction with machine-learning expert and ST Authorized
Partner Cartesiam, the FP-AI-NANOEDG1 software pack STMicroelectronlcs I www.st.com
contains all the necessary drivers, middleware, documentation
and sample code to capture sensor data, integrate and run
Cartesiam's NanoEdge libraries.
Users without specialist AI skills can quickly create
and export custom machine-learning libraries for their
• l::,
..,.,
...
.1./::•m~~ •

applications using Cartesiam's NanoEdge AI Studio tool


running on a Windows 10 or Ubuntu PC. The function pack
simplifies complete prototyping and validation free of charge •e :o~ .. • ....
..
<:> "

.
:
..
r:~
on STM32 development boards, before deploying on customer
hardware where standard Cartesiam fees apply.
The FP-AI-NANOEOG1 function pack is available now at
_:.•: ~- .
·!-
- •
www.st.com. The STM32l562E-DK Discovery kit contains
an STM32L562QEI6QU ultra-low-power microcontroller, an
FP-AI-NANOEDG 1
iNEMO 30 accelerometer and 30 gyroscope, as well as two to learn and monitor equipment health

MCU Solution Targets Micromobility Designs


Renesas Electronics has introduced what it calls its 48V energy storage systems. This reference design uses a modular
Mobility Winning Combination Solution that helps engineers approach in both hardware and software to showcase core
accelerate the development of e-scooters, e-bikes, UPS and and optional functional blocks that can be adopted for many
24V-48V micromobility applications such as lawn mowers,
electric carts, robot cleaners, power tools, power banks and
Renesas Reference Design for Electric more.
Mobility Solutions It also uses 15 Renesas ICs, including three key devices:
the ISL94216 16-cell battery front end (BFE), robust HIP2211
100V MOSFET drivers, and RX23T 32-bit microcontroller (MCU)
for motor control. The 48V mobility winning combination
solution is powered from a 25A-hour Li-ion battery that drives
a 1600W inverter to attain speeds up to 5,000rpm.
The ISL9421616-cell BFE is available now in a 64-lead QFN
package from Renesas' worldwide distributors, and is priced
at $2.99 USD in 1,000-unit quantities.

Renesas Electronics 1 www.renesas.com

Low Power Dual-Core MCU Serves Up BLE 5.2


Maxim Integrated Products has announced the MAX32666, authorized distributors The MAX32666EVKIT# is available at
an ultra-low-power dual Arm Cortex-M4 MCU with floating- Maxim Integrated's website for $157.50.
point unit (FPU) and Bluetooth Low Energy 5.2 (BLE 5.2).
Its battery life is extended by combining robust memory, Maxim Integrated I www.maximintegrated.com
security, communications, power management and processing
functions traditionally performed by multiple MCUs into a
single device, says Maxim.
This dual Cortex-M4F MCU provides efficient computation
of complex functions, operating at up to 96MHz. To replace
the need for a separate PMIC, the MAX32666 features an
integrated single-inductor, multiple-output (SIMO) regulator,
which extends the life for small-sized battery applications. The
MCU offers BLE 5.2, supports up to 2Mbps of data throughput
and long range (125kbps and 500kbps) and offers transceiver
output power of +4.5dBm programmable down to -95dBm.
The MAX32666GWPBT+ is available at Maxim Integrated's
website for $5.22 (1000-up, FOB USA); also available from
circui tcellar.com 17

The Directory of
PRO & SERVICES

Advertisers must furnish digital files that meet our specifications (circuitcellar.com/mediakit).

All text and other elements MUST fit within a 2" x 3" format.
E-mail [email protected] with your file.

For current rates, deadlines, and more information contact


Hugh Heinsohn at 757-525-3677 or [email protected].

,. 12 c Bus
~~ Technofogic Adapters
" Systems
ter
0
CE
USB I Ethe rne t I RS-232
Free
Visual Studio, LabVIEW & ASCII AP!s
TS-7250-V2 Win, OSX & Linux Drivers
Msg & EEPROM Program Apps
1 GHz ARM Computer with
Sw itch Selectab le O ptions
Customizable FPGA-Driven Voltage Sense (O.Sv to Sv)
PC/1 04 Connector Power Source l OOmA (3.3v or Sv)
Pull-Ups (Enable/Disable)
and Several Interfaces 0 /R V lt & ESD P t et'
at Industrial Temp
shop-mcc-us.com

ADuC841
M icrocontroller
Design Manual
78 CIRCUIT CELlAR • OCTOBER 2020 #363

Answer 1- The total power dissipation is specified as Answer 2- Yes, you could build a 2-input NOR gate
lmW, and the supply voltage is 1.5V. This means that with just one more resistor.
the total current consumption of both paths (base and Clearly, there would be no problem when both inputs
collector) can only be 666.7~-JA. are high or both inputs are low. However, the situation
The "forced W' is specified as 10, which means that where one input is high and one input is low presents
10x the base current flows through the collector. This a problem.
means that Ib must be 60.61JA and le must be 606.11-JA. Just like with the inverter, the high input drives about
Since Vc:E(satJ is 0.2V, the collector current must 611JA into the base of the transistor, which sits at about
=
produce a voltage drop of 1.5V- 0.2V 1.3V across Re- 0.7V. However, with the other input low (at 0.2V), the
=
Therefore, Re: must be 1.3V I 606.11-JA 2,145Q. other base resistor steals about {0.7V - 0.2V) I 11 kQ =
Similarly, since V8E is 0.2V, the base current must 451JA away, leaving only about 161JA for the transistor.
produce a voltage drop of 1.5V - 0.7V = O.BV across Now the transistor must have a minimum P of 6061JA I
Re+ R8 • Therefore, the total resistance must be O.BV I 161JA = 38 in order to remain saturated.
60.61JA = 13.2 kQ, and the value of RB must be 13200 However, you could not add a third input this way.
- 2145 = 11055 n. A single high input would not be enough to turn the
The closest standard E96 values are 2.15kQ and transistor on.
11.0kQ, respectively. Using E12 values of 2.2kQ and
12kQ yields currents of 5911JA and 56.31-JA, for a forced
~of 10.5.

Answer 3- The simplest way to have an arbitrary Answer 4- Each additional input connected to the
number of inputs is to add both a transistor and its base output of the gate draws more current through Re, but
resistor for each additional input. All of the transistors this current must be shared N ways, so the current
would share the same load (collector) resistor. available to each input drops.
Table 1 shows that even with up to 8 loads, the input

.....
1
2
,..... ....
current to each gate only drops by about half, requiring
a minimum Pof about 20.

6lj.IA
105j.IA
. . . . . .... Input
6lj.IA
52j.IA
4 163j.IA 41j.IA
ci rcuitcellar. corn 79

The Future of Modular Edge Processing

Three Real-World Intelligent


Infrastructure Applications
ystems designed for edge power Intel Atom processors. Such high
applications need to be highly scalability beyond dedicated processor
flexible. This requires scalable sockets has become possible by utilizing
processing power, which can be COMs on the basis of the vendor
provided most efficiently with computer- independent Qseven specification.
on-modules (COMs). Here, we three Towards the cloud, the LoRa gateway
real-world applications-ranging from LoRa offers connectivity with 1 Gbit Ethernet
gateways for smart cities to energy grid and 3G/4G.
servers and video surveillance servers, all
with optional Al-demonstrate the benefits SMART CHARGING
of this modular approach. INFRASTRUCTURE
Low-power wide-area network Edge systems requiring more hybrid
(LPWAN) technology LoRa is deployed in local connectivity will need more 1/0
many different application areas. Smart flexibility. But even in such scenarios, the
Dan Demers,
cities build networks on the basis of this modular approach is a great fit for edge congatec
technology to connect smart distributed computers as we can see in China's recent
devices-for example distributed parking edge layer deployments. China is currently
spaces as well as central multi-story car deploying an edge layer for a distributed
parks. Such different parking scenarios are management system for smart grids in
one example why LoRa gateways need to be cooperation with Tencent's Energy loT
highly adaptable. Partner (Figure Z). Such an edge server
design in a smart city infrastructure context
LoRa GATEWAYS is quite interesting, as e-mobility has a
Flexible loRa gateway configurations are bright future. E-mobility requires charging
also required because they can connect any infrastructures that must be fueled by
LoRa sensor as this wireless protocol needs regenerative energies to improve the
no physical connector. This means that loRa ecological footprint.
gateways can be used anywhere to cater for Regenerative energy is generated in
any additional application based on various local micro grids or distributed virtual grids;
mixes of loRa devices. Smart cities can and those grids need smart edge devices,
therefore also use loRa parking gateways capable to manage the decentralized
to track their free-floating mobility offers processes in real-time. Once the Chinese
and to integrate charging infrastructures edge layer service is fully available, it
into parking guidance systems and so on. will support thousands of power devices,
However, extending the tasks of smart city
gateways leads to the need to integrate
scalability for future demands to improve
investment security.
The LoRa FlexGate FGW264 Gateway from
the French company Expemb for example
offers this scalability with COMs (Figure 1).
By using COM modules for the edge processor • 2!!:3!
demands, the new gateway enables a flexible
hardware and software setup to meet ~- .. -.11 .
'": rr: . 1.. J
)·:.;~~'-·
any LoRa based loT technical challenge-
including artificial intelligence (AI). ., f .•
The platform supports up to eight LoRa I ·u
channels simultaneously to communicate
with several thousand connected objects.
It can further host not only one but two
.,.,.
....


j ,
(

•·..
• :
.,
.; '.

l

·-
. .

....
j

.
-· -
' . .. . .

rp
FIGURE 1
The LoRaWAN FlexGate FG264
Gateway from Expemb is designed
generations of high-performance and low- with Qseven ffiMs.
80 CIRCUIT CELlAR • OCTOBER 2020 #363

hundreds of power protocols and online editing of common


standard protocols as well as dynamic completion of common
standard device types. Such a comprehensive ecosystem could
be highly interesting for many worldwide deployments.
For the adaptive hardware of the new class of edge devices,
the edge server designers have chosen a flexible system design
based on COM Express Type 7 modules. These modules offer
server-grade performance and functionality on a standardized
, ~
-- form factor. First systems are based on modules with Intel
Xeon D1Sxx processors with up to 16 cores and 32 threads.
Alternative configurations are based on the Intel Atom C3xxx
processors. Featuring up to 16 cores, those processors are the
ideal fit for all installations that have to handle smaller package
sizes in parallel while consuming as little energy as 25W TOP.
FIGURE2
The first loT edge router designs in China's edge layer for smart grids are based SITUATIONAL AWARENESS
on congatec Server-on-Modules with Intel Xeon DlSxx processors. Alternative In rack server designs, standardized COMs can drastically
configurations are based on the Intel AIDm Oxxx processors. cut the long-term investment costs for infrastructure servers
used in connected smart city applications such as video
surveillance systems that are being equipped with AI to
improve situational awareness and public safety. For such
microserver installations at the infrastructure edges, vendors
such as Christmann also rely on Server-on-Modules based on
the vendor-independent COM Express Type 7 as well as the new
COM-HPC standard (Figure 3).
What speaks in their favor is not just the flexibility to adapt to
recent AI needs but also the long term perspective: The second
generation-required after three to five years as technology
enhancements evolve rapidly-is expected to cost only about
50% of the initial investment, as a simple replacement of the
processor modules will be all that's required in the majority
of cases.
To open up the potentia Is of significantly reduced TCO, such
rackmount servers can be flexibly equipped with up to 27 CPU
FIGURE3
microservers with x86 or Arm architecture. In addition, also
The Christmann microserver family for rack systems is scalable with both COM
standardized modular options for parallel processing in the
Express Type 6 and COM Express Type 7 Server-on-Modules as well as standardized form of GPGPU cards and FPGA modules are possible, which
GPGPU cards and FPGA modules. are physically implemented on a COM Express Basic footprint.
The modular concept makes the Christmann RECS Box 4.0
server family extremely scalable.

MODULARITY AT THE SG EDGE


These three examples illustrate the tremendous benefits of
designing edge gateways and edge servers on the basis of
Computer-on-Modules and Server-on-Modules. For large-scale
applications, even the fusion of modules with dedicated carrier
boards is a common strategy. So why not follow a similar
approach for large-scale applications such as SG edge servers
or for consumer-grade e-mobility vehicles, implementing first
a COM &. carrier design for R&D and later a full custom design
by COM and carrier fusion? Embedded computer vendors such
as congatec are ready to support such a paradigm change
from proprietary designs towards closed-loop engineering
with open modular platforms. e
RESOURCES Dan Demers holds a B.B.S degree in International Business from Grand
co ngatec I www.congatec.com Valley State University, Grand Rapids, Michigan and an M.B.A. from
Ashford University, Clinton, Iowa. Mr. Demers has over 22 years of
experi ence in embedded computing having worked with Fortune SOD
companies in the Industrial, Medical, and Communications markets.

You might also like