You are on page 1of 84

 


2 CIRCUIT CELLAR • DECEMBER 2019 #353

Issue 353 December 2Dl9 I ISSN 1528-0601

OUR NETWORK ORCUIT CEUAR® (ISSN 1528-0608) Is publlshod monthly by:

KCK Media Corp.

( • circuit cellar f 1I[. ftHxpress PO Box 417, Olase Oty, VA 23924

Periodical rates paid at Chase aty, VA, end additioiKll offiCI!S.


One-)'l!llr (12 issue<) sub<criptlon l'lll>! US and possessions
$50, Canada $65, Foreign/ P!JW $75. AI subscription orders
VOICE &~.t COIL payable in US funds only via VISa, Master<ard, intl!riKltional
postal money order, or check drawn on US benk.

~ LinuxGizmos lOUDSPEAKER
Ll S
SUBSCRIPTION MANAGEMENT
INDUillrY
SOURCEIIOOK Onllne Account ...............,, circuitcellar.com/account
Rerew I Change Address/E-mail 1 Check Status

CUSTOMER SERVlCE

1!-tul: customerservlceCPclrcuitcellar.com
Accutrace, Inc. C3 Phone: 434.533.0246

All Electronics Corp. 77 Mlolt Circuit Cellar, PO Box 417, Chase City, VA 23924

CCS, Inc. 77 Postmaster: S..nd address chenges to


CimJit Cellar, PO Box 417, Chase Oly, VA 23924
DesignCon C2
NEW SUBSCRII'TlONS
Earth Computer Technologies, Inc. 31
ciraitcellar.com/sub<cription
Embedded World 13
EzPCB 31 .AD¥ERTISING

Contact: Hugh Heinsohn


IAR Sytems 35 Phone; 757-525-3677

Pico Technology 43 Fu: 888-980-1303


E-mail: hheinsohnOclrcultcellar.com
Revenue Control Systems 77 Advertising rates and terms available on request.

SEGGER Microcontroller Systems 1 NEW PRODUCTS

Sectlgo 27 E-md: editor@clrcultcellar.com

SllngShot Assembly 21 HEAD OFFICI

Technologic Systems, Inc. C4, 77 KCK Media Corp.


PO Box417
Versa logic 51 0\ase Oly, VA 23924
Phone: 434-533-0246

COPYRIGHT NOTICf
NOT A SUPPORTING COMPANY YET?
Contact Hugh Heinsohn Entire contents copyright (> 2019 by KCK Media Corp.
All rights reserved. Circuit Cellar Is a r"gistered trademark
(hugh@circuitcellar.com, Phone: 757-525-3677, Fax: 888-980-1303) 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 fur 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 quaity and condition of materials and
workmanship of reader-assembled projects, KCK Media Corp.
TECHNICAL COPY EDITOR PROJECT EDITORS disclaims ary responsibi ity for the safe and proper function
FOUNDER
of reader-assembled projects basod upon or from plans,
Steve Ciarcia Carol Bower Chris Coulston descriptions, or irlormation published In Circuit Cellar®.
Ken Davidson
GRAPHICS David Tweed The irlormation provided In Circuit Celar® by KCK M<!dia
Grace Chen Corp. is for educational purposes. KCK Media Cor p. makes
no claims or warrants that reeders have a right to build
Heather Rennae things besed upon these ide!IS under patent or other
relevant intel ectual property law In their jurisdiction, or
COLUMNISTS that readers have a ri!jht to construct or operate any of
Jeff Bachiochi (From the Bench), Bob Japenga (Embedded in Thin Slices), the devices described herein under the relevant petent or
other intellectual property law of the reader's jurisdiction.
Robert Lacoste (The Darker Side), Brian Millier (Picking Up Mixed Signals), The reader assumes any risk of Infringement ~obility fur
George Novacek (The Consummate Engineer), and Colin O'Fiynn constructing or operating such devices.

(Embedded Systems Essentials) © KCK Media Corp. 2019 Printed In the United States
circuitcellar.com 3

loT Technology for a letter World


irst off, let me share some exciting news long-range and low power communication over public
about the Circuit Cellar brand. We recently or private LoRaWAN loT networks and short-range high
launched our new and improved version of data rate communication over Wi-Fi.
Circuitcellar.com. The physical redesign of First Prize in Smart Water Category went to
the site was a long time coming, and we're pleased for Universiti Tunku Abdul Rahman {UTAR) in Malaysia
you to see the new look and design. But the rebooted site students Lim Wen Qing, Yap Sheng Yao, Tan Kai Slang,
isn't just about looks. We're now offering new ways to Au Jin Cheng and Khor Jun Bin for their entry: "loT
access technical articles of all types, including detailed Detachable Waterway Monitoring Device with LoRa and
(and fun!) project-style articles, insightful technology Self-Sustainability." The project involved creating a
trend articles, comprehensive round-up style articles device that to help to monitor and report on the major
about key products, in-depth electronics tutorial stories waterways. For monitoring, the system used a variety of
and more-the kinds of stuff you're used to seeing in sensors paired with an Arduino Uno, which was chosen
Circuit Cellar magazine every month, but more of it. because it is affordable and compatible with the ESP32
And, we're adding new content all time including new TTGO T-beam module which include a LoRa transceiver
web-exclusive articles and filling out content from and GPS receiver. LoRa wireless communication was
Circuit Cellar's rich legacy of past articles. used for long distance direct communication between
Switching gears, I want to highlight the winners of the devices. All the data collected from the sensors are
Keysight loT Innovation Challenge announced this Fall. sent to IBM Cloud for analysis. Data was processed by a
Run by Keysite Technologies, the design competition has machine learning (ML) algorithm as well.
graduate and undergraduate engineering student teams Finally, a special prize called The Keysight Diversity
conceptualize low-power sensor networks to tackle issues in Tech Award was awarded to Massachusetts Institute
brought on by today's rapid urbanization. It caught my ofTechnology (MIT) students Nikhil Murthy, Sunny Tran,
interest because the projects the competitors submitted Gabriella Garcia and Irin Ghosh for their Smart Land
were exactly the types of project stories that make up entry called berrySmart. berrySmart is a device that
part of Circuit Cellar's magazine and online content. The gives berry farmers a way to better understand their
contest had two tracks: The Smart Land challenge and farm. It involves a variety of sensors strategically placed
the Smart Water challenge. across the farm in a mesh network, which is used to
The Grand Prize Winners were Stanford University create a dashboard for farmers. The berrySmart system
students Anand Lalwani, Max Holiday and Valmik consists of subsystems including sensor nodes, an edge
Lakhlani for their entry "Immersible loT Sensors for node, database, dashboard and the farmer's personal
Cloud-based Water Quality Monitoring." The project computer, which is used to view the dashboard. Nodes
consisted of deployable and immersible sensor hardware are connected through a mesh network. The team
used to better understand the water-energy nexus designed a mesh network overlayed with Wi-Fi via an
via cloud-based data management. They proposed to Espressif ESP32 chip coded from the Arduino IDE.
develop deployable water quality sensors that combine Congratulations to all the winners of the Keysight
recent breakthroughs in resilient micro-scale sensing, loT Innovation Challenge! You can be sure I'll be
electrochemical water treatment and low-cost micro- reaching out to them to write up detailed articles on
satellite/loT communication platforms. their projects for
First Prize in Smart Land Category were Massey the Circuit Cellar
University in New Zealand students Tyrel Glass, Baden brand. e
Parr, Darryn Wells and Madhav Kruthiventy of for their
entry: "CAIRNet (Climate Air Information Real-time
Network)." CAIRNet involves a novel low-cost sensor
node that uses electrochemical sensors to measure
carbon monoxide and nitrogen dioxide concentrations
and an infrared sensor to measure partlculate matter
levels. The node can be powered by either a solar-
recharged battery or the power grid. It is capable of
4 CIRCUIT CELLAR • DECEMBER 2019 #353

PRODUCT FOCUS

48 DC-DC Converters
Compact Efficiency
By Jeff Child

52 LoRa (Part 2) Embedded in Thin Slices

The Things Network


By Bob Japenga

56 Near-Field Magnetic Probes


The Darker Side

Low-Cost EMI Detection


By Robert Lacoste

62 Semiconductor Fundamentals
The Consummate Engineer

(Part 4)
Amplifiers and FETs
By George Novacek

66 Controlled Circuit Breaking


From the Bench

Home Electricity Evolution


By Jeff Bachiochi

TECH THE FUTURE

79 Drones, Aircraft and Cyber


The Future of Airborne Security

Attacks-What Can Go Wrong?


By A/an Grau

74 : PRODUCT NEWS
78 : TEST YOUR EQ

t.a @editor_cc
~ @circultcellar
11 circuitcellar
ci rcuitcellar. corn 5

6 Build a 4-DOF
Robotic Arm (Part 1)
Using MATLAB and Arduino
By Raul Alvarez-Torrico

14 Build a Simple
Quadcopter Drone
Using a PIC32 MCU
By Yijia Chen, Stewart Asian
and Thinesiya Krishnathasan

22 Create Your Own


I-V Curve Tracer
A $50 Design
By George R. Steber

32 Helping Cars Think for


Themselves
AI and Neural Networks
By Bryce Johnstone

SPECIAL FEATURE

37 Modular Solutions Enable AI


in Embedded Systems
Boards, Boxes and SaCs
By Jeff Child

TECHNOLOGY SPOTLIGHT

44 Test and Measurement


Solutions Push the Envelope
Speed and Functionality Advances
By Jeff Child
When it comes to building your own robotics
systems, the future is truly now, thanks to
inexpensive hardware and software tools available
today. In this project artide, Raul explains how he
built a robotic arm with four degrees of freedom
(4-DOF) and revolute joints. For anyone interested
in introductory robotics, this low-cost hardware
and software platform lets you get up and running.

By Rau/ Alvarez-Torrico

I
n this article, I discuss my project that MATLAB code also implements a Graphical
implements a robotic arm with four User Interface (GUI), from which the user can
degrees of freedom (4 DOF) and revolute control the robotic arm and run the forward
joints (often denoted as RRRR), for the and inverse kinematics algorithms. A 3D
purpose of studying and experimenting with simulation/visualization of the robotic arm is
forward/inverse kinematics and PID control displayed in the GUI in real time.
basics applied to robotic arms. It uses a The aim of this project is to provide anyone
DC motor with a bi-phase encoder for the interested in introductory robotics with a low-
first joint at the base of the arm, and digital cost hardware and software platform that
serve motors for the remaining three joints- allows easy experimentation with forward and
including one additional servo motor for the inverse kinematics algorithms, PID control
end effector. The angular position of the DC and controller/computer interfacing.
motor is controlled with a PID control loop. Figure 1 is a block diagram showing the
The remaining servo motors are controlled main components of the robotic arm. The
with open-loop control signals, because servo embedded controller determines the pose
motors already have closed-loop controls of the robotic arm by commanding each of
implemented in hardware. the four joint motors to the desired angles.
The robotic arm has an em bedded contrail er It implements a serial command interface
that runs the PID algorithm for controlling with a very simple ASCII string protocol for
the angle of the DC motor, and also controls receiving target angles from the companion
the servo motors. In addition, for changing computer. It also implements a PID control
joint angles, it implements a communication loop for controlling the rotation angle of the
interface to receive commands through the DC motor at joint 1.
serial port. To do so, it reads the current motor
The forward and inverse kinematics position from the bi-phase encoder attached
algorithms are implemented using Mathwork's to the DC motor, and computes the required
MATLAB programming language. They are run PID output signal to drive the motor to the
in a companion computer, which interfaces to target angle. The servo motors are handled
the embedded controller by using the serial much more easily by using only an open-loop
communications command interface. The control scheme. As noted earlier, forward and
ci rcuitcellar. corn 7

inverse kinematics algorithms are written in easy to understand for those new to this
MATLAB and run in the companion computer. concept. And, by including it as a hardware and
Both algorithms return a set of angles for software implementation example, it is easy
each of the four joints, which are then sent to understand for those new to this concept.
to the embedded controller via the serial For the other joints, I chose servo motors to
communications interface. For the companion keep the rest of the code simpler. Arguably, all
computer, I'm using a regular personal servomotors can be replaced by DC motors by
computer with Windows 10 operating system just duplicating the hardware and PID control
installed. code that already works for joint 1. I would
recommend beginning by replacing just one
ELECTRONICS HARDWARE servo motor and once it works well, proceed
The circuit schematic for the robotic arm with the next, and so on. The kinematics
is shown in Figure 2. For the embedded code in the companion computer should work
controller, I'm using an Arduino UNO board, just fine with the replaced motors, because
which is very intuitive for beginners and makes it is totally independent of the hardware
it easy to interface a wide variety of sensors implementation of the robotic arm.
and actuators. With it, there is no need to worry The DC motor at joint 1 is a generic JGY370
about low- or mid-level drivers and libraries for DC motor [1] that spins at 6 RPM when powered
performing basic functions-such as driving with 6 VDC. It has a torque of 14 kg- cm, which
a motor, doing serial communications or is more than enough to rotate the whole
managing external interrupts. robotic arm horizontally, and it comes with
Case in point: I'm using the Arduino an attached generic bi-phase encoder. The
microcontroller's (MCU) external interrupts motor is driven by a STMicroelectronics L298,
to promptly detect the ticks generated by 2-channel H-bridge Driver Module. If you want
the encoder attached to the DC motor in to try DC motors with PID controls in the rest
joint 1. Fast tick detection and counting is of the joints, first make sure to have motors
very important for the PID control algorithm. with the required torque for each joint. This
Besides, the Arduino UNO board is low-cost is important because the torque necessary to
and easily programmed just by using an rotate weights in a vertical plane generally
ordinary USB cable. The cable also can be must be greater than that for rotating them
used to interface the board with the MATLAB in a horizontal plane.
code running in the companion computer, by The bi-phase encoder attached to DC
opening it as a virtual serial port. Motor 1 has a resolution of 6,300 ticks per
I have chosen a DC motor for the first joint revolution (that is, it provides 6,300 pulses
at the base of the robotic arm specifically every full rotation). Theoretically, this gives a
to illustrate angular position embedded PID resolution of 17.5 ticks per degree, which is
control. By including it as a hardware and more than enough for our robotic arm. If you
software implementation example, it serves use an encoder with a different resolution,
as a means of studying the concept; hopefully don't forget to change the related constant

Servo motor 2 Power supply -------------,


Oolnt 2) I
I

Embedded
controller

Bi-phase
encoder

Companion
Servo motor 5 computer
(gripper)
FIGURE 1
Robotic arm block diagram
B CIRCUIT CELLAR • DECEMBER 2019 #353

ENC_TICKS_PER_REV in the Arduino code, cable connected to the companion computer,


otherwise you won't get the exact commanded which also powers the bi-phase encoder.
angle. If you don't know the resolution of your Finally, for the companion computer, I'm
encoder, you can measure it by commanding using a regular laptop with MATLAB R2015a
the motor a certain amount of degrees (say, installed on it. Any personal computer can
360 degrees or more), print the ticks in the be used, provided that it has the minimum
Arduino IDE's serial monitor, and then use the recommended specifications to run MATLAB
"rule of three" to obtain the number of ticks software.
per revolution for your encoder. For the mechanical frame, I picked an
off-the-shelf aluminum robotic arm kit [3]
MORE ON THE JOINTS to ease the mechanical implementation and
For joints 2 to 4 and the end effector or concentrate all efforts on the electronics and
"gripper," I'm using JX Servo PDI-6221MG code parts of the system. This is a generic
20 kg-cm digital servo motors [2]. Digital kit very popular among beginners. It's really
servo motors have smaller dead bandwidth easy to put together in a couple of hours,
compared to typical analog ones. This helps and has all parts for a complete robotic arm
to reduce vibration when the links are structure. I built a wood base to which I
horizontally extended and the servo motors attached the robot arm with screws, to have a
are holding against downward rotational more solid stand. Figure 3 shows the robotic
forces generated by the arm's weight and arm assembled with all its parts.
load. I'm powering the servos with 6 VDC, It is important to have motors with the
which is the maximum allowed power voltage correct torque specifications for each one
for these servo motors, to obtain their of the joints, otherwise they would not be
maximum torque performance. Lower torque able to counter the rotational torque in each
servo motors can be used for joints 3, 4 and joint due to the weight of each link and their
the gripper, but I'm using the same servos on corresponding loads. There are free online
all joints because that's what I had at hand. apps to calculate torque for robotic arm joints
The power supply must be able to provide [4]. You need to provide inputs, such as the
the required current for all motors. I have configuration of the robotic arm (how many
connected my bench power supply adjusted degrees of freedom it has), link lengths, link
to 6 VDC, which can provide up to 5 A. The weights, loads and so on.
Arduino UNO board is powered from the USB They'll compute the necessary torque for

Op~onal. Just tor ~cbugging

UARTtoUSB
Joint 4
DEBUG RX J TX

DEBUG TX 2 RX

GND
USB
Joint 3 I=
- 81

Ul
Joint 2
0
AREF
GND
l3 •IN Gripper
Arduino l2
UNO -ll f -- - - '
-10 1--- - - - - ' •IN
-9 1 - - - - - ,
8 f -- - - - - + - - - '
ENA -sv
ENB ·l2V 5VDC~PM

INI OUTJ Joint 1


IN2 OUT2
INJ OUT3
IN4 OUT4

GND

L298N OrtvOI Modlle

ThoAtdU01ols -sv
pow,,cd by ih~ USB cob4c

I
,jj

FIGURE2
Cin:u it schem~tic for the robotic arm
ci rcuitcellar. corn 9

each joint for the worst-case scenario-lifting


weights at 90 degrees from the vertical-that
is, with the links horizontally fully extended.
If you don't want to deal with the calculations,
it is possible to set the torques by trial and
error, testing the motors with their links at
90 degrees from the vertical and with full
loads, and oversizing them a bit just to be
sure they will cope well with the loads. There's
a fifth serve motor for the end effector (the
gripper). However, it doesn't get counted as a
degree of freedom for the robotic arm, so I
will ignore it when talking about kinematics.

EMBEDDED CONTROLLER
The embedded controller firmware is
written in C/C++ for the Arduino platform.
I'm using the "Serve" and "Serial" libraries
included by default in the Arduino platform to
control the serve motors and to do the serial
communications. Although a PID control
library for Arduino is also available, I chose
to write my own PID control routine. I did this FIGURE3
because I wanted to show how to implement Fully assembled robotic arm
it in code "by hand," for those who are new
to it. Besides, it is more portable, in case you and debug the hardware in this way before
want to try PID in another MCU platform. connecting the robotic arm to the companion
The embedded controller also implements a computer. This allows the correct rotation of
low-pass filter for filtering angle readings, every joint to be checked, before interfacing
and a serial command parser, which will be the arm with the MATLAB code.
discussed in more detail later.
The embedded controller receives angle PID CONTROL AND FILTERING
commands for each of the joints from the A PID (proportional-integral-derivative)
companion computer through the serial port, controller is a control-loop mechanism widely
in a very simple protocol format devised for used in many control systems, including
that purpose. Figure 4 shows an example robotics [5]. This controller calculates an error
of angle data packed for DC Motor 1 in the value as the difference between a desired
aforementioned protocol. The angle value setpoint (in our case, some desired angle
is packed along with some delimitation for joint 1) and the actual measured process
symbols. These delimitation symbols help variable (the actual measured joint 1 angle).
the embedded controller to discriminate the It then uses this error to calculate an output
angle data in the received frames. Figure 5 is signal composed of the sum of three terms:
an example of angle data packed for all four The proportional, integral and derivative (P,
joints. The embedded controller detects the I and D, hence the given name). The output
delimitation symbols when parsing the serial signal then is applied to the actuator as a
data, and can easily know which characters correction signal to drive the error to zero-
correspond to angles and for what joints. or more realistically, within a given error
When an Arduino board is connected to a tolerance that the system can cope with. The
computer, it is recognized by the operating PID control uses a feedback loop to measure
system as a "virtual serial port," so to send the error iteratively, calculate and apply the
data from MATLAB, we just have to open the
virtual serial port in code and send the data FJGURE4
in ASCII format. Packed angle data example for DC
This serial interface also becomes handy Motor l
when debugging the basic angle control of the
joints. We can manually open the virtual serial
port in Arduino IDE's serial monitor, or by
using any other terminal emulator software
(such as Putty or Tera Term), and send angle
command data frames by typing them in
the format shown in Figure 4 and Figure 5. 1$0&2$-92&3$34&4$-5& FIGURES
In fact, it is highly recommended to test Packed angle data for all four motors
10 CIRCUIT CELLAR • DECEMBER 2019 #353

FIGURE6
PID control loop for DC Motor 1

Desired
angle Error

+
+
~- _j
Angle feedback

output signal to the actuator. This closed-loop constants, KP, Ki and ~<et, which control the
configuration is what makes this type of control gain or contribution of each of the three
very responsive, accurate and independent of terms (proportional, integral and derivative)
external system parameters. Figure 6 is a to the output signal sum. By appropriately
graphical representation of the PID controller setting these three constants, we make the
used with the DC motor at joint 1. system's response to error as fast and stable
Every time a sensor is used to read some as possible. The PID constants I provide in the
variable in the environment (such as position Arduino code work well with my setup, but
or velocity), a certain amount of noise may not work as well with yours if you deviate
(typically random) will always be present in somehow from the proposed hardware.
that reading. This noise is due to some factors For example, you might have differences
such as the error tolerance of the sensor in motor velocity, encoder resolution,
itself, including external perturbations in joint friction and mass of your robotic arm
the environment and magnetic interference. structure. In that case you may need to re-
Generally, this sensor noise will be a high- tune the three constants from zero. Depending
frequency signal in comparison with the on your previous experience with PID, there
frequency of the signal or data of interest. It are some tuning methods you can use, the
tends to mess with the performance ofthe PID easiest of which-iterative trial and error-is
controller, because the controller will try to generally recommended for beginners. (I use
react to the high-frequency oscillating noise, it all the time.) There are many resources on
instead of trying to correct for the signal of the Internet for learning how to use it, in case
interest. That, in turn, will cause oscillations you aren't familiar with it.
in the system and also make it more difficult
to tune the PID constants. MATLAB GUI BASICS
Some systems are more sensitive than Figure 7 shows the GUI that I made for the
others to noise. It depends on their specific robotic arm, using MATLAB's GUI Development
characteristics. For systems that are very Environment. In the following paragraphs I'll
sensitive to noise, a filter helps to reduce the explain some basic concepts about how a GUI
amount of noise present in the sensor data, works in MATLAB, and how it interfaces with
thus improving the performance of the PID the application code to perform the desired
controller. I implemented a low-pass, moving- tasks. I won't explain how to build the GUI
average filter in the embedded controller [6] from scratch, but there are some online
to smooth the high frequency noise and help tutorials if you want to learn how to do it.
the PID algorithm to drive the motor more In a MATLAB GUI, the components used to
easily to the desired angle. This kind of filter is input data-such as buttons, sliders and check
generally the easiest way to implement sensor boxes-are generally attached to callback
noise filtering in an MCU. It is very popular and functions in code. So, any time you interact
works well with many types of sensors. with one of these components, for example,
A PID control system has three tuning by clicking a button or moving a slider, its
corresponding callback function is called.
This means that these callback functions
ABOUT THE AUTHOR must contain all the code you want to run in
Raul Alvarez-Torrico has a B. E. in electronics engineering and is the founder response to interactions with these controls.
of TecBolivi a, a company offering services in physical computing and edu- The provided MATLAB code file "Robotic_
cational robotics in Bolivia. In his spare time, he likes to experiment with Arm_GUI.m" contains all GUI callback
wireless sensor networks, robotics and artificial intelligence. He also publishes functions. For instance, when the "Motor
articles and video tutorials about embedded systems and programming in 1 Anglen slider is moved (Figure 7), the
his native language (Spanish), at his company's website www.TecBolivia.com. slider_motorl_angle_Callback()
function is called. Inside it, the following
You may contact him at raul@tecbolivia.com.
tasks are performed: get the new angle
ci rcuitcellar. corn 11

value for Motor 1 (set by the moved slider); initial angles to the embedded controller to
compute the forward kinematics and plot reset also the real robotic arm.
the new resulting pose; update the ,Motor 1 The MATLAB GUI code also has an
Angle" text label in the GUI with the new "opening function" called Robotic_Arm_
angle value; update also the resulting X, Y GUI_OpeningFcn() that runs once, when
and Z coordinates of the end effector (the tip the GUI window is created. It also has a
of the arm) in the corresponding coordinate "closing function" called fig u r e_g ui _
sliders and text labels; and finally, send the CloseRequestFcn() that runs every time
new angles through the serial port to the the GUI window is closed. In the opening
embedded controller, for moving the robotic function, the following tasks are performed:
arm to the new pose. The same applies for open the virtual serial port associated with
the other angle sliders. the Arduino UNO-don't forget to change
Also, when the "X Coordinate" slider this for your own before running the MATLAB
is moved, the call back function s l i de r _ code; set all initial values for the robotic
coordx_Callback() is called to perform arm (for example, angles, coordinates, link
the following tasks: it reads the values from parameters); and plot the robotic arm's initial
all three coordinate text labels (X, Y and Z), pose in the GUI. In the closing function, the
and stores them in an array (these are the most important task performed is closing the
target coordinates to move the arm by running serial communications port, because if left
inverse kinematics); then, it updates the open, the application will throw an error the
changed coordinate value in the X-coordinate's next time it runs and tries to access it.
text label. When the ,Run Inverse Kinematics"
button is pushed, the button_cal c_ MATLAB COMMS AND PLOTTING
i nv k i n_Ca ll back() function is called. It will To send data from the companion computer
read the previously stored target coordinates to the embedded controller via the virtual
and run the inverse kinematics algorithm to serial port (that is, the Arduino UNO's USB
compute new angles for each one of the joints, cable connected to the computer), the serial
plot the new pose in the GUI, and then send port must be properly configured and open.
the angles to the embedded controller. The This is easy to do with the available serial port
same applies for the Y and Z coordinates. functions in MATLAB. (See the aforementioned
When the "Reset to Start Pose" button is "opening function" in the code.) Sometimes,
pushed, the button_reset_Callback{) when debugging the serial communications,
function is called. It resets all angles and the MATLAB code will crash without properly
coordinates to their initial values, updates the closing the serial port. If this happens, you
robotic arm's pose in the GUI and sends these can type "instrreset" in the MATLAB Command

4DOF Robotic Arm Forward and Inverse Kinematics


Forward Kinematics
_,Angle: 0.----
r- J ~

Servo l Angle: -'41 30


.[ [ ~
S.rvo 4 Antle: 10 N
~I~ :10

15
Inverse KlnemaUcs
10
X Coord;n-· K .irll
J: S..!J
y c-.llnata: t
·r== r==·l 0

JO
~ ·10 0
y
Roo ln•ene Klnemo~cs X
EucUdeun En or 0
FIGURE 7
0 ReMt 10 s..n PoM
MATLAB Graphical User Interface
12. CIRCUIT CELLAR • DECEMBER 2019 #353

FIGURES
Robotic arm, embedded controller and Window to close the serial port that was left 30 stuff!) to keep the code readable for those
companion computer open, before running the code again. who are new to MATLAB programming. The
0
Once the serial port is open, sending plot3d"function used for this purpose basically
data to the embedded controller is just as takes as arguments three vectors of the X, Y
easy as calling MATLAB's "fprintf" function. and Z coordinates (among other arguments,
For instance, fpr i nt f(ser i a l_port, such as line width and calor), and lets you
strcat('2$', num2str(round(angle2)), draw lines and dots in three dimensions. I'm
' &' ) ) sends the angle data frame for serve passing as arguments the first three rows of
motor 2. Finally, in the "closing function," the the matrix returned by the forward kinematics
serial port will be closed before finishing the calculation, which contain the X, Y and Z
MATLAB application. coordinates of both ends of every link in the
The Run_Pl ot_Fwd_Kinemati cs(thetal, robotic arm to plot the arm's pose. Every time
theta 2. theta 3. th et a4) function the pose changes, the forward kinematics is
(contained in the uRu n_Piot_Fwd_Ki nematics.m" calculated again to obtain the new coordinates,
file) is in charge of plotting the robotic arm and the plot is refreshed in the GUI.
pose in the GUI. This function receives as
parameters the new joint angles of the WHAT'S NEXT?
robotic arm, and calls inside the Ca l c_Fwd_ Figure 8 shows the complete system,
Kinematics( d h_pa rams) function. This comprising the robotic arm, the embedded
function calculates the forward kinematics controller and the companion computer. The
and returns a matrix containing the X, Y and project files for this project are available on
Z coordinates of the ends of each one of the Circuit Cellar's article code and files down load
robotic arm's links. These coordinates will webpage. In those project files, there are
then be used by the caller function to plot the detailed instructions for setting up and
arm's graph in the GUI. running the system.
For simplicity, I'm using a simple "wire In Part 2 of this article series, I'll be
graph" plot of the robotic arm links (no fancy discussing topics more related to the
mathematical foundations of robotics, such as
For detailed article references and additional resources go to: configuration spaces, robot pose
-w.circuitcellar.com/article-materials representation in three dimensions,
References [1] through [6] as marked in the article can be found there. homogeneous transformations, Denavit-
Hartenberg parameters, direct kinematics
and inverse kinematics with the pseudo-
RESOURCES inverse Jacobian. I'll also talk a bit about
Arduino I www.arduino. cc testing, my conclusions and future
improvements. Part 2 is scheduled to appear
Mathworks I www.mathworks.com in the February 2020 issue (Circuit Cellar 355).
STMi croelectronics I www.st.com Stay tuned! G
2ew20P .. n
for tree admiSS\O
Your e-code \d de/Voucher
tl embedded-wor .

embeddedwo rld
Exhibition&Conference
... ifs a smarter world

DISCOVER INNOVATIONS
Over 1,000 companies and more than 30,000 visitors from 84
countries -this is where the embedded community comes together.
Don't miss out! Get your free ticket today!

Your e-code for free admission: 2ew20P

tl embedded-world.de/voucher
W @embedded_world #ew20 #futurestartshere

Media partners Exhibition organizer


NurnbergMesse GmbH
Markt&Technik Smarter ..........., . . . . . llfll;l'U
T +49 9 11 86 06-49 12
visitorservice@nuernbergmesse.de
DESIGN&
ELEKTRONIK
KNOW HOW rO• lNTWICKlU A vnrMAiiDN Conference organizer
WEKA FACHMEDIEN GmbH
Elektronik T +49 89 2 55 56-13 49
info@embedded-world.eu
Elektronik • elektron1k t.de
automotwe
14 CIRCUIT CELLAR • DECEMBER 2019 #353

Small quadcopter-style drones represent one of the most exciting areas of


embedded system design in recent years. Learn how these three Cornell students
designed, constructed and tested an autonomous quadcopter that uses a Microchip
PIC32 MCU as its flight controller and acquires data from an onboard IMU. They
also built a ground station with a PIC32, to downlink the IMU data through radio
and send commands to control the quadcopter's flight time.

By
Yijia Chen, Stewart Asian and Thinesiya Krishnathasan

W
e designed, constructed {ESC)-which receives PWM signals from the
and tested an autonomous PIC32-was used to control four motors.
quadcopter that uses Initial calculations and tests, shown in
a Microchip PIC32 Table 1, were used to determine the feasibility
microcontroller (MCU) as its flight controller of the project. For ease of testing, we chose
and acquires data from an onboard IMU. We to make our quadcopter as small as possible,
also built a ground station with a PIC32 to just big enough to carry the PIC32 MCU,
downlink the IMU data through radio, and associated electronics and the power supply.
send commands to control the quadcopter's The estimated total mass for the quadcopter
flight time. We wanted the drone to be able was 0.348 kg. This meant that the chosen
to take off, stay in air for a user-defined time motor, battery and propeller combination
and then land. We used a 3D-printed chassis must be able to lift this mass with a thrust-
to house all the quadcopter electronics and to-weight ratio greater than 1.
an off-the-shelf electronic speed controller
ELECTRONICS DESIGN
We found several motors weighing around
10 g that met this requirement, so building a
Chassis 1 0.05 0.05 quadcopter of this size seemed feasible. The
major constraint for the drone was between
Motors 4 0.01 0.04 the lift power and its weight. We wanted to
Batteries 1 0.08 0.08 minimize the weight by reducing unnecessary
4 hardware, and by using a battery with higher
Propellers 0.005 0.02
voltage within the limit.
Motor controller 1 0.02 0.02 To ensure that our flight control
Small board 1 0.01 0.01 algorithm had enough time to correctly
balance our quadcopter, we performed
IMU 1 0.005 0.005 our PID (Proportional, Integral, Derivative)
Radio 1 0.005 0.005 control in an Interrupt Service Routine
{ISR). We estimated the natural period of
Motor wires 20 0.001 0.02 our quadcopter to be milliseconds, and the
Other wires 20 0.001 0.02 motor time constant was around 10 to 20 ms.
Therefore, we could check the drone state at
Nuts/bolts 20 0.001 0.02
the frequency above 1 kHz, so the length of
Margin 20% of total 0.058 the ISR had to be within 1 ms, which is the
Total 0.348 maximum delay we expected that would still
keep the quadcopter under control. This 1 ms
TABL.El incorporated collecting data from the IMU,
Estimated quadcopter mass breakdown along with the PID calculations.
ci rcuitcellar. corn 15

TABLE 2
110 LOAD Oil LOAD LOAD TYPE Test data for the DYS BE1104 brush less
VOLTAGE CURRENT CURRENT Pull Power EEP DC motnr (Data from getfpv.com .)
Battery/prop
Volts Amps Amps grams Watts %
1.7 50 12.6 4
7.4 0.5 4.5 100 33.3 3 LiPox2/3020R
8.5 160 62.9 2.5
2.3 70 25.5 2.7
11.1 0.6 5.4 140 59.9 2.3 Li Pox3/3020R
11.8 220 131 1.7

We chose to use a brushless DC motor, Each pair of power MOSFETs controls


because these motors are so common in the the switching of one phase of the 3-phase
world of Remote Control (RC) aircraft and brushless DC motor. The DYS F18A ESC that
drones. This allowed us to choose from a we used had four circuits, one for each motor.
wide variety of off-the-shelf controllers that Each circuit accepted an independent PWM
are designed for controlling these motors in signal, but all were powered by the same
small aircraft applications. The BE1104 motor battery. A secondary function of the ESC was
from DYS was a good candidate, because of to step-down the battery voltage from 7.4 V
its small size and weight (11 mm diameter or 11.1 V, and provide a 5 V output. On RC
and 6 g mass). Additionally, because this aircraft, this is used to power the receiver,
motor is frequently used for small aircraft, but we used it to power the PIC32.
it has documented test data with particular The IMU read the raw data from the sensor
propellers and batteries. The data shown in chips, combined it and converted the results
Table 2 is from www.getfpv.com, a website to usable values. We chose to use the 6050
about model aircraft and drones. IMU from Invensense to measure acceleration
Based on the data in Table 2, we chose to and gyroscope readings for our PID. The
use a 3020R propeller with a 3" diameter. We PIC32 used I2C to communicate with the IMU.
bought a 2-cell, 7.4 V LiPo battery and a 3-cell, To retrieve data from the IMU, we used the
11.1 V LiPo battery to test the lift power. It takes PIC32 I2C library [1] with high-level I2C read
at least 4.5 A for a 7.4 V-battery or 5.4 A for and write helper functions. We used three
an 11.1 V-battery to lift up the quadcopter's gyro values and three accelerometer values
348g estimated mass. This allowed us to size on our drone. Each measurement value was
the batteries for reasonable flight times. At divided into two bytes stored in two registers.
4.5 A per motor (18 A total), a flight time of We read char type data for lower byte and
1 minute requires a 7.4 V battery with a capacity
of 112.5 mA-hours. We bought a battery
with 450 mA-hours to avoid a large depth of
discharge, which can also help to increase
the battery life. The most suitable 11.1 V LiPo
battery we could find had a capacity of 350 mA-
hours. Both batteries had a discharge coefficient
of 20 C, which was qualitatively sufficient for
current draws of the drone we were building.

ELECTRONIC SPEED CONTROLLER


We chose a DYS F18A Electronic Speed
Controller (ESC), because it was the smallest
and lightest 4-in-1 ESC we could find, and
18 A per motor was more than sufficient. Most
off-the-shelf ESCs take in a servo pulse, which
consists of a 50 Hz PWM signal with 1-2 ms
pulses. A 1 ms pulse corresponds to minimum
throttle (motor does not spin), and a 2 ms
pulse corresponds to full throttle (maximum
motor speed). The ESC converts this servo
pulse into PWM signals that it uses to control FIGURE 1
MOSFETs arranged in a bridge. Base sl<ltion
16 CIRCUIT CELLAR • DECEMBER 2019 #353

higher byte, then concatenated them to a hover. There was also a switch on the board
16 bit integer. To get a more reliable gyro that sent a start signal to the quadcopter and
data, we sampled the gyroscope over an signaled it to start the PID algorithm and
extended period of 50 ms and averaged it. We lift off. We mounted the other nRF24 on the
read the IMU inside the ISR to get the gyro drone, and used it to transmit IMU data and
rate ofthe drone, and fed it into PID controller receive commands. The schematics of the
to adjust the drone's position. ground station and the drone are shown in
We used a Nordic Semiconductor Figure 2. and Figure 3, respectively.
nRF24L01+ Radio [2] to communicate To make sure we had the correct order
between the drone and the base station. To of IMU data displayed on the TFT screen, we
construct the entire radio system, we placed designed a synchronization protocol, which is
one of the two radios on our base station. The as follows:
base station included a PIC32 mounted on a
PCB board with a thin-film-transistor liquid- 1) The radio on the drone starts off at receive
crystal display (TFT LCD), so we could see the mode (RX mode), awaiting the start signal.
down-linked data (Figure 1). We also included 2) The radio on the base station, starts off
a 10 kQ potentiometer that was used to select in transmit mode, waiting for the user to
the desired flight time for the quadcopter to toggle the switch up.

1 J8

~
+3.3V

DACCS
vcc
RBl 1 Jg

~ TFTCS

1 J10 ~F2AL01·

~
•3.711 Brcokout
2 Boord
PE CS GND
• 33V
·3.3V
U4 9
•MCLR AVDD
RAO AVSS VDD
RAJ RBlS GPBO GPAO
RBO RB14 CP81 CPAJ
R81 RB13 GP82 GPA2
RBZ WSBJV3 CP83 CPA3
R83 RBU GP84 CPM
vss RBJO GP85 CPAS
RA2 \/CAP GP86 GPA6
RA3 vss GP87 GPA7
R84 RB9 SCK
RAA RB8 SI so
VDD RB7 'CS
RBS RB6 AO INTA
AJ INTB
A2

1~
PIC32MX250Fl288 'RESET VSS

-+3.3V MCP23SJ7

PCO • RBO
PCC • RB1

~
~~1\
_j_ o ..
us
-::;:- LED

•3.:lV

lhlcJ VouiH H---<~:D


•cs vss
c___o~,--------.. SCK Voolb 17--t-<~;.U
SDI 'lOAC

MCP4822 Adodlrull TFT LCD DiSilioy

FIGURE2
Ground station schematics
ci rcuitcellar. corn 17

3) As soon as the switch is toggled, the flight considerations for the mechanical layout
time is transmitted, and the base station included minimizing weight and balancing the
goes into RX mode, awaiting the IMU data quadcopter. Its center of mass was positioned
from the drone. at the center of the four motors, making
4) Upon receiving the start signal, the drone altitude control easier. The 3D-printed chassis
switches into transmit mode. It downlinks was designed with simplicity and weight
the IMU data and the flight time, which savings in mind. Its size was based on the
are printed on the TFT screen of the base 3" propeller diameter, to give ample room
station. for the electronics and battery in the center
5) The drone also transmits a known sequence (Figure 4). Figure 5 shows the drone's motor
to the base station, to notify when there is and ESC test setup.
a new round of data coming, to ensure that The key part of the drone is the control
both radios are synchronized. algorithm. We used a PID algorithm to control
the motors. In our orientation of IMU on the
MECHANICAL DESIGN quadcopter, pitch is defined as the rotation
After the selection of electronics, we along the X-axis, and roll is defined as rotation
moved on to the mechanical layout. Important along Y-axis. The quadcopter determined its

PGD= RBO
PGC = RB1

•3.3V

\/CC

NRF2•LOl•
B<ellkout
Boord
GNO

•3.3V

02 swz

0..--c.., 1~7
)2 + -

~· IIIPU6050

FIGURE 3
Drone schematics
18 CIRCUIT CELLAR • DECEMBER 2019 #353

altitude by integrating gyro data in these


two axes to get two angle measurements Bx
and By. After reading the gyro, the angle was
determined by Euler integration:

An initial gyro offset was removed when


the IMU was set up by taking two gyro
readings 50 ms apart and averaging them.
This procedure was done only once, in the
main loop when the quadcopter was sitting
still on the ground before takeoff.
We employed several methods to
compensate for gyro drift. First, we reset
the integral term to 90% of its current value
whenever the rate changed the sign, to
improve the accuracy of integral term over
a period of time. Second, a complementary
filter used accelerometer data to correct the
gyro readings. 98% of the angle reading
comes from the previously mentioned
FIGURE4 gyro data integration, and 2% comes from
CAD model accelerometer determination of altitude
in relation to the direction of gravitational
acceleration. Accelerometer readings in each
direction are represented by ox, 0y and Oz.

9y = 0.98(9y + IDydl) + 0.0291'·"""

Two PID controllers ran independently-


one for X-axis rotation and one for Y-axis
rotation. Both controllers worked to maintain
the angle of the quadcopter at takeoff. The
initial angle was taken as Bx=O, 8y=O, and
during the flight, the controller tried to drive
FIGURES the angle back to zero. Figure 6 is a block
Motor and ESC test setup diagram of the PID control for each axis.
The control signal can be calculated by
ABOUT THE AUTHORS the following equations where intx and inf:y
represent the integral in X-axis and Y-axis,
Yijia Chen is a senior student at Cornell University studying Electrical & respectively.
Computer Engineering (ECE) and Computer Science. She is interested in
Mx = Kp9x + KDmx + K 1 (intx+ 9xdt)
computer system, architecture design and distributed computing.

Stewart Asian is a Master's student at Cornell studying Mechanical


and Aerospace Engineering. His primary interests include spacecraft We converted control signals to PWM
dynamics and controls as well as distributed space systems. signals by assigning two motors to each
axis and increasing or decreasing their PWM
Thinesiya Krishnathasan completed her Bachelors and Masters in ECE at Cor- signals in proportion to the control signal on
nell. Her focus was mainly in Digital Communication, Signal Processing and that axis. Note that we had a prescaler of 16,
Information Theory. She now works as a Communication Engineer at MITRE. and the clock speed for PIC32 was 40 MHz, so
the new clock speed was 2.5 MHz. Therefore,
ci rcuitcellar. corn 19

1 ms corresponded to 2,500 cycles. The length


of pause of the PWM signal was between 1 ms
and 2 ms, where 1 ms resulted in the off state
and 2 ms resulted in full-speed state.

Filter

Integration
PWMy. = 2500 + M 0 - My

In these equations, M0 denotes a set point


where the motors should stay if the quadcopter
Motor physics
is close to an angle of zero. This set point
PWM -> RPM ->Thrust ->
should be high enough that the quadcopter Acceleration -> Angular rate
can still lift off if all the motors run at that
speed. We ramped the set point up and then
down again at takeoff and landing, to make
flight smoother and to prevent noise spikes FJGURE6
associated with rapid motor acceleration. The TESTING AND RESULTS Block diagram for single-axis P!D
set point started at zero and ramped up to The fully constructed quadcopter and control
1,500 during flight. By limiting the PWM (pulse controller are shown in Figure 7. For
width modulation) signals to the range 2,500- the first stage of PID control testing and
4,500 cycles (1 ms servo pulse to 1.8 ms tuning, we powered two motors at a time
pulse), there was a 1,500 cycle range on each and controlled just one axis of rotation. We
side of the set point for the PID controller to held the quadcopter steady along one axis,
work with. and displaced it from horizontal to observe

FIGURE 7
Fully constructed quadcopter and
controller
ZO CIRCUIT CELLAR • DECEMBER 2019 #353

Controller G•ln• •nd Filtering Re•ult• of Flight


Kp = 1, Kd = 5, Ki = 0 Approx. 10 feet travel from takeoff point
Kp = 10, Kd = 5, Ki = 0 Flipped over and crashed
Kp = 10, Kd = 500, Ki = 0 Flipped over and crashed
Kp = 10, Kd = 50, Ki = 0 Approx. 7 feet travel from takeoff point
Kp = 10, Kd = 50, Ki = 0.1 Flipped over and crashed
Kp = 10, Kd = 50, Ki = 0.04 and complementary filter Approx. 2 feet travel from takeoff point

Table 3
Test flight results for various gain sets how well it recovered. Low frequency of the This turned out not to be the best method of
servo pulse control (50 Hz) led to problems in testing, since the string occasionally got tangled
integrating the gyro data and stabilizing the up in the propellers. But it allowed us to see that
quadcopter. We increased the frequency from the best strategy was to use quite low gains
50 Hz to 500 Hz, even though the ESC was only (Kp = 10, K0 = 50, Kr = 0.04). Table 3 shows
rated for 50 Hz. the results from different PID settings. Our goal
Although the threshold for the motors was to vertically take off, hover and land at the
turning on decreased slightly and motor same place. The last set of settings gave us the
speed overall increased, we saw no significant best performance.
adverse effects. Note that 500 Hz is the We found that high motor speeds or fast
maximum frequency, because a 2 ms servo motor acceleration created noise spikes
pulse must have a period greater than 2 ms. that caused the PIC32 to reset during the
We used 1.8 ms as our max pulse width, test. To prevent this, we limited the servo
so 500 Hz worked fine. After the control to 1.8 ms, which is 90% of the maximum
frequency was increased to 500 Hz, the motor speed, and ramped the PWM set point
quadcopter was able to successfully integrate slowly, less than 10 PWM cycles per ISR cycle.
gyro data to obtain angle measurements and This problem still posed a serious limitation
control its angle at a high enough bandwidth to the design, because a disturbance torque
to fly reasonably level. caused, for example by wind, could cause the
We chose our initial PID controller gains so PID controller to request a large change in
that for each axis at an angle of about 30 degrees motor speed and to reset the PIC32. A more
off horizontal, the servo pulse on one motor robust design would eliminate this problem.
would be at max (1.8 ms) and the servo pulse on The PIC32 could be powered from a separate
the other motor would be at minimum (1 ms). battery, and opto-isolator circuits could be
We observed the width of the servo pulses on introduced to isolate the PIC32 controller
an oscilloscope without the motors connected, ground and motors ground. Alternately,
and tilted the quad copter to find these gains. we could buy a better ESC, with its battery
In this initial estimate, the gain-especially ground isolated from the 5 V out ground and
proportional gain-proved to be much too high. signal ground.
Before flight testing, we hung the quadcopter Adding altitude control would also be a
from a string and connected two motors with major improvement to stabilize the flight.
a lower battery voltage, so they would balance Although we tried twice to integrate the
the quadcopter but not cause it to take flight. accelerometer data, it proved to be unstable,
and altitude readings were inconsistent. The
position readings drifted so severely that the
quadcopter could not tell whether or not it
For detailed article references and additional resources go to: was at the correct altitude.
-w.circu itcellar.com/article-materia Is
References [1] and [2] as marked in the article can be found there. CONCLUSION
In this project, we designed a drone and
made it fly. This could be an initial attempt for
RESOURCES anyone who is interested in making a small-
Digi-Key I www.dig ikey.com scale quadcopter. A PIC32 and other accessible
hardware are able to support the basic flight
DYS I www.dys.hk operation. We also built the communication
system for the drone and the ground station.
Invensense I www. invensense.com Time constraints kept us from reaching one
original objective of making the drone hover for
Microchip Technology I www.microchi p.com
a defined time, and there's still room to improve
Nordic Semiconductor I www.nordicsemi.com the flight performance of the quadcopter. e
$1000 IN FREE LABOR ON YOUR FIRST ASSEMBLY
*GET QUOTE NOW*

Speed. Quality. Service.


Find out how we're different.

Y slillaShot
bASSEMBLY

''/really can't tell you just how


much /love what you guys do.
Your service is on absolute
R:"~

GAME•CHANGER fol me:'


-A/ex, Loser Display Engineering

THE QUICK-TURN PCB PROTOTYPE EXPERTS!


sales@sassembly.com 1(720) 778-2400

_,~¥AS9100D
~ ISO 9001
CERTIFIED
22 CIRCUIT CELLAR • DECEMBER 2019 #353

Create Your Own 1-V Curve Tracer~


A $50 Design

Curve tracing is a classic way to learn more about


many electronic components. Instead of relying
on the documentation of electronic component
manufacturers, it's useful to do the curve tracing
yourself. In this project article, George presents an
inexpensive curve tracer that plugs into the USB
port of your computer and enables you to obtain
and compare the I-V curves of many devices.

By
George R. Steber

C urve tracing is essentially a


means of making a graph of
current (I) versus voltage (V)
called an I-V curve, to display
the basic characteristics of an electronic
many low-budget labs or experimenters.
In this article I will describe an economical
way of obtaining the I-V curves of two- and
three-terminal devices, using a PC, an
economical USB oscilloscope, a simple circuit
device. I-V curves of the components are and a bit of Windows software. It's a project
helpful in understanding their limitations that should appeal to almost anyone involved
and nonlinear operation. Such curves are in electronics.
also useful in establishing circuit models and With this setup, you will be able to
for determining bias points, load lines and accurately plot, save and compare the
boundaries of the devices. I-V characteristics of a variety of devices,
But, alas, curve tracing seems to be a including diodes, Zeners, LEDs, transistors,
lost art, and many engineers rely only on voltage regulators and more. It will also
the curves given by the device manufacturer. enable you to test some types of integrated
Unfortunately, the manufacturer's I-V curves circuits. It,s definitely a low-cost project-but
are not always handy, or the devices may one that will produce excellent results. To get
not be documented at all. Some fortunate started, let,s review some basic concepts of
labs have commercial curve tracers that will curve tracing.
do the job, but they are outside the realm of
WHAT IS 1-V CURVE TRACING?
An I-V curve is important because it
Horizontal (x) l(y)
R2 represents all the possible operating points of
----~~----~~ a device. It's obtained by continuously varying
120 VAC T1 the voltage of the device under test (OUT) and

=D=CJI V(x)
measuring the amount of current the device
permits to flow at each voltage.
AC curve tracing is the most common way
to do this. You need an AC voltage source, a
transformer, some resistors and a DC-coupled
Vertical (y) oscilloscope. Figure 1 shows a classic curve
tracer circuit for a two-terminal DUT. Current
FIGURE 1 I(t) and voltage V(t) are the two variables
Classic circuit for AC curve tracing of device under test (DUT). An exemplary I-V plot is shown on right. measured. A representative I-V curve is
ci rcuitcellar. corn 23

shown on the right side of Figure 1. HOW THE PROJECT STARTED


At a given point on the curve, the rate of With an analog scope, using the curve
change, or "slope" of the curve is equal to tracer circuit is straightforward but has
the reciprocal of the resistance of the OUT. some drawbacks. On many older scopes, it is
Hence, a "short circuit" OUT would plot as a difficult to measure accurately in X-Y mode,
vertical line through the origin, whereas an and there are no means to save and compare
,,open" OUT would be a horizontal line. Along component traces. A digital scope makes
a curve, a positive slope indicates positive things a bit easier.
resistance, whereas a negative slope means However, when I tried curve tracing with
it has negative resistance at that point. A my old digital scope, the X-Y display was
conventional resistor would plot as a straight difficult to read, and traces could not be
line with positive slope.
Transformer T1 is used to provide isolation
and voltage reduction from the AC source,
usually 120 VAC, 60 Hz. It also nicely allows
selecting an arbitrary place for the ground
reference point in the secondary circuit. Resistor
Rl is used as a current-measuring element, and
R2 is used to limit current. An oscilloscope, in
OC-coupled X-Y mode, is used to plot the curve.
The scope X-input measures the OUT voltage
V(t) and the scope Y-input measures the voltage
across R1, which is proportional to current I(t).
For example, if R1 equals 100 Q and there is 1 V
across it, we can deduce that there is 10 mA in
the OUT. Or, we might say we have a sensitivity
of 10 mA/V for this channel.
Notice that since the ground point for the
scope is at the connection of R1 and OUT,
the current signal measured by Rl will be
inverted with respect to V(t). This can usually
be corrected at the oscilloscope by reversing
the polarity of the channel.
When measuring low-voltage parts like FIGURE2
Hantek 6022BE USB scope used in the project. It came with a complete set of probes, USB cable and
diodes and Zeners, a 120 VAC-to-12 VAC step-
software CD.
down transformer is typically used. Note that
12 VAC provides a peak voltage of about 17 V.
If larger or smaller AC voltages are needed, a
Variac adjustable transformer may be used on
the 120 VAC side. Or, as seen later, a voltage
divider can also be used.
Resistor R2 is typically around 500 Q,
but depends to some extent on R1, since the
sum of R1 and R2 limit the current. You can
use convenient values as long as you realize
the implications of higher voltages on your
components and the power dissipation of
the resistors. Assuming the OUT is a direct
short is good way of estimating the maximum
power lost in these parts.
Notice that, since the applied voltage is
AC, the curve tracer sweeps both positive and
negative voltages, which can be instructive
in some situations, such as tracing Zener
diodes. However, some parts can be damaged
by the negative excursions, so a series diode
may be used to provide reverse voltage
protection. That said, we'll see that scanning
the negative regions for some components FIGURE3
can show some interesting characteristics. These simple parts are all that are needed to do curve tracing. Included are a 120 VAC-to-12 VAC plug
Next, let's discuss how this circuit fits into in transformer and a 3M circuit strip. Shown on the strip are a diode, a resistor and a small Zener diode
the current project. waiting to be traced.
Z4 CIRCUIT CELLAR • DECEMBER 2019 #353

• Component Curv<> Trac~r Ill g§IE) saved. I have since found that digital scopes
vary in this capability, with some producing
nice X-Y plots and others not. Although my
scope performed well for time plots, it was in

- the "not" category for good X-Y plots!


C. IX
Then a spark of an idea occurred, which
started this project. I bid on and won a

-
used Hantek 6022BE USB oscilloscope for
CH? V
$20 dollars on an auction site. Although it
couldn't compete with my other digital scopes
in overall performance, that didn't matter,
since I was looking for a USB platform to build
a component tester that would plug into to my
old laptop. The 6022BE has a 20 MHz bandwidth
with a sample rate of 48 MS/s. Resolution is
8 bits per sample. It has a dual trace input and
works with x1 or x10 probes, has a type B USB
lkp 2.0 plug and gets its power from the USB bus.
After looking around the Internet, I found
OpenHantek on GitHub. It was primarily for
0 1ck CRAB for singl e cep\VIe those interested in modifying or creating new
oscilloscope software for this instrument.
While I was not interested in doing this, it led
FIGURE4 me to a considerable cache of information on
Here is the main window of the curve tracer program. An I-V plot of a Zener diode is being displayed.
software development and the Hantek SDK.
In particular, there was a Visual Basic sample
01 Scope that showed how to use the HTMarch.dll for
r- - - ,
Select I I interfacing to the scope.
120 VAC T1 After successfully writing a few lines of VB
: c H1 :
code to see if reliable communication could be

=D=CJI
I I
established, I decided to write a program for
curve tracing using the Hantek. This wasn't
as difficult as it might have been, since I had
1,000 -=- done this before for a curve tracer using a
sound card [1] [2].
Things were progressing smoothly, so I
decided to buy a brand new Hantek 6022BE
from Circuit Specialists [3] as a backup and
FIGURES to validate the software on another unit. This
This circuit is used for general purpose curve tracing. See main text for details. new one came with all the trimmings, as
shown in Figure Z. Although only one probe is
shown, it came with two probes. It is compact
and ruggedly built.
ABOUT THE AUTHOR In addition to the USB scope, some other
items are needed for tracing. They consist
George R. Steber, Ph.D., is Emeritus Professor of Electrical Engineering of a 120 VAC-to-12 VAC wall adapter, a small
and Computer Science at the University of Wisconsin-Milwaukee. He is now 3M terminal strip breadboard and a 1,000 Q
semi-retired, having worked over 35 years. George is a life member of ARRL resistor (Figure 3). The strip is useful for
and IEEE and is a professional engineer. He has also worked for NASA and mounting transistors, regulators and other
the USAF. devices for testing.
George recently penned an article on the hidden story behind "The Discov-
ery of Radio Waves" in the January/February 2019 issue of Nuts and Volts SOFTWARE DEVELOPMENT
magazine. He also wrote a science-oriented article on 11 Dark Energy and the When writing the software, I came across
Expanding Universe" in the March/April 2019 issue of Nuts and Volts. several unusual properties of the Hantek
6022BE. It seemed to work fast and reliably
George still lectures occasionally on science and engineering topics at the when set at a high sample rate, but when
University. He is currently involved in cosmic ray research and, is developing the rate was decreased, the acquisition time
methods to study them on a global basis. When not dodging protons, pions increased dramatically. It would take many
and muons, he enjoys amateur radio, racquet sports, astronomy and jazz. tens of seconds to grab, say 500 samples, at
You may reach him at steber@execpc.com with 11Curve Tracer" in subject line the low sample rate, but less than a second at
and email mode set to text. the high rate. Fortunately, this was fixable in
software by using sub-sampling.
ci rcuitcellar. corn 25

Another, more pleasant surprise was Another thing I noticed was that the
finding that the effective sample size was accuracy of the 8-bit data, while acceptable,
greater than 8 bits. Normally, an 8-bit data could be improved. Hantek claims a DC
size implies a range of 256 values. But I accuracy of ±3%. While this is probably true,
was measuring a range of 320 values. This the volts per bit in my two units differed
corresponds to slightly more than 8.3 bits slightly from each other, particularly on the
per sample! Okay, I'm not complaining. More measurement of negative voltages. So, there
resolution is better. But I'm still not sure how is a manufacturing variation. Also, I found
they are doing it. This was another reason to that accuracy varies a bit with temperature.
have another Hantek unit on hand-it verified However, if the user is willing to do some
this unusual property of the scope. calibration, there is a custom calibration
One of my goals was to have a program
that would not require Windows Framework • Componmt Curw TtdCer Ill ~[61~
or any other bloated installation process.
In fact, I wanted it to run on my old laptop
in the lab that is still running Windows XP.
That way, I could just plug in the Hantek
and run the program. Another goal was to
make the software run with the classic curve
tracer circuit arrangement described in
the previous section. This would allow very
simple operation, while still permitting small
modifications by the user.
By the way, the curve tracer software only
runs on the Hantek HT6022BE and will not run
on the HT6022Bl, even though they appear
similar to each other. I checked with the
-CH2Y

Drs>I"Y
factory and they verified that the Bl model o.... J
uses a different Dll not compatible with the 2::.]
BE model. It's beyond me why they did not
make a Dll that would be compatible with ~
both units.

PC CURVE TRACER OPERATION


~vaue
M
EJ YV- .
••• Old< GRAB 'or srr gle cap11Jre

Basically, the curve tracer software uses


the Hantek as a two-channel data acquisition FIGURE6
unit. There should be two xlO probes Here are two I -V plots for a low-voltage incandescent bulb.
connected to CHl and CH2, the same as for
oscilloscope operation. Before proceeding • (.ompoll('flt Curve Tracer Ill [';]§(8)
too far, it should be mentioned that you need
to install the oscilloscope driver that comes

-
with the unit. After this, the curve tracer
program will recognize the unit and be ready C~l X
to operate automatically each time the USB
cable is plugged in.

-
The software starts out by initializing all
the variables in the instrument and verifies C H2Y
that a unit is connected. If a Hantek unit is
not connected, it continues in demo mode,
Aetacnco
which permits the loading of sample plots M"""""
for various components like Zener diodes or s....,
transistors. Oisple;y 0 I

There are refinements in the software to So't"C2

speed up the acquisition rate and perform ~ 0

fast operation. In operation, the software [£] SovcJI


O_o;pJj
starts by capturing about 850 samples from ~ ~
Or·
each channel at a 1 MHz rate. These samples
are then decimated and tested for overflow.
Cl cl<. GRAB lor single ce&l1Ute.
Finally, they are filtered and processed
according to the settings of the user. Results
are then presented on the screen of the PC. It FIGURE 7
all happens in near-real time. This is a trace of a ZNR 18 V surge suppressor.
Z6 CIRCUIT CELLAR • DECEMBER 2019 #353

procedure in the curve tracer software that For printing plots directly, a special routine
can be employed to bring the accuracy closer is used. If printing is done using software
to 1%. If this seems like too much trouble, it such as PDFCreator, you can save plots in PDF
can be skipped, and the normal accuracy will format or other formats. This was done to get
be used. the plots shown here.
Other features of the software are the
saving of the plot data and printing plots. In SOnWARE INSTALLATION
the first case the plots are saved in a comma- As mentioned earlier, you need to install
separated format compatible with Excel. In the oscilloscope USB driver that comes with
that way, they can be read and analyzed in the unit. This procedure is explained in the
that software, including printing and plotting. Hantek manual on the CD. It's probably a
good idea to make sure the oscilloscope
• C.ompoocnt Curve r racer Ill g§IX program is working before trying the curve
015et:l"g< El« eo:s.~ !!fr'l :!<I> i><• _ _ _ _ _ _ _ _ _ _ _ _ _ __ tracer program.
The Curve Tracer Ill software is available
on the Circuit Cellar's article code and files
webpage and is zipped for fast downloading.
Unzip it to a new folder, and you are ready to
go. Just run the executable (.exe) program.

D ISplay
-Oe!Ctcnce
t.t ......~
Sav~t1

.J!£.1
Hopefully, the software will run just fine.
However, in case of problems, continue
reading below for possible solutions. It should
be noted that I am not a software developer.
The software will not be maintained or
updated. Life is too short for all that.
The program was tested with Windows
XP, Windows 7 and Windows 8.1. When you
~ run the software, you may get a message like
l.::::J 0
Required Dll file MSVBVM60.Dll was not
found." This is a Visual Basic runtime file and
~ is on many systems. If not found, you will need
to obtain it and install it on your system. It is
Cick GfVIB lor stngl e cepit. re freely available from Microsoft and other sites
on the Web. It is usually available as Visual
Basic 6.0 SPS: Run-Time Redistribution Pack
FIGURE 8
Here are red and green LEDs plotted together.
(VBRun60spS.exe) and is a self-extracting file.
If you get the message, ncomponent
'COMDLG32.0CX' or one of its dependencies
• Component Curve Tr•cer Ill Q§['g) is not correctly registered: a file is missing or
invalidn when you try to run the program, you
will need to register it on your system. It is

-
freely available from Microsoft and other sites
unx
on the web.
The program also requires that the
HTMarch.dll and msvcrlOO.dll (supplied with
the curve tracer software) to be in the same
folder as the program, or else to be registered
somewhere on your computer. My XP system
works fine with them in the same folder.
You need to have these two Dlls to use the
program in demo mode or when an actual unit
Dos play is plugged in. If you just want to experiment
Ouol I with the Curve Tracer Ill program, go ahead,
since it does not install any other material
on your computer. You can remove it by just
deleting the entire folder it is located in.
Figure 4 is a screenshot of the curve
)(1/...,. 0
. . . . . . MH!f M
Y
l/-. 0 c.i< GRAB tor Single cop1ure
tracer. The origin is at the center of the
screen. Displayed here is a single trace of a
5.6 V Zener diode. In this case, the measuring
FIGURE9 cursor is off. Enabling it allows measurements
These are the traces for four Zener diodes plotted simultaneously. See main text for details. of the trace to be performed and displayed in
ci rcuitcellar. corn 'D

the X and Y boxes. There are four reference tester will determine the orientation of the
memories for saving and displaying device plot. If it is a diode, you will want the anode
curves. They can be saved and loaded from voltage plotted on the axis plus side.
memory. We'll see examples of this later on. Connections to the Hantek scope are
In what follows, I'll describe how to use shown as CHl and CH2. Two xlO probes must
the curve tracer to measure various devices. be used. Many kinds of devices can be curve
The basic curve tracer circuit will need to be traced. Let's get started with some examples.
modified in some cases to satisfy the demands It's a lot of fun and instructive too!
of the device being measured. These changes
are covered in the following sections. Let's
start with the basic setup.

GENERAL PURPOSE 1-V CURVE


TRACING
Shown in Figure 5 is the circuit used for
general purpose curve tracing. It is similar to
the classic circuit described earlier. Power is
provided by a small, 120 VAC-to-12 VAC 60Hz
wall-type transformer. These can be found
V
at rummage sales and surplus warehouses.
The circuit uses only a single resistor, in this Al
case 1,000 n. This both limits the current and
provides the current-sensing function. Other 100K
resistor values can be used as long, as the
value is entered in the program where the
current in the OUT can be calculated.
A 1N4001 diode Dl can be switched in
when the negative voltage excursions should FIGURE 10
be prohibited. The direction of the OUT in the Equivalent circuit of a four-layer diode made from transistors. See main text for detai Is.
14062423
14062423
30 CIRCUIT CELLAR • DECEMBER 2019 #353

Now, lets look at transistor I-V curve curves of a 2N3904 transistor are shown in
tracing. A bipolar-junction transistor (BJT) Figure 16. Multiple curves are displayed using
can be tested using a circuit similar to the the reference memory, with each curve saved
one in Figure 15. Collector current is some separately. Notice how the slope of the I-V
multiple of the base current (a factor of beta, curves increases at greater collector current.
the current gain), so the circuit requires This indicates that the incremental output
some method to inject current into the resistance is decreasing.
base terminal. An adjustable resistor, R3, Observe that in this case, both the positive
connected to a DC voltage source, is used for and negative voltage regions have been
this purpose. scanned. It is interesting to see that after
Although no substitute for a professional voltage breakdown in the reverse direction,
transistor curve tracer, this method gets the curve exhibits negative resistance. One
the job done and can easily be adapted for must be careful of scanning this negative
low-power or high-power devices. Collector voltage region, because it can damage or
destroy the device. Using a similar circuit
setup, FETs can be curve-traced, but with
voltage steps on the gate.

IC 1-V TROUBLE SHOODNG


Curve tracing of integrated circuits (ICs)
under various conditions has been described
for purposes of rework [6]. Tracing the inputs
and outputs of logic ICs, under power-on and
-off conditions, produced some diode-like
curves. So, I decided to try it myself.
Since many ICs operate at lower voltages,
it was necessary to lower the AC scanning
voltage. This can be accomplished with an
Ois!=I"Y
adjustable transformer on the primary side.
Alternately, a simple technique can be used
o..s l to make a voltage divider formed by R2 and
2] R3 as shown in Figure 17. Two test leads are
brought out to probe the IC.
El For this test, a 74HCTOO was used. Tracing

FIGURE 16

XVO<Je El

··-
YV- •
YV.U. J
Vorii'A
Oock GRAB !01 s11gle r.~~plure

Collector curves for 2N3904 transistor. This example shows the use of 4 memories of the curve tracer.
between one of the inputs and ground with
the power (Vc) on and off produced the
two curves shown in Figure 18. The same
technique can be used at the device output.
According to Mathews and Toroni [6], this
procedure should help identify bad ICs or
other problems on the PCB. By focusing on
cope
r--- ., the health of the low-side input diode of the
R2 :cH1 : ~- -------------- ,
OUT, this approach may eliminate the need to
I power the board for testing.
120 VAC T1
Furthermore, the approach should be the

=D=CJI same for most ICs, because these devices


rarely omit ESD protection, even in RF ICs.
On the one hand, if you endeavor to try this,
be prepared for unusual curves and possible
1,000
destroyed ICs. On the other hand, you might
learn how to test and repair some circuits
using a radical new method!
FIGURE 17
Test circuit for integrated circuits FINAL THOUGHTS
Various versions of curve tracers have
been around for a long time. Many of them
For detailed article references and additional resources go to:
are complicated and costly. However, this one
-.circu itcellar.com/article-materia Is
is special, because it is easy to understand
References [1] through [6] as marked in the article can be found there.
and use. In addition, it is low cost, using
just an inexpensive USB oscilloscope that is
RESOURCES readily available all over the world, and a few,
Hantek I www.hantek. com easy-to-acquire, parts.
ci rcuitcellar. corn 31

For the beginning curve tracer user, this • Compo"""t Curvv Trdcor Ill r;]@J~
provides an inexpensive way to get started
and learn about electronic devices. But even
seasoned engineers may want to experiment
with it. There is a lot of room to modify the
basic curve tracer circuit. For example, it till)( Grab J
could be adapted to accommodate lower- or
-~


higher-power devices or higher-voltage parts.
This could lead to many interesting results!
CH2 Y _!1
Only a fraction of the possible devices
were curve-traced here. Many other parts
are just as interesting. For example, there
was an old 2N28 Western Electric germanium
transistor in my collection. It was nice to
see this old transistor come to life again.
Oo~~le.y
-M<m~>~Y

~ I

Another unusual application might involve o""' I


curve-tracing special minerals such as iron B
pyrite, which, in some cases, can form
semiconductor diodes. Early crystal radios El
used galena crystals as a detector, which
may prove interesting. Another application r.::::-::::-1
~
)<
Wit
v..... []
tt
V Vd.to •
ew- y VIM
VorrnA
I
might be in the area of analog signature
analysis. The list goes on.
FIGURE 18
I hope you enjoyed reading about this Traces of one pin of a 74HCTOO, with the power on and off
curve tracer. I hope I haven't thrown too
many curves your way. In any case, take
heart-there might be a curve tracer in your
future!e
There's no doubt that cars are becoming smarter, but if the automotive industry is
going to achieve its goal of fully autonomous vehicles, then they still have a long
way to go and they'll need AI and neural networking to get there. In his article,
Imagination Technologies' Bryce lohnstone explains how GPUs and neural network
accelerator chips provide an intelligent edge for automotive applications.
By
Bryce Johnstone,
Director of Automotive Segment,
Imagination Technologieso

A utomotive is one of the key sectors


driving developments in artificial
intelligence (AI) due to the focus
on autonomous vehicles and the
spin-off benefits of advanced driver assistance
All neural networks are organized to
operate in layers that process data multiple
times. So, rather than running the operation
once with a certain set of parameters, the
neural network can run it 10 or 20 times
systems (ADAS). Cars are becoming intelligent, with different input patterns. The idea is that
but the road to fully autonomous vehicles is a with all these different paths, the number of
long one. While there are discussions about the options increases. By the time it reaches the
ideal mix of technologies that will be needed to point where a decision needs to be made, it
achieve full autonomy, what is clear is that AI has all the information extracted from the
and, in particular, neural networks, will play a inputs.
key role. In the road-sign recognition, for example,
the first layer could be looking for the corners
NEURAL NETWORKS of a sign, then the color and so on, until it can
The purpose of a neural network is to say with a high degree of certainty that this is
carry out tasks that are quite challenging a sign and this is what says. But the beauty of
for traditional vision or pattern recognition this is that there's no need to program each of
systems. By making every neural network these steps. A neural network will do it itself
different and designed for a specific task, it and learn over time. The algorithm knows
can carry out that task more efficiently and at what it needs to find and will try different
high precision. methods until it achieves its goal, learning as
ci rcuitcellar. corn 33

it goes along. Once it is trained, it can be used Studying the whole face can determine if
in a real application. This means engineers the driver is angry or sad. If angry, the system
do not have to spend hours fine-tuning could advise drivers to pull over and calm
complicated algorithms. They just show the down before continuing. All this is based on
neural network what it needs to find and let building a picture of the face, extracting key
it teach itself. points and using neural networks to extract
These technologies are already becoming emotions, gaze time and so on to judge the
prevalent in vehicles for object detection, driver's state of mind.
classification and analysis while driver Over the next two or three years, driver
monitoring, access control, and voice and monitoring is likely to become a requirementfor
gesture recognition can also take advantage approval by the European New Car Assessment
of the different types of neural networks. Programme (NCAP) and the U.S. Department of
In addition, AI approaches that combine Transportation's National Highway Traffic Safety
classical vision with neural networks for use Administration (NHTSA) and thus become
cases such as pedestrian path analysis and necessary for car makers to implement, not just
surround-view will rely on both graphics on high-end cars, but all vehicles.
processing units (GPUs) and neural network
accelerators (NNAs) (Figure 1). LEVEL FIELDS
The use of neural networks can be seen in The Society of Automotive Engineers (SAE)
the whole make-up of the sensor to electronic and the NHTSA have classified six levels of
control unit (ECU) chain, with pre-processing, capability for autonomous cars. Basically,
intermediate and post-processing using various Level 0 is no automation at all, while in Levell
techniques bringing AI into the mix. In addition, the car will offer some assistance to the driver.
vehicle-to-everything (V2X) technologies Level 2 has more driving assistance and can
are in development that will essentially use even execute some tasks autonomously such
autonomous vehicles as sensing agents to as automatic emergency braking to avoid a
provide data and information for various smart collision.
city and smart transport scenarios. Again, Level3 is the tricky one, as the car is driving
these advances will rely on approaches to AI itself but the driver has to be ready to take
that employ both GPUs and NNAs to support a over at any time. Driver monitoring will be key
wide variety of analyses and computations from in Level 3 autonomous driving, because the
an ever-larger set of inputs. driver has to be prepared to intervene, and to
a certain degree, the car has responsibility for
SENSOR FUSION ensuring that the driver is prepared.
Autonomous and highly automated vehicles In Level4, even though the driver can take
will rely heavily on sensors of various types, over, the car, in theory, can handle all the
including cameras, thermal imaging, radar, situations into which it has been put. A Level
LiDAR and so on. The signals from all these 5 car will be fully automated; there will be no
sensors need to be interpreted and fused steering wheel or pedals (Figure 2).
to give an overall view of what is happening
outside and inside the vehicle. Sensor fusion
will be essential for autonomous driving and
will involve a combination of GPUs and neural
networks along with machine learning and AI.
A good example of sensor fusion inside
the vehicle is driver monitoring. In today's
vehicles, various sensors are able to detect
if a driver is losing concentration. A neural
network can analyze the images taken of the
driver to work out if he or she is sleeping,
tired, not paying attention or even talking or
messaging on a mobile device. This is essential
information for early-stage autonomous
vehicles that may require the driver to retake
control at certain points, as the car needs to
know if the driver is in a fit state to do so.
How does driver monitoring work? Cameras
pointed at the driver's face provide inputs
for algorithms that analyze facial elements,
particularly the eyes. Are they open or closed; FIGURE2
if closed how long have they been closed; are The SA.E and the NKTSA. have classified six levels (0 to 5) of capability fur autonomous cars. A Level 5 car will
they fluttering; where is the driver looking? be fully autDmated; there will be no steering wheel or pedals.
34 CIRCUIT CELLAR • DECEMBER 2019 #353

Each time a vehicle goes up one of these needs AI and neural networks to see if there
levels, there is about a 10-times increase in is an object there, identify it as a child and
compute performance needed. This is why send a signal to an actuator or the driver to
neural networks are important as they can do something about it.
deliver this performance at very low power. This is made more complex because the
Take, for example, a pedestrian. A car's camera will normally have some sort of fish-
onboard cameras and sensors can record the eye lens. This produces a warped picture that
pedestrian walking or standing; the neural needs straightening and then interpreting.
network can be used for plotting the likely Inputs from this and other sensors need
path the pedestrian might take and calculate combining for split-second decision-making.
if the vehicle may need to slow down or brake
quickly. The neural network can also look at DATA HANDLING
the same image and segment it, picking out At the same time, other information is
other objects and applying object recognition coming from all around the car-from all
technology to work out if they represent the sensors and information that's being
something the vehicle needs to be aware of. received wirelessly from other vehicles or the
All this has to be put into the context of infrastructure. That is a massive amount of
where the vehicle is and where it wants to go. data, likely in the terabyte range.
If it is reversing and it detects a child behind ECUs will be all around the car, making
the car, then that needs to be processed decisions based on the data. This can
quickly and the brakes applied. To do this involve 100 ECUs or more. Some approaches
are looking at how this could be done with
fewer ECUs and more computing power. An
embedded AI right next to the camera or
sensor can make some of the decisions so
that less information needs passing around
the vehicle.
This means different levels of processing
are needed. Data can be pre-processed, such
as straightening out a fish-eye image, at the
point of capture. Intermediate processing
could involve various planned tasks, object
recognition, decision-making and so on.
Post-processing happens afterward, when
the information can be cleaned up and a
displayed on a screen so the driver knows
what is happening or has happened.
These data processing technologies
are also being used to create applications
currently in development to provide virtual
see-through pillars inside the car. In this use
case, the pillars (the struts that attach the
FIGURE3 roof of the car to the body) would be installed
Far in-vehicle infotainment (IVI) and navigation, GPUs play a major role. They are also involved in voice with cameras to capture what is going on
control, which is likely to became a key interface between humans and vehicles.
outside the car. The inside of the pillars would
provide a display that shows what these
cameras are capturing providing the driver
with an uninterrupted field of vision.
This process is phenomenally difficult to
achieve. The system has to understand what
is on the other side of where the driver is
looking. The picture will need to be de-warped
and placed onto an uneven or curved surface,
then re-warped to the contours of the pillar.
While this advancement is one for the
future, some high-end cars already provide
surround-view systems, and these will soon
move into mid-range and entry-level cars.
FIGURE4
A GPU is used to analyze the images coming
The whole instrument cluster can use GPUs to carry out image rendering and information prioritization. If from the various cameras around the car-
the system determines that the driver needs to know some critical piece of information, the message could there are usually four or five cameras-and
pop aut of the cluster or even be projected onto the windshield. stitch the images together. From the stitched
ci rcuitcellar. corn 35

image, a neural network will carry out object be projected onto the windshield. Images on
detection and path prediction to see if the the windshield could also be used as part of
object is likely to intercept the path of the the navigation system, showing the driver
vehicle. the correct turning or illustrating which
lane the car needs to be in for an upcoming
INFOTAINMENT AND NAVIGATION junction.
When it comes to in-vehicle infotainment
(IVI) and navigation, GPUs play a major role
(Figure 3). They are also involved in voice
control, which is likely to become a key
interface between humans and vehicles. So,
for a satellite navigation system, rather than
having to enter in a destination and fiddle
with buttons and keypads, the driver could
just say the zip code or street name and ask
the system to plot the route.
The dashboard cluster will be linked to the
external cameras for activities such as road-
sign recognition. If the camera picks up, say,
a sign showing a speed limit, that sign can be
displayed in front of the driver while it is valid
and a warning sounded ifthe car exceeds that
limit.
In fact, the whole instrument cluster will
use GPUs to carry out image rendering and
information prioritization (Figure 4). If the FIGURE 5
system determines that the driver needs to An intelligent transportation system would control the whole transport infrastructure of the city. This
know some critical piece of information, the infrastructure would communicate with veh ides and traffic signals and vehicles would also communicate
message could pop out of the cluster or even with each other and send collected data back.
36 CIRCUIT CELLAR • DECEMBER 2019 #353

practical example of this would be controlling


ABOUT THE AUTHOR the traffic lights so vehicles pass through
an area at optimum speed without delays
Bryce Johnstone is responsible for relationships (Figure 5). If emergency vehicles need quick
and marketing throughout the automotive val- access, these same traffic signals could be
ue chain in support of defining IP requirements used to stop other road users and create a
for the rapidly changing car market. Previously safe path for them.
at Imagination, he was in charge of Developer If there is a traffic jam, vehicles can
Ecosystem largely working with mobile games relay this information to the infrastructure,
companies throughout the world. Prior to join- which in turn can inform other vehicles to
ing Imagination in 2011, Mr. Johnstone spent 19 stay away from that zone, thus not adding to
years with Texas Instruments, where he worked the problem so the jam can be cleared more
in several technical, managerial and business de- quickly. This could even be used outside of
velopment roles before moving into the Wireless cities, say on an entrance ramp to a freeway.
Terminal Business Unit to head up the OMAP Developer Network activity. He If there is already a backup that the system
started his career as a Senior Design Engineer at STC Semiconductors. Mr. has learned about from cars traveling in the
Johnstone holds a BSC. In Electrical and Electronic Engineering from the Uni- opposite direction, it can warn drivers before
versity of Edinburgh and an MBA from the Open University. they join the freeway, thus enabling them to
consider other routes.
To achieve this goal, cities will need to have
a central intelligent hub that can process the
Mirror replacement is another major incoming information and calculate what data
potential development. Cars are already to send out to other vehicles or traffic signals.
being developed where the mirrors have been This can only be done with a combination of
replaced with screens showing views from neural networks, AI, machine learning and
different cameras. As well as showing what is advanced algorithms.
happening behind the car, as with traditional
rear-view mirrors, they can also be used for CONCLUSION
blind-spot detection. Here, the neural network Highly automated vehicles will be safer
can issue a warning to the driver about a car than those driven by humans. Research
that the driver cannot see and automatically by the NHTSA found that 94% of accidents
prevent the car from changing lanes into the were caused by human error [1]. Al-based
path of another vehicle. technology is already better than a human
driver in terms of responsiveness and picking
SMART CITY up threats that need a fast response.
A long-term goal that local governments To achieve the processing power for
around the world are moving toward is for such vehicles, GPUs working with NNAs will
smart cities to have autonomous and highly- be required. As the industry moves to fully
automated vehicles that are integrated into autonomous vehicles, NNAs will come into
an intelligent transportation system covering their own because of the massive increase in
a whole town or city. computing power. Estimates suggest that a
The idea behind this is that all city services level 5 autonomous vehicle will need 10,000
and planning efforts are coordinated and times the computing power of a levell vehicle.
connected, giving citizens greater access This is a huge increase in processing
to information and making living in a city performance, but it also has to be done
more pleasant and, importantly, healthier. within a power budget. Already, an NNA has
To achieve this, reducing pollution and traffic 100 to 800 times the performance of a CPU
congestion is essential. and in a package that is a fraction of the size.
An intelligent transportation system would A vehicle could have a large CPU with many
control the whole transport infrastructure NNAs carrying out tasks around the vehicle at
of the city. This infrastructure would much lower power and higher performance
communicate with vehicles and traffic signals than CPUs spread around the vehicle.
and vehicles would also communicate with Imagination Technologies produces lP for
each other and send collected data back. A both GPUs and NNAs. Its technologies are in
more digital dashboards than any of its
competitors, and the company is also
For detailed article references and additional resources go to: spearheading advances in the ADAS and
-w.circuitcellar.com/article-materials autonomous vehicle markets. All the elements
Reference [1] as marked in the article can be found there. that are needed to make autonomous vehicles
practical will depend on these technologies-
RESOURCES and it will be only a matter of time before it
Imagination Technologies I www.imgtec.com becomes a reality. e
There's a big difference between AI in the abstract sense and AI implemented
in embedded systems. Smoothing the way, processing technologies including
FPGAs, GPUs, NPUs and dedicated AI SoCs are being designed into a variety of
solutions in board, box, development kit and chip lP formats.

W
hile Artificial Intelligence computing. In terms of compute density, the
(AI) is very much a topic GPU approach continues to excel in small
of mainstream discussion form factor embedded implementations. The
these days, there's a latest solution along those lines from Nvidia is
whole set of challenges that emerge when its Jetson Xavier NX, announced in November.
AI is implemented in embedded systems- With a form factor smaller than the size
especially in loT edge applications. Today, of a credit card, the company is touting it
there's no one way to do AI or machine as 0 the world's smallest, most powerful AI
learning (ML) from a processing standpoint. supercomputer for robotic and embedded
FPGAs, NPUs, GPUs and even dedicated AI/ computing devices at the edge." Jetson
ML systems-on-chips (SoCs) are all part of the Xavier NX provides up to 14 TOPS (at 10 W)
landscape when it comes to AI. or 21 TOPS (at 15 W), running multiple
Perhaps more significant for embedded neural networks in parallel and processing
system developers, is that all those processing data from multiple high-resolution sensors
approaches are becoming available in embedded- simultaneously in a Nano form factor (70 mm
friendly formats-including embedded boards, x 45 mm) (Figure 1). For developers already
box-level systems, complete development kits building embedded machines, Jetson Xavier
and even chip-level IP {intellectual property). NX runs on the same CUDA-X AI software
Over the past 12 months, a new crop of those architecture as all letson offerings.
products has emerged, designed to serve the The Jetson Xavier NX is based on a Nvidia
needs of both general and application-specific Volta GPU with 384 Nvidia CUDA cores and 48
AI requirements. Tensor Cores, plus 2x NVDLA. The module's
CPU is 6-core Carmel Arm 64-bit processor.
GPUs DRIVE AI Video support includes 2x 4K30 encode and
There's no question that Nvidia has been 2x 4K60 encode. It supports up to six CSI
a pioneer when it comes to the idea of using cameras (36 via virtual channels)-12 lanes
GPU processing technology for AI kinds of (3x4 or 6x2) MIPI CSI-2. Rounding the
38 CIRCUIT CELLAR • DECEMBER 2019 #353

Nvidia also announced that it topped all


five benchmarks measuring the performance
of AI inference workloads in data centers and
at the edge. The results of MLPerf Inference
0.5-the industry's first independent AI
benchmark for inference-demonstrate the
inference capabilities of Nvidia luring GPUs
for data centers and the Nvidia xavier SaC
for edge. The Jetson Xavier NX module is built
around a new low-power version of the Xavier
SaC used in these benchmarks.

AI FOR VISION SYSTEMS


Vision systems is another application
category where AI is providing powerful
FIGURE 1 solutions. As an example, along those lines, in
With a form factor smaller than the size of a credit card, Jetson Xavier NX provides up to 14 TOPS (at 10 W)
or 21 TOPS (at 15 W), running multiple neurill networks in parallel and processing data !Tom multiple high-
September, Microsoft announced making its
resolution sensors simultaneously. The module runs on the same CUDA-X flJ. software architecture as all "Vision AI Developer Kit" broadly available.
Jetson offerings. The kit comes with an 8MP, 4K camera that
runs Linux on Qualcomm's 10 nm, AI-enabled
QCS603 SoC (Figure 2). The kit is aimed at
module's features are 8 GB 128-bit LPDDR4x AI edge developers using Azure loT Edge and
DRAM and Gbit Ethernet. Azure Machine Learning.
Jetson Xavier NX is aimed at embedded The Vision AI Developer Kit was originally
edge computing devices that demand increased announced in May 2018 as a collaboration with
performance but are constrained by size, weight Qualcomm, which had recently announced its
and power budgets or cost. These include small Qualcomm Vision Intelligence Platform. This
commercial robots, drones, intelligent high- hardware/software platform for deep learning
resolution sensors for factory logistics and was deployed with its 10 nm fabricated acta-
production lines, optical inspection, network core QCS605 and quad-core QCS603 SaCs.
video recorders, portable medical devices There are three development paths
and other industrial loT systems. Jetson available with the kit. The first is "no code",
xavier NX is supported by Nvidia's JetPack using Custom Vision, Azure Cognitive Service,
software development kit, which is a complete custom models with Azure Machine Learning,
AI software stack that can run modern and and the Visual Studio Code IDE. Aimed at
complex AI networks, accelerated libraries novices, Custom Vision walks users through
for deep learning as well as computer vision, the process of uploading data, training and
computer graphics, multimedia and more. deploying customer vision models including
image tagging. With the Vision AI Developer
Kit, users can then use Azure loT Hub to deploy
a custom vision model directly to the kit.
The second path is for advanced users.
They can use the Azure Cognitive Service
with visual drag and drop tools for AML
development. Reference implementations
provided in lupyter notebooks walk you
usa< .... • - - 1 through the steps to upload training data to
-butlon - Azure Blob Storage, run a transfer learning
experiment, convert the trained model to be
compatible with the developer kit platform
and deploy via Azure loT Edge.
Finally, more advanced developers can
use the kit's extension for Visual Studio
Code, which offers sample Python modules,
FIGURE2
pre- built Azure loT deployment configurations
The Vision flJ. Developer Kit comes with an BMP, 4K camera that runs Linux on Qualcomm's 10 nm, flJ.-enabled and Dockerfiles for container creation and
QCS603 SoC. The kit is aimed at flJ. edge developers using Azure loT Edge and Azure Machine Learning. deployment. Visual Studio Code can also add
ci rcuitcellar. corn 39

FIGURE 3
business logic to existing Azure solutions BeagleBone flJ. is designed to
based on camera input sent via Azure loT Hub make it easy to explore how
to transform the image data into normalized flJ. can be used in everyday
datastreams using Azure Stream Analytics. life via the TI C66x DSP cores
and embedded-vision"i!ng ine
(EVE) cores supported through
BEAGLEBONE AI an optimized TIDL machine
Open-spec SBCs have become an important learning OpenCL API with pre-
resource among embedded systems developers. installed tools.
And AI has found its way into that realm too.
As an example, in September, the BeagleBoard.
org Foundation made its BeagleBone AI SBC
available after announcing it back February. The
BeagleBone AI's 1.5 GHz, dual-core Cortex-A15
Texas Instruments (TI) Sitara AM5729 is a
major performance boost over the 1 GHz, port (up from 10/100), as well as 802.11ac
Cortex-AB Sitara AM3358 found on the earlier Wifi and Bluetooth 4.2. A USB 3.0 Type-C OTG
BeagleBone Black and its many variants. port supports power input, and there's also a
BeagleBone AI is designed to make it easy USB 2.0 host port.
to explore how AI can be used in everyday
life via the T1 C66x DSP cores and embedded- AI FOR STREET LIGHTING
vision-engine (EVE) cores supported through The emergence of Smart Cities is bringing
an optimized TIDL machine learning OpenCL with it a variety of demands to enhance
API with pre-installed tools (Figure 3). The many aspects of connected systems that
EVE cores, which use a Vision AccelerationPac leverage AI. A great example is the fanless,
architecture, provide a programmable imaging AI-enhanced "Atlas" embedded computer
and vision processing engine for AI acceleration. announced by Aaeon and Intel in November.
The AM5729 processor adds 2x TI C66x It is designed to be integrated with a variety
DSPs and 2x Cortex-M4 MCUs in addition to of different streetlamp designs. The computer
the EVE cores. Like the earlier AM3358 SoC, the is based on an Intel Apollo lake SoC and an
AM5729 is equipped with 4x programmable, Intel Myriad X VPU.
real-time PRU-ICS (Programmable Real- The Atlas consolidates data streams from
Time Unit and Industrial Communication smart lighting, environmental monitoring
SubSystem) cores. The BeagleBone AI doubles and video sensors. Atlas works at the edge
the RAM to 1 GB and quadruples the eMMC to allow city administrators to create a
storage to a 16 GB eMMC compared to the connected data hub that enables numerous
BeagleBone Black. The board provides a GbE new applications. For example, when the Atlas

AAEON- c.omrolltt/td~ nodo


doploytd on • su ...~ gill
FJGURE4
Top: Aaeon Atlas shown in conjunction
~

' with camera, NVR, and management


(<·>)
Came111 ~nson
'' \
\
\
system powered by Intel Vision
Pnoducts. Bottom: Captured data is
I
I transferred and analyzed from edge

,:-- .. ==========:::! + _.,:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; to cloud with complete support for


scalability and back-i!nd security.
AUdio and SftKor conunl
Envuoomenlal , I Thnough the open architecture design,
Sfnsors ,, developers can work with cities to
create new solutions that utilize the
data.
40 CIRCUIT CELLAR • DECEMBER 2019 #353

FIGURES
The SB50 SoM is designed for AI/
The node streamlines multiple overlapping
AR/VR applications. Its MediaTek efforts by city agencies and saves on costs
i500 SaC combines 4x Cortex-A73 (Figure 4) by helping agencies consolidate
and 4x Cortex /'53 cores, all clocked their data and application. Atlas includes
at 2.0 GHz. There's also an BOO MHz
outdoor smart lighting control for streetlight
Arm Mal i-G72 MP3 and a 500 MHz
AI processor (APU) for deep learning,
systems and environmental monitoring
neural network acceleration and using multiple gas sensors. The edge node
computer vision applications. can be used to monitor traffic flow, parking
availability, pedestrian crossings, seismic
activity, trash receptacle overflow and even
atmospheric changes in addition to numerous
other use cases.

edge node is deployed in conjunction with a FROM SoC TO BOARD-LEVEL AI


camera, network video recorder (NVR) and For its part, MediaTek offers a trio of SoC
management system, it can power a citywide solutions aimed at smart home systems. The
parking application. Car drivers can park on chips are highly integrated, specially designed,
city streets without having to fish for change extreme low-power solutions for short and
or pay at a meter-nearby smart cameras medium range connectivity in the home.
on streetlights can capture and classify These AioT SaCs include its i300, iSOO and i700
images such as license plates using computer products. In August, linuxGizmos.com, Circuit
vision and charge the owner directly for the Cellar's sister website, reported on Innocomm's
exact parking time via a gateway and cloud- preliminary information on two system-on-
based management system connected to a modules {SoMs) based on MediaTek SaCs. The
department of motor vehicles database. SB30 SoM is based on MediaTek's 1.5 GHz,
For Intel, the Atlas provides a means for quad-core, Cortex-A35 based MediaTek i300
the company to showcase the Intel Vision (MT8362) SoC. And the SBSO SoM is based on
Products line. This includes its dual Movidius the MediaTek i500 (MT8385).
Myriad X VPUs, deployed via an Aaeon AI Core The SB50 SoM (also called SB50 MTK iSOO
XM 2280 M.2 module. The other key element SoM) is designed for AI/AR/VR applications
is Intel's OpenVINO AI toolkit for running AI (Figure 5). Its MediaTek iSOO SaC was
inferences on frameworks such as TensorFiow announced with the MediaTek i300 in April. In
or Caffe. July, MediaTek followed up with its high-end
An online Intel product brief describes MediaTek i700 (AI loT platform i700). More on
how Aaeon's Atlas can be added onto existing the i700 on the next page. MediaTek designed
infrastructure, such as street and traffic lights. all three of these 0 AioT" platforms for media-
enhanced edge computing, with the iSOO and
i700 also targeting AI on the edge.
For detailed article references and additional resources go to:
The MediaTek iSOO SaC is the mid-range
-.clrcultcellar.com/artlcle-materlals model of the three. The SoC combines 4x
Cortex-A73 and 4x Cortex A53 cores, all
RESOURCES clocked at 2.0 GHz. There's also an 800 MHz
AaeonI www.aaeon.com Arm Mali-G72 MP3 and a 500 MHz AI
ADLINK Technology I www. adlinktech.com processor (APU) for deep learning, neural
Arm I www.arm. com network acceleration and computer vision
applications. The ncost-effective MediaTek
BeagleBone.org Foundation I www.beaglebone.org i300 (MT8362) inside the SB30 SoM is a
I nnocomm I www.innocomm.com more stripped down offering. The SoC is built
Intel I www.intel.com around 4x power-efficient Cortex-A35 cores
clocked up to 1.5 GHz.
iWave System s I www.iw avesystems.com
Innocomm's SB30 SoM (SB30 MTK i300
MediaTe k I www.mediatek. com SoM) is designed for audio/video, kiosk, digital
Microsoft I www.mi crosoft. com signage and fitness console applications. It
Nvidia I www.nvidia.com combines the MediaTek i300 with 1 GB or 2 GB
LPDDR3, 16 GB eMMC and either dual-band
• Qualcomm I www.qualco mm. com 802.11ac and Bluetooth 5.0 or 2.4 GHz 802.11n
Xili nx I www.x ilinx .com with Bluetooth 4.0. The SB30's media interfaces
ci rcuitcellar. corn 41

include MIPI-DSI, LVDS and HDMI 1.4a, as well percentage of today's microcontrollers and
as 125 for audio. It also has USB 2.0 host and embedded processors these days are based
OTG connections plus I2C, SPI and UART. on Arm CPU cores. It's a natural progression
perhaps that Arm has gotten into the AI game
SoC FOR AI IMAGE RECOGNinON with technology for mainstream consumer
MediaTek's most recent AI SoC is its i700 devices. Arm says that, while CPUs and GPUs
device, which was launched in July. The SaC are ML powerhouses in their own right, where
features high speed edge AI computation for the most intensive and efficient performance
rapid image recognition. According to the is required, they can struggle to meet
company, the i700 platform can be applied requirements. For those tasks, a dedicated
in a wide range of scenarios, including smart NPU (neural processing units) has advantages
city, smart building and smart manufacturing. in efficiency. Along just those lines, in October
As an integrated platform encompassing CPU, Arm announced new lP in form of two NPUs
GPU, ISP and a dedicated AI processing unit, (neural processing unit) aimed at AI and ML
it enables embedded system developers to applications.
accelerate the development of Al-enabled The two new processors are the Ethos-NS7
consumer loT products. and Ethos-N37 NPUs and they follow the earlier
The i700 platform is powered by an introduction of the Arm ML processor (now
acta-core CPU, which includes two 2.2 GHz referred to as the Ethos-N77). Arm Ethos is
Arm Cortex-A7S cores and six 2.0 GHz Arm a suite of products designed to solve complex
Cortex-ASS cores, operating alongside an IMG AI and ML compute challenges allowing the
9XM-HPB ISP that is clocked at 970 MHz. The creation of more personalized, immersive
AI loT platform supports CorePilot, which experiences in everyday devices (Figure 6).
ensures processing resources are allocated As consumer devices become smarter there
efficiently across all cores for maximum is a need for additional AI performance and
performance and battery efficiency. efficiency via dedicated ML processors, says
An improved AI engine comprising Arm. They are optimized for the most cost
a dedicated dual-core AI processor, AI and battery life-sensitive designs.
Accelerator and AI Face Detection Engine is The NPUs support IntB and Int16 datatypes
embedded in the i700 platform. Combined, and offer performance enhancement
the new components enable the platform to
perform AI computations five times faster the
predecessor iSOO. In addition, i700 supports
MediaTek's NeuroPilot SDK.
Compatible with Google's Android Neural
Networks API, it provides an open platform
for customers and device manufacturers
to take full advantage of common industry MAC Programmable
frameworks including TensorFiow, TF lite,
Engine Layer Engine
Caffe and Caffe2 when developing new
applications.
The i700 supports camera configurations
of up to a single32MP camera or a 24MP+16MP
dual-camera setup. It also supports
accurate, zero-latency image recognition on
30 fps videos shot on a 32MP camera, as well
as high speed recognition on high resolution
120 fps slow motion videos. Furthermore,
the upgraded tri-core ISP supports 14-bit
RAW and 10-bit YUV processing, while the
AI Face Detection engine enables fast facial
recognition. The MediaTek i700 is expected
to be globally available starting in 2020.

MACHINE LEARNING lP FOR ARM FIGURE6


Arm-based processors are in a wide Arm Ethos is a suite of IP product designed to solve complex AI and ML compute challenges allowing the
variety of embedded devices. Indeed, a good creation of more personalized, immersive experiences in everyday devices.
42 CIRCUIT CELLAR • DECEMBER 2019 #353

The unit also provides an edge solution for


real-time video/graphic analysis applications
necessary for today's increasingly complex
railroad operations. To meet varying
application requirements, the AVA-5500 is also
available in variants featuring an additional
two USB 2.0 via M12 connectors and two 2.5"
SATA 6Gb/s drive bays, as well as a version
supporting +12 VDC power input only.
The AVA-5500 is being tested and
deployed commercially by leading rail
system integrators worldwide, according
to the company. In one application, the
FIGURE7 techniques such as Winograd. They also intelligent platform is installed on special rail
Powered by an Intel Core i7 processor
and integrated Nvidia Quadro GPGPU
provide advanced data management inspection trains to process captured images
module, the EN50155-certitied AVA- techniques minimizing data movement and of key wayside equipment in real-time. With
5500 AioT Platform provides an edge associated power. The Ethos-N57 features 8x a sophisticated algorithm driven by parallel
solution for real-time video/graphic compute engines and supports up to 2-TOPS computing and deep learning, the application
analysis applications necessary for
AI performance using 1024 8-bit MACs. It's can effectively identify potential equipment
today's increasingly complex railroad
operations.
designed for smart home hubs, mainstream faults at a train speed of 120 km/h, and raise
smartphones and digital TVs. the alarm to notify maintenance crews. In
The Ethos-N37 measures only one square another application, the AVA-5500 is used
millimeter. It offers 4x compute engines for in a train station control office to analyze
up to 1-TOPS AI performance using 512 8-bit the real-time video stream received from
MACs. The Ethos-N37 is intended for entry- the platform. The application is able to not
level phones and smart devices such as smart only detect suspicious behaviors and trigger
cameras. On the high end, the up to 4-TOPS alerts, but also conduct post-event analysis.
Ethos-N77 (Arm ML) has a much larger 1 MB
to 4 MB memory footprint than the 512 KB- FPGAs AND EMBEDDED AI
ready Ethos-N57 and -N37. It targets premium FPGAs offer another attractive approach
smartphones, AR/VR and computational to AI, especially where flexibility is key. Xilinx
photography applications. offers an AI Platform, which it calls "Xilinx/
Deephi Core." The platform was developed
AI FOR RAILWAY DESIGNS partly as a result of Xilinx's acquisition of
Even railway systems are hungry to employ DeePhi Technology in July 2018. DeePhi was a
the benefits of AI. Feeding that need, in May Beijing, China-based start-up with expertise
ADLINK Technology released its latest rugged, in in machine learning, deep compression,
fanless NVIDIA Quadro embedded AioT (AI pruning and system-level optimization for
and loT) platform, the AVA-5500, designed neural networks.
for real-time video/graphics analytics In October, iWave Systems launched
applications in the rail industry (Figure 7). its "iW-Rainbow G30D Zynq Ultrascale+
According to ADLINK, AI is making railway MPSoC Development Kit" for its iW-Rainbow
operations safer, smarter and more reliable, G30M compute module, based on the Arm
significantly enhancing passenger travel Cortex-A53/FPGA Xilinx Zynq UltraScale+
experience and freight logistics services. MPSoC (Figure 8). In the announcement,
Al-driven applications only function with iWave focused mostly on the platform's ability
proper data input that is collected by massive to test the new Xilinx AI Platform, which it
numbers of loT devices installed in stations, calls Xilinx/Deephi core.
on trains and along tracks. A successful The kit's Zynq UltraScale+ MPSoC SOM
implementation of such rail applications features an intelligent blend of MPSoC and
requires a seamless integration of AI and loT FPGA functionality in an Arm plus Xilinx
technologies, says ADLINK. Powered by an FPGA architecture. The heterogeneous
Intel Core i7 processor and integrated NVIDIA Arm multicore processors complement the
Quadro GPGPU module, ADLINK's EN50155 edge applications with high-performance
certified AVA-5500 AloT Platform is ruggedized non-real-time processing-such as system
for both wayside and onboard deployment with boot, peripherals management, server
its wide range DC input and isolated 1/0 design. communication and so on-while offloading
ci rcuitcellar. corn 43

FIGURES
the FPGA to execute critical real-time tasks The iW-Rainbow G30D Zynq
using Deephi algorithms. Ultrascale+ MPSoC Development
Deephi core platforms integrate both Kit fur iWave Systems' iW-Rainbow
hardware and software components, G30M compute module is based on
the Arm Cortex-A53/FPGA Xilinx Zynq
presenting a comprehensive framework for
UltraScale+ MPSoC. The kit showcases
AI/ML acceleration in applications such as face the module's ability to test the Xili nx
recognition, real-time surveillance, image/ AI. Platform known as Xilinx/Deephi
pose detection and so forth. With its AI/ML core.
capabilities, the Xilinxf Deephi core platform
allows high-level adaptiveness to various
workload characteristics and complement
edge applications with ultra-low latency real-
time inference. iWave supports an extensive
portfolio of Deephi cores based on various
application needs.
In contrast with AI used in a generic office
environment, embedded AI must be
implemented with the right size, volume and
power capabilities to be able to operate in the
intended application. Clearly, a lot of choices
are available in the form of embedded boards,
box-level systems, development kits and
chip-level lP to meet the wide range of needs
for embedded AI. Those choices will only
expand as these technology vendors and
others roll out new solutions. e

Waveform capture on your


PC, just add PicoScope®
DISCOVER THE PICOSCOPE" FAMILY
21180 SIRES- Uhr<K:Ompact; 1 GS/s Sarrj)ierate; AWG; Available MSOs; Bandwidth 1o 100 MHz • 30011 salES- Genera~purpose; 1 GS/s Sample rate; + MSOs; AWG; Deep memory, Bandwidii11D 200 MHz
4800 SIRES- ResoiLilion 1D 1bl:lit; 2. 4 and 8 channels; AWG; Differential-inpLil model • 5GOD salES- Flex~ S. to 1~it; Sample rates to 1 GS/s; Bandwidth 1D 200 MHz; AWG; MSOs available
111110 EIES- Bandwidth to 1 GHz; Sample rates to 5GS/s; AWG; 170,000 waveformsls; Memory to 2 GS • 9DDCIIIEAEll- Sampling Oscilloscopes to 25 GHz; TDRfTDT available; Optical models

0201t P'ko Tochnolov. AllrithtuwrfOd. P'ko Technolocr, PleoScopo and Rodoo.,.. .......,.,.... 1ndomartc..fP'ko Tochnolov. Learn more: -.picotech.com
Speed and
Functionality Advances

FIGURE 1
By Jeff Child, Instead of having a screen and arrays of controls, the headless approach has the test
system interface with your desktop or laptop computer, so that the computer provides
Editor-in-Chief all the display and control needs fur the equipment. Pioo Technology's latest example is
its PicoScope 9404-16 SXRTO, a 16 GHz sampler-extended real-time oscilloscope.

Test gear such as oscilloscopes, analyzers, signal generators and others are important tools
for embedded systems developers. Choices today revolve around form vs. function trade-
offs, right-sized performance and application-specific functionally.

T est and measurement equipment remain a staple


for embedded system developers. Perhaps more
than other kinds of systems, test equipment has
to cater to the long evolutions of users' particular
comfort levels. Using today's electronics technology, it's
quite feasible to have an all-in-one test system. Yet, many
computer provides all the display and control needs for the
equipment. Announced in August, its latest example along
those lines is its PicoScope 9404-16 SXRTO, a 16 GHz sampler-
extended real-time oscilloscope (Figure 1).
The new model joins the 5 GHz 9404-05 model launched
earlier this year. Well suited to repetitive or clock-derived
engineers desire a stand-alone box to serve as an oscilloscope, signals, both models feature four high-resolution 12-bit
for example. Meanwhile, even though touchscreen and push- channels, each supported by real-time sampling to 500 MS/s
button digital interfaces become are mature technologies, per channel and up to 5 TS/s (0.2 ps) equivalent-time sampling.
many engineers still like the feel of turning knobs when it These are voltage and timing resolutions that match, or more
comes to operating test gear. typically exceed, the best available among broadband real-
In terms of functionality, test gear always has to time oscilloscopes today, says the company.
achieve performance levels higher than the components The wide-band inputs, and fine timing and voltage
they're testing, requiring cutting-edge analog conversion resolutions, display and accurately measure transitions as
technologies to keep pace. Meanwhile, test solutions continue fast as 22 ps, pulses and impulses down to 45 ps wide, and
to evolve in many application-specific directions, including allow clock performance and eye diagram analysis of up
automotive test, 5G communications and more. Over the last to 11 Gb/s signals (to third harmonic). Less than 2 ps RMS
12 months, test and measurement equipment vendors have trigger jitter and 5 GHz trigger support margin analysis and
rolled out new solutions that continue to push the barriers of characterization of today's high-speed serial data systems.
performance and functionality. Thanks to integrated clock and data recovery to 11 Gb/s
and an external pre-scaled trigger input, the SXRTO trigger
HEADLESS TEST APPROACH capability extends to the full bandwidth of the 16 GHz model.
Exemplifying what can be done with today's technology, The real-time broad band sampling modes can support, for
Pico Technology's approach to test gear is to create compact, example, capture of carrier envelope, baseband modulation
easily portable box-level systems. Instead of having a screen and other envelope tracking signals around amplify, route
and arrays of controls, Pico Technology's test systems and transmit paths-including major wireless frequency
interface with your desktop or laptop computer, so that the bands such as 900 MHz, 2.4 GHz, 5.5 GHz and upward.
ci rcuitcellar. corn 45

4 GHz TO 16 GHz ON BENCHTOP The DP070000SX Series oscilloscopes


Like Pico Technology, the latest oscilloscope were initially developed to test the highest
from Rohde & Schwarz (R&S} is likewise performance, highest speed serial and optical
a 16 GHz product but in a more traditional interface standards. With this platform
benchtop format. In September, R&S extension, Tektronix brought these high-
announced that its RTP high-performance end capabilities to lower speed interfaces
oscilloscope family is now scalable from such as USB, Display Port, HDMI, LPDDR,
the 4 GHz minimum up to the full 16 GHz MIPI C-PHY and D-PHY plus legacy server
bandwidth (Figure 2). Additional new storage applications such as PCI Express
highlights are powerful debugging functions Gen 3 and SATA that are widely used in
such as the high-speed serial pattern trigger consumer, automotive and military/aerospace
using hardware-based clock-data-recovery applications.
(COR) up to 16 Gbps, or the DDR4 signal The new 13 GHz and 16 GHz models offer
integrity and compliance test. The R&S RTP four 50 GS/s sample rate input channels with
oscilloscope now also provides time domain the unique ability to synchronize up to four
reflection (TOR) and transmission (TOT) scopes for a total of 16 input channels. The
analysis to characterize and debug signal UltraSync architecture provides precise data
paths. synchronization and convenient operation
R&S expanded its high-performance R&S across multi-unit systems to support
RTP oscilloscope family in terms of both applications that require more than four
bandwidth, and functions for debugging and channels. The low-profile size fits in a single
analysis. The new R&S RTP134 with 13 GHz, 3U rackmount space or two oscilloscopes
and R&S RTP164 with 16 GHz bandwidth, can be stacked in the same space as a single
support four channels to 8 GHz, or two standard bench oscilloscope.
channels interleaved for the respective higher
frequencies. For all R&S RTP models, update HIGH DEFINITION OSCILLOSCOPE
options support bandwidth increases right up Putting its efforts into the high-resolution,
to 16 GHz. high-definition route, the latest oscilloscope
The new R&S RTP models support all offering from Teledyne LeCroy is its WaveSurfer
functions already introduced for models 4000HD High Definition Oscilloscope (HDO).
up to 8 GHz, including the high acquisition Announced in November, the company claims
and processing rate, and the real-time it as the first in its class to feature 12-bit
deem bedding. The bandwidth of the industry- vertical resolution at all times, showing
leading digital trigger is extended to 16 GHz clean, crisp waveforms on a bright, 12.1"
to provide the highest precision for detecting touchscreen display. WaveSurfer 4000HD is
very small and intermittent signals. available in bandwidths from 200 MHz to 1 GHz,
The R&S RTP triggers on real-time
deembedded signals and supports all trigger
types including pulse width, setup and hold, or
runt, up to the full instrument bandwidth. Well
suited for debugging high-speed differential
signals and available for both data acquisition
and trigger functions, the new math module
introduced directly after the real-time
deembedding block supports addition or
subtraction for any two signals, plus signal
inversion and common mode operations.

HIGH-SPEED SERIAL FOCUS


With its 16 GHz oscilloscope offering,
Tektronix provides a solution catered to
supporting highest performance, highest
speed serial and optical interface standards.
In July, Tektronix announced the expansion of
its scalable DP070000SX Series Performance
Oscilloscope to include new 13 GHz and 16 GHz
models. The new offerings allow engineers
to take advantage of the high sample rate
and low noise floor of Tektronix' highest FIGURE 2
performance family of oscilloscopes at lower The R"ll' high-performance oscilloscope family is scalable from the 4 GHz minimum up to the full 16 GHz
bandwidth levels and more affordable price bandwidth. Additional new highlights are debugging functions such as the high-speed serial pattern trigger using
points, says the company. hardware-based clock-data-recovery (CD~ up to 16 Gbps, and the DDR4 signal integrity and compliance test.
46 CIRCUIT CELLAR • DECEMBER 2019 #353

with sample rates of up to 5 GS/s and up to


12.5 Mpts of acquisition memory on each
channel (25 Mpts interleaved). It offers
versatile built-in capabilities for embedded
systems debug and is compatible with
Teledyne LeCroy's comprehensive probe
offerings.
The WaveSurfer 4000HD leverages
Teledyne LeCroy's HD4096 High Definition
technology to deliver 12-bit resolution all the
time (Figure 3). HD4096 technology utilizes a
system design of high signal-to-noise input
amplifiers, high sample rate 12-bit ADCs, and
a low-noise system architecture to enable
capture and display of waveforms with 16x
more resolution than 8-bit oscilloscopes.
The WaveSurfer 4000HD claims to offer the
lowest baseline noise-2.5 times better than
competitive oscilloscopes with 12-bit ADCs and
8 times better than competitive oscilloscopes
with 10-bit ADCs-and highest accuracy -0.5%
versus competitors' 2.5% at 1 mV/div gain
FIGURE 3 setting, according to the company. Displayed
The WaveSurfer 4000HD leverages Teledyne l.eCroy's HD4096 High Definition technology to deliver 12-bit waveforms are crisper, cleaner and provide
resolution all the time. HD4096 technology utilizes a system design of high signal-to-noise input amplifiers, visibility into signal details that are often lost
high sample rate 12-bit ADCs, and a low-noise system architecture to enable capture and display of in the noise on other oscilloscopes, including
waveforms with 16x more resolution than 8-bit oscilloscopes. those with advertised 10-bit and 12-bit ADCs.

AUTOMOTIVE TEST SOLUTION


An example of automotive focused test
solution is Keysite Technologies' PathWave Test
2020 solution which the company announced
in October. The PathWave Test 2020 software
suite is designed to provide an integrated
experience for electronic manufacturers to
accelerate time-to-market of their digital and
wireless platforms and products (Figure 4).
Developed on the Keysight PathWave software
platform, the PathWave Test 2020 software
suite enables 5G, IoT and automotive
engineers and managers to streamline test
data processing and analysis to speed product
introductions and secure a competitive
advantage in the market, says Keysite.
At the core of the PathWave Test 2020
FIGURE4 software suite is PathWave Desktop Edition,
The PathWave Test 2020 software suite includes PathWave Desktop Edition and PathWave Test Automation
providing users with access to the platform
which leverages the OpenTAP open source test sequencer. For design verification, validation, and test
engineers under extreme deadline pressures, the PathWave Test 2020 suite supports efficient test fiows,
for launching and managing applications in
the design and test ecosystem. PathWave
Desktop Edition enables engineers to manage
instrument discovery and installed design
and test software. Users can share data with
RESOURCES a common user experience across all design
Keysight Tec hn ologi esI www.keysight. com and test software.
Measurement Computin g I www.mccdaq .com PathWave Test 2020 includes PathWave
Desktop Edition and PathWave Test Automation
Pica Technology I www.picotech.com
which leverages the OpenTAP open source
Rohde & Schwarz I www.rohde-schwarz.com test sequencer. For engineers under extreme
Sig lent I www.sig lentna.com
deadline pressures, the PathWave Test 2020
suite supports efficient test flows including
Tektronix I www.tek. com shared data and analysis for making fast,
Teledyne LeCroy I www.teledynelecroy.com informed decisions.
ci rcuitcellar. corn 47

RASPBERRY Pi TEST GEAR


The popular Raspberry Pi family of
embedded computers has infiltrated FIGURES
numerous areas of embedded design. The MCC 134 is a thermocouple
Though mainly used by nhackern and DIY measurement HAT for Raspberry Pi.
The device features four thermocouple
kinds of users, professional engineers find
(rC) inputs capable of measuring the
it attractive for many development needs. most popular TC types including J, K,
That trend has motivated vendors like R, 5, T, N, E and B. Each channel type
Measurement Computing to offer Raspberry is selectable on a per-channel basis.
Pi supplementary modules, called HATs, for
test and measurement needs.
Announced in June, Measurement
Computing's latest product along these lines is
the MCC 134, a thermocouple measurement HAT
for Raspberry Pi. The MCC 134 is designed to
bring high-quality, temperature measurement
capability to the popular low-cost Raspberry Pi
computer (Figure 5). The device features four
thermocouple (TC) inputs capable of measuring
the most popular TC types including J, K, R, S,
T, N, E and B. Each channel type is selectable on
a per-channel basis.
The MCC 134 features 24-bit resolution
and provides professional-grade accuracy
that is best in class. Open thermocouple
detection lets users monitor for broken or
disconnected thermocouples. Up to eight MCC
HATs can be stacked onto one Raspberry Pi.
With the already available MCC 118, eight
channel voltage measurement HAT and the
MCC 152 voltage output and digital 1/0 HAT,
users can configure multifunction, Pi-based FIGURE6
solutions with analog input, output and amplitude accuracy and real 1 Hz resolution The 3.2 GHz SVA1032X analyzer
digital 1/0. The open-source MCC DAQ HAT bandwidth. Options include advanced provides the ability to perform
Library of commands in C/C++ and Python measurements (AMK), EMC-Pre-Compliance measurements such as antenna
allows users to develop applications on Linux. (EMC), distance to fault measurement (DTF) mall:hing in the widely used 2.4 GHz
The library is available to download from together with standard vector analysis and ISM band. Beginning with this
product, the vector network analysis
GitHub. Comprehensive API and hardware spectrum analysis.
function is now integrated and
documentation are also provided. The SVA1032X has a built-in 100 kHz to
enabled as standard for the entire
3.2 GHz tracking generator and a vector SVAlOOOX series.
SPECTRUM/VECTOR ANALVZER reflect bridge. The newly added harmonic and
In today's world, an increasing number carrier-to-noise ratio (CNR) measurements
of embedded devices have antennas and are now part of the option SVA1000X-AMK.
radios of some kind. Test equipment vendors The SVA1000X-EMI option expands EMI filter
are keeping pace with critical gear such as bandwidth including 200 Hz, 9 kHz, 120 kHz
spectrum analyzers. Along those lines, in and 1 MHz. And it also includes the quasi-peak
September, Siglent introduced a 3.2 GHz detector defined by CISPR (International
model to it SVA1000X series. It provides the Special Committee on Radio Interference.) In
ability to perform measurements such as addition, the SVA1032X can be equipped with
antenna matching in the widely used 2.4 GHz a vector signal analysis function for analog
ISM band. Beginning with the SVA1032X and digital modulations (SVAlOOOX-AMA/
product, the vector network analysis function DMA). This can be used, for example, to
is now integrated and enabled as standard for measure the error vector magnitude (EVM) of
the entire SVAlOOOX series (Figure 6). PSK, MSK or QAM modulated signals. The
Compared to SVA1015X, the SVA1032X 10.1" touchscreen, ability to connect an
not only extends frequency range, but also external mouse and keyboard and the
performance and RF specs. The spectrum integrated web server, all make operation and
analyzer's frequency range is 9kHz to 3.2 GHz, e
control easier.
and vector network analyzer frequency range is
100 kHz to 3.2 GHz. The analyzer has excellent
RF specs including -161 dBm/Hz DANL, less
than -98 dBc phase noise, less than 0.7 dB total
48 CIRCUIT CELLAR • DECEMBER 2019 #353

Modern rail infrastructure requires a wide range of DC-DC converters to


power a variety of new safety systems and passenger services. Railway
systems need DC-DC converters with input voltage ranges that meet mult iple
EN50155 standards.

It's never a good idea to treat your power conversion electronics as an afterthought in
your embedded system designs. The DC-DC converter you choose can have a direct impact
on the cooling and mobility of your system.

By JeH Child,
Editor-in-Chief

T here's no one single factor driving


the evolution of today's DC-DC
conversion products. As product
manufacturers push the limits in
power density, voltage range and advanced
filtering, they're also under pressure to
component for many applications. Usually
characterized by high-frequency operation
allowing them to achieve their small size, high
power density and efficiency, these converters
come in thousands of combinations of input
voltage, output voltage and power level.
provide more compact, integrated solutions. As you can see from the product gallery on
Add on top of that the need to accommodate the next couple of pages, these representative
multi-voltage electronics, operate at wide examples of DC-DC converters include products
temperature ranges and serve distributed released within the past 12 months. The gallery
system requirements, and it's clear that shows a mix of products spanning a wide range
nothing is simple in this product category. of sizes, formats and voltage configurations.
The good news is that DC-DC converter Some DC-DC supplies offer certifications
vendors are keeping pace by rolling out more specifically tailored to specific markets like
efficient products, while making advances medical devices. Others feature special cooling
in packaging and trying new partitioning schemes and wide temperature specs enabling
strategies. Improved solutions continue to them to be used in harsh environment
roll out at the component and brick level in a applications. DC-DC converters play a critical
variety of packaging and format options. For role in wide variety of applications including
DC-DC converters, the modular form factor, industrial control, railway systems (Figure 1),
commonly referred to as a brick, continues solar power equipment, medical equipment,
to be a popular building block approach equipment and telecom systems. e
ci rcuitcellar. corn 49

e ;~ MINMAXe 1~
l• ~):- MINMAX 1APU02·0SSOSH
lolAPU02· 05!10SH 1Y26
• 1921 -
.,..._...._.,

2 W DC-DC Converter Meets 600 W 1/lth Brick Converter DC/DC Converters Boast
General Industrial Needs for Telecom Designs Low Profile QFN-Package

MINMAX Technology's MAPU02H Murata's DRE-11.4/53-L48 is an RECOM's RPX-2.5 module is the


is a series of 2 W isolated/regulated eighth brick Intermediate Bus Converter latest addition to its DC-DC converter
DC-DC Converters with wide input (IBC). The product series addresses portfolio. RECOM claims it as one of
ranges in the SIP package. The family the growing power requirements of the smallest in its class of low profile
consists of 24 models offering 4.5 V networking and telecommunications QFN-packaged buck regulator power
to 5.5 V, 10.8 V to 13.2 V, or 21.6 V infrastructure equipment by delivering modules. The module is exceptional
to 26.4 V DC input ranges with single 96% efficiency. It is well suited for due to its flip-chip technology which
output models ranging 3.3 VDC to applications that require a highly increases power density and improves
15 VDC and dual output models :1::5 V to efficient, 600 W intermediate bus thermal management.
:1::15 V delivering 2 W of output power. converter that supports a Vin range of
36 VDC to 60 VDC. • Buck regulator power module with
• Industrial standard SIP-7 package integrated shielded inductor
• 1/0 isolation 3,000 VDC • DC input range: 36 V to 60 V {50 V • 28 V maximum input voltage
• 1/0 isolation capacitance 20 pf typ. nominal) • 2.5 A maximum output current
• Ripple and noise {20 MHz) 65 mVp-p • Industry standard S-pin eighth brick • SCP, OCP, OTP, OVP and UVLO
typ. package. protection
• Operating ambient temp. range • 95.5% efficiency at full load On/Off • 4.5 mm x 4 mm low profile QFN
-40°C to +90°C control package
• Short circuit protection • Designed for Regulated Intermediate • Flip-Chip technology for improved
• High efficiency up to 82% Bus Architectures {RIBA) thermal management
• Plastic {UL94V-0 rated) case • Monotonic startup into pre-biased • Efficiency up to 91%
output conditions
MINMAX Technology • 2,250 VDC input to output isolation, RECOM
www.minmaxpower.com functional insulation www.recom-power.com
• RoHS compliant
• Certification to UL/EN/IEC 60950

Murata Power Solutions


www.murata-ps.com
50 CIRCUIT CELLAR • DECEMBER 2019 #353

DC-DC Converters

Tiny Non-Isolated SIP DC-DC Isolated Converters Target Medical DC-DC Converters
Converter Delivers 250 W Railway EN50155 Systems Meet 2xMoPP Safety Spea;

TDK-lambda's i6A4W product family Vicar's new DCM2322 ChiP family The JHM20 series from XP Power are
is comprised of 250 W rated SIP (Single is a lower-power and smaller package a range of 20 W DC-DC power modules
In-line Package) models of non-isolated variant of its DCM3623 family and with international agency approvals
DC-DC converters. Utilizing less than provides power system engineers a for medical/healthcare applications.
0.47 inl of board area, this represents smaller footprint option with input The series is suitable for all medical
a 60% saving compared to 1/16th voltage ranges that meet multiple applications and particularly intended
brick format converters. Capable of EN50155 standards. Packaged in a for use where the DC-DC converter
operating from a wide input voltage of 22 mm x 23 mm x 7 mm nchiPn format, provides a reinforced (2xMoPP (Means
up to 9 V to 53 V, the i6A4W step-down the new series offers engineers wide of Patient Protection)) safety isolation
converters deliver an output voltage input voltage ranges of 43 V to 154 V barrier, including patient contact and
that can be adjustable from 3.3 V to and two more narrow input voltage patient vicinity applications.
15 V, or 3.3 V to 40 V. ranges of 14 V to 72. V and 9 V to 50 V.
• Regulated single and dual outputs
• High efficiency (up to 97.5%) • 22 mm x 23 mm x 7 mm nChiPn from 5 VDC to 30 VDC
• 9 to 53 VDC input, up to 3.3 to 40 V • Efficiencies up to 90.5% • 2" x 1" footprint PCB mount
output adjustment • Power levels ranging from 35 W to • 4 kVAC reinforced isolation
• Up to 250 W or 20 A output 120 w • 2xMoPP at 250 VAC working voltage
• Basic and full featured versions • Wide input voltage: 43 V to 154 V • 2.5 IJA patient leakage current
• 97.5% efficiency • Narrow input voltage ranges: 14 V to • Medical approval, IEC60601-1, 3rd
• Optional: power good, output 72 V and 9 V to 50 V Edition including risk management
sequencing and frequency • Meets multiple EN50155 standards • EN55011 Class A with no external
synchronization components
Vi cor • -4oac to +Boac operating
TDK-Lambda Americas www.vicorpower.com temperature
www.us.tclk-lambda.com
XP Power
www.xppower.com
Enter to Win!
Android Demo/Eval Kit

Visit ci rcuitcellar.comlversalog ic

The kit includes:


• 7" 1024x600 HDMI Touch-screen
flat panel display
• Tetra Single Board Computer "Set-up was a breeze,
(SBC) with Quad-core i.MX6
• Pre-loaded Android (Oreo 8.0)
it was up and running
on MicroSD card in less than 10 m in:'
• Wall power adapter
- Electronics Technician
• USB Hub
• Start-up guide
• Required cables
52

Embedded in Thin Slices

By
BobJapenga
T he first computer network I was
exposed to was DECnet running on
a Digital Equipment Corporation
(DEC) PDP-11 (Figure 1) [1].
While taking a course on DECnet in Maynard
Massachusetts in 1976, some of us were
home in the lab. But we all wondered: How in
the world would digital networks ever be able
to do what was portrayed in the commercial?
Fast forward to the present, and today's
networks-both wired and wireless-do far
more than we ever imagined back in those
talking about a commercial we'd seen the early days.
night before on TV. This was back in the One such amazing network is The Things
days when there were only three channels Network (TTN) (Figure 2). This month we will
and these kinds of conversations regularly explore what it is and what kind of security
happened. The commercial showed two trains it provides. We'll explore its advantages and
rushing at each other on the same track. At disadvantages and how you can get started
the last minute, a control computer talking using it. Because TIN is based on the LoRa
over a network to the two trains switched one technology, it would be good for you to review
train to a different track and they whizzed the first article in this series [2] if you are not
by-just missing each other. At the end of the familiar with LoRa.
commercial, the narrator said something to
the effect of "The power of computers." WHAT IS THE THINGS NETWORK?
Most of us agreed that we wouldn't want Let's introduce the topic by looking at
to be on either one of those trains. During the a particular need. And by seeing how TIN
course of that class, we struggled just to get meets that need, we will define the network.
two PDP-ll's to say "Hello" to each other. I Let's imagine that you have a large number
remember the exhilaration when I was able to of wireless sensors that you want to deploy
get my DEC computers talking together back in municipalities around the world. Each
circuitcellar.com 53

city would need between 100 and 1,000 of FIGURE Z


these devices. You have designed a really The Things Network Oogo shown here)
is a community based, open network
cool battery-operated sensor. It mounts on
that uses LoR.a technology.
or in a product you sell that gets placed all
around the city. You have chosen to use LoRa
technology for communicating to the first leg
on the way to your back end. But how do you
get the data to your back end?
One approach would be for you to mount
gateways all around the city. Each gateway
would talk to about 100 of your devices. You
cannot mount the gateway where the device
THE THINGS
is mounted because it needs more power than NETWORK
an appropriate and acceptably sized battery
could provide. It is impractical for you to go the logistical problems of finding homes and
to up to 10 businesses in every community power for the gateways, the devices and
and see if they would allow you to power and software are off-the-shelf and open source.
mount your gateway in their building. Here is In summary, TTN enables LoRa devices to
where TTN comes in. connect to gateways which in turn connect
Because it is a community based and open to an open-source decentralized network on
network, ITN may have gateways already which you can put your own applications to
there. So, let's imagine that you are going to send the data to your back end.
deploy in Zurich. If you go to the ITN website
you find that there are 155 gateways already SECURITY FOR TTN
running there. Viola! You can configure devices If you read the literature about LoRa
to connect to one or more of these gateways and ITN, you-as a busy designer-may be
and you are in business. The devices will talk tempted to deal with it like we do the myriad
via LoRa to the gateway. The gateway will of licenses and terms and conditions we are
send your data to the TTN backend. You write asked to accept. Often, we just scroll down
a simple app that forwards your data to your and say UI accept" without really knowing
back end and you are in business. what is going on. You may be tempted to say:
If there is no existing TTN in all of the uThese folks are smarter than me. They have
cities where your devices are installed, then thought this through. They write a lot about
TTN still helps you. However, as we previously security. It must be secure." This has the
stated, you will have to provide the gateway potential of proving fatal to your project and
yourself and find locations around the city possibly even your company.
to power and mount them. But apart from ITN is designed based on the LoRaWAN

J1

a~-- ...

Gateway
FIGURE 3
End-device The LoR.aWAN specification was
created with a business model where
the people who own and operate the
network are different from those who
Connection LoRa Connection lP own and operate the end device.
54 CIRCUIT CELLAR • DECEMBER 2019 #353

FIGURE 4
m gateways worldwide specification. For example, the specification the data that is sent across the network. For
makes the assumption that you store the keys this reason, there are two distinct AES 128- bit
in tamper-proof I tamper-resistant memory. private keys (called the root keys) used for
When the writers of the specification say that encrypting and decrypting: a network session
network traffic is secure, they are assuming key and an application session key.
you have done everything they have told you
to do. We need to understand how security ACTIVATION METHODS
works in TTN before we blindly adopt it. Having the network session key alone
Knowing how it works, what vulnerabilities it (necessary for the network operator) does not
is susceptible to and what measures you need provide access to the payload of the device.
to take to secure your data is critical. You This is a foundational idea in TTN security.
need to know the attacks your device will be Only your application has access to the
vulnerable to and how that fits in the security application key for encrypting and decrypting
provided by LoRaWAN. your data. A third key (application key) is used
All loT devices need two basic forms during one of the two activation methods
of security: Confidentiality of the data (Over-The-Air-Activation (OTAA)) to generate
(preventing others from reading your data) the other two keys. Authentication of your end
and Authentication of the devices (knowing device is primarily provided by utilization of a
that you are who Ithink you are). The LoRaWAN bearer token which is signed by a secret key
specification was created with a business and kept on the account server.
model where the people who own and operate The challenge with any private key
the network are different from those who encryption model is: how to get the root keys
own and operate the end device (Figure 3). onto the devices initially and how to update
Confidentiality is created by encrypting all of them. TIN provides two ways for activating
your device: Dynamic or OTAA and Static or
For detailed article references and additional resources go to: Activation-By-Personalization (ABP). OTAA
-w.circuitcellar.com/article-materials is the preferred and most secure method.
References [1] through [7] as marked in the article can be found there. With OTAA, the devices join the network
and network session keys and application
session keys are generated from the secret
RESOURCES application key.
Microchip Technol ogy I www.microchip.com This method doesn't solve the chicken and
Raspberry Pi Fo undat ion I www.ra spberrypi.org egg problem, however, since the application
Shenzhen RAKwi reless Technology I www.ra kwi reless .com key must be somehow provided to the network.
Sodaq I www. sodaq. com Various methods are proposed including:
circuitcellar.com 55

Public Key Infrastructure and utilizing the LoRa and Bluetooth Mesh along those lines.
authenticated Diffie-Hellman key Exchange We have designed and installed hundreds of
(ADHE) algorithm. But none of this is provided thousands of cell-based devices using the
in the TTN open-source code available to very automated activation processes that
date. In addition, TTN allows for all of your were provided by the cell carriers.
devices to have the same application key,
which simplifies your process but decreases GETTING STARTED WITH nN
security. We will talk more about this later in this
There are many more in depth discussions article series. I'll describe the setup I used
of security on TTN's web site [3] and a number to test out loRa and TTN. As a little preview
of good articles about the threats that even of that, here is what I did. You need a LoRa
a well-secured TTN presents [4]. For now, device and a gateway. For my loRa device,
we can just scan down the page and say: "I I purchased an ExploRer board designed by
Accept" that they have some well thought out Sodaq for Microchip.[S] It has everything you
security methods. It is up to you the designer need for a stand-alone loRa device (including
to find the level of security you require and the a rechargeable battery).
lengths you will need to go to get that level of For my TTN gateway, I purchased a
security. As we will show in future articles in Raspberry Pi 3 B+SBC [6] and RAKwireless 831
this series, the open-source gateway packet LoRa gateway [7]. In less than two hours you
forwarders I have found do not implement can have everything put together-although
even the basic security requirements. So, you must wait overnight to get your gateway
keep in mind that you will be responsible registered on TTN. After they accept your
for implementing much of these security gateway, you can start sending and receiving
requirements, if you deem them necessary. packets on the loRa network. I will provide
many more details in the final article in the
ADVANTAGES AND series-but all of you are smart enough to get
DISADVANTAGES these going yourself by using this article's
The advantages of TTN are many: a references.
broad community support, a vast array of The Things Network has many significant
open-source code from which to build your advantages for deploying low power sensors
infrastructure, and the potential of not having over long range. The examples given on
to deploy gateways. These are significant the TTN's website show that this is doable
advantages. quickly and economically. Activation for large
We have already mentioned one of the numbers and security remain concerns but
disadvantages of TTN and that is that most this is still relatively new technology. Even the
likely there are not public gateways available LoRaWAN 1.0 specification has already been
where your device is marketed (Figure 4). updated to 1.1 to address security concerns
Even with all of the gateways they have up, found in the specification used for TTN. Not
that number is a drop in the bucket compared all end devices are 1.1 compatible. Therefore,
to a full worldwide network provided by the known vulnerabilities exist in most of the
cellular market. This means that you will have devices.
to deploy your own gateways. When I think As always, we have hit this in thin slices.
of two devices we designed and developed Next time we will look at a commercial
that were candidates for TTN, there were TTN LoRaWAN network that has other potential
gateways in less than 1% of the locations. solutions and possible problems. e
The question we have to ask ourselves: Is TTN
going to propagate as widely as cell networks?
Once you deploy your own gateways, you
are not the only one on the network. In last
month's article I talked about rules like the ABOUT THE AUTHOR
amount of time you are allowed to light up Bob Japenga has been designing embedded
the cloud and the number of packets per day. systems since 1973. In 1988, along with his
Other poorly designed devices may be on your best friend, he started MicroTools, which
network that don't follow those rules, and specializes in creating a variety of real-time
they could bring your product down. embedded systems. MicroTools has a combined
The activation process for TTN does not embedded systems experience base of more
lend itself to a quick on-ramp for deploying a than 200 years. They love to tackle impossi ble
large number of devices. As discussed in our problems together. Bob has been awarded 11
last article series, Bluetooth mesh is much patents in many areas of embedded systems
further along in this respect with many more
and motion control. You can reach hi m at
built-in automated provisioning steps. And of
rjapenga@microtoolsinc.com.
course, cell technology is way ahead of both
Lacoste's very first topic covered in his Circuit Cellar column back in 2007
u"'ru:.rl'
was electromagnetic interference (EMI). Coming full circle, this month he examines
EMI once again, but this time from a different standpoint. Robert explains what
near-field magnetic probes are, and how they can help you in your designs.
importantly, he shows how to build one at virtually no cost.

By
Robert Lacoste

W
elcome back to "The Darker EMI generated by a badly designed circuit
Side." Twelve years ago, I can easily affect radio communications,
started this column with an including critical ones. However, it can also
article on electromagnetic jeopardize the behavior of other electronic
interference (EMI) ("Let's play with EMI!" circuits, especially if they are not well
Circuit Cellar 205, August 2007). That subject protected against EMI. If you want to learn
was clearly written in the spirit of Steve more about some real-life incidents or
Ciarcia (Circuit Cellar's founder) and I wanted even accidents caused by EMI, I strongly
to focus "The Darker Side" on " ... some of recommend the NASA document titled,
the lesser-known, more obscure aspects of "Electronic Systems Failures and Anomalies
electronic design." As a regular reader, you Attributed to Electromagnetic Interference"
now know that nothing is black magic. Some [2]. It is 30 pages long and includes, as an
subjects may seem scarier than others at the example, an EMI-Iinked accident in 1967 on
beginning, but all are understandable with the ship USS Forrestal that caused the deaths
some basic knowledge. And, after all, playing of 134 sailors.
with them is a lot of fun! Even if you are not designing weapon-
This month, I will once again write about control systems, EMI can still be a concern
EMI, but from a different perspective. I'll in your projects. Have you ever gotten more
explain what a near-field magnetic probe is, noise than expected on sensor circuits?
and how it can help you in your designs. More Maybe it was due to EMI conducted or
importantly, I will show you how to build one radiated by power circuits or digital circuits
at virtually no cost. So, take a seat and enjoy! nearby? Have you ever seen a microcontroller
(MCU) behaving erratically from time to
EMI? time? Maybe this happened because some
Let's start with a refresher on EMI. EMI EMI inadvertently triggered its reset or
appears when a disturbance generated by a interrupt inputs? Last but not least, EMI is
given device affects another device, either now controlled by regulations such as CE
through conducted or radiated coupling. It is marking in Europe and the FCC in the US. If
not a new topic. According to Wikipedia, the your product is not adequately designed in
first international commission on EMI was terms of EMI, then you simply will not be able
launched in 1933. CISPR (French acronym to sell it to anyone or even to have the right to
for "Comite International Special des switch it on outside of your own lab. For more
Perturbations Radioelectriques") was born, on CE, see ''The Darker Side - CE Marking in
and is still an active IEC commission [1]. a Nutshell," Circuit Cellar 257, October 2011).
circuitcellar.com 57

MAGNEnC lk ELECTRIC FIELDS are mainly used for qualitative and relative
As noted earlier, EMI can be either measurements.
conducted (transmitted between two circuits Because an electromagnetic field can be
through a wire), or radiated (transmitted generated either by an electric or a magnetic
wirelessly). I will now focus on the latter. You source, near-field probes exist in two variants:
know that a wireless transmission is done electric probes (E-probes) and magnetic
using a propagating electromagnetic field. probes (H-probes). Because magnetic EMI
Such a field is a combination of an electric field sources are more common than electric
and a magnetic field-interacting together sources, a magnetic probe is the first to get
as defined by Maxwell's equations. Don't be in your lab. By the way, another advantage
afraid. I won't do any math here. I simply of an H-probe is that a magnetic field fades
want to point out that these two fields are faster than an electric field as the distance
jointly propagating in a well-defined manner. increases, and this helps to locate the source.
Now, how is an electromagnetic field
created? Either by creating an electric field or MAGNETIC PROBE
a magnetic field. An electric field is produced Now let's look at how to make a magnetic
by stationary charges (electrostatic sources), probe. Some theory may help here. You may
whereas a magnetic field is created by moving have learned that any current circulating
charges (current sources). So, the field in a conductor generates a magnetic field,
around an EMI source is mainly either electric which is calculated using the Biot-Savart law
or magnetic, depending on the physical {Figure 1, left). If the conductor is a straight
phenomenon that generates this EMI. This wire, then the magnetic field will turn around
area close to the source is called the 0 near- the wire as illustrated. Its direction can
field zone." Further from the source, Maxwell's be determined using the so-called aright-
equations transform this field into a gentle hand law." Put your right hand around the
electromagnetic field-the "far-field zone." cable, with the thumb in the direction of the
Now think about an average electronic current. Your fingers are in the direction of
design, with some parts soldered on a PCB the magnetic field.
and interconnecting wires to the outer world. But there is also the Faraday law
Do you think you are more likely to have (Figure 1, right). This one states that a current
magnetic or electric EMI sources? Magnetic is is induced in any conducting loop put into a
often the good answer because such designs magnetic field. This current-or more exactly
more often have high currents and low the electromagnetic force {EMF)-is not
voltages, rather than the opposite. proportional to the strength of the magnetic
field, but rather, to the rate of change of the
NEAR-FIELD PROBES magnetic flux through the loop. This means
Imagine that you have a prototype that that no current will be generated in a fixed
generates too much EMI, and you need to loop put in a fixed magnetic field. However,
improve it. You first need to know where there will be a current if the magnetic field is
this EMI came from. Who is the culprit? Why changing, and this is the case when the current
not install a radio receiver (or a spectrum
analyzer) a couple of meters in front on your
product, meaning in far-field conditions?
Usually this is done in an anechoic chamber
to avoid external perturbations. You will then
measure the frequency spectrum of the EMI, I (electric c urre nt)
and this may help a lot. For example, if EMI is
mainly at frequency multiples of 24 MHz-and
if your CPU clock is 24 MHz-then you have
some clues.
A complementary method is investigating
far closer to the device, using so called ,,near- B (mag netic fi eld)
field probes" {also called ,,close-field probesn).
Such probes are intended to help locate the
exact source of emission on a circuit. Just Biot- avan law : Faraday law :
connect it to a measuring instrument-using dcp
fl.ol
a spectrum analyzer, or even an oscilloscope, B= -
2nr e=- dt
as I will show you-and drag it over the board.
The stronger the signal, the closer the source.
The signal level will vary a lot when moving FIGURE 1
the probe, but qualitatively it is quite easy to Any current circulating in a wire creates a magnetic field, and a loop positioned in a magnetic field generates
find the hottest spots. So, near-field probes an electromotive force proportional to the time rate of change of the flux of this field thnough the loop.
14062423
14062423
60 CIRCUIT CELLAR • DECEMBER 2019 #353

easily locate the major noise source and its


frequencies. Then you'll switch to a smaller
probe to locate exactly where the noise is
coming from.
And don't forget to turn the probe around its
axis. This type of probe grabs the most current
when its plane is parallel to the trace or cable
carrying the EMI current. This will be especially
helpful to determine which track is the noise
source in multi-layer designs, where the tracks
are often orthogonal between layers. If you
want to learn more about these investigation
techniques, there is a nice article published by
Holland Shielding Systems BV on its website:
"EMI troubleshooting, step-by-step" [3].

AUTOMATED MEASUREMENTS
Manual analysis of the board is usually more
than enough to locate an EMI source. It is also
possible to make an automated measurement
of the entire board, using a 11near-field scanner."
FIGURE9 Basically, the concept is either to move a probe
Here the probe is moved across an a strong signal close to the processor chip. through the board, using a motorized arm, and
old Raspberry Pi 1 rnmputer module, The measured signal was clearly at 4.43 MHz plot the map of the measured signals, or to
while a Tektronix MSO 70404C and its harmonics, as illustrated on the scope include hundreds of probes under a fixed table
oscilloscope displays the measured screen capture (Figure 10). Doesn't 4.43 MHz and electronically scan it. Such scanners are
signal and its frequency spectrum.
sound familiar? Yes, that's the carrier produced by companies including EM-Scan,
frequency of PAL video signals, so it's likely Detectus and Amber Precision Instruments
that the video output is generating some EMI. and are not actually accessible to hobbyists or
You now understand that such simple occasional users. However, nothing prevents
probes enable you to localize quite precisely you from building your own electromagnetic
the source and type of a perturbance. In scanner. This is indeed quite simple, as long as
real life, you will probably start with a large you have some spare time and don't need high
probe, and sniff around the product. You will performance.

FIGURE 10
The measured electromagnetic noise
is mainly a 4.43 MHz carrier and its
harmonics, which is the PAL video
carrier.
circu itcellar.cam 61

In fact, my company did it with the help


of three successive trainees (my thanks to
them!). Our first version was based on an old
pen plotter. We just replaced the pen with a
sensor probe similar to the one described in
this article, and put the board under test upside
down above the plotter. The mechanical section
was rather clumsy and soon died, so we rebuilt
one using a nice Chinese-made laser-engraving
X-Y table. This table was bought on eBay for
about $200, including the stepper motors and
a USB-driven controller (Figure 11).
To have an autonomous system, we
added a low-cost USB-driven spectrum
analyzer from RF Explorer. Such a low-cost
instrument doesn't provide the performance
of standard equipment, but is usually enough
for EMI measurements. Last but not least,
we developed PC-based software to drive the
measurement. It does the configuration of the
spectrum analyzer, configuration of the corners
of the board and move/measure/store result
sequencing. Developing and debugging this FIGURE 11
software was the longest job. We used National This is our automated X-Y dose-field measurement table, built using a laser engraver kit and a low-cost RF
Instruments' LabView, but you can use the Explorer spectrum analyzer.
programming environment of your choice.
As an example, I put the Raspberry Pi 1
on our scanner and launched the software.
The result, with the near-field measurement
superimposed on the board image, is shown
in Figure 12. As suspected, there seems to
be a PCB trace going from the processor to
the yellow video connector, which is radiating
significantly more than the other sections.
With an analysis like this, the board designer
can take counter-measures, such as shielding
this PCB trace, checking the line terminations
or adding some current-limiting resistors
somewhere. Nice, isn't it?

WRAPPING UP
Here we are at the end. I hope that you
have already switched on your soldering iron
and plan to make your own probe in the next FIGURE 12
The close-field analysis of the
10 minutes. Grab a board and try to find
Raspberry Pi 1 clearly shows that
EMI sources. The motherboard of your PC
the culprit is the trace between the
may be an interesting target. If you already system-on-chip and the RCA video
have a spectrum analyzer, just use it. If not, connector.
switch on your oscilloscope and use its "FFT"
function. And if you don't have a scope at all-
or if it's too old to have an FFT-then look for
ABOUT THE AUTHOR
one on eBay. Robert Lacoste lives in France, between Paris and
You can buy an RTL-SDR USB dangle for Versailles. He has 30 years of experience in RF
$10 to $20. These modules are based on systems, analog designs, and hig h speed
DVB-T receiver chips, and can be used as a electronics. Robert has won prizes in more than 15
poor man's spectrum analyzer, with some international design contests. I n 2003 he started
of the available open-source software. a consulting com pany, ALCIOM, to share his pas-
Another solution, if you're a ham-radio sion for innovat ive mixed-signal designs. Robert's
person, is to connect the probe to the bimonthly Darker Side column has been published
antenna port of your shortwave radio in Circuit Cellar since 2007. You can reach him at
receiver. That should work! Anyway, try to
experiment. And have fun! e rlacoste@alciom.com.
George continues his article series looking
at all aspects of the basic structures that
make semiconductors work. In Part 4, he
shows you some useful discrete transistor
circuits and then zeros in on the field effect
transistors: Junction FETs and MOSFETs.
The discussion includes an examination of
some fundamental structures like cascode
amplifiers and Darlington transistors.

By
George Novacek

L ast month we exhausted the topic


of transistor theory, so now let's
look at some useful transistor
circuit topology. Figure 1• shows
you a cascade (not cascade!) amplifier and
two versions of Darlington transistor in
whether vacuum tube or solid state. It is
expressed as:

where AV is the voltage gain of the amplifier


[1]

Figure 1b and Figure le, respectively. The and C the capacitance between the input and
three configurations can be realized with the output-in other words, base to collector
either NPN or PNP or both transistors. The in our example.
latter would be called a complementary pair. Because of the cascade amplifier's ability
The cascade amplifier (Figure la) can be to eliminate the Miller effect, you can often find
found in many radio and higher frequency it as the front end of Rf receivers. Transistor
circuits. Compared with the common Ql works in common emitter configuration,
base amplifier-which is also used as high feeding Q2 working as a common base
frequency amplifier-the cascade amplifier amplifier. This amplifier can and often is
features higher input impedance, especially realized with junction (JFET) and metal oxide
when a small resistor is placed between the {MOS) FETs. We'll address that later when we
Ql emitter and ground. It also has a higher discuss those semiconductors. The drawback
output impedance-both advantageous for of cascade amplifiers is that it's comprised
interfacing with tuned circuits. And, last but of two transistors with additional parts and
not least, it has greater bandwidth because the usually a higher supply voltage is needed.
cascade topology eliminates the Miller effect. But then the end result is a top-notch high
The Miller effect causes an increase of frequency amplifier. To obtain maximum gain,
the equivalent input capacitance of inverting the load RL should be as high as possible. In
voltage amplifiers by amplifying the actual critical applications, a constant current source
capacitance, in our case, between the base is used instead of the resistor RL.
and the collector terminals. Predictably,
the result is the reduction of the maximum THE DARLINGTON TRANSISTOR
frequency response. The Miller effect, by the The Darlington transistor (Figure lb) is
way, affects all inverting voltage amplifiers, named after its inventor Sidney Darlington. It
ci rcuitcellar. corn 63

FIGURE 1
b) c) Cilscode amplifier (a) and Darlingtun
transistor (b, c)

is simply a cascade of two transistors Q3 and Q4, NPN or PNP,


in a single package. Its main advantage is a very high current FIGURE2
gain, which is approximately the product of the two transistors' Differential pair
gains-this is usually in the thousands. The price you pay for
this feature lies in a doubling of the base-to-emitter voltage VBE
and increased collector saturation voltage VCEQ4 by VBE, which
leads to a higher power dissipation than a single transistor. The
Darlington current gain is:

[2]
Unfortunately, the switching speed of the Darlington pair is
reduced because Q3 cannot effectively inhibit the base current
of Q4. This is to some degree alleviated by the base to emitter
resistors integral within the transistor. A complementary
IN o-- - - - - - ; - - - - - - - - - '
pair-one NPN and the other PNP-can be used instead of two
transistors of the same type as illustrated by Figure le. Either
Constant Current 8 ao
transistor can be NPN or PNP. The Darlington pair's larger phase
shift when compared with a single transistor may lead to a
system instability.
Another important topology is the balanced, differential,
emitter coupled pair-sometimes called a nlong tailed pair.n It
is shown in Figure 2. You'll find it in many applications. For
example, it is a common input stage of op amps, both discrete
and monolithic (ICs). In many discrete component designs,
resistors are used in place of the constant current sources. •) Voc
b) voc
0
However, for the best performance and especially in the design
of IC op amps, constant current sinks and sources are deployed.
Besides, in IC manufacturing transistors are easier to implement

~ RA
than resistors. Consequently, to the benefit of monolithic op
amps, current sources are almost exclusively used.
R'
l h l OO
01
11'11914
~ Ra100
Figure 3 shows a couple of discrete circuits that can be
useful when an op amp would be an overkill. Figure 3a is a D2
IH914 Q3
complementary voltage amplifier. With the component values 01 JI<J-
2N:l!l0<
shown it has a gain of 40 dB (100), flat from about 0.01 Hz
to 3.5 MHz. The circuit Figure 3b is a constant current source IN 1">--1
supplying 4 mA with the given component values. It could be Cl OW
OUT
used as the load in the long-tailed amplifier. Its NPN cousin
Rll
would be sinking emitter current in that amplifier. With the 34<
current mirror, the actual circuit implemented either with
discrete components or as a part of a monolithic op amp would
~ ,,R~ 0
•mA
look like the circuit in Figure 4.
In Part 2 of this article series, I mentioned that few diodes
behave exactly as described by the theoretical equations. The
opposite is true about transistors. You can use a transistor
-
collector-base or base-emitter junction as an almost ideal FIGURE 3
diode. What's more, a reverse-biased base-emitter junction A simple complementary am pi ifier (a) and a constant current source (b)
64 CIRCUIT CELLAR • DECEMBER 2019 #353

FIGURE 4 of a transistor functions as a Zener diode.


Implementation of the long-tailed The popular 2N3904 NPN general purpose
amp Iifier using current sources
transistor, for instance, has a very sharp
knee at approximately 6 V, needing just a few
microamperes as compared with milliamperes
for Zener diodes. This can be useful when
power consumption is at premium, as I
showed in my past article about infrared
detectors (Circuit Cellar 343, February 2019).

A LOOK AT FETs
Now, let's turn our attention to field
effect transistors-commonly called FETs.
Interestingly, the invention of a FET preceded
the BJT by some two decades. The FET was
patented by Julius Edgar Lilienfeld in 1926, but
it was never constructed because the necessary
technology wasn't available at that time.
We begin with the JFET structure depicted
by Figure 5 with their accompanying schematic
symbols. Just as with the BJTs, JFETs come
Or-.ln in two flavors: N-channel and P-channel. You
can see that the control electrode called gate
is a P-N junction forming a diode. To achieve
the FET's signature high input impedance, this
diode must be reverse-biased. The result is that
11 the reverse biased gate inhibits the movement
of electrons or holes, depending whether the
channel is N or P material. The maximum drain-
to-source current is obtained at zero bias as
shown in Figure 6. For this reason, we say that
lFETs are depletion-mode devices.
Similar to BJTs, FET amplifiers can also be
FIGURE 5 created in three basic configurations: Common
Structure of N-channel JFIT and schematic symbols of N and P channel. Notice that the Drain and Source source, analogous to the common emitter:
electrodes are interchangeable. common gate equivalent to the common
base and common drain, also known as a
lo source follower corresponding to the emitter
follower. Figure 6 is the drain-to-source
Ohmic Region saturation Region current 10 versus drain-to-source voltage V0s
characteristic with gate-to-source voltage VGs
as a parameter. At some negative VGs there
Vos= OV
will be no I 0 current flowing. This negative
voltage is referred to as the pinch-off voltage
Vpo In the ohmic region the channel resistance
can be calculated based on measured drain-
Vos= -1V source voltage 105 and drain-source current.
Then:
V~-2V

R = AVDS = _1_ [3]


Vos= -3V DS AT
Llln 8m
Channel OFF Vos< V~ where gm is the FET's transconductance gain.
Common source configuration is widely
Drain to Source Voltage Vos
used, including front end stages of monolithic
op amps where it can be often seen as FET-
FIGURE6 based long-tailed pairs. It has very high input
JFIT Drain I -V characteristics with VGS as parameter impedance and good voltage gain. Common
gate, analogous to the common base, is not
For detailed article references and additional resources as widely used. But it can be seen as the
go to: w-.circuitcellar.com/article-materials second stage of a cascade amplifier. Once
ci rcuitcellar. corn 65

again, this is analogous to its BJT version with its advantages and FIGURE 7
disadvantages. Constant current sink built with a
N-channel JFET
Common drain-in other words, source follower-transforms
very high input resistance to a low resistance output. It is frequently
an integral part of sensors, such as the passive infrared (PIR). In
the saturation region, the saturation current Ioss shows very little
dependence on the drain-to-source voltage lDS. This characteristic can
be advantageous for the design of constant current sinks and sources.
In a constant current sink (Figure 7), resistor R adjusts the magnitude
of the sink current which, for R = 0 is the maximum saturation current
I 055• This, as well as the pinch-off voltage, are device dependent. Using
a P-channel JFET in place of the N-channel and switching polarities you
will obtain a constant current source.
As you may have deduced from Figure 5,
the JFET is a symmetrical device and the drain
and source terminals are interchangeable. This
ABOUT THE AUTHOR
makes a JFET useful as an analog switch. And George Novacek was a retired president of an
if that wasn't enough, JFETs have a fairly wide aerospace company. He was a professi onal
ohmic region where, based on the VGs• they engineer with degrees in Automatio n
behave as voltage-controlled resistors. This and Cybernetics. George's dissertatio n
makes JFETs suitable for applications such as project was a design of a portable ECG
volume control, voltage-controlled oscillators, (electrocardiograph) with wireless interface.
modulators and wherever a variable resistance George contributed articles to Circuit CeJJar
is needed. Because of its high input impedance since 1999, penning more than 120 articles
and small geometry, FETs found their use in over the years. George passed awa y i n
low noise, high frequency circuits with up to 30
January 2019, but we're grateful to be able to
GHz frequency limit.
share with you this, and several more articles
Next month, in Part 5, will expand our
discussion of FETs. e he left with us to be published.
FIGURE 1
By Insulator standoffs (knobs) and feed-throughs (tubes) were used to support 1-conductor wire between
JeH Bachiochi wall and floor joists between tne fuse box and electrical device.

I
f you hear someone say "controlled breaking" mains cover. Fuses are single-use devices, so you had
in this age of autonomous vehicles, you might to have plenty of spare fuses on hand.
assume it a discussion about vehicle braking Today, our homes use breakers in the power/
was about to commence. Instead, in this service panel, which are fuses that can be reset after
article we're going to look at the kind of breaking tripping (Figure 3). No longer are we exposed to the
implemented in your fuse box. For some, I expect the "live" wiring inside the breaker panel. Resetting a
name "fuse box" to bring up some blank stares. In breaker is a simple OFF-ON recycling of the tripped
my younger days, whenever I ventured into the cellar, breaker's plastic lever. Circuit breakers also give
which had a dirt floor and the smell of kerosene, I us a convenient and safe way to disconnect branch
couldn't help but notice the electrical wiring looked circuitry, allowing us to replace outlets, switches,
like Frankenstein's lab, consisting of knob and tube fans, lights and other direct-wired devices without
wiring. What? Never heard of kerosene, Frankenstein the circuit being "live." The front panel protects us
or knob and tube wiring? Hmm, I guess a lot has from the killing potentials that await inside. To be
changed in 50 years. safe, homeowners should never remove this cover.
Figure 1 shows knob and tube (K&T) insulators The standard circuit breaker has two basic modes
that were used to hold wires, providing power from of operation: short circuit and overload protection.
your fuse box to your room outlets. Note that each Although a short circuit is a kind of overload, these are
conductor has its own K&T wiring path. This is unlike handled separately. Refer to Figure 4 for the guts of
the multi-conductor cable, or "14-2 with ground" that a typical circuit breaker. The plastic handle (1) allows
is used today. It consists of two insulated conductors the user to turn ON/OFF the switch via the latching
plus a bare, copper grounding wire (14-gauge). The actuator mechanism (2), which closes the contacts
fuse box shown in Figure 2 used Edison-style, screw- (3) between the two external wire connectors (4). The
in fuses and cartridge-style main fuses under the bi-metallic strip (5) deforms due to self heating as
clrcuitcellar.com 67

current passes through it. The movement of RGURE2


this strip will unlatch the actuator mechanism Edison fuses-having the same screw-
in base as Incandescent light bulls-
(2) when the current exceeds the rating of
protected each hot wire of a circuit
the breaker. The trip point is factory adjusted branch. They came in various Ampen!
using the adjustment screw (6). The closed ratings just like today's breakers.
circuit current path between terminals (4) Large bus-type fuses prttected each
includes the coil (7). This is actually a solenoid. leg of the main.
Normal circuit current Is not sufficient to
enable the solenoid. It requires high (short-
circuit) current to enable the solenoid and trip
or unlatch the actuator mechanism (2). When
the breaker trips (opens), interrupting high
currents may produce an arc on the switch
contacts. The arc divider/extinguisher (B) is
several parallel plates, which create many
smaller gaps across the contacts, helping to
dissipate any arcing.

POWER OUTAGES
We've all experienced power outages
and brownouts. These might be due to
infrastructure damage-for example, when
a branch drops on a power line, a pole is
taken down due to an auto accident or during
extreme demand when the generation can't
keep up with the demand. Many homes have
installed backup generators, which supply
power in an emergency situation. Safety
systems are In place to prevent a generator
from placing power back on the grid, which
is a safety hazard to line men working on
"dead" lines. This safety device is known as
a "transfer switch." It allows you to connect
either the utility's power or your generator's
power to your home, but not both at the same
time. This transfer switch can be manual or
automatic.
A generator is usually sized to produce
only a fraction of the maximum amperage
your home might require. In emergency
cases, you are most interested in operating
only those items of importance, such as your
heating system (in winter), water pump, stove
and fridge. The demand on these might be
sporadic, and as long as you don't ask for
more than your generator can handle at any
given time, you can get away with a lot less
generating capacity. The larger the generator,
the more fuel is required to keep it running,
even if there is no power demand on it.
You might not be able to run two high-
demand items at the same time. Therefore,
you must load share or load shed. load sharing
requires turning breakers (power to individual
circuits/ devices) ON and OFF, such that only
one is ON at a time. load shedding is turning
OFF those items of lesser importance, to allow FIGURE3
Today's electrical (service) panels
for more important loads. load shedding is
contl!in all r~ttable circuit breakers.
based on a hierarchy of load importance. That
A tripped breaker's handle moves to
is, you designate each circuit with a priority a centered position and must be
level. All circuits begin ON. Should the load manually cycled OFF and ON to reset
to the generator be more than its capacity, the breaker.
68 CIRCUIT CELLAR • DECEMBER 2019 #353

FIGURE4 then circuits are turned OFF starting with the


This diagram shows the typical
lowest priority and continuing up the priority
components of the standard
chain until enough loads have been shed to
residential breaker. It has both short
bring the demand down to that which the
circuit protection and over current
protection.
generator can handle.
This all requires constant monitoring of the
generator to prevent overloading. In general,
these systems are pretty dumb. There is no
feedback of whether or not a circuit is looking
for power, unless the breaker is turned ON
and the load increases. The smart home of
the future could provide this. Let's start by
looking at the breaker used in these systems
to remotely turn a breaker ON and OFF.

POWERLINK BREAKERS
Schneider Electric is a global specialist in
energy management and automation. They
develop solutions to manage and process
energy in ways that are safe, reliable, efficient

Control
r device
--- ,
I
Black On1
FIGURE 5
Here's a circuit diagram of the White
Q0120PllLC motorized bneaker 24Vdc
Red
showing the 3-wi re external control +
connection and how the motor is 011 1
wired with end-of-travel switches that
automatically disconnect the motor. L.--- .J

Kl Kl
1 GGSK-2 6 GGSK-2

R3

.11<

R5
Jk

R2
4.71<

FIGURE&
This is the latching test circuit I used, which let me investigate the breakers control system. Later, the same circuit allows a microcontroller to set and reset the breaker.
ci rcuitcellar. corn 69

FIGURE7
The scope trace shows the length of
time necessary to change the state of
a motorized cincuit breaker.

and sustainable. Powerlink is an energy- the scope to measure the current through the
management powerhouse that remotely resistor. With the breaker attached, you can
monitors and controls circuits, panels and see in Figure 7 the current pulse required to
lighting from one centralized location. Part of change the state of the breaker. You'll note
that system is the ON/OFF control of breakers. from the schematic that the set and reset
They have taken the standard breaker and inputs need only to be pulled high for a brief
modified it to be controlled remotely without period for the latching relay to do its thing.
introducing any safety issues. The standard Because this relay doesn't need power to
20 A circuit breaker (Q020, $12) becomes a remember its last state, a power cycle will not
Q0120PLILC ($46). cause the relay to change state.
The Powerlink breaker has a 24 VDC motor
inside that closes and opens the breaker. In FTB 344
addition, there are limit switches wired to Now, I'm going to borrow from a previous
disable the motor once it has reached its project. My From the Bench (FTB) column in
destination. The signal on the control line is Circuit Cellar 344 (March 2019), entitled uNon-
either a +24 V (to close the breaker) or ground lnvasive Current Sensor" was on current
to open the breaker. Motor current is only measurement, and clamp-on current sensors
required while switching. Specifications call were used to measure the amps flowing
out a supply of providing 24 VDC at 2 A for through a conductor. The sensors are available
10 ms. Figure 5 is a diagram of this breaker. in different current ranges, but are all pretty
The first thing I wanted to do was to much the same-except for a burden resistor
look at the breaker in action. I purchased a that sets the range equal to a full-scale output
switching supply that is capable of over 2 A. I of ±1 V. After all, we're dealing with AC current
designed a little circuit to handle the current measurement here.
and provide me set and reset push buttons Because the sensor output is positive
(Figure 6). Note that in this circuit I used a and negative, and most analog-to-digital
latching relay with dual coils, one to set the converters (ADCs) are ground based and
relay, and one to reset the relay. The relay looking for only positive signals, I used a
provides some memory for the breaker's bias circuit to create a positive offset voltage
state, should the system go down. The push equal to 1.2 V, upon which the sensor's
buttons give local control, the LEDs provide output would be applied. The resultant signal
optical feedback, and additional connections would be 1.2 V when the sensor produced
allow this board to be interfaced for external no current. The probe's output current goes
control and status. through the internal burden (load) resistor.
Without the breaker attached, I can This voltage across this burden resistor is
change the state of the relay with the push- an AC voltage, and will thus be positive and
buttons. The LEDs show power and relay negative (referenced to one end).
state, so I added a 0.1 Q resistor between the When referenced to the bias voltage, it
power supply and the circuit and hooked up adds to and subtracts from the bias voltage.
70 CIRCUIT CELLAR • DECEMBER 2019 #353

Since the voltage should never exceed MQTT


:1:1 V full scale (unless it is measuring a current I didn't intend for this project to
higher than its rating), it will subtract or add include MQTI (Message Queuing Telemetry
(up to 1 V) to the 1.2 V bias. This produces a Transport), but after thinking about it, this
combined voltage of 0.2 V to 2.2 V when the makes the perfect platform for interfacing
probe is measuring full-scale current (:1:1 V). stuff to a browser-based user panel. What I
You can see that since we are dealing with a have is digital 1/0 (the breaker) and analog
60 Hz signal here, we must take many readings input (current through the breaker). I already
(conversions) and save the highest and lowest have OpenHAB 2 running on a Raspberry Pi.
conversions to get a p-p (peak-to-peak) value It has an MQTI server and Node-RED, but
of the sensor's voltage, which translates into thus far I'm only using MQTT and Node-RED,
a p-p current flowing through the conductor. which by itself, makes this all available from
To me, monitoring energy is an essential anywhere on the Internet.
part of being able to control it. The load This part of the project will use an
sharing/shedding discussion above is missing Espressif Systems ESP-32 for its processing
so much. While it might be an effective means power and Wi-Fi. Because it's programmable
of keeping the consumption under the limit of from the Arduino IDE, the application is easy
the generation system, it's based on detecting to program and can be downloaded over the
a brownout condition of the generator, which air. The ESP-32 has enough pins to handle
isn't a good thing to start with. I'll get back to four breakers. Although it would make sense
this, but for now let's see how we could make to put all the parts I've discussed on one PCB,
use of all this. I'll prototype this using connectors to make
use of the two circuits discussed earlier.
Refer to Figure 8 for the block diagram
of this system. While 24 VDC is required for
Breaker 1 the breakers, the rest of the system runs on
Bias and current
probe interface
- 20X4 LCD
3.3 V. Using a linear regulator to get 3.3 V
would drop around 20 V across the regulator,
and even a current draw of only 100 mA would
Breaker 1 produce 2 W of wasted heat! So, I'm using a
Pulse contro l and - small switching regulator-CUI's VX07803-
state feedback 500-that comes in the familiar 3-pin Input-
Ground-Output (I-G-0) format. The ESP-32
has 16 times the flash memory of Espressif's
Breaker 2 ~
Bias and current
probe interface
- ESP8266, tons of 1/0 and built-in Bluetooth
and Wi-Fi. I'm going to skip over the MQTT
explanation-for that, you can go to issues
Breaker 2 .___. 351 and 352 of Circuit Cellar (October and
November 2019). Instead, I'll get right into
Pulse cont ro l and
some main loop code Figure 9.
state feedback
Initially, I intended to use an Internet
ESP-32 connection to use NTPCiient to get the time
Breaker 3 of day from one of the Network Time Protocol
Bias and current pools. Since this is already handled by my
probe interface Pi's MQTT server-and I have implemented

Breaker 3
Pulse control and
_f publishing this information every minute-
all projects can subscribe to the "TimeDate"
topic and get that indirectly. I use the built-in
state feedback micros() timer to count seconds, resetting to
~
zero in sync with a "TimeDate" reception (or
Breaker 4 upon reaching 59 seconds, if the reception is
Bias and current
probe interface
- missed). The sampling routine executes once
every second. This will sample four analog
channels as fast as possible for 500 ms (30 AC
Breaker 4 24 V and cycles). Note: Loop counts show that I can get
Pulse cont ro l and - 3.3 V a few thousand samples in that time frame.
state feedback power Then, there is still 500 ms to check the
breaker status, update the time, select Mode
1 to show the breaker status on the LCD and
toggle the on-board blue LED. Button inputs
FIGURES
This is a block diagram of the end system I used to monitor and control four motorized breakers. All of this are handled through interrupts and only flag
could have easily fit on one PCB. a button push. The buttons' flags are tested at
ci rcuitcellar. corn 71

the end of the main loop. However, presently Node-RED


there are no functions for these buttons. Node-RED allows the interfacing of
Thestatusofeach breaker and its measured different hardware in creative ways. The
current are published every second. And, programming is done through a browser.
since this application subscribes to the topics This means you can easily connect pieces of
nchannel 1:4," requests to turn the breakers hardware together to exchange information.
ON and OFF can come from the MQTT server. In this case, the project circuitry hardware
This means we have local control from the is connected with a browser window for
relay push buttons, and external control from real-time user I/0. Please refer again to my
any other source through the MQTT server. articles in Circuit Cellar 351 and 352 (October
Should you want to make a programming and November 2019) for a more complete
change to the ESP-32 from the Arduino IDE, discussion on MQTT and Node-RED.
choosing the circuit's lP address in the IDE's For this project, we need to display four
»PORT" selection will activate an over-the- analog values and four breaker status values. In
air (OTA) request. When this is received by addition to these, I want the user to be able to
the ESP-32, it will accept the request and control the breakers via the browser. In Node-
receive the new application. OTA progress RED, we create a »flow" from one object to
is displayed on the LCD, and if it receives another using various function blocks. The MQTT
everything correctly, the memory pointer in put function allows us to capture any"Topic"
is changed and the new application takes sent to the MQTT server. In this project we are
over as the ESP-32 is reset. Should an error interested in eight items-Analog 1:4and Digital
occur during this process, then the original 1:4. These topics consist of the board-specific
application continues to run and you may ID, esp32_ + 6-character MAC address, with
retry from the IDE. a "/" + Analog # or Digital # appended. This

connect WIFi
setup OTA
Connect MQTT

Take samples
for SOO ms state for
Ca lculate p-p each channel
for each channel Publish results
Publish results

FIGURE 9
This is a block diagram of the application code written for this circuitry. The ESP-32 has plenty of I/0 as well as built-in Bluetooth and Wi-Fi. All systems including analog inputs
operate at 3.3 V.
72 CIRCUIT CELLAR • DECEMBER 2019 #353

control. I chose to use push buttons, giving a


similar control feel as the hardware buttons
used in the project. If you remember, these
ABOUT THE AUTHOR
were used as set (ON) and reset (OFF) inputs
Jeff Bachiochi (pronounced BAH-key-AH-key) to the latching relay. This means that we
has been writing for Circuit Cellar since 1988. will need eight buttons-and ON and OFF
His background includes product design and for each of the four breakers. Each of these
manufacturing. You can reach him at: button pairs publishes to a topic with either
jeff. bachiochi@imaginethatnow.com or at: a "0" (OFF button) or "1" (ON button) as the
topic's data. However, we need to feed all
www. imaginethatnow.com. these topics to the function MQTT output
to make the connection. Anyone subscribing
to these topics will be notified when that topic
is published, due to a button push. An "ON
button" will have no effect if the breaker is
allows Node-RED's MQTI function to grab any presently ON and vice-versa.
topic beginning with esp32_DDA795/ for Let's look at what happens when a button
use in the "flow." A second function switch is pushed. Suppose the breaker 1 is OFF (LED
takes in the topics and divides them into 1 red), and you push the "Turn Breaker 1
eight outputs by using the topic's endings- ON" button. A message is published with the
Analog 1, Analog 2, Analog 3, Analog 4, Digital1 topic esp -32_D DA795/Ch an nel_l with a
and so on. payload of "1". The topic is received by the
Two different functions are used to display MQTT server, and it forwards the message
the data. The analog values are straight to any subscribers. The application running
forward-using the "gauge" function a min on the ESP-32 has subscribed to these topics,
value (0) and max value (100, the sensor's full- and so it will receive them. The topic is
scale value) are entered as the extents of the analyzed, and since it is for Channel_1 with
gauge. The gauge's pointer will be positioned a data payload of "1," a pulse is placed onto
according to the value for each channel. pin 21, the digital output pin connected to the
For the digital values, the breaker's status "set" input for breaker 1.
is shown as LEDs-green when the breaker The pulse routine configures pin 21 as an
is ON and red when the breaker is OFF. To output (driving pin 21 high), delays for 100 ms
allow these breakers to be controlled from and reconfigures pin 21 as an input (removing
the browser, we have to give the user some any drive). This pulse will set the latching relay,

FIGURE 10
This phatn demonstrates the relative
sizes of the standard circuit breaker,
the matnrized breaker and the
industrial motorized breaker with
integral current sensor. Each of these
is rated for 20 A!
ci rcuitcellar. corn 73

which puts 24 VDC on the breaker's control FIGURE 11


input. The breaker will switch noN.n The In an industrial application the low
voltage (24 VDQ power supply,
second set of latching relay contacts provides
controller and interface can coexist
feedback as a logic level of the breaker's state. with the high voltage breakers. Note
The circuit sees the breaker's status change the 6-pin interface sockets in the
on the feedback input pin 22. The topic esp- circled area where non monitored/
32_DDA795/Digital_l is published with a controlled breakers are inserted.
payload of nl.n MQTT forwards this to Node-
RED, and the calor of LED 1 is changed to green!

INDUSTRIAL SETTING
This circuitry can now be used by
OpenHAB 2-the home control application on
the Raspberry Pi. It is interesting to note that
in an industrial setting, systems using similar
hardware monitor and control buildings.
Schneider Electric's Square D products
now include complete systems that handle
this type of monitoring and control. As you
probably suspect, the costs can be extremely
high when compared to residential equipment.
Figure 10 shows size comparisons of the
standard breaker, the controlled breaker, and
the industrial monitor and control breaker.
You may have noted that the breaker I used
has a 3-wire connector. This requires an
external current sensor to monitor breaker
current (as I have implemented).
The industrial breaker has both an internal
DC motor to switch the breaker, and a current
sensor to monitor the current of the breaker.
This breaker has an integral, single, 2x3 pin
socket, which mates to a low-voltage PCB
mounted along either side of the breaker panel current draw. I hope appliance manufacturers
box. You can see this in Figure 11. Special rules will begin producing devices capable of this
must be observed when combining different right out of the box. It would also be helpful to
class wiring in an electrical box. Please refer have an output available for a request for
to National Electrical Code (NEC), NFPA 70 [1] service. This would allow for smarter decision
for the latest comprehensive regulations for making. Until installing Wi-Fi-connected
electrical wiring, over-current protection, devices becomes a standard, we'll settle for
grounding and installation of equipment. replacing wall switches and outlets around the
In an industrial environment, each piece house one by one. An expensive proposition,
of equipment commonly has its own circuit but done in stages doesn't hurt so much. Being
breaker. Monitoring and controlling breakers in smart in how we control our devices can lower
this case can make sense, since that breaker our utility bills, and this should pay off in the
has a single purpose. While our homes will often long run. Too much to do, so little time. e
have this for specific appliances such as the
furnace, stove and clothes dryer, other lower-
current devices will share a circuit. This means Additional materials from the author are available at:
turning off the breaker for your living room w-.circuitcellar.com/article-materials
lights may also turn off other devices that share Reference [1] as marked in the article can be found there.
that breaker. So, it makes sense that we monitor
and control individual devices at the device, and
not at the breaker. We saw this approach years RESOURCES
ago with X-10, and more recently with Wi-Fi- CUI I www.cui.com
connected switches and outlets. Esp ressif Systems I www.espressif.com
I tried to monitor device usage years ago
through individual breakers, and found it MQTI I www.mqtt.org
impossible to determine which devices were ON Node-RED I www.nodered.org
in any particular circuit, especially when
multiple devices were ON at the same time. openHAB I www.openhab.org
Today, we can pinpoint device status and Schneider Electric I www.se.com
74 CIRCUIT CELLAR • DECEMBER 2019 #353

PRODUO NEWS
• Compact
• Ae~ible
8-pin Device Brings 32-bit MCUs Capabilities to
Simple Applications • Simple
STMicroelectronics has announced four STM32 MCUs that are now available
in an 8-pin package, enabling simple embedded projects to leverage 32-bit
performance and flexibility in a compact and cost-effective outline. The four
new STM32GO devices deliver a combination of 8-pin economy with a 64 MHz
Arm Cortex-MO+ CPU giving 59 DMIPS, up to 8 KB RAM and 32 KB flash on-chip, governed by battery-capacity limits, eco-
and high-performing peripherals including a 2.5 MSPS ADC, high-resolution design legislation, or market expectations
timer and a high-speed SPI. such as appliance energy ratings. The new
With flexible mapping of I/0 pins and internal MCU functions, designers can 8-pin STM32GO MCUs are available now
upgrade end-product functionality without trading board real-estate or bill- in 6mm x 4.9mm SOBN, from $0.31 for
of-materials costs. The stability of the internal oscillator, which is accurate 1,000-piece orders of the STM32G030J6
to :1::1% over wide temperature and voltage ranges, also saves external clock Value line MCU.
components. Benefiting from the low-power design features of the STM32 MCU
family, the 8-pin STM32GO devices can be used in energy-conscious applications STMicroelectronics 1 www.st.com

Pre-Provisioned Solutions Provide Scalable loT Security


Microchip Technology has introduced what it claims is Microchip's Trust Platform for its CryptoAuthentication family
the industry's first pre-provisioned solution that provides enables companies of all sizes to easily implement secure
secure key storage for low-, mid- and high-volume device authentication. Microchip's Trust Platform consists of a
deployments using Microchip's ATECC608A secure element. three-tier offering, providing out-of-the-box pre-provisioned,
pre-configured or fully customizable secure
elements, allowing developers to choose the
platform best suited for their individual design.
As the first solution to provide ready-to-go secure
authentication for the mass market, the first tier-
Trust&GO-provides zero-touch pre-provisioned
secure elements with a Minimum Orderable
Quantity {MOQ) as low as 10 units.
Device credentials are pre-programmed,
shipped and locked inside the ATECC608A for
automated cloud or LoRaWAN authentication
onboarding. ln parallel, corresponding certificates
and public keys are delivered in a umanifest" file,
which is downloadable via Microchip's purchasing
e-commerce store and select distribution
partners.

Microchip Technology
www.mlcrochlp.com

Secure 240 MHz MCU Provides Wi-Fi and 43 GPIOs


Espressif Systems has announced the ESP32-S2, a truly Wi-Fi is enabled, the chip
secure, highly integrated, low-power, Wi-Fi microcontroller automatically powers on
SoC supporting Wi-Fi HT40 and having 43 GPIOs. Based on an or off the RF transceiver
Xtensa single-core 32-bit LX7 processor, it can be clocked at up only when needed, thereby
to 240 MHz. With state-of-the-art power management and RF reducing the overall power
performance, 10 capabilities and security features, ESP32-S2 consumption of the system.
is well suited for a wide variety of loT or connectivity-based ULP eo-processor with less
applications, including smart home and wearables. With an than 5 IJA idle mode and
integrated 240 MHz Xtensa core, ESP32-S2 is sufficient for 24 11A at 1% duty-cycle
building the most demanding connected devices without current consumption.
requiring external MCUs. Users can leverage Espressif's Improved Wi-Fi-connected
mature and production-ready software development and MCU-idle-mode power
framework (ESP-IDF). consumption. Engineering Samples of ESP32-S2 beta will be
ESP32-S2 supports fine-resolution power-control through a available in June 2020.
selection of clock frequency, duty cycle, Wi-Fi operating modes
and individual power control of its internal components. When Espressif Systems 1 www.espressif.com
ci rcuitcellar. corn 75

PRODUO NEWS

RK3399-Based Raspberry Pi Clone Starts at $70


FriendlyEiec offers an upgraded version of its Rockchip compact 85 x 58 mm
RK3399 based SBC, the NanoPi-M4. Called NanoPi M4V2, the board, has an on board
new $70 board is mostly identical to its predecessor, but 2.4G & SG dual-band
offers 4 GB of LPDDR4 RAM, along with two user buttons for Wifi and Bluetooth
power and recovery. While the NanoPi-M4 cost $75 in its 4 GB module, 4x USB 3.0 Type A
version ($50 for 2 GB), the new NanoPi-M4V2 with 4 GB costs host ports, 1x Gbit Ethernet
only $70. The new board adds two new user buttons-for port, lx HDMI 2.0 port, lx 3.5
power and recovery-that were not on the original NanoPi-M4. mm audio jack and 1x Type-C
Some power management features are listed in the specs port. You also get a Raspberry
of the new NanoPi M4V2 that aren't in the NanoPi M4's specs. Pi compatible 40-pin connector,
On the new board, the RK808-D power management chip dual MIPI-CSI camera interface,
in cooperation with the DC-DC converter provides support PCie x2, USB 2.0, eMMC socket and an RTC. The NanoPi M4V2
for enabling DVFS, software power-down, RTC wake-up and can be booted from either an SD card or an external eMMC
system sleep mode. Like its predecessor, the NanoPi M4V2 module.
has the same form factor as the Raspberry Pi B3+ and has
ports and interfaces that are compatible with the RPi 83+. The FrlendlyEiec I www.frlendlyarm.com

Rugged Apollo Lake SBC is Credit-Card Sized


Versalogic has announced a new SWaP-optimized Within its 55 mm x 95 mm x 27 mm package, the Harrier is
embedded SBC with ECC memory. Named "Harrier", this new well suited for space-limited applications such as in unmanned
embedded computer features the Intel's latest 5th generation vehicles, whether on land, underwater or in the air. The Harrier
Apollo Lake Atom processors with error-correcting memory. is designed and tested for full industrial temperature (-40°C
The Harrier includes a TPM 2.0 security chip, on-board power to +85°C) operation and meets MIL-STD-202H specifications
regulation, USB and Ethernet 1/0 ports and Mini PCie expansion for shock and vibration. On-board I/0 includes dual Gigabit
sockets. The soldered-on ECC Ethernet, one USB 3.0 and four
RAM enhances both the reliability USB 2.0 ports and two serial
and ruggedness of the product. ports. A SATA interface, eMMC
ECC memory is beneficial in Flash, mSATA slot and a microSD
environments where single bit socket provide a range of data
memory errors may occur due storage options. Harrier will be
to cosmic ray interactions, which available in production volumes
increase dramatically at altitude. Q1 of 2020.
The Harrier is available with up to
8 GB of ECC memory to address Versa Logic
the risk of memory errors in any www.versalogic.com
high-reliability applications.

Family of 2.5 A Buck-Boost Converters Feature Tiny Footprint


Texas Instruments (TI) has introduced a family of four high- store and authorized distributors. Pre-production samples are
efficiency, low-quiescent-current {IQ) buck-boost converters also available for the TPS63802 and TPS63810 devices. Pricing
that feature tiny packaging with minimal external components ranges from $0.98 to $1.09 {1,000s).
for a small solution size. The integrated TPS63802, TPS63805,
TPS63806 and TPS63810 DC/DC noninverting buck-boost Texas Instruments I www.ti.com
converters offer wide input and output voltage ranges that
scale to support multiple battery-driven applications, helping
engineers simplify and accelerate their designs.
Each of the devices in the family automatically selects
buck, buck-boost or boost mode according to the operating
conditions. Their complete solution size of 19.5 mm2 to
25 mm2 is a result of compact packaging, an advanced control
topology requiring few external multilayer ceramic capacitors
and tiny 0.47-I.IH inductors. The devices offer a wide 1.3-V to
5.5-V input and 1.8-V to 5.2-V output voltage range, which
helps engineers speed their designs and encourages reuse
aq:oss multiple applications. The TPS63805 and TPS63806
devices are available in production quantities through the TI
76 CIRCUIT CELLAR • DECEMBER 2019 #353

PRODUO NEWS

MCU Development Solution Targets Industrial Network Designs


Renesas Electronics has announced its RX72M Industrial an evaluation board, an operating system, middleware, and
Network Solution, designed to accelerate the development of a sample software that supports approximately 70 percent
industrial slave equipment using the RX72M Group of 32-bit of the communications protocols used in industrial network
industrial Ethernet MCUs. The new RX72M solution includes applications. This enables users to immediately launch slave
equipment development, such as motor control blocks for
Renesas RX72M Industrial Network Solution compact industrial robots, PLC {programmable logic controller}
With Major Sample Communication Protocols devices, and remote 1/0 systems.
The sample software includes: EtherCAT, PROFINET RT,
Ethernet/IP, Modbus TCP, and OPC UA, as industrial Ethernet
software, and PROFIBUS DP, Mod bus, RTU/ASCII, CAN open and
DeviceNet, as Field Bus communication software. Industrial
network protocols differ extensively between countries and
regions, and industrial network equipment deploying globally
must support a wide range of protocols. The RX72M Industrial
Network Solution will be available for customers in Japan by
December 2019 with OS, middleware, industrial networks
support from Renesas' partner companies. Global access will
be available by October 2020.

Renesas Electronics I www.renesas.com

Bluetooth LE Solar Dev Kit for loT Taps Nordic Semi's BLE SoC
Nordic Semiconductor has announced that Powerfilm, a company specializing in
custom solar solutions, employs Nordic's nRF52832 Bluetooth Low Energy (Biuetooth LE}
SoC in its "Indoor Solar Development Kit with Nordic BLE" for IoT developers, engineers
and hobbyists looking to power electronics by harvesting indoor light energy. Once
harvested, the energy is stored in a rechargeable battery or capacitor bank.
The development kit simplifies the design process for OEMs incorporating indoor
solar energy in Bluetooth LE devices, with applications including smart home, building
automation, inventory and retail management, asset tracking, and industrial monitoring.
In addition to the Nordic SoC, the plug and play kit incorporates an onboard energy
harvester/power management IC and indoor solar panels. In operation, the nRF52832
SoC automatically connects to the power when energy is available-enabling Bluetooth
LE operation of the solar-powered device-before disconnecting when the stored energy
is depleted. The nRF52832 has been engineered to minimize power consumption with
features such as the 2.4 GHz radio's 5.5 mA peak RX/TX currents and a fully-automatic
power management system that reduces power consumption by up to 80% compared
with Nordic's nRF51 Series SaCs.

Nordic Semiconductor I www.nordicsemi.com

Low Power, Secure Boot MCUs are Designed for loT Implementations
Nuvoton Technology has launched a new low power, robust (shown) and NuMaker-M263KI, are available for the MCUs.
security M261/M262/M263 series microcontrollers {MCUs} The M261/M262/M263 series is downward compatible with
designed for loT applications. It is based on an Arm Cortex-M23 Nuvoton Arm Cortex-MO MCU. The low supply voltage ranges
secure core for Armv8-M architecture, running up to 64 MHz from 1.8 V to 3.6 V and operating temperature ranges from
with 512 KB flash in dual bank mode supporting Over-The- -40°C to 105°C. The MCU series provides multiple power
Air {OTA} Firmware update and 96 KB modes for different operating scenarios,
SRAM. The MCUs' power consumption in integrating RTC with independent VBAT
the normal run is down to 45 ~A/MHz in to support low power mode. The power
DC-DC mode. It implements a secure boot consumption in normal run mode is
function and hardware crypto acceleration 97 ~A/MHz (LOO mode) and 45 iJA/MHz
to achieve high security of IoT devices. For (DC-DC mode). Standby power-down
loT connectivity and sensors, the MCU current is down to 2.8 ~A and Deep
integrates SDHC 2.0, USB 2.0 FS OTG, CAN power-down current is less than 2 IJA.
Bus 2.0B and a 3.76 MSPS ADC for sensing
data from sensor devices. Two types of Nuvoton Technology
evaluation boards, NuMaker-loT-M263 www.nuvoton.com
circuitcell~r.com 77
--

The Directory of
PRODUCTS & SERVICES
AD FORMAT:
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 adcopy@circuitcellar.com with your file.

For current rates, deadlines, and more information contact


Hugh Heinsohn at 757-525-3677 or Hugh@circuitcellar.com.

Revenue Control
Systems PnP
- Pick & Place Machines starting @ $6,250
-Direct U.S. Sales, Support, Training,
Parts, Accessories, Warranty
- PCB Fabrication Equinn..a.n...
- Makerspace Specials
- Reflow Ovens
757-258-0910
RCSPnP.com ,~~~~
78 CIRCUIT CELlAR • DECEMBER 2019 #353

Answer 1- It's obvious that when the circuit is first


powered up, the transistors are active and the battery voltage
is placed across the coil, causing its current to ramp up. What
isn't obvious is why the transistors eventually cut off.
The two transistors are wired in a configuration similar to the inductor value and the difference between the input and
a Darlington pair. (Actually, this combination of PNP and NPN output voltages, and this does vary. As the output voltage
is called a "Sziklai pair.") Together, their gain is very high rises, the off time becomes shorter and the cycle frequency
(limited somewhat by R3), but there's a clue in the relatively goes up.
high values used for Rl and R2. In particular, R2 can only sink
a limited amount of current at the base of Ql, which means Answer 3- Initially, Q3 does nothing. But once the output
that there's a limit to how much current can flow through Q2. voltage rises enough for Q3 to start conducting, it "steals"
When the current through the coil reaches this limit, the current away from the base of Q2, causing it to come out of
voltage at the collector of Q2 starts to rise, and so does the saturation at a lower value of collector current. This shortens
voltage at the base of Ql. This positive feedback quickly cuts the on time of the switching cycle and reduces the amount
off both transistors, and they stay that way while the energy of energy transferred per cycle. This becomes negative
stored in Ll is discharged via Dl into Cl. Eventually, when feedback that regulates the output voltage. Adjusting R4
Dl cuts off, Q2's collector voltage drops again, starting the modifies the output voltage.
cycle over.
Answer 4- This is straightforward to calculate, because
Answer 2- Because this circuit operates strictly in
the circuit is always operating at the border between
discontinuous mode, the power transfer is defined by the discontinuous and continuous conduction mode (DCM vs.
amount of energy stored in the inductor for each cycle, CCM). As such, the peak current in the coil and the switching
multiplied by the cycle frequency. capacitor is twice the average input current.
Note that the on time is controlled only by the input voltage, If the circuit were 100% efficient (it is not!), then the input
the inductor value and the current limit value established by power would be equal to the output power, or 2.4 W in this
the bias resistors and the transistor gains. It is independent case. The average input current would be close to 1 A, and so
of the output voltage. However, the off time is controlled by the peak current would be about 2 A.
ci rcuitcellar. corn 79

The Future of Airborne Security

Drones, Aircraft and


Cyber Attacks-
What Can Go Wrong?
here are many different types of moving vehicles that can
be considered drones. A drone is any remote controlled
or autonomous vehicle-be it an undersea submersible, a
material movement vehicle used in a factory or warehouse,
a small robotic food delivery vehicle in an urban area, or a weapon-
carrying and reconnaissance vehicle used for military and defense
purposes. All that said, when most people think of drones, they think
of smaller aircraft that can be used for aerial photography, delivery of By
packages or just simply for fun.
Many companies are researching and developing strategies to use
A/an Grau,
fleets of small flying drones to help resolve the nlast mile" delivery issue. Vice President of Io T/
UPS, Amazon, the US Postal Service, hospitals and others are exploring Embedded Solutions,
how drones can be used to deliver packages to business complexes,
retail stores and even customers and patients in their homes. Sectigo
Recently, UPS announced signing a deal with the FAA to explore how
it can use drone fleets to deliver a wide range of packages to homes
and offices. A plethora of issues need
to be resolved, including how will
these delivery and shipping services
handle the logistics of loading and
recharging/refueling these drones,
as well as ensuring that accidents
to not occur and that drones are not
intercepted and their contents stolen.
Another big issue is security.
Imagine drones being hacked and
their deliveries redirected to thieves?
Or cyber terrorists taking over
airborne drones and used them to
physically attack people, vehicles or
infrastructure? (Figure 1).
How can drone delivery system
developers and operators protect
their airborne fleet from cyber-
attack? In addition to securing the
drone delivery network management
and communication networks from
interception and misdirection, the
actual drones themselves need to be
protected.

AIRCRAFT
VULNERABILITIES
It is not just unmanned drones that
are at risk. Earlier this year, the U.S.
Department of Homeland Security FIGURE 1
Cybersecurity and Infrastructure Top: The rapidly emerging fleet of delivery drones will require protection against cyber-attack from cyber criminals
Agency (CISA) issued a security alert and cyber terrorists. Bottom: Cyber criminals and terrorists have numerous ways to attack an aircraft's control
[1] warning small aircraft owners and navigation systems-including via the infl ight entertainment systems.
80 CIRCUIT CELlAR • DECEMBER 2019 #353

have failed to broadly implement security technologies


lntemet of Secure Things Framework such as secure boot, secure communication and embedded
firewalls on their devices, leaving them vulnerable to hacking.
(I Secure Boot While OEMs have begun to address these issues, there is
much more to be done.
This includes ground-based flight and drone piloting
A~
Secure Remote Updntes systems as well as the navigation and steering systems
aboard the drones and aircraft. It is also critical to protect
the various components that go into drone management and
((c >)) Secure Communicat ion hardware systems. This means ensuring that assemblies,
sub-assemblies and other components that arrive at the
drone and aircraft factories have been protected against
~ Embedded F1rewall cyber-attack during their manufacturing processes, delivery
and final assembly. If a minor component infected with

0 Secure Element l ntegrat 1on


malware is integrated in a final product on the assembly line,
the results can later be catastrophic.

~ Dev1ce Identity Cert1f1cates SIX TECHNOLOGIES


Figure 2 shows six cyber security technologies that can
help ensure that aircraft and drone systems can safely and
securely operate and deliver their payloads and shipments to
the correct locations and destinations. Each are explained in
FIGURE2 more detail here:
Six components of a secure framework to protect aircraft and autonomous vehicles
from cyber-attack
• Secure Boot - Ensures the integrity of firmware running
on the device from the initial "power on" to application
execution.
• Secure Remote Updates - Validates firmware is
authentication and unmodified before permitting
about vulnerabilities that can be exploited to alter airplane installation of firmware updates. Ensures components
telemetry. The OHS CISA warning stated that "An attacker have not been modified and are authentication modules
with physical access to the aircraft could attach a device to an from the OEM.
avionic CAN (Controller Area Network) bus that could be used • Secure Communication - Protects control messages,
to inject false data, resulting in incorrect readings in avionic configuration updates and status updates sent to or from
equipment." Other reports have shown remote vulnerabilities drones, preventing hackers from even communicating
in which attackers did not require physical access. with drones.
At risk to cyberattack, the aircraft's CAN bus connects • Embedded Firewa/1 - Enforces configured filtering rules,
the various avionics systems-control, navigation, sensing, preventing communication with unauthorized devices and
monitoring, communication and entertainment systems-that blocking malicious messages.
enable modern-day aircraft to safely operate (Figure 1). This • Secure Element Integration - Enabling use of Secure
includes the aircraft's engine telemetry readings, compass Elements, including Trusted Platform Module (TPM)
and attitude data, airspeed and angle of approach-all of compliant secure elements for secure key storage.
which could be hacked to provide false readings to pilots and • Device Identity Certificates - Injection of certificates into
automated computer systems that help fly the plane. devices during manufacturing, allowing devices to be
The CISA fears that, if exploited, these vulnerabilities could authenticated when installed on a network and before
provide false readings to pilots and remotely operated aircraft, communicating with other devices in the system.
causing crashes or other air incidents. Attackers with CAN bus
access could alter engine telemetry readings, compass and Security must be approached holistically. Relying on
attitude data, altitude and airspeed measurements. secured networks and perimeter security is insufficient for
Today's drones and aircraft can have dozens of connected drones operating remotely. It is critical to enable drones with
subsystems transmitting critical telemetry and control data to an identity that can be verified and to build security features
each other. Currently, tier-one suppliers and OEMs in aviation into the drone to provide protection from cyberattacks. G

Alan Grau has 25 years of experience in telecommunications and the


embedded software marketplace. Alan joined Sectigo in May 2019 as
part of the company's acquisition of Icon Labs, a leading provider of
For detailed article references and additional resources go security software for loT and embedded devices, where he was CTO
to: -.circuitcellar.com/article-materials and eo-founder, as well as the architect of Icon Labs' award-winning
Reference [1] as marked in the article can be found there. Floodgate Firewall. He is a frequent industry speaker and blogger and
holds multiple patents related to telecommunication and security. Prior
RESOURCE to founding Icon Labs, Alan worked for AT&T Bell labs and Motorola.
Sectigo I www. secti go.com

You might also like