0% found this document useful (0 votes)
261 views84 pages

Circuit Cellar 2014.11

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

Circuit Cellar 2014.11

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

ANALOG TECHNIQUES

NOVEMBER 2014
circuitcellar.com ISSUE 292

circuit cellar
REPEAT: Analog. Still. Matters.
Analog. Still. Matters. Analog. Still. Matters.
Analog. Still. Matters. Analog. Still. Matters. Analog. Still. Matters. Analog. Still. Matters.
Analog. Still. Matters. A na lo g . S till. M atte rs. A n alo g . S till. M a tters. Analo g . S till. M a tters. A n a lo g . S till. M a tte rs . A n a lo g . S till. M a tte rs . A n a lo g . S till. M a tte rs . A n a lo g . S till. M a tte rs . A n a lo g . S till. M a tte rs . A n a lo g . S till. M a tte rs.

$ 9 . QOUS $ 1 0 . OOCAN CC Present & Future |Q&A: Designing "Little Robots" Build a Control
1 1>
Display Component |MCU-Based Ultrasonic Wayfinder |DIY BP Monitor

Power Budgeting 101 |Inductors Explained |Motor Control Solutions


Q 74470 75349 o
| Embedded Voice Sound Files The Future of Analog
Ethernet Core Modules with
High-Performance Connectivity Options

> MOD5270
147.5 MHz processor with 512KB Flash & 8MB RAM • 47 GPIO
3 UARTs • l2C • SPI
> MOD5234
147.5 MHz processor with 2MB flash & 8MB RAM • 49 GPIO ■3 UARTs
l2C • SPI • CAN • eTPU (for I/O handling, serial communications, *
motor/timing/engine control applications)
> MOD54415
250 MHz processor with 32MB flash & 64MB RAM ■42 GPIO • 8 UARTs
5 l2C • 3 SPI • 2 CAN • SSI ■8 ADC • 2 DAC • 8 PWM • 1-Wire8 interface ,
> NAN054415
250 MHz processor with 8MB flash & 64MB RAM • 30 GPIO • 8 UARTs
4 l2C ■3 SPI • 2 CAN ■SSI ■6 ADC • 2 DAC • 8 PWM • 1-Wire8 interface

S Add Ethernet connectivity to an existing product, or use it as your product's core processor

The goal: Control, configure, or monitor The method: Create and deploy applications from The result: Access device from the
a device using Ethernet your Mac or Windows PC. Get hands-on familiarity Internet or a local area network (LAN)
with the NetBurner platform by studying, building,
and modifying source code examples.

The NetBurner Ethernet Core M odu le is a device containing


everything needed for design engineers to add network control NetBurner D evelopm ent Kits are available

and to monitor a company's communications assets. For a very to customize any aspect of operation
low price point, this module solves the problem of including web pages, data filtering, or
network-enabling devices with 10/100 Ethernet, including custom network applications. The kits
those requiring digital, analog and serial control. include all the hardware and software you
need to build your embedded application.
MOD5270-100IR.........$69 (qty. 100) NNDK-MOD5270LC-KIT............ $99
MOD5234-1001R.........$99 (qty. 100) NNDK-MOD5234LC-KIT.......... $249 > For additional information please visit
MOD54415-1001R.......$89 (qty. 100) NNDK-MOD54415LC-KIT......... $129 http://www.netburner.com/kits
NAN054415-200IR...$69 (qty. 100) NNDK-NAN054415-KIT............. $99

Information and Sales | [email protected]


etBurner Web | www.netburner.com freescale
Networking in One Day! Telephone 11-800-695-6828
p i c o ’
T e c h n o lo g y

MIXED SIGNAL
OSCILLOSCOPES
4 ANALO G + 16 DIGITAL CHANNELS
RAPIDLY DEBUG COMPLEX MIXED SIGNAL DESIGNS
• USB 3.0 '4 -------------------------------
• ULTRA DEEP MEMORY
• SEGMENTED MEMORY
• RAPID TRIGGERS

INCLUDES AUTOMATIC MEASUREMENTS, SPECTRUM ANALYZER, SDK,


ADVANCED TRIGGERS, COLOR PERSISTENCE, SERIAL DECODING
(CAN, LIN, RS232, I2C, PS, FLEXRAY, SPI), MASKS, MATH CHANNELS,
ALL AS STANDARD, WITH FREE UPDATES . 5 YEAR WARRANTY

3204D MSO 3205D MSO 3206D MSO 3404D MSO 3405D MSO 3406D MSO

Channels 2 analog, 16 digital 4 analog, 16 digital

Bandwidth 60 M H z 100 M H z 200 M H z 60 M H z 100 M H z 200 M H z

Buffer m em ory 128 MS 2 5 6 MS 512 MS 128 MS 2 5 6 MS 512 MS

M ax. sampling rate 1 G S /s

Signal generator Function generator + A rb itra ry waveform generator

Digital inputs 100 M H z max. frequency, 500 M S /s max. sampling rate

Call:1.800.591.2796 www.picotech.com/pco529
2 CIRCUIT CELLAR • NOVEMBER 2014 #292

EDITOR ' S LETTER

ANALOG STILL M ATTERS


Is s u e 2 9 2 N o v e m b e r 2 0 1 4 | IS S N 1 5 2 8 -0 6 0 8

C I R C U IT C E L L A R ® (ISSN 1 5 2 8 -0 6 0 8 ) is p u b lis h e d m o n th ly by: In the first edition of Circuit Cellar magazine in 1988, founder Steve Ciarcia ran an
editorial titled "Inside the Box Still Counts." The argument was that too many engineers
C ir c u it C e lla r, Inc.
111 F o u n d e r s P laza , S u ite 300
and so-called IT professionals were regarding PCs as mere "appliances." In fact, many
E a st H a rt fo r d , C T 06108 were openly arguing that the electronics "inside the box" didn't matter. Ciarcia noted
that he'd heard a PC salesman say, "Real computer people don't want to know what's
P e rio d ic a l ra te s p a id at E a st H a rtfo r d , CT, an d a d d itio n a l o ffice s.
O n e - y e a r (12 issu es) s u b s c r ip t io n ra te U S a n d p o s s e s s io n s
inside the box and don't care."
$ 50, C a n a d a $ 65, F o re ig n / R O W $75. All s u b s c r ip tio n o rd e r s A somewhat similar argument is made today regarding analog technology. If you
p a y a b le in U S fu n d s o n ly v ia V is a , M a s te r C a rd , in te r n a tio n a
pick up the tech section of almost any newspaper, electronics magazine, or book on
p o sta l m o n e y o rd e r, o r c h e c k d ra w n on US b ank.
the subject of modern technology, you'll surely read various analyses about "our digital
S U B S C R IP T IO N S
world" of 1s and 0s. The problem, of course, is that too many of us regard digital as
"new" and analog as "old." Others see digital as high tech and analog as low tech.
C ir c u it C e lla r, P.O. B o x 4 6 2 2 5 6 , E s c o n d id o , C A 9 2 0 4 6
For this issue, we asked Columbia University electrical engineering professor Peter
E - m a il: c ir c u it c e lla r @ p c s p u b lin k .c o m
Kinget to write an essay on the state of analog technology and its relevance for current
P h o n e : 8 0 0 .2 6 9 .6 3 0 1
and future engineers. On page 80, he presents a realistic take on the state of analog and
I n t e r n e t : c ir c u itc e lla r .c o m
digital technologies. He also points to the relevance of devices like analog sensors and
A d d r e s s C h a n g e s / P r o b le m s : c ir c u itc e lla r @ p c s p u b lin k .c o m
interfaces within the quintessential "digital" systems of our day— mobile devices.
P o s t m a s t e r : S e n d a d d r e s s c h a n g e s tc Now let's turn to the rest of this issue.
C ir c u it C e lla r, P.O. B o x 4 6 2 2 5 6 , E s c o n d id o , C A 9 2 0 4 6 On page 8 we run an interview with Rome, Italy-based electronics enthusiast
Alessandro Giacomel. We're fascinated by his interest in "little robots" and we found the
A D V E R T IS IN G
projects posted on his website to be worth a closer look.
S t r a t e g ic M e d ia M a rk e tin g , Inc. Turn to page 18 for Jerry Brown's article on a microcontroller-based control display
2 M a in S tr e e t, G lo u c e s te r, M A 0 193 0 U S A
component. It's used in an innovative traffic-monitoring system.
P h o n e : 9 7 8 .2 8 1 .7 7 0 8
Interested in echolocation? Check out the article "Ultrasonic Wayfinder" (p. 26),
F a x : 9 7 8 .2 8 1 .7 7 0 6
which details a project that uses the principle of echolocation to assist visually impaired
E - m a il: c ir c u itc e lla r @ s m m a r k e tin g .u s
A d v e r t is in g ra te s an d t e r m s a v a ila b le on re q u e s t
individuals.
N e w P ro d u c ts :
On page 34, a team of university students describes its microcontroller-enabled
N e w P ro d u c ts , C ir c u it C ellar, 111 F o u n d e r s P laza , S u ite 300 optical blood pressure sensor system. The design detects volumetric changes in blood.
E a st H a rtfo r d , C T 0610 8, E-m a il: n e w p r o d u c ts @ c irc u itc e lla r .c o m Tracking power consumption and energy costs are among the most important tasks
for data center admins. On page 47, Ayse Coskun addresses the "power budgeting" issue.
H E A D O F F IC E
George Novacek covered resistors and capacitors in recent articles. This month he
C ir c u it C e lla r, Inc. 111 F o u n d e r s P la z a , S u ite 300
investigates inductors and covers the basics (p. 52).
E a st H a rt fo r d , C T 0610 8
Phone: 8 6 0 .2 8 9 .0 8 0 0
Ed Nisley has been upgrading a sewing machine with speed control, lighting, and
needle positioning. On page 58 he describes how he converted the foot pedal and more.
CO VER PHO TO G R APH Y If you found Jeff Bachiochi's October article on embedded voice recognition useful,
C h r is R a k o cz y , w w w .ra k o c z y p h o to .c o m
you're in for a treat. This month he explains how to add and access sound files (p. 66).
Lastly, be sure to check out the top eight winning projects from the WIZnet Connect
C O P Y R I G H T N O T IC E the Magic 2014 Design Challenge on page 68. Congratulations to all the winners!
E n tir e c o n te n ts c o p y rig h t © 2014 by C ir c u it C e lla r, Inc. All
r ig h t s re s e r v e d . C ir c u it C e lla r is a r e g is te re d tr a d e m a r k of
C ir c u it C e lla r, Inc. R e p ro d u c tio n o f th is p u b lic a tio n in w h o le C. J. Abate
o r in p a r t w it h o u t w r itte n c o n s e n t f r o m C ir c u it C e lla r, Inc. is
p ro h ib ite d . cabate@ circuitcellar.com

D IS C L A IM E R

C ir c u it C e lla r ® m a k e s no w a r r a n t ie s an d a s s u m e s no
r e s p o n s ib ilit y o r lia b ility o f a n y k in d f o r e r r o r s in th e se THE TEAM
p r o g r a m s o r s c h e m a tic s o r f o r th e c o n s e q u e n c e s o f any
s u c h e r ro r s . F u r th e r m o r e , b e c a u s e o f p o s s ib le v a r ia tio n ir
th e q u a lity a n d c o n d itio n o f m a t e r ia ls an d w o r k m a n s h ip o f
E D IT O R -IN -C H IE F (Green Co m p uting ), Bob FO U N D ER
r e a d e r -a s s e m b le d p ro je c ts , C ir c u it C e lla r ® d is c la im s a n y
r e s p o n s ib ility f o r th e s a fe an d p ro p e r f u n c tio n o f re a d e r-
C. J. A bate Japen ga (Em bedded Steve C iarcia
a s s e m b le d p ro je c t s b a se d u p o n o r f ro m p la n s, d e s c rip tio n s , o r
in fo r m a tio n p u b lis h e d by C ir c u it C e lla r® . A R T D IR ECTO R in Thin Slices), R ob ert PR O JE C T ED ITO RS

T h e in fo r m a tio n p ro v id e d by C ir c u it C e lla r ® is f o r e d u c a tio n a l


KC Pre sco tt Lacoste (The D arker C h ris Co ulsto n, Ken
p u rp o s e s . C ir c u it C e lla r ® m a k e s no c la im s o r w a r r a n t s th a t
Side), Ed N isley (Above D avidson, and David
re a d e r s h av e a rig h t to b u ild th in g s b a se d up o n th e s e id e a s A D V E R T IS IN G C O O RD IN ATO R
u n d e r p a te n t o r o t h e r re le v a n t in te lle c tu a l p r o p e r t y la w in
Kim H opkins the G round Plance), Tweed
t h e ir ju r is d ic t io n , o r th a t r e a d e r s h a v e a rig h t to c o n s tr u c t o r
o p e ra te a n y o f th e d e v ic e s d e s c rib e d h e re in u n d e r th e re le v a n t G eorge N ovacek (The
p a te n t o r o th e r in te lle c tu a l p r o p e r ty la w o f th e re a d e r 's P R E S ID E N T CU ST O M ER SERVICE
C o nsum m a te Engineer), D ebbie Lavoie
ju r is d ic t io n . T h e re a d e r a s s u m e s a n y ris k o f in fr in g e m e n t
Hugo Van haecke
lia b ilit y f o r c o n s tr u c t in g o r o p e ra tin g s u c h d e v ice s .
and Colin O 'Flynn
© C ir c u it C e lla r 2014 P rin te d in th e U n ite d S ta te s C O LU M N IS T S (P ro g ra m m a b le Logic in
Je ff Bachiochi (From the Practice)
Bench), A yse K. Coskun
circu itc el lar .c om 3

OUR NETWORK

circuit cellar ^WTflxpress V O ÍCE H| COIL


O

SUPPORTING COMPANIES

2015 International CES C3 Ironwood Electronics 78

Accutrace 7 Lemos International Co., Inc. 25

All Electronics Corp. 78 MaxBotix, Inc. 79

AP Circuits 31 Measurement Computing Corp. 23

CadSoft Com puter GmbH 49 Messe München GmbH 11

Custom Computer Services 78 Micro Digital, Inc. 37

Elektor 32, 33 m icroEngineering Labs 79

Elektor 56, 57 Mouser Electronics, Inc. 15

Elektor 63 MyRO Electronic Control Devices, Inc. 78

EMAC, Inc. 55 NetBurner, Inc. C2

ExpressPCB 39 Oscium 51

Front Panel Express 55 Pico Technology, Ltd. 1

Humandata, Ltd. 78 Saelig Co., Inc. 31

IAR Systems 61 Technologic System s 13, 41

Im agineering, Inc. C4 Triangle Research International, Inc. 79

NOT A SUPPORTING COMPANY YET?

Contact Peter Wostrel (circuitcellar@ sm m arketing.us, Phone 978.281.7708, Fax 978.281.7706)


to reserve your own space for the next edition of our m em bers' magazine.
4 CIRCUIT CELLAR • NOVEMBER 2014 #292

CONTENTS

circuit cellar

NOVEMBER 2014 • ISSUE 292

ANALOG
TECHNIQUES

CONTROL DISPLAY COMPONENT DESIGN

CC COMMUNITY FEATURES
06 : CC WORLD 18 : MCU-Based Control Display Component
By Je rry Brown
08 : QUESTIONS & ANSWERS A DIY microcontroller-based CDC for a traffic-
Robotics & Intelligent Gaming monitoring system
An Interview with Allesandro Giacomel
A Rome, Italy-based roboticist and blogger on his 26 : Ultrasonic Wayfinder
"little robotics" projects, DIY games, and more Echolocation for the Visually Impaired
By Shane Soh & Eileen Liu
The wayfinder system comprises a head-mounted
INDUSTRY & ENTERPRISE navigation unit and a hand-mounted tactile sensor
16 : PRODUCT NEWS
34 : The Pressure Is On
17 : CLIENT PROFILE Microcontroller-Based Blood Pressure Monitoring
EMAC, Inc. (Carbondale, IL) By Randy Song & Alexander Ngai
Use a microcontroller and optical sensors to detect
volumetric changes in blood

COLUMNS
46 : GREEN COMPUTING
Budgeting Power in Data Centers
By Ayse Coskun
An analysis of the power budgeting problem facing data
centers

52 : THE CONSUMMATE ENGINEER


Inductors 101
By George Novacek
SM ALL ROBOTICS AND INNOVATIVE DESIGNS A look at common inductors and their uses
circu itc el lar .c om 5

CONTENTS

THE ULTRASONIC W AYFINDER SYSTEM TOP PROJECTS FROM THE W IZNET IoT DESIGN CHALLENGE

58 : ABOVE THE GROUND PLANE TESTS & CHALLENGES


Universal Motor Control Vs. Transistor SOA
By Ed Nisley 42 : WIZnet Connect the Magic 2014 Design
A DIY sewing machine upgrade, as well as a look at Challenge Winners
the limits of transistor SOA graphs
74 : CROSSWORD
66 : FROM THE BENCH
Embedded Voice Recognition (Part 2) 75 : TEST YOUR EQ
Add and Access Sound Files
By J e ff Bachiochi
How to add and access sound files with your Easy VR TECH THE FUTURE
module for embedded voice recognition 80 : The World Is Analog
By Peter Kinget
Why analog technology still matters

BLOOD PRESSURE M ONITORING SYSTEM


AN ARDUINO UNO BOARD CONVERTS THE ANALOG SIGNAL FROM @editor_cc n
A FOOT PEDAL INTO A VARIABLE-FREQUENCY PULSE TRAIN @circuitcellar circuitcellar
6 CIRCUIT CELLAR • NOVEMBER 2014 #292

CC WORLD

CIARCIA MAKES DEAL FOR CC,


AX, LIS, & VC
By CC S taff (US)

Circuit Cellar's founder Steve Ciarcia finalized a deal in


October 2014 to purchase C ircu it Cellar, audioXpress, Voice
Coil, Loudspeaker In d u stry Sourcebook, and their respective
w ebsites, new sletters, and
products from Netherlands-
based Elektor International
Media. The deal marked the sta rt
of a new era for C ircu it Cellar
and the aform entioned audio
publications. The m agazines
and products w ill be managed
by Ciarcia's US-based team.
COM M UNITY

S te v e C ia rc ia s p e a k in g to th e s ta ff ir A fte r gaining international


S e p te m b e r 2 01 2
recognition for w riting BYTE
m agazine's "C iarcia's Circuit
Cellar" colum n, Ciarcia launched C ircuit Cellar m agazine in
1988. Since then, he has published hundreds of a rticle s and
ed itorials in the magazine.

CIRCUIT CELLAR RELAUNCHES


WEEKLY NEWSLETTER
By CC S taff (US)
Circuit Cellar recently updated its w eekly new sletter by
sim p lifyin g its navigation and im plem enting a m ore modern
layout. It's free to join the m ailing list.
As for the content, each w eek C ircuit Cellar delivers
you need-to-know announcem ents, high-quality electrical
engineering tips, engineer interview s, in du stry news, product
deals, and much more.

CIRCUIT CELLAR NEWSLETTER

Act now! Sign up fo r the new-and-improved weekly


Circuit Cellar Newsletter, It's free!

Go to: CircuitCellar.com/circuit-cellar-newsletter-subscribe/

You'll receive popular articles, blog posts, product news,


and deals via e-mail to your inbox on a regular basis.

I f you're looking for essential electrical engineering-


related information, we've got you covered: embed­
ded development, programmable logic, robotics, wire­
less communications, analog techniques, measure­
ment & sensors, Internet & connectivity, and embedded
programming!
PRINTED CIRCUIT BOARDS

THINK YOU CAN FIND PCB PRICES THAT BEAT QUR5P

WE DARE YOU.
-_r BEST W fc?
OUR GUARANTEE:
We are so confident in our PCB pricing,
PCB PRICES
we dare you to find lower prices!
IN THE
“ INDUSTRY v If you do, we will match the price AND
give you $100 towards your next order!

■- ----------------

Visit us at www.PCB4u.com
and see why our pricing can not be beaten!
* From sam e day quick turn prototype to
production in under 10 days
* Full CAD a n d C A M review plus design rule check
on ALL G erber files
* Materials: Fr4, Rigid, Flexr M eta l Core (Aluminum),
Polym idet Rogers, Isola, etc.
* HD I Capabilities: Blind/Buried Mocrovias,
10+N+10, Via-ln-Pad Technology,Sequential
Lamination, Any Layer, etc,
* Our HD I Advantage: Direct Laser Drilling, Plasm a
D e -S m e ar Technology, Laser M icro via
Conductive Plate Shut, etc.

www.PCB4u.com ■ [email protected] *
8 CIRCUIT CELLAR • NOVEMBER 2014 #292

QUESTIONS & ANSWERS

Robotics & Intelligent


Gaming
An Interview with Alessandro Giacomel
When Alessandro Giacomel discovered Arduino in 2009, he quickly became
hooked. Since then, he's been designing "little robots" around Ardunio and
blogging about his work and findings. In this interview, Alessandro tells us
about his most interesting projects and shares his thoughts on the future of
robotics, 3-D printing, and m o re — Circuit Cellar Staff
COM M UNITY

CIRCUIT CELLAR: How long have you been The design included m odified servom otors
designing embedded systems and what that can rotate 360° moving the robot and
sparked your interest? connected to the wheels and a servom otor to
move a little head where there is an ultrasonic
ALESSANDRO: I have been designing embedded distance sensor. The distance sensor lets you
system s for about five years. My interest arose know when the robot is in front of an obstacle
from the possibility of building robots. When I and helps you decide the most convenient way
was a kid, I found robots extrem ely fascinating. for the robot to escape.
The ability to force m atter to do som ething we In its sim plicity, this robot enables one to
decided always seemed to be one of the main understand the basics for the developm ent
goals conceded to man. of a m icrocontroller-based robot: the need to
have separate power supplies for the m otors'
CIRCUIT CELLAR: Tell us about your first power circuits and for the m icrocontroller's
design. logic, the need to have precise sensor reading
tim ing, and the im portance of having efficient
ALESSANDRO: My first em bedded system was algorithm s to ensure that the robot moves in
an Arduino 2009. The availability of a huge the desired mode.
shield, sensors, and actuators has enabled me My first robot took me a long tim e to build.
to design many applications at an acceptable But all the elements of the robot (hardware and
price for an am ateur like me. software) were developed by me and this was
I started like many people, w ith a robot im portant because it let me begin to face the
on wheels moving around avoiding obstacles. real problem s that arise when you are building
It's a standard robot that alm ost all beginners a robot. Today there are many resources on
build. It's sim ple because it is built with only a the Internet that enable one to build a robot
few com ponents and a standard Arduino 2009. sim ply replicating a set of steps anyone has
described. These guides should be used as a
source of inspiration, never followed exactly
step-by-step, otherw ise—while in the end it is
true that you can build a robot—you don't own
the knowledge of what has been done.
My robot evolved with the a b ility to speak,
thanks to a sound module. When I build a
robot the goal is always to experim ent with a
technology and to have fun. My frien ds have
enjoyed seeing the robot turning around,
speaking, and telling funny stories.

CIRCUIT CELLAR: Your blog, Robottini (http://


robottini.altervista.org), is described as
"little robots with Arduino." What inspired
A le s s a n d r o 's f ir s t ro b o t you to begin the blog?
circu itc el lar .c om 9

QUESTIONS & ANSWERS

ALESSANDRO: I stron gly believe in sharing


knowledge and open-source hardw are and
softw are. I thought it was norm al to try to
share what I was designing when I started to
build robots. When I started, I had the benefit
of what others had made and published on the
Internet. I thought about w riting a blog in my
language, Italian, but I thought also it would
be a good exercise for me to try to w rite in
English and, m ost im portantly, this enabled
me to reach a much w ider audience.
The site description includes the philosophy
at the basis of the blog: sm all robots built using
Arduino. I build sm all robots because I'm an
am ateur and my house isn't very big, so I only
build robots that I can put in an arm oire. I
use Arduino because it is a m icrocontroller
developed in Italy, it was obvious for me to
use it, and it is really a great board for a

COM M UNITY
beginner— inexpensive and robust.
The community has developed thousands
of applications that can be reused. When I
started the blog in 2011, I was building small
robots for a few years. In the beginning, finding
information was much more complicated and
there were few shields that were not cheap.
So, I always tried to use "poor" materials (e.g.,
A le s s a n d r o 's f ir s t ro b o t a t th e A r d u m c
recovered or recycled). Decreasing the cost of Initially, I built robots to understand how
D ay 2011 event
implementation and reusing and imagining new the driver for the m otors w orks, the sensors,
purposes for the things already available in a and the problem s related to the logic of the
normal house seemed like a good way to work. robot. A fterw ard, the first branch of research
My achievem ents docum ented in the blog was the issue of control, how to set the
are never step-by-step guides to build the proportional, integral, derivative (PID) control
robot. I include a list of com ponents to buy, to follow a line or make a robot that is in
the source code, and som etim es the w iring balance. This has enabled me to address the
diagram . But I never provide a complete m anagem ent of com plex sensors, such as the
guide, since I think everyone should try to inertial m easurem ent unit (IMU).
build their own robot because, once built, the To have a robot balance on two w heels it
satisfaction is enormous. is im portan t to m easure how much the robot
Through my blog I am available to help is tilting from the vertical. To do this, typically
with problem s people encounter when they a cluster of sensors is used, called IMU,
are building robots, but I think it is im portant w hich are based on m ulti-axes com binations
to give people the tools to build, rather than of precision gyroscopes, accelerom eters,
providing detailed explanations. Everyone
can learn only by fighting the difficulties,
w ithout having som eone preparing everything
perfectly.

CIRCUIT CELLAR: Robottini obviously


includes quite a few robotics projects. Why
did you build them? Do you have a favorite?

ALESSANDRO: Many tim es people ask me


what is the meaning of the robots I build. The
answer that I give them leaves people puzzled.
The answ er is this: My robots are useless.
They are useful only as fun— as a passion.
I'm happy when I see my little son, Stefano,
who is three years old, watching and laughing
at a robot turning around in our house. But
this does not mean I don't follow a branch of
research when I build robots. A r d u in o a n d IM U c ir c u it
10 CIRCUIT CELLAR • NOVEMBER 2014 #292

QUESTIONS & ANSWERS

My firs t experim ent is the Dadaist Poetry


Box, which is a box capable of composing
and printing Dadaist poems. It's made with
an Arduino and uses a printer for receipts to
w rite poems. The box uses an algorithm to
compose the poems in autonomy. You push
the button and here is your Dadaist poem.
Norm ally, the poem is a valuable asset, the
result of an intim ate m om ent when the poet
transposes on paper the em otions of his soul.
It is an inspired act, an act of concentration
and transport. It's not im m ediate. The poem
box instead is trivial, it seem s alm ost "an ti­
poem." But it's not; it's a Dadaist poem. A
user can push the button and have an original
poem. I like the m achine because it gives
everyone som ething m aterial to take home.
In this way, the experience of interaction with
the machine goes beyond the moment.
COM M UNITY

Another of my favorite robots is one that


is capable of draw ing portraits. I've never
been good at draw ing, and I've always been
envious of those who can easily use a pencil to
make a portrait. So I tried using my technical
Com ining technology and art in a
m agnetom eters, and pressure sensors. skills to fill this gap.
poetry box design
In a m ore sim ple version, the IMU uses an The search of the algorithm t h a t -
accelerom eter and a gyroscope, and it is starting from a picture— is able to detect the
m andatory to use both signals to obtain a most im portant lines of the face has been
correct value of the tilt angle from the vertical particularly long and difficult. I used the
(it is called fusion of signals). OpenCV open-source libraries for com puter
The most common method used is based vision and im age processing, which are very
on the Kalman filter, which is a mathematical pow erful, but hard to handle. Installing the
tool that enables you to combine two or more libraries is not a sim ple undertaking and
signals to obtain the value of the angle. But it is a using them is even m ore com plicated. I
highly sophisticated and difficult for an amateur used the OpenCV for Processing. Processing
to understand, and it requires fairly advanced is an open-source program m ing language
knowledge of mathematics. A new method that and integrated developm ent environm ent
is rather simple has been proposed in the last (IDE) built for the electronic arts, new media
years. It is called the "com plem entary filter." art, and visual design com m unities with the
One of the studies I perform ed and posted purpose of teaching the fundam entals of
on my blog com pares in practice the signals of com puter program m ing in a visual context.
the two filters to v erify if the com plem entary The algorithm in itially found facial lines
filter is able to approxim ate the Kalman filter using the algorithm s for calculation of edges
in typical situations coming up in robotics. of a picture. So I used the Canny edge detector,
This post has had a great follow ing, and I've the Sobel edge detector, and all the other main
been surprised to see that several university- edge detection algorithm s, but none of these
level scientific publications have linked to it. proved to be adequate to draw a face. Then
I only w rote the post because I was curious I changed the course and used the Laplacian
to see a sim ple and alm ost trivial method filter with threshold. I think I reached a good
that has become helpful to researchers and result because it takes less than 10 minutes
hobbyists. It has been a pleasure for me. to draw a portrait, which enables me to take
In the last year, I have followed the trend of pictures of people and make their portrait
art and interaction (i.e., the possibility of building before they lose their patience.
something that can somehow m arry art with
technology). It was the theme of the stall I had CIRCUIT CELLAR: According to your blog,
at Maker Faire Europe in Rome, Italy, in October you began studying robots at the University
2013. Arduino is an electronic circuit without a of Padua. What types of robots did you work
heart and without a soul. Can an Arduino be an on while you were at school?
artist? I'm trying to do something with Arduino
that could be "art." The arts include painting, ALESSANDRO: I attended the U niversity of
poetry, music, sculpture, and so on. I'm trying Padua, which is in the north of Italy, more
to do something in different fields of art. than 20 years ago. I was one of the first
Mette München
Intemationel

Connecting Global Competence

Welcome to Planet e.
The entire em bedded universe at a single location!

2 6 th In te rn a tio n a l Trade Fair fo r

. electrónica
E lectronic C o m p o n e n ts , Systems
and A p p lic a tio n s 2014
M esse M ü n ch e n
N o ve m b e r 11-14, 2014 inside tomorrow
w w w . ele c tro n ic a .d e
12 CIRCUIT CELLAR • NOVEMBER 2014 #292

QUESTIONS & ANSWERS

students who chose the specialization in


"m echatronics." (That was the word for
robotics at that time.) We worked with large
and heavy robots. In particular, I had been
practicing with an ABB RB2000 six degrees
of freedom (6DoF), an industrial robot that
weighed 500 kg and had 0.1-m m accuracy.
This was a w onderful robot that cost
hundreds of thousands of dollars, with a
program m ing tool not w ithin the reach of a
hobbyist. I had to study hard to be able to
make it move on w ell-defined trajectories. At
the tim e, robotics seemed a thing of science
fiction. They w ere still the years when neural
netw orks and fuzzy logic were studied and
applied to robotics, and it seemed that robots
would soon invade the world.
In conversations with the other students,
we im agined a world with a robot in every
COM M UNITY

home, doing hundreds of different jobs. Now


we know the situation is different, but we
were young and full of dream s. At the time,
the main difficulty was sharing knowledge.
In fact the Internet was just born and the
Mosaic brow ser was not easy to make it
work. The e-m ail and bulletin boards were
the only "so cia l" tools and I still rem em ber
that outside of my student friends, my other
friends and people I knew did not have email,
so I did not know who to send an e-m ail to!
My final work at the university was on a robot
working with compressed air. It used valves
and air pistons to move. Unfortunately, the air
had a chaotic behavior and its movement was
very difficult to model, so controlling the robot
and performing precise movements was almost
impossible. In fact, in the years following,
robots running on compressed air have been
abandoned in favor of electric motors.

CIRCUIT CELLAR: What was the last


electronics engineering-related product you
purchased and what did you do with it?

ALESSANDRO: I'm very interested in sm art


servom otors, such as Robotis's Dynamixel
or Dongbu's HerkuleX. Having low-cost
servom otors that have an internal Atmel
ATmega m icrocontroller—the sam e as the
Arduino— offers new possibilities and potential
for robot manufacturers. These sm art servos
enable you to set a multitude of param eters
to match different needs. For example, it is
possible to use one or two w ires to m onitor the
tem perature, set the torque, set the acceleration
and deceleration curves, and create a daisy
chain of several hundred servom otors. These
servom otors can be program m ed and run
controlling the position or the speed, operating
at a very large range (300°), and offering a
whole series of possibilities that are im possible
with normal RC servos.
DESIGN YOUR SOLUTION TODAY

71
Technologic
Systems CALL 480-837-5200

www.embeddedARM.com

Pricing
starts at
$99
Q t y 100

$134
Qty 1

Pricing starts at
(Shown with all options)
s i 5 9 $203
1 GHz Single or Quad Core Cortex A9 ARM CPU Qty 100 Qty 1

Up to 2 GB DDR3 RAM and 4 GB eMMC Flash


F e a tu re s:
Wireless 802.11 b /g /n and Bluetooth 4.0
- 454 MHz ARM CPU Wireless 802.11b/g/n
1x G igabit Ethernet, 1x PCI Express Bus
■ 128 or 256 MB RAM Bluetooth 4.0+EDR
1x mSD slot, 1x SATA II, 1x USB Host, 1x USB OTG
70x DIO, 4x I2C, 1x I2S, 2x SPI, 2x CAN ■ 2 GB Flash Storage Wireless 802.11b/g/n

-40 °C to 85 °C Industrial Tem perature Range ■ 1x microSD Socket 24 VAC or 8-24 VDC Power
Runs Linux 3.10, Debian, U buntu, Yocto, QT, OpenGL ■ 2x 10/100 Ethernet DIO, CAN, M odbus, Relays
Coming Soon: QNX, A ndroid and W indow s Support
B e n e fits :

Com puter-on-M odules ■ Low pow er and low cost industrial grade SBC
State of the Art Embedded Design ■ Rugged 24-Pin screw term inal connector

& TS-4740: High Capacity FPGA and G igabit Ethernet ■ Flexible pow er inputs including AC and DC
TS-4600: 450 MHz lo w cost w / 2 Ethernets
TS-4710: Up to 1 GHz PXA168 w / video ■ Wireless data aquisition via WiFi and Bluetooth

TS-4720: Like TS-4710 + 2 GB eMMC Flash & 2 Ethernets ■ 30 V to leran t DIO, analog IO, 3 A relays, and more
TS-4200: Atm el ARM9 w / super lo w power Also Available:
TS-4800: 800 MHz FreeScale iMX515 w / video TS-7670 Low Power SBC with GPS Radio & Cell Modem

We've never Embedded Support every Unique em bedded


discontinued a systems that step of the way solutions add
product in 30 are built to with open value for our
years endure source vision customers

www.embeddedARM.com
14 CIRCUIT CELLAR • NOVEMBER 2014 #292

QUESTIONS & ANSWERS

Program m ing these servos is more the long term. Instead, building a robot or a
com plicated than standard servom otors. In machine capable of interacting with a person
fact, each bit has a sp ecific m eaning. I wrote has a very different impact. It enables people
som e lib ra rie s for A rduino to m anage these not only to watch, but to experience. Added to
servos. This enables one to deal with low- this, there is the playful side, which enables
level program m ing, w here it is necessary one to deal with the technology without fear,
to evaluate the checksum for exam ple, breaking down the walls of suspicion that a
and, according to the conventions used, set person with no technical skills has. Sim plicity
the byte with the big-Endian or the little- is the other key to successfully interact with
Endian convention. This is an unusual way to people. The games and the robots must be
program w orking with Arduino, w here these easy to understand and relate to people in the
com plexities are masked by the IDE, but way they are accustomed. That's why these
the interaction w ith the low-level hardw are m achines w ill have the ability to speak—thanks
enables a better understanding of how the to an MP3 chip and 4D Systems's SOMO-14D
m icro co ntro lle rs work. embedded audio sound module—and will be
I'm w orking w ith new sensors, such as equipped with an LCD and LEDs.
Freescale Sem iconductor's MPR121QR2.
The MPR121 is a capacitive-touch sensor CIRCUIT CELLAR: What new technologies
controller driven by an I2C interface. The chip excite you and why?
COM M UNITY

can control up to 12 individual electrodes,


as well as a sim ulated 13th electrode. The ALESSANDRO: I w ork alm ost strictly with
MPR121 also features eight LED -driving pins. Arduino m icrocontrollers. I was excited with the
I am tryin g to use this chip to make m usical arrival of Linux-em bedded m ini-PCs (e.g., the
instrum ents. Sim ply by creating a circuit Raspberry PI, the pcDuino, and BeagleBoard.
and moving the hands over the circu it it is org's BeagleBone Black). Forcibly, I'm very
possible to generate the notes. I am w orking intrigued by the new Arduino Tre, which is
in pa rticu la r with an electronic m usician a m ini-PC with Linux joined with an Arduino
who is helping me through his m usical Leonardo. Combining a PC's processing power
experience. The ab ility to w ork w ith people of with Linux with the real-tim e managem ent
w ith sk ills different from mine is one of the of the sensors and actuators made by an
m ost exciting things about this hobby. Arduino is an interesting road. It offers the
possibility to manage the real-tim e processing
CIRCUIT CELLAR: Are you currently working of video stream s through, for example, the
on or planning any projects? OpenCV libraries, with the option of acquiring
signals from analog sensors and the possibility
ALESSANDRO: This year I found a new line of of drive motors. For exam ple, this enables one
design leveraging on interaction. In particular, to have a com pletely autonom ous 3-D printer
I'm working on interactive games, where the and to perform the slicing and m anagem ent
mind is the protagonist. More specifically, I of the 3-D printer. It also opens up new
am using NeuroSky MindWave Education to perspectives in the robotics and computer
develop some sim ple games. It's a helmet vision. The main lim itation, which is now
that can read brain waves and com m unicate present in embedded system s, is the limited
via Bluetooth with an Arduino driving some processing capacity. The ability to have in the
motors. The helmet can read the attention sam e card a Linux system — with the world of
and m editation. Taking advantage of these applications and drivers already available—
signals, I'm creating some games in which two linked to the ability to manage physical devices
people challenge each other to "think" with brings a revolution. And I'm already excited to
more intensity. I'm going to take the games see the next results.
to the Maker Faire Europe, and I'm sure people
will have a lot of fun playing in this new and CIRCUIT CELLAR: What do you consider to be
original way. the "next big thing" in the industry?
The other "intelligent" games I'm making
are different and—from technical point of ALESSANDRO: The new "next big thing" will
view — more challenging. I'm designing a be the mass 3-D printing. Companies such
robotic arm that uses sm art servos playing Autodesk or Hewlett-Packard are already
chess against a human and a Connect Four interested. I think certainly in the next few
game where you can challenge an Arduino. years there will be a 3-D printer in every home.
The em phasis is always on the interaction. The other major thing I hope will be our old
Building a robot moving and making a demo friend, the robot. The new cards Linux +
is certainly nice, but it leaves the viewer m icrocontroller will open the way for new
outside the experience and a bit indifferent. It applications, original and powerful. I will
am azes the view er at the moment, but not in definitely be there! £
mouser.com
The N ew est P rod ucts for Your New est Designs

HFTIflfEST

ÍPisrftjT

More new products


More new technologies
More added every day

Authorized distributor of sem iconductors


and electronic com ponents for design engineers.
MOUSER
ELE C TR O N IC S .

M o u se r a nd M o u s e r E le ctro n ics a re re g istere d tra d e m a rk s o f M o u s e r E le ctron ics, Inc. O th e r p ro d u c ts , logos, a nd c o m p a n y n am es m e n tio n e d herein, m ay be tra d e m a rk s o f th e ir re sp e ctive o w ners.
16 CIRCUIT CELLAR • NOVEMBER 2014 #292

PRODUCT NEWS

ENCAPSULATED 60-W AC-DC POWER SU PPLIES


XP Pow er re ce n tly announced p o p u la r no m inal o utput
the ECE60 series of s in g le ­ v o lta g e s fro m 3.3 to 48
o u tpu t encap su la te d 60-W AC- VDC.
DC pow er su p p lie s. The ECE60— • The ECE60 m eets EMC
w hich is a v a ila b le in e ith e r PCB s p e c ific a tio n EN55022 for
m ount, c h a ss is m ounted w ith cla ss B conducted and
screw te rm in a ls , or in a DIN rail ra d ia ted e m issio n s.
m ount c o n fig u ra tio n — is intended • The su p p ly o p e ra tes from
fo r a p p lic a tio n s re q u irin g a -2 5 ° to 70°C w ith no
slim p ro file , low no-load pow er d e ra tin g until 50°C.
co n su m p tio n , and a h ig h -p o w e r • Class II co n stru c tio n
density. m eans no Earth or Ground
Features include: c o n n ectio n is requ ired.
• The ECE60 se rie s p a rts
• The PC B -m ounted model com e w ith th re e -y e a r
m e a su res 91.4 x 38.1 x w a rra n ty.
& ENTERPRISE

28.0 m m and has a pow er


d e n sity of g re a te r than 10 X P Pow er
W per cu b ic inch. w w w .x p p o w e r.co m
• The range co m p rise s eight
m odels p ro v id in g all the
INDUSTRY

W AVESURFER 3 0 0 0 OSCILLOSCOPES
FEATURING MAUI UI
Teledyne LeCroy re ce n tly in tro d u ce d the W aveSurfer
3000 se rie s of o sc illo sc o p e s fe a tu rin g the MAUI advanced
u ser in te rfa ce . The user in te rfa c e , w hich w as p re v io u sly
a v a ila b le only on high e r-e n d o sc illo sc o p e s, in te g ra te s
a deep m e a su re m e n t to o lse t and m u lti-in s tru m e n t
c a p a b ilitie s.
The o sc illo sc o p e 's fe a tu re s include:

• A 10.1" touch screen


• A v a rie ty of m u lti-in s tru m e n t c a p a b ilitie s includ in g
w ave form g e n e ra tio n w ith a b u ilt-in fu n ctio n
ge nerato r, pro to co l a n a ly s is w ith s e ria l data
t rig g e r and decode, and lo g ic a n a ly s is w ith an
a v a ila b le 16 -ch a n n e l, m ix e d -sig n a l option
• A fa s t w ave form update rate of 130,000 w ave form s The W aveS u rfer 3000 is a v a ila b le in fo u r d iffe re n t
per second w ith H isto ry m ode w a ve fo rm pla yba ck m od els ran g in g fro m 200 MHz, tw o channel to 500 MHz,
and W aveScan se a rch and find to u r channel w ith p rice s ranging fro m $3,200 to $6,950.

The MAUI advanced user in te rfa c e puts the o scillo sco p e 's T e le d y n e Le C ro y
pow er and fu n c tio n a lity at y o u r fin g e rtip s . E a sy-to -u se te le d y n e le cro y .c o m
to u ch scre e n co n tro ls enab le you to p o sitio n and zoom
w ave form s, move c u rso rs, co n fig u re m e a su re m e n ts, and
in te ra c t w ith re su lts.

STATEMENT REQUIRED BY THE ACT OF AUG U ST 12, 1970, TITLE 39, UNITED STATES CODE SHOWING THE OWNERSHIP, MANAGEMENT AND CIRCULATION OF CIRCUIT CELLAR, THE MAGAZINE FOR COMPUTER APPLICATIONS.
Published m on thly at 111 Founders Plaza, Suite 300, East Hartford, CT 06108. Annual sub scrip tio n p rice is $50.00. Publisher: Hugo Van haecke. The ow ner is C irc u it Cellar, Inc., East Hartford, CT 06108. The nam es anc
addresses of stockholders holding one percent o r m ore of the total am o unt of stock are: Elektor International Media, LLC, 111 Founders Plaza, Suite 300, East Hartford, CT 06108. EXTENT AN D NATURE O F CIRCULATION:
A verag e n u m b e r o f cop ies o f each issue p ublished d u rin g the p re ced ing tw elve m onths; (A) total n u m b e r of copies printed , 12,544; (B.1) p aid/re que sted m ail su b scrip tio n s, 5,434; (B.3) sales thro ug h d ealers and c a rrie rs,
street v end o rs and c o u n ter sales, 3,736; (B.4) p aid/re que sted copies d istrib u te d by o th e r m ail classes, 10; (C) total p aid/re que sted circu latio n , 9,180; (D.1) sam p les, c o m p lim e n ta ry , and o th e r nonrequested copies, 2,153,
(D.4) Nonrequested copies d istrib u te d outsid e the m ail, 1,212; (E) total nonrequested d istrib u tio n (sum of D.1 & D.4), 3,365; (F) total d istrib u tio n (sum o f C & E), 12,545; (G) cop ies not d istrib u te d (office use, leftover,
u naccounted, spoiled after p rin tin g , re turns fro m new s agents), 2,568; (H) total (sum o f F & G), 15,113. Percent Paid Requested: 73% A ctual n u m b e r o f cop ies o f a single issue p ublished nearest to filin g date: (A) total
n u m b e r of copies p rinted , 11,350; (B.1) p aid/requested m ail su b scrip tio n s, 5,146; (B.3) sales thro ug h d ealers and c a rrie rs, street vend o rs and c o u n ter sales, 3,710; (B.4) p aid/requested cop ies d istrib u te d by o th e r m ail
classes, 10; (C) total p aid/re que sted c ircu la tio n , 8,856; (D.1) sam p les, c o m p lim e n ta ry , and o th e r nonrequested copies, 2,109; (D.4) Nonrequested copies d istrib u te d outsid e the m ail, 200; (E) total nonrequested d istrib u tio n
(sum o f D.1 & D.4), 2,309; (F) total d istrib u tio n (sum o f C & E), 11,165; (G) cop ies not d istrib u te d (office use, leftover, unaccounted, spoiled a fte r p rinting , re tu rn s fro m new s agents), 2,597; (H) total (sum o f F & G),
13,762. Percent Paid Requested 79% . I c e rtify tha t the sta te m e n ts m ad e by m e above are c o rre ct and com plete. Hugo Van haecke, Publisher.
circu itc el lar .c om 17

CLIENT PROFILE

EMAC, Inc.
w w w . em acinc. com
2390 EMAC Way, Carbondale, IL 62902

CONTACT: Jeffrey Young ([email protected])

PRODUCTS: EMAC, Inc. is a glo ba l le a d e r in A R M -ba se d


System on Module design and m an ufacturing. EMAC offers
both OEM m a n u factu rin g as w ell as a com p reh en sive line
of distributed COTS products that include x86 SBCs, System
on M odule (SoM), panel PCs, PC/104 m odules, em bedded
s e rv e rs, em bedded operating sy stem s, so lid -sta te drives,
and custom ca rrie r boards.

INDUSTRY
OF INTEREST TO CC READERS: The iPAC-9x25 is a low-power
PC/104-sized SBC for use in em bedded data acquisition and SPECIAL OFFER: EMAC is o ffering in sta lla tio n of EMAC OE
control applications. The board has an industrial tem perature Linux pre-installed on the iPAC-9x25, along with integration,

& ENTERPRISE
range of -40°C to +85°C and is powered by an Atmel SAM9X25 test, and enhanced support. Promo code: CIRCUITCELLAR
ARM9 processor. It comes standard with 4-GB eMMC, 16-MB
of serial data flash, and 128 GB of DDR RAM. With PWM, A/D, Circuit Cellar prides Itself on presenting readers with information
a battery-backed real-tim e clock/calendar, an external reset about innovative companies, organizations, products, and
button, and an abundance of I/O, the iPAC-9x25 is the perfect services relating to electrical engineering and embedded systems
choice for engineers and designers looking for a web-enabled technology. In this space, Circuit Cellar enables clients and
SBC for equipm ent m onitor and control applications. sponsors to present readers product info, special deals, and more.

Sign up today an d SAVE 50% • Sign

Now offering student


SUBSCRIPTIONS!
. -I *

18 C IR C U IT C E LL A R • N O V E M B E R 2 0 1 4 # 292

MCU-Based
Control Disp lay
FEATURES

Component
i », h

Jerry designed and built (both the


hardware and software) an MCU-
based com puter display component
(CDC) for a traffic-m onitoring
system. The system with the CDC
is intended for m onitoring and
recording the accum ulative count,
direction of travel, speed, and tim e
of day for vehicles that pass by.

By Jerry Brown PHOTO 1


F u lly fu n c tio n a l p ro to ty p e C D C

or the past five years, I have been SYSTEM OVERVIEW


F w orking on an em bedded project that you The TMS com prises a dual laser beam
m ight find interesting. As part of a traffic- transm itter, a dual sensor receiver, and the
m onitoring system (TMS) developed by a CDC (see Figure 1). It is intended for unmanned
colleague (a retired aerospace/aeronautical use on city streets, boulevards, and roadways
engineer), w hereby traffic flow on city streets to m onitor and record the cum ulative count,
and boulevards is m onitored, I designed direction of travel, speed, and tim e of day for
and built (both the hardw are and software) vehicles that pass by a specific location during
a dual M icrochip Technology PIC18F4520 a set tim e period (e.g., 12 to 24 hours).
m icrocontroller-based control display The transm itter, which is placed on
com ponent (CDC, see Photo 1). My motivation one side of the roadw ay at the selected
to develop the CDC came about as a result of m easurem ent-m onitoring location, has
my chance m eeting with my colleague when two laser diodes (in the red color spectrum
we were both judges at the local county-w ide about 64 0-to-650-nm wavelength) spaced
science fair. He explained the concept of the 12" apart. The receiver has two photo
TMS to me and his m otivation for developing tra n sisto r detectors also spaced 12" apart.
it and said he needed an electrical engineer The tran sm itter is positioned directly across
to design and build the CDC. Would I be the roadw ay from the receiver as nearly
interested? You bet I was. orthogonal as possible. In operation, the two
circu itc el lar .c om 19

laser diodes in the tra n sm itter continually Functionally, the CDC had to be capable
em it a pair of parallel beams a sm all distance calculating speed to w ithin ±1 mph of all
above the road surface, and the beams are vehicles passing through (i.e., "interrup ting")
aligned so that they im pinge on the two the laser beam pair. In addition, the CDC had
photo sensor arrays in the receiver across to be able to determ ine the direction of travel,
the road. When a vehicle passes through the the tim e the valid interruption occurred,

FEATURES
m onitoring location, one beam is interrupted and the cum ulative count for all vehicles
and, a sh ort tim e later, the second beam is interrupting the laser beam pair during a
interrupted. The CDC electronics and softw are manned or unmanned test session. A real­
accurately m easures the tim e differential tim e GUI (i.e., the LCD) and a keypad were
between the sequential beam interruptions to also required, as was nonvolatile m em ory
determ ine vehicle speed and, depending on (CFM card) to store all the traffic pattern data
which beam is interrupted first, determ ines obtained during a traffic-m onitoring session.
the direction of travel. The CDC—which
counts the passing vehicles accum ulatively CDC OPERATION
and calculates and displays vehicle speed, Photo 1 shows the actual prototype CDC's
direction of travel, and tim e of event on an user interface (i.e., LCD, keypad, three status
LCD— is electrically connected to the receiver. LEDs, and the three control switches). The LCD
All traffic-m onitoring data including the time is the GUI that provides a visual representation
of each interruption event is recorded on a of the data being entered into the CDC by the
Com pact Flash Mem ory (CFM) card w ithin the operating technician as well as all the traffic
CDC for later review and analysis in an Excel pattern data. The LCD is daylight readable. In
spreadsheet or other data analysis program . norm al operation, the receiver provides 12-V
In addition, the CDC has an alphanum eric electrical power to the CDC. If the receiver
keypad w hereby the set-up technician can battery is between 10 and 12 V, the Battery
enter four initial param eters (Date, Location, Status LED will display green. If the battery
Map Book Page, and Map Book Coordinates), voltage falls below 10 V, the Battery Status LED
which are downloaded to the CFM card as the will display red. If the battery is below 10 V,
"Header File." it must be recharged to the full 12 V before
The TMS system -level requirem ents system operation can continue.
established by my colleague drove the CDC The sensor status LEDs provide the status
level requirem ents which I documented. of the receiver's left and right sensors. In
Specifically, the CDC had to be of a size and the Align and Test modes, the Right and Left
w eight so that it could be easily hand carried. sensor status LEDs will display green if the
Inexpensive off-the-shelf com ponents were to tra n sm itter's Right and Left laser beams are
be utilized to the m axim um extent possible in properly aligned with the receiver's associated
the design and fabrication of the CDC. Power sensor, indicating a "h ig h " or Logic 1. If the
consum ption needed to be kept to a m inim um . laser beam is not properly aligned with the

FIGURE 1
The t r a f f ic - m o n it o r in g s y s te m

in c lu d e s a la s e r beam tr a n s m it t e r ,

sensor r e c e iv e r , and th e c o n tro l


d is p la y c o m p o n e n t
20 CIRCUIT CELLAR • NOVEMBER 2014 #292

[ Dat*: 011414
|Location: 93010 1 A l l an Mode
I TR F-3r30 s 494
FEATURES

Coords: B.5?4.bg |

PHOTO 2
T h e to p -le ft s c re e n (a) d is p la y s th e In itia l P a r a m e te r e n trie s . T h e t o p - r ig h t s c re e n (b)

s h o w s th a t th e C D C is in th e A lig n M o d e a n d th e s e n s o r s ta tu s L ED s in d ic a te th a t n e ith e r
t r a n s m it t e r la s e r b e a m is a lig n e d w ith th e a s s o c ia te d re c e iv e r s e n s o r. In th e b o tto m -

r ig h t d is p la y (c), th e s e n s o r s ta tu s L E D s in d ic a te th a t bo th L a s e r b e a m s a re alig n e d .

associated sensor or a previously aligned STBY position, the CDC is in the Align mode.
beam is being interrupted (e.g., by a passing In the Align Mode, no traffic pattern data is
car), then the associated Sensor Status LED generated, but the sensor status LEDs are
ABOUT THEAUTHOR will display red indicating a "lo w " or Logic 0. functional. The operating technician uses the
Jerry Brown is a Camaril­ When the laser beam is properly aligned with Align mode when aligning the tran sm itter
lo, CA-based aerospace/ the associated sensor or the interruption of laser beams to the receiver detectors. When
electrical engineer who a previously aligned beam is removed, the both sensor status LEDs display green, the
retired from the indus­ Sensor Status LED w ill again display green system is properly aligned. Once aligned,
try about five years ago. (see Photo 2). the CDC mode sw itch is moved to the Run
Since then, he has worked The operating technician can enter up position, putting the CDC in the Test mode. In
as a consultant for a lo­ to four initial param eters (IPs) using the Test mode, the CDC generates and records on
cal aerospace firm and as alphanum eric keypad. Norm ally, a key press the CFM card the traffic pattern data when the
a math tutor. He has also will enter a num eric value except when the tra n sm itter laser beam pair is m om entarily
worked on numerous "in­ map coordinates for the test session location interrupted by a passing vehicle.
house" (i.e., his garage are entered. For that value, an alphabetical The CDC Display sw itch turns the LCD
"lab") electronic projects. character ("A" through "J") is entered depending backlight and front panel status LEDs on or
Jerry holds a BS in Electri­ on which key is pressed (see Photo 2). The off. When in the On position, the LCD and
cal Engineering and a BS keypad is also used to set/reset the on-board status LEDs are functional. When the sw itch is
in in Business Administra­ real-tim e clock (RTC). in the Display position, the LCD backlight and
tion from California Poly­ The CDC main power sw itch turns power front panel status LEDs are turned off in order
technic State University in (12 V, ~350 mA) to the CDC on and off when the to save battery power. Power consum ption
San Luis Obispo, CA. His CDC is connected to the receiver via the DB-9 goes from ~320 mA when the LCD the Display
interests include photog­ connector or is being powered externally by a sw itch is in the On position to ~200 mA when
raphy, electronics, science 12-V source plugged into the CDC's external the sw itch is in the Display (Off) position.
and anything Apple. power port. The receiver and CDC pair are self-powered
When the CDC mode sw itch is in the by a 12-V, 18-Ah rechargeable, sealed lead
c ir cu itc e ll ar .c om 21

FIGURE 2
1 2 3 t Real-tim e The C D C 's fu n c tio n a l b lo c k d ia g r a m
Real tim e
LCD 4 5 6 clo ck m odule
clo ck m odule show s th e tw o m ic r o c o n tr o lle r s ,
7 8 9 2nd
u se r in te r f a c e , and th e s u p p o r t in g
Clr 0 Help Entr
f u n c tio n a lit y

T D = Tim e for ve h icle to tra vel 1' K ey pad

I2C Data
-H *—

FEATURES
P1 M ath
1 M ath
H -U -T R B eam _In I2C C lock co pro ce sso r
6 co pro ce sso r
C rystal oscilla tion
40 M H z
TX

P IC 18 F4 52 0 POR
CFM
5 T |___T LB eam _In
P IC 18 F 4 52 0 C FM Card C FM Card
m odule m odule
C o nn e cto r
DB9
B attery
pow e r
e ry L_B eam
se nse
IC S P Port M ode sw itch
r R_Beam
SW 2
External vN rr,
p ow e r port
(12 VDC) P ow er on

J
1 B ico lor LEDs
(red/green)
D isplay o n /o ff
SW1 P ow er co nd itio ning sw itch SW 3
and reg ula tio n

acid battery located in the receiver ca rry for approxim ately 90 hours before the 12-V
FIGURE 3
box. The receiver/CDC draw s approxim ately battery would need recharging.
T h is is th e m a in m ic r o c o n tr o lle r
320 mA at 12 V when the LCD backlight is on
c ir c u it, w h ic h in c lu d e s th e p o w e r on
and 200 mA when the LCD backlight is off. CDC HARDWARE re se t c ir c u it and 4 0 -M H z o s c illa t o r
Since the LCD backlight is m ostly off during Figure 2 is a functional block diagram c ir c u it. T h e c o m p le te s e t o f s c h e m a tic s
a lengthy traffic-m onitoring session, the (FBD) showing the CDC's various functional is a v a ila b le on th e C irc u it Cellar FTP
receiver/CDC can be continuously operated elem ents. During the initial design phase site .

+5V

VDD
RE3/*M CLR/VPP RB7/PGD SOUT TSTIN
RAO/ANO RB6/PG C I. S C LK /S C K TSTOUT
RA1/AN1 RB5/PGM VSS SIN/SDA
RA2/AN2/VR EF- RB4/AN11 CStart/Run H1
RA3/AN3/VREF+ RB3/AN9
RA4 RB2/INT2/AN8
RA5/AN4 RB1/INT1/AN10
RE0/AN5 RB0/INT0/AN12
RE1/AN6 VDD
RE2/AN7 VSS
VDD RD7
VSS RD6
RA7/OSC1 RD5
RA6/OSC2 PSP4/RD4 -^FX^Data
RCO RX/DT/RC7 <Rx
RC1 TX/CK/RC6
RC2 SDO/RC5
SCK /SCL/R C3 SDI/SDA/RC4
RDO RD3
RD1 RD2 -< R B LED Grn

-< L Beam Buf

-< R Beam Buf

*PBRST VCC
*ST RST
TD *RST
TOL
GND

C o m p le te s c h e m a tic s a r e a v a ila b le at:


c ir c u itc e lla r .c o m / c c m a te ria ls
22 CIRCUIT CELLAR • NOVEMBER 2014 #292

of the project, the functional requirem ents


tended to be som ew hat of a m oving target.
As a result, the circuit design ended up being
a bit of "o v e rkill" in order to ensure that
potential future requirem ents could be met
w ith the existing circuit design. As shown
FEATURES

in the FBD, there are two m icrocontrollers,


the main m icro co ntro ller and the CFM
m icrocontroller. The main m icrocontroller
com m unicates w ith the LCD, the RTC, and a
math coprocessor via an I2C bus. (It should
be noted here that the function of the math
coprocessor was achieved in softw are in
the main m icro co ntro ller and, as a result,
the math coprocessor, although installed
on the m otherboard, was not used in the
CDC prototype configuration.) The main
m icro co ntro ller com m unicates with the CFM
m icro co ntro ller via an asynchronous serial
data line using the built-in USART running at
19.2 bps. Even though the CFM m icrocontroller
is on the I2C bus, the main m icrocontroller
does not com m unicate w ith it via the I2C bus
in the prototype configuration.
PHOTO 3
The functions of the main co-processor
T a k e a look in s id e th e C D C . Y o u c a n s e e th e m a in m o t h e r b o a r d (1), th e m a in m ic r o c o n t r o lle r (2, P IC 1 8 F 4 5 2 0 ),
are to display on the LCD input from the
th e CFM m ic r o c o n t r o lle r (3, P IC 1 8 F 4 5 2 0 ), th e LCD m o d u le (4), th e k e y b o a rd m o d u le (5), th e r e a l- t im e c lo c k
m o d u le (6), a n d th e CFM C a rd m o d u le , w h ic h is o n ly p a r t ia lly v is ib le (7).
User Interface, to drive the status LEDs and
to calculate and display tra ffic pattern data
which is sent to the CFM m icrocontroller.
The CFM m icro co ntro ller form ats the tra ffic
pattern data in a File Allocation Table (FAT)
file and w rites that file to the CFM card.
Both m icro co ntro lle rs are clocked by a 40-
MHz crystal controlled oscillator and both
have an in -circu it serial pro gram m in g port
(ICSP), which allow s for program m ing and
rep ro g ra m m in g the m icro co ntro lle rs at the
CDC level. During the softw are developm ent
phase of the project, the ICSP ports were
d efinitely utilized. A power on reset (POR)
c ircu it initia lizes both m icro co ntro llers at
system power-up.
Based on the FBD and the established
CDC functional requirem ents, I designed the
CDC m otherboard circu it using a schem atic
capture program . Where necessary, I
sim ulated elem ents of the circuit using a
circu it sim ulation program . I used an online
PCB prototype fabricatio n service and had to
re-enter the schem atic using their softw are.
I then laid out and routed the tw o-sided
board using the softw are package provided
by the online vendor. A fte r I subm itted the
file, it only took a few days to receive the
two prototype PCBs I ordered. I "populated"
one of the boards w ith com ponents I had
purchased and kept the second board as a
spare. P relim in a ry board-level testing of the
assem bled PCB revealed two layout errors
which were easily corrected by an X-ACTO
PHOTO 4
Knife trace cut and by the addition of a
O s c illo g r a p h o f th e r e c e iv e r s im u la t o r o u tp u t
ju m p er wire.
FINALLY...
Easy Android™ Data Acquisition

New BTH-1208LS - Only $199


Bluetooth and USB connectivity
8 SE/4 DIFF analog inputs
1 kS/s continuous sampling, 50 kS/s burst I/O mode
2 analog outputs, 8 digital I/O , one 32-bit counter
Rechargeable batteries, over 8 hours of continuous use
Collect data
D em o apps available on Google Play™ wirelessly w ith the
BTH-1208LS DAQ
OEM version available for easy integration device

Turn your Android tablet or phone into a low-cost data logger.

mccdaq.com/Android

F a a1 M E A S U R E M E N T
Contact us
aVK C O M P U T IN G ,
The Value Leader in D ata A cquisition 1.800.234.4232
© 2 0 1 4 M e a s u r e m e n t C o m p u t in g C o r p o r a t io n , 10 C o m m e r c e W a y , N o r t o n , M A 0 2 7 6 6 • in f o @ m c c d a q . c o m
24 CIRCUIT CELLAR • NOVEMBER 2014 #292

Figure 3 depicts the CDC main


Time Delay Calculated Displayed
L/N m icrocontroller circuit on the m otherboard
(ms) Speed (mph) Speed (mph) and represents the m echanization of the
1 20 34.1 34 functionality depicted in the functional block
2 28 24.4 25 diagram (see Figure 2). Additional schem atics
are posted on the C ir c u it C e lla r FTP site.
3 10 68.2 68
FEATURES

Photo 3 shows the inside of the CDC with


4 7 97.4 97 the fron t panel removed. As indicated above,
5 8 85.2 85 I designed and assem bled the m otherboard
circuit card. The LCD module, the keyboard
6 38 17.9 18
module, the RTC module, and the CFM card
module were all purchased assem blies. Once
TABLE 1
all the parts were installed in the case, I
C o m p a r is o n o f c a lc u la te d v s. C D C d is p la y e d s p e e c
completed the interface wiring.

MCU & CFM SOFTWARE


Two s o ftw a re builds w ere req uired , one
fo r each m ic ro co n tro lle r. I used a Basic
language co m p ile r (m icroE ngineering
Labs PICBASIC PRO) fo r the main
m ic ro c o n tro lle r and a separate Basic
co m p ile r (M ikroE lektronika m ikroBasic)
fo r the CFM m ic ro co n tro lle r. I have a lo t of
experience w ith PICBASIC PRO and decided
to use it fo r the m ore com plicated main
m ic ro c o n tro lle r p ro gram . m ikroBasic
has b u ilt-in Compact Flash commands
w hich make the developm ent o f the
com pact flash " w r ite " p ro gram fa irly
s tra ig h tfo rw a rd .
The so ftw a re p ro g ra m fo r the m ain
m ic ro c o n tro lle r is divid ed into five
se ction s: D e cla ra tio n s, In itia liz a tio n s ,
Setup , M ain, and S u b ro u tin e s. Th ere are
five su b ro u tin e s called fro m m ain: g e t _
A D C to m easure re ce iv e r b a tte ry v o lta g e ,
g e t _ r a t e to ca lcu la te v e h ic le speed from
tim e delay (TD), A l i g n to put CDC in Alig n
m ode w h e re b y no tr a ffic p a tte rn data is
m easured or c a lcu la te d , K P _ R e a d to read
PHOTO 5 keypad e n trie s, and G e t _ R T C to read the
H e re th e LC D is d is p la y in g t r a f f ic p a tte rn d a ta . E v e n t No. 3 o c c u r r e d a t 1 0 :3 8 A M . T D w a s 3 4 m s a n d th e tim e fro m the re a l-tim e clock. Th ere is one
v e h ic le s p e e d w a s 2 0 m p h . A s v ie w e d f r o m th e re c e iv e r , th e v e h ic le w a s tr a v e lin g fr o m r ig h t to left. s u b ro u tin e called fro m S e t u p . S e t _ R T C is
fo r se ttin g RTC tim e via the keypad. I used
M ic ro c h ip T e ch n o lo g y's M PLAB IDE to w rite
and co m p ile the so ftw a re p ro g ra m and to
dow nload the Hex file to the m icro co n tro lle r.
The so ftw a re p ro g ra m fo r the CFM
p ro g ra m is fa ir ly s tra ig h tfo rw a rd and
co n sists of th re e se ctio n s: D i m [ension],
SOURCES M a i n , and s u b _ p r o c e d u r e . Th ere are
tw o s u b -p ro c e d u re s called fro m main:
L K 2 0 4 -2 5 LCD
i nit and Create_New_File. The
M a t r i x O r b it a l | w w w . m a t r i x o r b i t a l . c o m p ro g ra m s im p ly m o n ito rs the USART
and w hen a tra n s m iss io n fro m the main
P IC 1 8 F 2 4 2 0 / 2 5 2 0 / 4 4 2 0 /4 5 2 0 m ic ro c o n tro lle r is d e tected , it reads and
c le a rs the USART and w rite s the file to the
M i c r o c h i p T e c h n o lo g y | w w w . m i c r o c h i p . c o m
CFM card. C o n fig u ra tio n c o n tro l fo r both
c ir c u it c e lla r . c o m / c c m a t e r la ls so ftw a re p ro g ra m s is achieved by using a
m ik r o B a s ic "Rev. No." fo r the so u rce code file name
M i c r o E l e k t r o n ik a | w w w . m i k r o e . c o m and by listin g in ta b u la r fo rm both the file
nam e and the a sso cia te d Hex file checksum
circu itc el lar .c om 25

value as comment statements in the source code file header. PHOTO 6


T h is E x ce l s p re a d s h e e t

show s a c tu a l tr a f f ic
TESTS & RESULTS
p a tt e r n ta k e n on a
Once the prototype CDC was assembled and the software
lo ca l c it y s tr e e t o v e r a
downloaded and partially "debugged," I "bread-boarded" a 1 5 - m in u te p e rio d . T h e
microcontroller-based sensor receiver simulator. The simulator a v e ra g e speed w as

FEATURES
has two m om entary pushbutton switches and a potentiometer. 20 m ph. The In itia l
When a pushbutton was pressed, two high-to-low-to-high P a ra m e te r H eader file

signals were outputted to the connected CDC and to a two- is at th e to p of the

channel digital storage oscilloscope. Depending on which s p re a d s h e e t.

pushbutton was pressed, either the LBeam_in or the R_Bean_in


signal was outputted first. The time, in milliseconds, between
the falling edges of the two signals was set by the potentiometer.
Refer to Photo 4. Several time delay (TD) values were used, and
based on the time delay as shown on the oscilloscope, actual
speed was calculated using the following equation: Vehicle
Speed = (0.000189 x 3600)/TD.
The TD as shown on the oscilloscope and the calculated
vehicle speed were compared to what the CDC displayed for each
test value. In every case, the TDs agreed exactly. The vehicle
speed agreed to within 0.7 mph. Refer to Photo 4 and Table 1.
After verifying CDC functionality using the receiver simulator
on the bench top, the CDC was connected to the actual prototype
receiver. The receiver/CDC were placed on one end of my garage
floor and the prototype transmitter was placed on the other end
of the floor approximately 20' away. Setup and alignment (i.e.,
aligning the two transm itter Laser beams to the associated
receiver detector) was fairly easy. Using a square piece of
cardboard to simulate a vehicle, I passed the cardboard through
the beams and further demonstrated system functionality
although we obviously couldn't verify the actual speed with
which the cardboard was being passed through the beams.
Next, my colleague and I conducted several "road tests' RF Specialists
whereby we set up the TMS on a two-lane, lightly traveled city " M a k i n g y o u r fIF id e a s in to p r o f i t a b l e p r o d u c t s , "
street near my residence. The street was approxim ately 40'
wide. After some "fine tuning" and adjustments over a period Affordable Rf MURS
of time, we were able to get good test data. Photo 5 shows a M ii.'ri-üif-flflrfi'e-Sfi itfcf I iisrf flradufU
typical traffic pattern data screen from one of the road tests. Modules fr" SWJfi - Üoflÿ Hifti Pewer
forro^ ufi'pg rh< f-V.;' Çhannti Radies
.Mu.'ri
We conducted a road test "for score" on a busy residential street tMJT JS M 2*2 S i a n d
near my house. The data from that road test was downloaded LMJUSM-JU-Lff I B. .
from the CFM card to a PC and imported (comma delimited)
into an Excel spreadsheet for review and analysis. Photo 6 is
the Excel spreadsheet showing the traffic pattern data from
ZiyBeePro industrial Bluetooth
that road test.
O FM i f i f l Z ig f ir r J r ir ih . C£W. IVTrfJfjf P f S f j - r t f i . IfS-ÎÎÎ
H am # A u ie m a r jo ii.. ftu n ç e Finders l i ng j f iplicm li iv m i
REAL-WORLD APPLICATION L ig h f r n j A p p fjra T itw is

Now that the CDC hardware and software design has been
functionally verified, our plan is to contact some local city traffic :■/
agencies and homeowner associations (HOAs) and demonstrate
the system to them. My colleague is considering setting up the loWiRower, Hi y fr Performance
TMS on his busy residential street for a period of time and
submitting the results to his city council for possible installation l^em iconmictorsj
of speed bumps. / Tuee lien l s cusitivLtv. very E11iciofll Power ton pullers
I live in a small homeowners' com m unity with one main
street through it. Residents often drive on that street too fast.
R F Design Services
We plan to conduct a measurement session there as well in the
P rc p a rt d !o wc.'Jk w i ifr jt tm in - A o u j r e â p m rp r i.,
near future and present the results to the HOA Board of f l f i u p j i w f jfO tff p r c / t d frflm i s ïff lp f o iW f lfo ip s fî.

Directors, of which I am president, and to the homeowners and uîtffol •Wtftery » S p s r * * J iW r c f llf * £ b « T f i r â i W f t ir iW ÿ • Ligtofirwji Control
residents in an effort to slow down the traffic. And finally, to
support potential future utilization of the TMS, I wrote a user's # F i L T O Q »ft
f c L C f r f l / O o r é m O lu n o iin t . f o *
guide for the CDC which will enable city traffic engineers and
T * Î N T Ë R N A T iO N A L w w w . îe m a s i n t . c a m
the like to operate it in the future. £
26 CIRCUIT CELLAR • NOVEMBER 2014 #292

Ultrasonic Wayfinder
'* i -
Echolocation for the Visually Impaired
FEATURES

This m icrocontroller-based "ultrasonic w a yfin der" uses the principle of écholocation


to help the visually im paired to move around with ease and confidence. The design
com prises two m ain w earable systems: a head-m ounted navigation subsystem and a
hand-m ounted tactile sensor subsystem.

By Shane Soh & Eileen Liu


he sense of sight is a privilege th a t many typically, a w hite cane. A talented few are
T of us have taken fo r granted. I f you were able to use the technique of echolocation
to close your eyes, w ouldn't the simple act (i.e., creating clicking noises w ith their
of getting out of your seat and walking canes or even th e ir tongues) to determ ine
across the room become a daunting task? th e ir surroundings based on the reflected
Many visually im paired people spend sound waves, as a means of navigating
th e ir lives w ith the inconvenience of being w ith o u t visual cues. Unfortunately, this
unable to navigate th e ir surroundings technique of navigating using echolocation
w itho ut some form of assistance, w hether is hard to master.
it is a guide dog, a human helper, or more Motivated by the desire to create an

PHOTO 1
T h e f in is h e d p r o d u c t s h o w in g s e p a ra te h e a d - m o u n t e d (a) a n d h a n d - m o u n t e d (b) s u b s y s te m s
c ir cu itc e ll ar .c om 27

assistive device that enables any visually FIGURE 1


An o v e rv ie w of th e u ltr a s o n ic
im paired person to use echolocation w ithout
w a y fin d e r
any prior training or experience, we sought
to develop an acoustic w ayfinding device for
a m icrocontroller design class (ECE 4760) at
Cornell University. For our final project, we

FEATURES
developed an "ultrasonic w ayfind er" that
uses the principle of echolocation to help the
visually im paired navigate their environm ent
w ith ease and confidence (see Photo 1).

WAYFINDER OVERVIEW
The ultrasonic w ayfinder com prises two
main w earable subsystem s: a head-mounted
navigation subsystem and a hand-m ounted
tactile sensor subsystem (see Figure 1 for
a high-level overview). The head-m ounted The rate of the m otors' pulse is proportional
navigation device is used for spatial sensing to the distance of the obstacle from the user—
and directional navigation, while the hand- the closer the object, the more rapid the
mounted tactile sensor is used much like a pulses. This way, the user can easily discern
virtu al w hite cane for sensing obstacles below an obstacle's proxim ity and determ ine the
eye-level and nearby. urgency with which he or she should react.
The head-m ounted navigation subsystem
consists of two ultrasonic rangefinders HARDWARE DESIGN
and two m otors. It is capable of detecting The ultrasonic w ayfinder design features
obstacles up to 5 m away with a field of view an Atm el ATmega1284 m icrocontroller
of about 120°. It provides instructions to mounted on a custom PCB that was designed
turn left or right using one of the two m otors by our course instructor, Bruce Land. M ini­
mounted on the back of the user's head. disc m otors are sewn into the headband and
The hand-m ounted tactile sensor subsystem the hand strap. We chose the m otors because
consists of one ultrasonic rangefinder and they were sm all enough to be sewn into
one motor. The tactile sensor enables the w earable pieces of fabric and strong enough
user to "sw eep" for obstacles that are out of to provide clear vibrational pulses.
the head-m ounted sensors' range in a fashion The m otors are driven directly from the 9-V
sim ila r to how one would use a w hite cane. battery via a sim ple control circuit that uses

BAT1 _

Left Rangefinder

Forward Rangefinder

ATmega1284

FIGURE 2
T h e u ltr a s o n ic w a y fin d e r 's c ir c u it r y
28 CIRCUIT CELLAR • NOVEMBER 2014 #292

FIGURE 3 the rangefinders is then controlled using


O v e rv ie w o f th e p ro g r a m
control signals from three output pins on the
m icro co ntro ller (pins C.1, C.2, and C.3) fed
into the rangefind er's RX pin.
The MB1000 sonar rangefinder supports
three different outputs: analog voltage with
FEATURES

the voltage corresponding to the ranged


distance; pulse-w idth output w ith the width
corresponding to the ranged distance;
and ranged distance in RS-232 form at. We
in itia lly tried to use the pulse w idth output
but decided a gainst it, as the TinyRealTim e
(TRT) kernel uses Tim er1 for scheduling. This
w ould, in turn, leave us with Tim er3 (on the
a 2N3904 NPN transistor. We found that even ATmega1284) as the only other tim e r that
though the m otors could be driven in pulses could be used w ith an input capture register.
at 5 V from the m icro co n tro lle r's port pins, We could have im plem ented our device by
driving the m otors for extended durations reading from all three sensors into one port
of tim e would draw too much current (with pin using a m ultiplexer, but we decided that
peak current of approxim ately 100 mA) it would be too cum bersom e an approach. In
from the m icro co ntro ller and would cause the end, we chose to use the analog voltage
the on-board voltage regulator to reset the output.
m icrocontroller. Instead, the control circuit The m icro co ntro ller and m otors are
uses a control signal from a m icrocontroller powered with a single 9-V battery in a 9-V
output pin into the base of the BJT (see battery holder. We found that a single 9-V
Figure 2) with the em itter connected to ground battery was su fficie n t for powering our
and the collector connected to the negative device for extended use.
term in al of the motor. The m otor's positive Each m otor has a resistance of 50 Q and
end is driven from a potential divid er circuit is driven at 4.5 V, effectively draw ing 0.405
that provides it w ith 4.5 V. Pins C.6 and C.7 W each (i.e., 4.52/50), w ith three m otors
are used to control the left and right motors, draw ing 1.215 W altogether. Additionally, the
respectively. The m otors did not need to be m otors are driven in pulses, with the longest
isolated from the m icrocontroller, as there pulse being around 200 ms.
was no evidence the m otors were generating
large inductive spikes. SOFTWARE DESIGN
We used three M axBotix MB1000 Our program uses the TRT kernel to provide
LV-MaxSonar-EZ0 sonar rangefinders. Two real-tim e functionality. As a result, our device
are located on the head-m ounted navigation can perform certain tasks sim ultaneously,
system and one is on the hand-m ounted tactile such as allowing the user to use the hand-
sensor. We went w ith the MB1000 rangefinder mounted tactile sensor independently of the
for its m axim um range and its beam pattern. head-m ounted navigation system.
Each rangefinder has a m axim um operating There are three real-tim e tasks for
range of 6.45 m and a w ide beam width. As a the sequential reading of each ultrasonic
result, two rangefinders placed next to each rangefinders and two other real-tim e tasks
other can cover a w ide field of view. for the navigation logic— one for instructing
All three rangefinders are powered the user to turn left or right, and another for
with 5 V to get as much range as possible the tactile sensor. All the readings are median
and a wide beam pattern. The ranging of filtered to remove discrete noises caused by
interference (typically from external sources)
or noise in the sensor circuit.
ABOUT THEAUTHORS The device uses a real-tim e kernel for
Atm el AVR m icrocontrollers. W ritten by Dan
S h a n e S o h is m a j o r i n g in E l e c t r i c a l a n d C o m p u t e r E n g i n e e r i n g a t C o r n e l l U n i ­ Henriksson and Anton Cervin, the TRT kernel
v e r s i t y . H is t e c h n i c a l i n t e r e s t s i n c l u d e e m b e d d e d s y s t e m s a n d m i c r o c o n t r o l l e r supports preem ptive Earliest Deadline First
a p p l i c a t i o n s . He a l s o h a s a k ee n i n t e r e s t in c o m p u t e r s e c u r i t y a n d p r iv a c y . scheduling of tasks.
TRT is used in the ultrasonic w ayfinder
to allow the ranging of distances to occur
E ile e n Liu is c u r r e n t l y a g r a d u a t e s t u d e n t a t C o r n e l l U n i v e r s i t y s t u d y i n g E l e c ­
independently of the navigation logic, and
t r ic a l a n d C o m p u t e r E n g in e e r in g . S h e s t u d ie d B io lo g ic a l E n g in e e r in g a s an
to allow the head-m ounted navigation and
u n d e r g r a d u a t e a t C o rn e ll U n iv e rs ity. H e r in t e re s t s in c lu d e m e d ic a l d e v ic e s
the tactile sensor to operate in a seem ingly
an d e m b e d d e d system s.
independent fashion. This is especially
im portant in ensuring that the user does not
circu itc el lar .c om 29

confuse the vibration s in the headband with PHOTO 2


T h is s c re e n c a p tu r e fro m ar
the vib ration s from the hand strap.
o s c illo s c o p e show s a v o lta g e level
All the real-tim e tasks but the navigation
c o r r e s p o n d in g to d e te c te d r a n g e , as
logic are executed with the deadline equaling
w e ll a s th e p re s e n c e o f im p u ls e n oises.
the release time. This means that the tactile
sensor logic task and all three ranging tasks

FEATURES
run in the order in which they are released
(i.e., not in a true "re a l-tim e " fashion) and
have p rio rity over the navigation logic. The
navigation logic is also executing every 300
ms com pared to 250 ms for all the other
tasks. This is because the navigation logic
can still function fa irly accurately w hile using
range data that are slightly "old."
The ranging tasks for all three rangefinders repeat every 250 ms. We determined
experim entally that this is approxim ately the m inim um tim e the tasks require to com plete the
ranging (which takes 49 ms according to the datasheet), convert the range to m eters, and save
the range for median filtering.

INITIALIZATION & CALIBRATION


As you can see in Figure 3, upon powering on the device, the program first initializes the ADC
and TRT kernel and creates the necessary sem aphores and real-tim e tasks. The ADC is initialized
by configuring the appropriate registers, m ainly to left-align the ADC values in the data registers
(to convert the m easurem ents from 10 to 8 bits as we did not need 10-bit resolution and it
was easier to read off one register) and to set the ADC prescaler to 32 (which was determined
experim entally to provide the best com prom ise between sam pling frequency and resolution for
this device). The sam pling frequency is therefore 500 kHz (i.e., 16 MHz/32).
The program then enters C alib ra tio n mode in w hich it de term ines the thre sho ld fo r the
ta ctile sensor based on the user's height. The user is required to hold the ta ctile sensor
by his or her side w hile the program p e rfo rm s the in itia l ca lib ra tio n . The program takes
three ca lib ratio n reading s at around 140 ms apart. It then chooses the m edian value as the
calib rated value to rem ove any outlying reading s that m ay a rise due to inte rferen ce or noise.
The tactile sensor threshold is determ ined to be V2 x calibrated value as we assum e that the
user will m ost often be holding the tactile sensor at a 45° angle (much like holding an assistive
cane) such that the hypotenuse would be given by the follow ing equation: V 2 x (height from the
ground to the sensor).

RANGE INFO FROM SENSORS


There are three separate real-tim e tasks for reading from each of the ultrasonic rangefinders
from the m icrocontroller's ADC inputs. Sem aphores are additionally used to ensure that the
rangefinders are ranging sequentially so as to not interfere with each other (e.g., one rangefinder
receiving another rangefinder's reflected pulse). Delays are used to ensure that the rangefinders
have sufficient tim e to range. In particular, a delay of 50 ms is used, as the rangefinders require
49 ms to obtain a range reading.
Range inform ation is obtained from the sensors by calling the a d c _ r e a d function which
selects the correct ADC pin by setting the right bit values in the ADMUX register, sta rts the
conversion, and then returns the 8-b it range value from the ADC register. The 8-b it range
value from the ADC register is converted to distance in m eters using the following equation:

, ^ (5 1 2 V in c h e s ^ meters^ ( 5 ^ (5 1 2 ^
Distance (m) = V IN x I I I — —— I x 0.02541— —— I = I x ADC x I I x 0.0254

The firs t term converts the ADC (the nam e of a re g iste r) bit value p ro p o rtio n a te ly from 0 to
255 (since the value is 8 bits) to 0 to 5 V. The second term converts the voltage to distance in
inches. A ccord ing to the MB1000 datasheet, the analog output from the sensor corresponds
to (VCC/512) vo lts per inch. Finally, the th ird term converts the distance reading from inches
to m eters.

MEDIAN FILTERING
All ultrasound rangefinder readings are median filtered (with a filter of size 3) to remove
im pulse noises. The median filtering was effective as m ost of the noises encountered in the
ranging data were im pulse noises (see Photo 2).
30
FEATURES CIRCUIT CELLAR • NOVEMBER 2014 #292

PHOTO 3
U s e rs te s tin g th e u ltr a s o n ic w a y fin d e r We found th a t the m ost freq ue n t cause data w ill change a b ru p tly from 3 to 5 m,
had little d if f ic u lt y d e te c t in g the of the noise is the sudden changes in ranges creating spikes in the range data sim ilar to
p re s e n c e o f s m a lle r o b s t a c le s b e lo w
detected when the rangefinder ranges those in Photo 1. Another common source
e y e -le v e l u s in g th e h a n d -m o u n te d
m ultiple objects of d iffe re n t distances. of impulse noises are the unintended
t a c t ile s e n s o r
For instance, when the rangefinder is reflections caused by overestim ating the
pointed slig h tly o ff center tow ard a person distance of an object when the reflected
standing 3 m away from the sensor (with pulse bounces o ff the ground before
a wall 2 m behind the person), the range reaching the rangefinder.

WAYFINDING LOGIC
There are two real-tim e ta sks responsible
PROJECT FILES
for the w ayfind ing aspect of the device: the
navigation and ta ctile sensor logic. The
navigation log ic checks for the presence of
-------- , "P r o t o t y p e B o a r d fo r A tm e l M e g a 6 4 4 ,”
obstacles in the field s of view of the le ft and
C o r n e ll U n iv e r s i t y , 2006, h t t p : / / p e o p l e .e c e .c o r -
rig ht ran ge fin d ers and buzzes the m otor
ne ll.e d u / l a n d / P R O J E C T S / P r o t o B o a r d 4 7 6 / .
to in dica te to the user the direction of the
obstacle. If obstacles are detected by both
M a x B o t i x , " L V - M a x S o n a r - E X 0 Hig h P e r f o r m a n c e the left and rig ht rangefind ers, then the
c ir c u it c e lla r . c o m / c c m a t e r ia ls S o n a r R a n g e F in d e r ,” P D1 0 0 0 1 , 2012. user w ill be notified of the direction of the
obstacle closer to the user (which is likely
the obstacle m ore c ritic a l or hazardous to
RESOURCES M. P r a s a d , "T h e A D C o f th e AV R,” 2011,
the user).
http://m axem b ed d ed .com /20 11/06 /20 /
A t m e l C o r p. , " 8 - B i t A tm e l M i ­ The ta ctile sensor logic checks for the
the-adc-of-the-avr/.
c r o c o n t r o l l e r w it h 1 6 / 3 2 /1 2 8 K presence of obstacles w ithin the threshold
Bytes In-System P r o g r a m m a ­ as determ ined by the calibratio n process.
SOURCES
ble F la s h ,” 8 2 7 2 C - A V R - 0 6 / 1 1 , O bstacles at a range below this threshold
2011. ATm ega1284 M icroco ntroller correspond to obstacles that would norm ally
A t m e l Co rp. | w w w . a t m e l . c o m be detected when a v isu a lly im paired person
scans his im m ediate su rro u n d in g s using
B. Land , "A P r e e m p t i v e K e r ­
a w hite cane (i.e., objects that are large
nel fo r A tm e l M e g a 1 2 8 4 MB1000 LV-M axSonar-EZ0 so nar ran ge fin der
enough to cause the user to trip and fall or
M i c r o c o n t r o l l e r s , ” E CE 4760,
M ax B o tix | w w w .m a x bo tix .co m objects that can collide w ith the user). The
C o r n e ll U n iv e r s i t y , 2013,
ta ctile sensor logic also scales the intensity
h t tp :/ / p e o p le .e c e .c o rn e ll.
of the v ib ra tio n s p ro p o rtio n a tely w ith the
e d u /lan d/cou rses/ece4760/
p ro xim ity of the obstacles.
TinyR ealTim e/.
circu itc el lar .c om 31

Both the navigation and ta ctile logic sensor was responsive and sensitive enough
functions scale the in te n sity of the vib ratio n s to enable the user to sense sm a ller obstacles
p ro p ortio n ately w ith the distance of the below eye-level (see Photo 3).
obstacles from the sensor. This is done by More interestingly, m any users found the
v ary in g the duration of each pulse using device to be v ery intuitive. Most were able
the follow ing equation: pulse duration = (1/ to use the ultraso nic w a yfin d er w ith little

FEATURES
range) x m ultiplier, w here the values of the to no prio r in stru ctio n s, suggesting that the
m u ltip lier w ere exp erim en ta lly determ ined pulsing se nsations of v a ryin g stren g th s were
to be 30 for the navigation logic and 20 for v ery natural indicato rs of obstacles and their
the ta ctile sensor logic. This w as chosen proxim ities.
so that the m inim um detectable range of
ap p roxim a tely 0.15 m w ill give 200 and 133 FUTURE WORK
ms for the m u ltip lie r values of 30 and 20, As a prototype device developed within
respectively. Longer pulse durations (and the m onetary and tim e constraints of a
hence higher pulse intensities) were used u n iversity course, the device has exceeded
fo r the head-m ounted m otors as com pared our expectations in term s of how well it has
to the hand-m ounted m otors as we found perform ed. We feel that this proof-of-concept
that the head is less sensitive to vib ratio n s device has clearly dem onstrated the potential
com pared to the hand. utility behind a novel approach to visual
assistive devices. We are excited to see what
RESULTS we can achieve with m ore tim e and resources.
The ultraso nic w a yfin d er perform ed This is an endeavor we hope to pursue with
exceedingly well when we had our classm ates future research and coursework.
and in stru cto r test it. We found that most Who knows? Perhaps the ultrasonic
users w ere able to confidently w alk around w ayfinder m ight pave the way for future
indoor environm ents w ith th eir eyes closed assistive devices of this nature? O
w hile avoiding m ost obstacles. The head-
m ounted sensors allow ed the user to detect
w alls easily, w hile the hand-m ounted tactile

A AP CIRCUITS
PCB Fabrication Since 1984

A s jo w as... Two Boards


I ? Two Layers
■ Two Masks
each! One Legend

Unmasked boards ship next day!

www.apcircuits.com

— ^
JSff-Zn IPC MEMBER i-
_ASSOCIATIONCONNECTING
I BLSCTHONICBINOUBTRieS'
Spotlight
@electronica 2014

Made in Munich
Come MAKE it ©electrónica 2014
By W isse Hettinga (Elektor Labs)

You've all heard of the m aker revolution and seen cool things described
but how cool is it to MAKE som e real electronics at the w orld's largest
exhibition on real electronics? To have a place w here you can relax,
charge you r phone, e-gossip, have a coffee and touch base with re­
al-w orld electronics. W here you can bring along anything you'd w ant
to unbox, (un)solder, show off, m easure, check-4-specs, Arduino'd, or
R aspberry Pi'd. Feel free to com e w ork with us the Elektor way!

E le kto r d e sig n e rs and en g in e e rs are on sta n d b y to lend a helping hand and su p p ly


e v e ryth in g you need to get so m e real e le ctro n ics w o rk done rig h t th ere and then.
G erm an, English, Dutch, Sp anish, C ++, spoken.

For th is special occasion E lektor Labs are putting at yo u r disposal: de sk space, tools,
test & m e asurem ent equipm ent, a 3D printer, and free WiFi. Not forgetting mini w ork­
shops, techtalk, coffee (please donate), and plenty of pow er sockets to charge phones,
m n H i amh tablets, laptops, and gizm os.

Navigate to the Elektor Maker Space in Hall A6, Booth 380

Stay in touch with Elektor's activities


register for our newsletter on www.elektor.com. right hand bottom corner.

WHO: J Nd elek to r in ter n a tio n a l

e l e k t o Z s m a k e r s p a c e

2014
MnUF.MBER l l ' 1'*'

E L E C T R O N IC A M U N IC H ^ q q T H
34 CIRCUIT CELLAR • NOVEMBER 2014 #292

Pressure
FEATURES

Microcontroller-Based
Blood Pressure Monitoring

You can build a m icrocontroller-enabled optical blood pressure sensor system. Featuring
an MCU and a few optical sensors, the system uses infrared light to detect blood flow,
prim arily heart rate. By detecting volum etric changes in blood, it can identify when a pulse
goes through a particular area of the body.

By Randy Song & Alexander Ngai


ave you ever sat around and thought to BLOOD PRESSURE & PPT
H yourself, "It would be really nice to have an Our focus on optical m easurem ents
optical-based blood pressure m onitor handy?" comes from our idea to reduce the level of
No? Well, now you do! For our senior design invasiveness as fa r as possible. Com pared to
course at Cornell University, we developed trad itio nal m ethods, our optical m easurem ent
the Scan-E M ark I , which is a new embedded method is fast and sim ple enough for v irtu ally
device for the average person who sits around anyone to use w ithout training. In order to
w ishing they had a way to m easure their get pulsatile readings on two parts of the
blood pressure optically and not deal with body sim ultaneously, we use a fron t and top
those pesky blood pressure cuffs. The Scan-E facing sensor on the final device. You position
M ark I is a user-friendly (loosely defined), your fin g er on the top sensor w hile pointing
painless, and stylish way to check out your the fron t sensor to a different part of your
blood pressure on the fly! It's a noninvasive, body, thus m easuring a difference in pulse
optically based blood pressure and heart rate time.
detector that can be used quickly and easily. As blood pumps through the body,
Although this article deals with the the volum e of blood in the points of
PHOTO 1
prototype, note that we're w orking on a Mark m easurem ent also changes. These volum etric
T h e fin a l s y s te m in c lu d e s tw o lig h t-
II that will include a whole array of new changes m odify the m easured area's optical
t o - f r e q u e n c y c o n v e r te r s , tw o in fra re d

L E D s, an a rra y of r e s is t o r s anc
features. Photo 1 shows prototype. In future reflectivity, since the com position of the
c a p a c it o r s , an A tm e l ATm ega1284p
iterations, we will be supporting Bluetooth surrounding tissue stays the sam e w hile the
m ic r c o n t r o lle r , and som e v o lta g e com m unication as well as a sm aller form volum e of blood changes. We can m easure
re g u la to rs . factor. these volu m etric changes and detect peaks
circu itc el lar .c om 35

in the signals to detect heart beats. We use


the delay between peaks at different parts of P T T vs£& P
the body to detect differences in pulse transit
tim e (PTT).
In the paper "Continuous Blood Pressure ■
-
«if
M easurem ent Using Pulse Transit Tim e," A.

FEATURES
Hennig and A. Patzak analyze the correlation
PTT w ith blood pressure changes (see
Figure 1). The theory is that a patient's
PTT can be utilized to m easure a patient's I? “ftPi
pulse wave velocity, w hich is based on blood

vessel stiffness. This stiffn ess correlates to *
* • * -

a num ber of different factors, but through


calibration we can norm alize the pulse wave
velo city to correlate to a blood pressure.
We can m easure a patient's PTT by utilizing 1« 1» HO in HO tu w
M t o T r-ifts ir T iiii# [ n r i]
two different plethysm ographs. By placing
a plethysm ograph on a patient's neck and * hrtr * Hk — —Hat [Alert to* |W |r|
another plethysm ograph on a patient's finger,
we can m easure the difference in tim e it
takes fo r the patient's blood to travel through
the patient's hand versus the tim e it takes FIGURE 1

for blood to travel through the patient's neck. T h e r e la tio n s h ip b e tw e e n s y s to lic b lo o d p r e s s u r e a n d PT T u n d e r d if f e r e n t c o n d it io n s : s it t in g , ly in g d o w n ,


p r e - a n d p o s t -e x e rc is e .
Because we do not directly m easure
blood pressure, our device requires some
m athem atical calibration which we did not
yet im plem ent. Photo 2 shows the different fluctuates. We can m easure these volum etric
results we obtained when we tested the device changes, detect heart beats, and determ ine
on ourselves. You can see the relationship differences in PTT. In order to do this, we
between PTT and systo lic blood pressure. utilized two light-to-frequency sensors and
In order to obtain different blood pressure two IR LEDs. The changing volum e of blood
readings, we utilized a sphygm om anom eter reflects different am ounts of infrared light,
and tested under different conditions such as allowing the phototransistors to capture the
sittin g, lying down, sitting afte r exercising, changing intensities.
and lying down afte r exercising. For more We then utilized pin B0 and B1 to capture the
inform ation concerning the conversion of PTT resulting frequencies of the phototransistors.
to a blood pressure model, refer to Hennig We use an Atm el ATmega1284p as our main
and Patzak's paper. m icrocontroller, as it contains a v a riety of
However, m easurem ents of systolic different tim e rs and enough m em ory and clock
blood pressure can be made w ithout any speed to obtain and capture the necessary
calibratio ns or previous data collection by data. Upon filtering and analyzing the data,
using a universal m odels for all body types. the m icrocontroller w ill then use a Future
Although there are slight va ria tio n s in Technology Devices International (FTDI) chip
correlated blood pressure to PTT for different
body types (e.g., users with longer arms),
a reasonable generalization can be made
to include all m em bers of a population. For
exam ple, we would form a model for all adult
m ales and hard code the form ula associating
PTTs to systolic blood pressure. This model
would be constructed using the PTT of many
adults and their known blood pressure, and
would allow for any subsequent users to get a
rough estim ate of their blood pressure given
sim ila r body type characteristics.

HARDWARE OVERVIEW
In order to m easure pulse, we use
an infrared LED and a phototransistor to
m easure the reflectivity of blood in an artery.
As blood pumps through the body, the blood
volum e in the points of m easurem ent also
36 CIRCUIT CELLAR • NOVEMBER 2014 #292

oscillator, voltage regulators, and an FTDI/


Infrared LED FT232R chip that we utilize (see Figure 4). The
L ig h t-to -fre qu en cy
co n ve rte r I
FTDI chip is used for com m unicating with the
L ig h t to
main PC through UART, and we use a sim ple
B luetooth
F in g er pulse fre q u e n cy M icroco n troller
m o d ule /U S B
PC G UI O utp ut GUI im plem ented in the Processing IDE to
co n ve rte r
parse all the incom ing data (see Photo 3).
FEATURES

1
L ig h t to
N e ck pulse — > fre q u e n cy PHYSICAL HOUSING
co n ve rte r
The physical housing was designed in
•f Ligh t-to -fre qu en cy
co nve rte r Solidw orks and converted to an .STL file to be
printed on a 3-D printer. The housing includes
ports for the light sensors and associated
FIGURE 2 LEDs, as well as ports for an on/off toggle
T h e A T m e g a 2 8 4 p m ic r o c o n t r o lle r a n d a s s o c ia te d c o m p o n e n ts
power sw itch and a m om entary push button
for user input. The ports are designed so a
plastic w indow is mounted on top, so the user
to convert UART to USB and send the data to has a place to rest his/her finger on top to
a PC. Figure 2 shows the basic setup including reduce m ovem ent during m easurem ent. Later
the m icrocontroller and associated hardware. revisions of the housing w ill more properly
An HC-06 Bluetooth module is mounted shroud the sensors from am bient light by
underneath the main board and connected better enclosing the sensing areas. There was
to UART0 on the m icrocontroller. The module also an issue with cro ss-talk between sensors
is paired with a PC that has Bluetooth w ithin the housing, so thicker isolation
connectivity via a USB dongle. Currently, between light sources and light sensors will
the device can utilize Bluetooth, but we increase inform ation gain.
encountered som e interference in the signal,
so we chose to utilize an FTDI chip with a USB DIGITAL OPTICAL SENSOR
connection instead. We chose the TSL235R light-to-frequency
The ATmega m icrocontroller is the brain of converter because it allowed com plete digital
the device (see Figure 3). All of the sensors m easurem ent of light. The typical square wave
and LEDs are broken out and connected to the output from the sensor was several kilohertz,
microcontroller, which is connected to a white which was reasonably accurately detectable
board. The unit is still on battery power, and by our m icrocontroller. The advantage of the
thus the entire device can be made wireless. We light-to-frequency sensor was its variable
used the board that Professor Bruce Land gave dynam ic range. Since we ultim ately used
us for the ECE 4760 class at Cornell University. counters to m easure the frequency, we could
The custom PCB board includes an external m easure over a wide range of frequencies and

FIGURE 3
P C B la y o u t f o r m ic r o c o n t r o lle r b o a rd
circu itc el lar .c om 37

light intensities by m easuring tim e r overflows. SOFTWARE & DATA ACQUISITION


The reason w hy we w anted to m easure light The main tasks of our program
over a w ider range of frequencies is that included acquiring data from the light
fo r future versions of the device, we w anted sensors, controlling the output of the LEDs,
to im plem ent basic spectroscopy utilizing processing the acquired data and extracting
different wavelengths of light to measure m easurem ents in real tim e, and transm itting

FEATURES
blood glucose and blood cholesterol. S1 and the m easurem ents to a PC for visualization
S2 in Figure 5 show our two light-to-frequency with a GUI. Table 1 shows the functions for
sensors hooked to power and to pin B0 and B1 our program.
of our m icrocontroller. Our optical data acquisition method used a
m ixture of externally triggered counters and
internal tim e r interrupts in order to sam ple
the num ber of pulses from the light sensors
in a given am ount of time. We used a total
of four tim ers. Tim er2 and Tim er3 were used
for tim ekeeping. Tim er2 was set with a clock

ABOUT THEAUTHORS
R a n d y S o n g (s s h . r a n d y @ g m a i l . c o m ) ) is c u r r e n t l y a s t u d e n t in E l e c t r i c a l a n d
C o m p u t e r E n g i n e e r i n g a t C o r n e l l U n i v e r s i t y . H is i n t e r e s t s i n c l u d e r o c k c l i m b ­
ing, s a ilin g , a n d p r o g r a m m in g .

A l e x a n d e r N g a i (a s n 5 4 @ c o r n e l l . e d u ) is c u r r e n t l y a s t u d e n t in E le ctrica l an d
C o m p u t e r E n g i n e e r i n g a t C o r n e l l U n i v e r s i t y . H is i n t e r e s t s i n c l u d e r o b o t s a n d
electronics.

Need a Free RTOS for


Your DIY Project?
Use the best. SMX® is now freely available for non-commercial projects.
Learn multitasking and develop Extensive operating examples and
your own applications excellent manuals
Free for non-commercial usage Work with low-cost boards and free
No time limit, No sales contact IAR tools

i l Micro Digital www.smxrtos.com/lk


PHOTO S
m u Y-, O U R R T O S P A R T N E R

F in a l d a ta a n d GUI
38 CIRCUIT CELLAR • NOVEMBER 2014 #292

FIGURE 4
actual acquisition of the data.
A d d it io n a l F T D I /F T 2 3 2 R U A R T -to -U S B

c h ip
DIGITAL SIGNAL PROCESSING
Though our data acquisition m ethods
w ere designed to reduce jitte r and noise, the
signals w ere still unstable. Because we chose
FEATURES

a light-to-frequency sensor that measured


all wavelengths of visib le light plus infrared
light, we needed to add a degree of high-pass
filtering in order to extract the alternating
current (AC) values that w ere caused by the
flicker rate of the overhead lights fluorescent
lights. In order to do this, we created a moving
average filter of 20 sam ples. To extract the AC
com ponents, we then subtracted the original
signal from the mean of the 20 previous
sam ples in the moving average filter. These
filters w ere contained w ithin our filterS ensor
function.
In addition, we needed to add a low
pass elem ent to the filtered data in order to
sm ooth som e of the high frequency jitter.
divid er of 64 w ith an output com pare register To do this we additionally added a sm all 5
w ith value 249 in order to trig g e r an interrupt elem ent low pass filter and extracted the
every 16,000 cycles, or 1 ms. This becam e the mean of the sam ples. This effectively reduced
tim e base fo r the system . Tim er3 was set as the v a ria b ility due to jitte r and resulted in a
a precise 10-m s tim er, and since it is a 16-bit stable signal. We experim entally chose our
counter, it can count to a higher value with param eters by com paring the two different
m inim al jitter. Tim er0 and Tim er1 w ere both signals in real tim e, and display the results
externally trigg ered by the light to frequency for our final filter.
sensors. However, Tim er0 is only 8-bit, so the
anticipated counts of a pproxim ately 300 per PEAK DETECTION
sam ple exceed the lim it w ithout overflow. As We were able to reliably detect peaks in
a result we added an ISR for the overflow a signal by finding the first local m axim a in
of Tim er0 to increm ent a variable which a positive pulse. The sequence w aits in the
is later used to determ ine the final count first state if the signal is negative or zero,
fig u r e 5 of Tim er0 afte r the sam pling period. The and changes state when the signal becomes
A d d it io n a l h a r d w a r e c ir c u it r y lightSensorCapture function contains the positive. In this state, we check if the signal
is increasing or decreasing. When the signal
begins decreasing, we have detected the first
local m axim a, and a flag is set. In order to
make sure the signal was not due to jitter,
we increm ent a counter. When the counter
is increm ented a threshold am ount of tim es
and the values continue to decrease, the state
changes to set another flag that a valid peak
has been detected. This flag is reset when the
signal returns to the original state when the
signal drops below zero. We have found that
this method w orks reliably with the optical
signals, as it only counts a peak for the first
m ajor peak. The peak detection is found within
the threshold1 and threshold2 functions.

GRAPHICAL USER INTERFACE


To visualize our collected data and aid with
debugging, we created a sim ple GUI to use
with the unit. The GUI was helpful to visually
represent our peak detection and filtering
m ethods, and also provides a convenient
method to validate if the data collection is
w orking. To im plem ent the GUI, we used a
circu itc el lar .c om 39

visual Java IDE called Processing to quickly These invalid results could be easily removed
build the real tim e display. The program since the invalid m easurem ents were much
sim ply updates on each valid reception different than the co rrect m easurem ents.
from the Bluetooth connection, delim ited by We could easily remove outlier data points
a newline character. We tra n sm it multiple due to deviation from the median and retain
variables indicating sensor readings and only valid values. In addition, we could

FEATURES
detected peaks for pulse tra n sit time. remove data points that are larger than a
We made a predefined packet structure certain threshold. However, w ithout these
and delim ited between different transm itted counterm easures, the m easurem ents were
variables with a space character. The often skewed and inconvenient as we had
transm itted variables are then displayed on to m anually stabilize the device to reduce
the GUI, including the m easured pulse transit m ovem ent a rtifa cts. To remove som e of the
tim e and m easured heart rate. m ovem ent artifacts, the optical sensors and
em itters could be moved closer to the surface
FINAL DEVICE and a non-infrared blocking plastic should
Currently, our system is portable, but
there are several w ires protruding from the
main device to the ATmega board. In addition,
due to the construction of the device and the
sam pling techniques we used, we currently
need close supervision to get good data
w ithout motion artifacts. Our device does not
filter out results that are obvious outliers, but
only averages the data so we do not always
get very accurate sam ples. While we were
testing, we had to hold the device to our necks
very still to acquire a few decent sam ples,
and we had to record sam ples of data that we
knew w ere accurate readings while rejecting
motion a rtifa ct corrupted data.
The way the current device is configured,
you m ust place your index finger on the
device's top-facing window. Next, you must
point the front w indow at your neck. Currently,
in order to get accurate readings, you must
take a deep breath, and slow ly exhale. The
readings taken while you're slow ly exhaling
are the m ost accurate. For best results, you
m ight have to adjust the placem ent of the
forw ard facing window, as it m ust be pointing
directly at a larger artery.

RESULTS
In the end, we obtained results that serve
as a proof of concept for an optical blood
pressure and heart rate m onitor using digital
signals processing. Our results show the
correlation between PTT and blood pressure,
giving us a good stepping stone tow ards
making a general health m etric acquisition
device. Although we would need more data
from patients of different body types, we
show that for certain body types it is possible
to acquire som e level of accuracy utilizing
PTT. We processed the data in real-tim e so
that we could analyze the data. We learned
about the physical constraints associated with
using the ATmega1284p and the effectiveness
of the sensors we implem ented.
M any of the m easurem ents we gathered
w ere invalid due to som e inaccuracies with
peak detection and m ovem ent a rtifacts.
e$>resspcb.com
40 CIRCUIT CELLAR • NOVEMBER 2014 #292

uart_init, uart_putchar, The UART functions were taken from Joerg Wunsch on Bruce Land's ECE 4760 website. These
uart_getchar functions are utilized for serial com m unication with a com puter in order to send data to a GUI.

The initialize function initializes tim er 0 and tim er 1 to be externally triggered through pin
B0 and B1, and both tim ers used overflow interrupt routines that extended the length of the
FEATURES

initialize counters to 32 bits. Tim er 2 and 3 are initialized to count 1 ms and 10 ms. Tim er 2 serves as a
millisecond tim e base, while tim er 3 serves as a counter that counts the num ber of clock edges
from tim er 0 and 1 in 10 ms.

The main loop runs lightSensorCapture, filters the values with filterSensor, runs peak detection
main on the two sensors using threshold1 and threshold2, calculates pulse transit tim e and pulse rate
using ptt_calc and ps_calc, and sends all relevant data using uart to the main computer.

This function begins the 10-m s sequence that kicks off tim er 3. Because we can run different
biom etric sensors at different tim es, we have a dead w aiting while loop that w aits until the
lightSensorCapture
tim er has counted 10 ms. Once the tim er 3 interrupt occurs, this function records the number
of counts from each of the light sensors in order to obtain intensity inform ation.

The filtersensor function applies a running average filter and a mean subtraction filter to the
filterSensor
acquired values.

These functions run a state machine that checks to see if the intensity inform ation changes
threshold1/threshold2
from positive and growing to decreasing. This peak is then utilized by ptt_calc and ps_calc.

This function uses the tim e base to calculate the am ount of tim e passed between the peaks of
ptt_calc
the two different sensors.

S im ila r to ptt_calc, ps_calc uses the tim e base to calculate the am ount of tim e between two
ps_calc
peaks in the sam e sensor.

TABLE 1
T h e f u n c tio n s f o r o u r p ro g ra m be attached to the front sensor window. In greatly increase the usability by any user. In
addition, shielding from external sources of one of our tests, we lay on the ground while
light and an opaque shielding would create a m easuring our blood pressure and observed
less noisy signal. that our readings were much noisier. Sim ply by
We could achieve this by using a thinner instructing the user to sit upright while using
profile for the device that allowed for the the device allow s for a much higher am ount
sensors to be closer to the surface, in addition of accuracy. By including these instructions,
to a better encasing that allow s for less we believe that any user with basic reading
transm ission of light and a sm aller window a b ility will be able to use the device.
to m axim ize signal to noise ratio. In addition, For the Scan-E M ark II, we plan to use
proper instructions and pictures of use will a more powerful m icrocontroller with more
precise tim ing so that we can acquire higher
precision when calculating PTT. We also want
PROJECT FILES B. Land " P ro to ty p e B o a rd fo r A tm e l M e g a 6 4 4 ,”
to include an acquisition mode on the device
C o rn e ll U n iv e rs ity , h ttp :/ / p e o p le .e c e .c o rn e ll.
that acquires data for a set am ount of tim e so
e d u /la n d /P R O JE C T S /P ro to B o a rd 4 7 6 /.
that the LEDs w on't be on when the device is
not in operation, as they use heavy am ount of
power from the battery.
SOURCES Lastly, we want to explore how to shield
A T m e g a 1 2 8 4 p M ic r o c o n tr o lle r
our signal from noise that is received from
the Bluetooth module. Currently, we cannot
A tm e l C o rp . | w w w .a tm e l.c o m
c ir c u it c e lla r . c o m / c c m a t e r ia ls use Bluetooth for real-tim e data acquisition
because of noise that we encounter while
FT 2 3 2 R U S B - to -s e r ia l UART in te rfa c e recording signals.
F u tu re T e c h n o lo g y D e v ic e s In te r n a tio n a l | w w w .
If you would like to learn more about our
RESOURCES device or look at som e of the source code
ftd ic h ip .c o m
A. H en n ig and A. P atzak. (which is posted on C ircuit Cellar's FTP site),
"C o n tin u o u s b lood p re s s u re feel free to em ail us. We are currently
m e a s u r e m e n t u s in g p u lse developing a product w ebsite at w w w.m oxie-
t r a n s it tim e ,” S p r in g e r- V e r la g health.com, so stay tuned for more updates
B e rlin H e id e lb e rg 2013. in the future! O
DESIGN YOUR SOLUTION TODAY
7191Technologic CALL 480-837-5200
T i S y s t e m s

www.embeddedARM.com

Touch Panel Com puters TS-8820-BOX Industrial Controller


Panel Mount or Fully Enclosed Opto-Isolated Analog IO
Powered by:
TS-SOCKET
Series start at
M odules
$369
Q ty 100 T S -8 8 2 0 -4 7 0 0

$409 Pricing starts at


Q ty l
$6 0 8 $659
Q ty l 0 0 Q ty l

F e a tu re s c a n in c lu d e : T S -8 8 2 0 -4 8 0 0
■ 5, 7, and 10 Inch Touchscreens Pricing starts at
■ Fanless O peration from -20 °C to 70 °C
$6 4 8 $699
■ Up to 1 GHz ARM CPU, 2 GB RAM, 4 GB eMMC Flash Q ty l 0 0 Q ty l
F e a tu re s:
- Ethernet, USB, DIO, CAN, RS-232, M odbus, SPI 800 MHz ARM CPU 2x USB Host
■ O ptional Cellular, WiFi and XBee Radios
256 MB RAM 8x Opto-Isolated Inputs
■ Supports A ndroid & Linux w ith Fast Boot Times
256 MB Flash Storage 6x Digital Inputs, 6x Out

1x microSD Socket 16x ADC, 4x DAC Ports


M odbus Peripherals
1x 10/100 Ethernet PWM, Counter, & H-Bridge
Standalone Signal Processing
Benefits:
Provides a variety o f electrically isolated IO

M etal enclosure w ith rugged screw connectors

C onvenient Power over Ethernet (PoE) powers SBC

Custom izable w ith program m able 5 KLut FPGA

6x 24 VDC A uto Relays 12x 8 A Power Switches -40 to 85 °C industrial tem perature range
2x MODBUS-TW RJ45 O u tp u t Power M onitor
Boots Linux 2.6 in less than 3 seconds
Rugged Connectors 6-Bit PWM Capable

We've never Embedded Support every Unique em bedded


discontinued a systems that step of the way solutions add
product in 30 are built to with open value for our
years endure source vision customers

www.embeddedARM.com
WIZnet Connect
the Magic 2014
Design Challenge
Winners
The Internet of Thing (IoT) is
revolutionizing everyth from
consumer electronics to healthcare-
related technology. It's transforming how
humans interact with electronic systems
and Internet, and it's advancing the ways
machines connect with other machines.
The leaders driving progress in the
IoT field are inventive engineers and
creative electronics enthusiasts who are
jassionate about embedded systems, the
To study the complete projects
—including abstracts, photos,
fnternet, and problem solving.
documentation, schematics,
diagrams, and code—go to:
Back in March 2014, WIZnet launched the
circuitcellar.com/wiznet2014
Connect the Magic 2014 Design Challenge
and called on engineers around the world
to join the IoT revolution. The challenge
was to incorporate at least one WIZnet
WIZ550io Ethernet module or W5500 chip
in inventive 'Net-connected systems for a
chance win prizes and gain international
recognition. The project subm ission
deadline was August 3, 2014.

After reviewing all the entries and scoring


the projects on their technical merit,
originality, usefulness, cost-effectiveness,
and design optimization, the judges'
results are now final.

Congratulations to all the winners!


Sp o nso re d by W IZnet — c irc u itc e lla r.c o m /w iz n e t2 0 1 4
FIRST PRIZE
Chimaera
The Poly-Magneto-Phonic Theremin
Hans Peter Portner (Switzerland)
The Chim aera is a touch-less, expressive, network-ready,
polyphonic music controller released as open source hardware.
It is a mixed analog/digital offspring of the Theremin.
An array of analog, linear Hall effect
sen so rs make up a continuous tw o­
dimensional interaction space. The
sen so rs are excited with N eodym ium
magnets worn on fingers. The device
continuously tracks and interpolates
position and vicinity of multiple present
magnets along the sensor array to produce
corresponding low-latency event signals. Those are encoded
as O pen Sound Control bundles
and transmitted via U D P / T C P to a
software synthesizer.
The digital signal processing
(DSP) unit is a mixed-signal
board and handles sensor read
out, event detection and host
communication. It is based on an
A R M Cortex M4 microcontroller in
combination with WIZnet W 5 50 0 chip, which takes care of all
low-level networking protocols via UDP/TCP.

Sp onsored by W IZnet — c irc u itc e lla r.c o m /w iz n e t2 0 1 4


SECOND PRIZE
LCDTV Server
Streaming Media Using an Ethernet/USB Adapter
L in d s a y M e e k ( A u s t r a lia )

The W IZnet W IZ 5 5 0 io -b a s e d LCDTV S e rv e r


project e n a b le s an L C D T V equipped with a U S B
port to stream media a c ro s s a LA N . T h e small
adapter co n ve rts the M a s s S to ra g e D evice requests
com in g from the U S B into L A N M edia requests
using a virtual file system . W h e n co m b in ed with a
P o w er-Lin e to Ethernet Bridge, the user can watch
digital video on an older T V from an yw he re in the
neighborhood.

THIRD PRIZE
WIZ Security Network
C la u d iu C h ic u lit a ( R o m a n ia )

T h e W IZ S e cu rity Netw ork


project is a secu rity system co m p o s e d of multiple nodes. The
n o d e s ca n co lle ct and p ro c e s s information independently,
and can generate ala rm s and co m m u n ica te with the others
in order to exam ine the threats from multiple angles. Each
node has a W IZnet W 5 5 0 0 network chip, p a ssiv e Pow er
over Ethernet, PIR, se rv o motor, storage, video cam era,
and im a g e -p ro c e ss in g capabilities. A P C application can
provide monitoring and configuration functions.

Sp onsored by W IZnet — c irc u itc e lla r.c o m /w iz n e t2 0 1 4


HONORABLE MENTION
Sentry
David Penrose (United States)
The Sentry project uses an array of passive IR sensors placed in
various rooms of a senior citizen residence to track motion throughout
the building. The system also uses motion sensors attached to
chairs/beds to determine if the resident is occupying the chair/bed
The systems are connected over an RF link to a processor with the
attached WIZ550io to unobtrusively monitor the residents' activity.

Automatic Animal Feeder


Dean Bom an (United States)
The Automatic Animal Feeder system brings the Internet of
Things to the barnyard by automatically feeding hay to small farm
animals such as goats and sheep. The control system's network
interface connection is provided by a WIZnet WIZ550io network
module. You can control the feeder remotely via the Internet.

W IZpix
Internet-Connected Pixel Controller
R o b ert G asio ro w ski (United States)
The WIZpix pixel controller uses a WIZnet W5500 to connect
to the Internet and an MCU to interface with W5500 and drive
intelligent pixels. You can use the system anywhere animated
lights are required (parties, displays, snows, home decor, etc.). It
eliminates the need for a complex DMX system. Thanks to built-in
PoE, only one cable is required.

The Instrument of Things


Radko Bankras (The Netherlands)
The Instrument of Things (IoT) shows how to extend your custom
electrical instruments with industry-standard capabilities for remote
control via a TCP/IP interface. A WIZnet WIZ550io module enables
a basic web server, a portmap service, and a server for the remote
control of the instrument using the VXI-11 communications protocol.
The goal for the project is to easily add the VXI-11 communications
protocol and LAN extensions for Instruments (LXI) technology to
any electrical project.

Radio Telescope Controller


Clayton Gum brell (Australia)
This innovative controller is for a radio telescope that's designed
to observe the universe at the Hydrogen Line emission—a
frequency of 1,420 MHz (21 cm wavelength). The radio telescope
consists of a 1.7-m dish antenna mountedon a motorized azimuth/
elevation mount, steerable in any direction above the horizon. A
WIZnet WIZ550io Ethernet module provides the connectivity to the
antenna controller, allowing the telescope to be located with a clear
view of the sky and the operator and controlling computers to be
located elsewhere.

Sp onsored by W IZnet — c irc u itc e lla r.c o m /w iz n e t2 0 1 4


46 CI R C U IT CE LL A R • N O V E M B E R 2 014 #292

' .
! GREEN COMPUTING

*4

Budgeting Power
in Data Centers

Rising electricity costs restrict power


COLUMNS

consumption in data centers. When a data


center is operating under a power cap, it
i . v i needs to distribute this total power cap
among the servers and the cooling units
fairly and efficiently. This article discusses
this "power budgeting" problem.

By Ayse K. Coskun (US)

I
n my May 2014 C ircuit Cellar article, "Data controlling the peak power consum ption using
Centers in the Sm art G rid" (Issue 286), I data center power-capping m echanism s.
discussed the growing data center energy Other m echanism s of cost and capacity
challenge and a novel potential solution that m anagem ent include load shedding, referring
modulates data center pow er consum ption to tem p orary load reduction in a data center,
based on the requests from the electricity load shifting, which delays executing loads to
provider. In the sam e a rticle, I elaborated on a future tim e, and m igration of a subset of
how the data centers can provide "regulation loads to other facilities, if such an option is
service reserves" by tracking a dynam ic available.
power regulation signal broadcast by the All these aforem entioned m echanism s
independent service operator (ISO). require the data center to be able to dynam ically
Dem and-side provision of regulation cap its power w ithin a tolerable error margin.
service reserves is one of the ways of Even in absence of advanced cost m anagem ent
providing capacity reserves that are picking strategies, a data center generally needs to
up traction in US energy m arkets. Frequency operate under a predeterm ined m axim um
control reserves and operating reserves are power consum ption level as the electricity
other exam ples. These reserves are sim ilar distribution infrastructure of the data center
to each other in the sense that the dem and- needs to be built accordingly.
side, such as a data center, m odulates its Most data centers today run a diverse set
power consum ption in reaction to local of w orkloads (applications) at a given time.
m easurem ents and/or to signals broadcast Therefore, an interesting sub-problem of the
by the ISO. The tim e-scale of m odulation, power capping problem is how to distribute
however, differs depending on the reserves: a given total power cap efficiently among the
m odulation can be done in real tim e, every com putational, cooling, and other com ponents
few seconds, or every few minutes. in a data center. For exam ple, if there are two
In addition to the em erging m echanism s of types of applications running in a data center,
providing capacity reserves in the grid, there should one give equal power caps to the
are several other options for a data center to servers running each of these applications, or
manage its electricity cost. For exam ple, the should one favor one of the applications?
data center operators can negotiate electricity Even when the loads have the sam e level of
pricing with the ISO such that the electricity urgency or priority, designating equal power
cost is lower when the data center consum es to different types of loads does not always
power below a given peak value. In this lead to efficient operation. This is because the
scenario, the electricity cost is significantly pow er-perform ance trade-offs of applications
higher if the center exceeds the given limit. vary significantly. One application may meet
"Peak shaving," therefore, refers to actively user quality-of-service (QoS) expectations
circu itc el lar .c om 47

or service level agreem ents (SLAs) while


consum ing less power com pared to another
application. -♦ -s p e c p o w e r-B -m c f s tre a m c lu s te r fe rre t
Another reason that makes the budgeting
problem interesting is the tem perature and
cooling related heterogeneity among the
servers in a data center. Even when servers in
a data center are all of the sam e kind (which
is rarely the case), their physical location in
the data center, the heat recirculation effects
(which refer to som e of the heat output of
servers being recirculated back into the center
and affecting the therm al dynam ics), and

COLUMNS
the heat transfer among the servers create
differences in tem peratures and cooling a model that estim ates the throughput given FIGURE 1
efficiencies of servers. Thus, w hile budgeting, server power and hardw are perform ance The p lo t d e m o n s tr a te s b illio n of

one may want to dedicate larger power caps counter m easurem ents. In addition, in s t r u c tio n s per seco nd (BIPS)

v e r s u s s e r v e r p o w e r c o n s u m p tio n as
to servers that are more cooling-efficient. we analyzed the potential perform ance
m e a su re d on an O r a c le e n t e r p r is e
As the com putational units in a data center bottlenecks resulting from a high num ber of
s e rv e r in c lu d in g tw o SPARC T3
need to operate at safe tem peratures below m em ory accesses and/or the lim ited num ber
p ro ce s s o rs . A p p lic a t io n s ru n a re
m anufacturer-provided lim its, the budgeting of softw are threads in the application. We
S P E C p o w e r_ s s j2 2 0 8 (sp e c p o w e r),
policy in the data center needs to make sure w ere able to predict the saturation point m cf fro m SPEC CPU 2006, anc
a sufficient power budget is saved for the for each application via a regression-based s tr e a m c lu s t e r and fe rre t fr o m th e
cooling elements. On the other hand, if there equation constructed based on this analysis. P A R S E C s u ite . T h e s lo p e o f th e B IPS
is over-cooling, then the overall efficiency Predicting the m axim um server power using vs. p o w e r c u rv e a n d th e p o w e r level

drops because there is a sm aller power this em pirical modeling approach gave a w h e re th ro u g h p u t s a t u r a te s d iffe r

budget left for computing. mean error of 11 W for our 400-to-700-W s ig n if ic a n t ly a m o n g th e a p p lic a tio n s .

I refer to the problem of how to efficiently enterprise server.M


allocate power to each server and to the Such methods for pow er-perform ance
cooling units as the "power budgeting" estim ations highlight the significance of
problem . The rest of the article elaborates telem etry-based em pirical models for
on how this problem can be form ulated and efficient characterization of future system s.
solved in a practical scenario. The more detailed m easurem ent capabilities
newer com puting system s can provide— such
CHARACTERIZING LOADS as the ab ility to m easure power consum ption
For distributing a total com putational of various sub-com ponents of a server—
power budget in an application-aw are the m ore accuracy one can achieve in
manner, one needs to have an estim ate of constructing models to help with the data
the relationship between server power and center management.
application perform ance. In my lab at Boston
University, my students and I studied the TEMPERATURE, ONCE AGAIN
relationship between application throughput In several of my earlier a rticles this year,
and server power on a real-life system , and I em phasized the key role of tem perature
constructed em pirical models that m im ic this aw areness for im proving com puting energy
relationship. efficiency. This key role is a result of the
Figure 1 dem onstrates how the relationship high cost of cooling, the fact that server
between the instruction throughput and energy dynam ics also rely on tem perature
power consum ption of a specific enterprise su bstantially (i.e., consider the interactions
server changes depending on the application. among tem perature, fan power and leakage
Another interesting observation out of this power), and the im pact of processor therm al
figure is that, perform ance of som e of the m anagem ent policies on perform ance.
applications saturates beyond a certain power Solving the budgeting problem efficiently,
value. In other w ords, even when a larger therefore, relies on having good estim ates
power budget is given to such an application for how a given power allocation among the
by letting it run with more threads (or in servers and cooling units would affect the
other cases, letting the processor operate at tem perature. The first step is estim ating
a higher speed), the application throughput the CPU tem perature for a given server
does not im prove further. power cap. In my lab, we modeled the CPU
Estim ating the slope of the throughput- tem perature as a function of the CPU junction-
power curve and the potential perform ance to-air therm al resistance, CPU power, and
saturation point helps make better power the inlet tem perature to the server. CPU
budgeting decisions. In my lab, we constructed therm al resistance is determ ined by the
48 CIRCUIT CELLAR • NOVEMBER 2014 #292

ABOUT THEAUTHOR
A y s e K. C o s k u n (a c o s k u n @ b u .e d u ) is a n a s s is ta n t p r o fe s s o r in th e E le c tric a l a n d C o m p u t e r E n g in e e rin g
D e p a rtm e n t a t B oston U n iv e rsity . S h e rece ive d M S an d PhD d e g re e s in C o m p u te r S c ie n c e an d E n g in e e rin g
fr o m th e U n iv e rs ity o f C a lifo rn ia , S a n D ieg o. C o sk u n 's re s e a rc h in te re s ts in c lu d e te m p e r a tu r e a n d e n e rg y
m a n a g e m e n t, 3 -D s ta c k a r c h it e c t u r e s , c o m p u t e r a r c h it e c t u r e , a n d e m b e d d e d s y s te m s . S h e w o rk e d a t
S u n M ic ro s y s te m s (no w O racle) in S a n D ieg o , CA, p r io r to h e r c u r r e n t p o sitio n a t BU. C o sku n se rv e s a s an
a s s o c ia te e d ito r o f th e IE E E Embedded Systems Letters.
COLUMNS

hardw are and packaging choices, and can be Recently, using in-row coolers that
characterized em pirically. For a given total leverage liquid cooling to im prove efficiency
server power, CPU power can be estimated of cooling is preferred in som e (newer) data
using perform ance counter m easurem ents in centers to im prove cooling efficiency. In such
a sim ila r way to estim ating the perform ance settings, the heat recirculation effects are
given a server cap, as described above (see expected to be less significant as the most of
Figure 1). Our sim ple em pirical tem perature the heat output of the servers is im m ediately
model was able to estim ate tem perature with removed from the data center.
a mean error of 2.9°C in our experim ents on In my lab, my students and I used low-cost
an Oracle enterprise server. M data center tem perature models to enable
Heat distribution ch aracteristics of a fast dynam ic decisions.M Detailed therm al
data center depend stron gly on the cooling sim ulation of data centers is possible through
technology used. For exam ple, traditional data com putational fluid dynam ics tools. Such
centers use a hot aisle-cold aisle configuration, tools, however, typ ica lly require prohibitively
w here the cold air from the com puter room a ir long sim ulation times.
conditioners (C R A C ) and the hot air coming
out of the serves are separated by the rows BUDGETING OPTIMIZATION
of racks that contain the servers. The second What should the goal be during power
step in therm al estim ation, therefore, has budgeting? M axim izing overall throughput in
to do with estim ating the im pact of servers the data center may seem like a reasonable
to one another and the overall im pact of the goal. However, such a goal would favor
cooling system. allocating larger power caps to applications
In a traditional hot-cold aisle setting, the w ith higher throughput, and absolute
inlet server tem peratures can be estimated throughput does not necessarily give an idea
based on a heat distribution m atrix, power on w hether the application QoS demand is
consum ption of all the servers, and the met. For exam ple, an application with a lower
CRAC air tem perature (which is the cold air BIPS may have a stricte r QoS target.
input to the data center). Heat distribution Consider this exam ple for a better
m atrix can be considered as a lumped model budgeting metric: the fa ir speed-up m etric
representing the im pact of heat recirculation com putes the harm onic mean of per-server
and the air flow properties together in a speedup (i.e., per-server speedup is the ratio
single N x N m atrix, where N is the num ber of measured BIPS to the m axim um BIPS for an
of servers.!2! application). The purpose of this m etric is to

REFERENCES
[1] O. T un cer, K. V a id y a n a th a n , K. G ro ss, an d [3] J. M o ore , J. C h a se , P. R a n g a n a th a n , an d R.
A. K. C o sk u n , "C o o lB u d g e t: D ata C e n te r P ow er S h a r m a , "M a k in g S c h e d u lin g 'C o o l': T e m p e ra ­
B u d g e tin g w ith W o rk lo a d an d C o o lin g A s y m ­ tu r e -A w a r e W o rklo a d P la c e m e n t in D ata C e n ­
m e tr y A w a re n e s s ,” in P ro c e e d in g s o f IEEE te rs ,” in U S E N IX A T C -05, 2005.
In te r n a tio n a l C o n fe re n c e on C o m p u te r D e sig n
(ICCD ), O c to b e r 2014. [4] CVX R e se a rc h , "CVX: M a tla b S o ftw a re fo r
D is c ip lin e d C o n v e x P r o g r a m m in g ,” V e rsio n
[2] Q. Tang, T. M u k h e rje e , S. K. S. G u p ta , and 2.1, S e p te m b e r 2 0 1 4 , h ttp :/ / c v x r .c o m /c v x /.
P. C a y to n , "S e n s o r-B a s e d fa s t T h e rm a l E v a l­
circuitcellar.com /ccm aterials
u a tio n M odel fo r E n e rg y E ffic ie n t H ig h -P e r ­
fo r m a n c e D a ta c e n te rs ,” in IC IS IP -0 6 , O c to b e r
2 006.
T h e n e w E A G L E h a s la n d e d !

V e r s i o n 7

now
available
y

EAGLE
...what are your plans
between
November 11 & 14, 2014? i i r*

For mo e information, visit www.cadsoftusa.com


50 CIRCUIT CELLAR • NOVEMBER 2014 #292

am ount of cooling power, thus the fa ir speedup


drops. However, as the CRAC tem perature
increases beyond a point, the perform ance of
the hottest servers are degraded to m aintain
CPU tem peratures below the redline; thus, a
furth er increase in the CRAC tem perature is
not useful any longer (as in step 6).
This iterative algorithm took less than a
second of running tim e using Matlab CVX[4]
in our experim ents for a sm all data center
of 1,000 servers on an average desktop
computer. This result indicates that the
algorithm can be run in much sh orter tim e
COLUMNS

with an optim ized im plem entation, allowing


for frequent real-tim e re-budgeting of power
in a modern data center with a larger num ber
FIGURE 2 ensure none of the applications are starving of servers. Our algorithm im proved fair
The b u d g e t in g a lg o r it h m s ta r ts while m axim izing overall throughput. speedup and BIPS per Watt by 10% to 20%
fr o m th e la s t know n o p tim a l CRAC
It is also possible to im pose constraints compared to existing budgeting techniques.
te m p e r a t u r e v a lu e , and th e n
on the budgeting optim ization such that a
it e r a t iv e ly a im s to im p ro v e on th e
o b je c tiv e . T h e o b je c tiv e is m a x im iz in g
specific perform ance or throughput level CHALLENGES
is met for one or more of the applications. The initial methods and results I discussed
th e f a ir s p e e d u p in t h is e x p e rim e n t .

A f t e r s te p 5 , th e a lg o r it h m n o tic e s th e
A b ility to meet such constraints strongly above dem onstrate prom ising energy
f a ir s p e e d u p is d e c r e a s in g (ste p 6), s c relies on the a b ility to estim ate the power-vs.- efficiency im provem ents; however, there are
c o n v e rg e s to th e v a lu e in s te p 5. perform ance trends of the applications. Thus, many open problem s for data center power
em pirical models I m entioned above are also budgeting.
essential for delivering m ore predictable First, the above discussion does not
perform ance to users. consider loads with som e dependence to
Figure 2 dem onstrates how the hill- each other. For exam ple, high-perform ance
clim bing strategy my students and I designed com puting applications often have heavy
for optim izing fa ir speed up evolves. The com m unication among server nodes. This
algorithm sta rts setting the CRAC tem perature means that the budgeting method needs
to its last known optim al value, which is to account for the im pact of inter-node
20.6°C in this exam ple. The CRAC power com m unication for perform ance estim ates as
consum ption corresponding to providing air well as w hile making job allocation decisions
input to the data center at 20.6°C can be in data centers.
computed using the relation ship between Second, especially for data centers with a
CRAC tem perature and the ratio of com puting non-negligible am ount of heat recirculation,
power to cooling power.[3] This relationship therm ally-aw are job allocation significantly
can often be derived from datasheets for the affects CPU tem perature. Thus, job allocation
CRAC units and/or fo r the data center cooling should be optim ized together with budgeting.
infrastructure. In data centers, there are elem ents other
Once the cooling power is subtracted from than the servers that consume significant
the overall cap, the algo rithm then allocates am ounts of power such as storage units. In
the rem aining power among the se rvers with addition there are a heterogeneous set of
the objective of m axim izing the fa ir speed servers. Thus, a challenge lies in budgeting
up. Other constraints in the optim ization the power to a heterogeneous com puting,
form ulation prevent any server to exceed storage, and netw orking elements.
m anufacturer-given redline tem peratures Finally, the discussion above focuses on
and ensure each server to receive a feasible budgeting a total power cap among servers
power cap that falls between the server's that are actively running applications. One can,
m inim um and m axim um power consum ption however, also adjust the number of servers
levels. actively serving the incoming loads (by putting
The a lgorithm then iteratively searches some servers into sleep mode/turning them
for a better solution as dem onstrated in steps off) and also consolidate the loads if desired.
2 to 6 in Figure 2. Once the algo rithm detects Consolidation often decreases performance
that the fa ir speed up is decreasing (e.g., fair predictability. The server provisioning problem
speedup in step 6 is less than the speedup in needs to be solved in concert with the budgeting
step 5), it converges to the solution computed problem, taking the additional overheads into
in the last step (e.g., converges to step 5 in account. I believe all these challenges make
the example). Note that setting cooler CRAC the budgeting problem an interesting research
tem peratures typ ically indicate a larger problem for future data centers. O
S e r i o u s . T o o l .

2 .4 G H z S p e c tru m A n a ly z e r

S O -A P -1

t
TtTTTL
'-■
■■:I i im

1 1
I KPfPjfllJEOr- :f a 6^0 .SflOHWI^HilCt .Wlf*'

» I... II H S II A JU ^
Sptctrum C urton. U upiir# C A o hfettnfi PVMM Swrtlc-hTo

Now with:
◦ SSID/RSSI
◦ Open API
° Increased amplitude & frequency resolution

Optimize your wireless network.


Buy WiPry-Pro today.
oscium .com
D ow n loa d on the

iPod D iPhone 0 iPad w A ppS tore OSCIUM


COLUMNS

George Novacek (US)

R
ecently, I covered two passive components, electrom echanical and electrical power
resistors and capacitors. Now let's take a devices, ranging from sim ple solenoids
closer look at inductors. Basic inductors are through motors, electrom echanical actuators,
the sim plest com ponents to construct, as they various inductive sensors, relays and
are essentially nothing m ore than a coiled transform ers. Many pages would be needed
piece of w ire, usually wound on a bobbin with to only briefly address all those applications.
air or a ferrom agnetic core. In this a rticle, I'll focus on just the inductors
Inductors form the basis of most used com m only in electronic circuits. These
are alternatively called chokes, reactors,
baluns and inductors.

COMMON INDUCTORS
Photo 1 shows som e inductors one can
com m only encounter. They are available
as through-hole as well as surface mount
devices (SMD). Those in Photo 1 contain
ferrom agnetic cores to increase their
inductance as com pared with air-core coils.
Iron, for exam ple, has 5,000 tim es greater
perm eability than air. This means that 5,000
tim es few er turns of w ire would be needed
to obtain the sam e inductance. Inductors
with ferrom agnetic cores are w idely used
in applications requiring large inductance,
such as in power supplies, power line filters,
im pedance m atching and resonant (tank)
circuits, radio frequency (RF) transform ers,
and so forth. Notice the two ferrite core
exam ples located at the left and right
extrem es of Photo 1. These are to be clamped
on, typically, com puter interface cables to
increase their im pedance at high frequencies
PHOTO 1 for suppression of conducted as well as
I n d u c t o r s a n d f e r r it e c o re s u se d in e le c t ro n ic s radiated electrom agnetic interference (EMI)
ci rcu itc el lar .c om 53

caused by the signals they carry.


A m ajor area of inductor application has
been in RF circuits, as shown in Photo 2 . Here
we can see air-core inductors form ed by a
coiled w ire only as well as others with ferrite
cores w hich allow adjustm ent for tuning of
their associated tuned circuits.

REACTIVE COMPONENTS
Just like capacitors, inductors are reactive
com ponents, albeit com plem entary to
capacitors. In their ideal form , like capacitors,
they do not dissipate any power—they store

COLUMNS
energy. Capacitors store energy in an electric
field, inductors in a m agnetic field. The AC
voltage across capacitors lags the current
by 90°. The AC current through inductors
lags the voltage by 90°, as it is opposed by a
back electrom agnetic force (EMF) developed
by the inductance's m agnetic field. The unit
of inductance is Henry (H), defined as 1 V
of back EMF developed across the coil when
the current changes by 1 A in 1 s. This is a rt, it used to be a painful experience. With pho to 2
illustrated by the diagram Figure 1. the present-day va riety of low -cost inductors T y p ic a l t r a n s f o r m e r s , c h o k e s a n d c o ils

Due to Faraday's law, a changing current available on the m arket, the pain is no longer u se d in rf e q u ip m e n t

" i" flowing through a coil whose inductance ne ce s s ar y.


is constant, will generate a back EMF voltage
across the coil's term inals: EMI SUPPRESSION
In addition to sw itching supplies and other
applications based on the sim ila r principle,
such as power facto r correction, the other
This is a defining equation for inductors. com m on use for inductors in em bedded
Power stored in the m agnetic field of an ideal controllers is for EMI suppression. Different
coil - meaning no parasitic capacitance of the types of chokes are used, beginning with
w indings, nor resistance of the w ire, w ill be: resistor-like through-hole com ponents and
ending with SMD ferrite beads placed over
P = ^ L I2 a printed circu it board (PCB) trace or ferrite
2
cores clam ped over interconnection cables as
Inductors can replace capacitors (keeping seen in Photo 1.
in mind their com plem entary characteristics) At low frequencies, typ ica lly up to about
in most RC circuits, but not always vice versa. 100 kHz, it is som etim es advantageous to
C apacitors do not exhibit back EMF and, substitute an inductor with a gyrator circuit
therefore, can't be used instead of coils in (see Figure 2). The gyrator can be form ed
applications relying on it, such as autom otive w ith an operational am plifier, two resistors
ignition or sw itching power supplies. and one capacitor. Com ponent values in
In em bedded controllers capacitors have Figure 2 provide an equivalent of 1-H inductor
often been given preference over inductors in series with a 100-Q resistor. The equivalent
because capacitors have lower losses, size, inductance can be calculated using the
w eight, cost less, and exhibit superior equation:
precision. This situation has changed with the
grow ing popularity of sw itching power supplies ZM = R + JfflR1R 2C 1) || ^R 2 + -J c J
(where inductors could not be substituted
if R2 » R 1, then Z IN = j© R 1R 2C1
by capacitors). This has led to the increase
of inductors' off-the-shelf availability, their You also can build the circuit with ju st one
subsequent im provem ent in m anufacturing
processes, increase in the volum es sold, and
the corresponding cost reduction.
Engineers, out of necessity, had often
designed and built their own inductors. As
such designs rely heavily on the understanding
of m agnetics and their underlying theories, FIGURE 1
w hich, for many, are som ething akin to black T h is is a n R L c ir c u it.
54 CIRCUIT CELLAR • NOVEMBER 2014 #292

w ire gauge, but, more im portant, by the


characteristics of its ferrom agnetic core.
Should the core's m agnetic flux become
saturated, the characteristics of the inductor
change dram atically.
The fundam ental characteristic of an
inductance is that it is a reactive elem ent and
as such its impedance is frequency dependent.
FIGURE 2
S o m e tim e s y o u c a n re p la c e a n in d u c to r w it h a g y r a t o r c ir c u it.
Z =j®L =j 2nfL

The back EMF slowing down the rate of rise


of current in inductors depends on the rate
COLUMNS

of change of the m agnetic field which causes


m agnetic flux. This is expressed as:

L = — x 10-8
I
L is the in d u cta n ce in H, I is the c u rre n t
ca u sin g the m a g n etic flu x in am p s, and 0
FIGURE 3
is the m ag n etic flu x in M a xw ells (M).
O n e - t r a n s is t o r g y ra to r c ir c u it w ith
Henry, the un it of in d u cta n ce , is too
5 -H e q u iv a le n t in d u c ta n c e
larg e fo r m ost e le c tro n ic a p p lic a tio n s. You
w ill be m ore lik e ly to en co u n te r a m illih e n ry
transistor, as shown in Figure 3 . For R2>>R1 (mH) o r a m ic ro h e n ry (pH), even nanoh enry
the equivalent inductance is approxim ately: (nH), w here:

L = R 1R 3C1 1H = 103 mH = 106 ^ H = 109 nH

It is 5 H in this case. All gyrators require some When tw o (or m ore) in d u c to rs operate
current flowing through them , but in many close to each other, such as in tra n s fo rm e rs
instances, it's not a problem . For exam ple, and filte rs , th e ir re sp e ctiv e m ag netic
the gyrator in Figure 3 can be, and often is, flu x e s a ffe c t the o th e r c o ils th ro u g h m utual
used instead of a heavy netw ork inductor in in d u cta n ce , also exp re sse d as a c o e ffic ie n t
modern telephones. R4 is selected for the of co u p lin g (k). For tw o coupled co ils,
desired "off-hook" current. m u tual in d u cta n ce is:

o o
ELECTRICAL CHARACTERISTICS M= x 10-8 = x 10-8
When specifying or looking for an off-the- Ii I2
shelf inductor, there are several electrical Here, M is the mutual inductance. 0 2,i is
characteristics to keep in mind, in addition m agnetic flux in the second coil caused by
to the required inductance and m echanical the current in the first coil. 0 12 is magnetic
issues, such as m ounting, shielding, flux in the first coil caused by the current in
dim ensions and so forth. It is crucial to the second coil. I1 and I2 are the respective
pay attention to the m axim um operating currents in the first and the second coil.
current. This is not only lim ited by the coil's Mutual inductance and coupling are im portant
characteristics for coupled coils. It affects the
perform ance of tra nsfo rm ers and sensors.
.co m /
A nd, if a c c id e n ta l, it can also cause
A sk," B eig e Bag S o ftw a re , w w w .b e
unw anted e ffe c ts, such as in te rfe re n c e and
c a s e _ g y ra to r.h tm .
o s c illa to r fre q u e n c y pu llin g. The m axim um
m u tual in d u cta n ce betw een tw o co ils L1
G. N ovacek, "W ire le s s D ata L in k s (P a rt 1)," C ir ­
and L2 o ccu rs w hen m a g n etic flu x of one
c u it C e lla r 2 83, 2014.
coil c ro sse s all the tu rn s of the second coil.
O ltro n ix , "T h e o ry o f O p e ra tio n : F e rro re -
c ir c u it c e lla r . c o m / c c m a t e r ia ls s o n a n t R e g u la to rs ," w w w .o ltro n ix .n l/ e n /
M,

fe r r o r e s o n a n t - p r in c ip le .
The ratio of an actual (measured) mutual
RESOURCES inductance M divided by M max is a coefficient
H. M o re h o u se , "E v e ry th in g P. P ark, C. S. K im , M. Y. P ark, S. D. K im , and
of coupling.
You W an te d to Know A b o u t H. K. Yu, "V a ria b le In d u c ta n c e M u ltila y e r I n ­

G y ra to r s B ut W ere A fr a id to d u c to r w ith M O S FE T S w itc h C o n tro l," IEEE M


k =
X p lo re , h ttp :/ / b it.ly /1 z F O 6 d u . M,
circu itc el lar .c om 55

It has no d im e n sio n . Its m a xim u m value have been unable to find a so u rce to
is 1. For tig h tly coupled co ils, k > 0.5, w hile p u rchase a few sa m p le s fo r test. One
co ils w ith k < 0.01 are co n sid e red loosely e xcep tio n to th is is a co m m o n ly used
coupled. T ig h t co uplin g is n e c e ssa ry for co n sta n t v o lta g e tra n s fo rm e r (CVT). It is
m axim u m tra n s fe r of pow er w ith m in im u m in fa ct an e le c tric a lly co n tro lle d v a ria b le
losses in tra n s fo rm e rs . Both loose and inducto r. Its fe rro m a g n e tic core o p e ra tes
tig h t co u p lin g s are found in m any RF in fe rro re s o n a n t mode causing an o utput
c irc u its . T yp ically, a fre q u e n c y resp o nse of vo lta g e to rem a in co n sta n t du rin g input
IF filte rs can be ad ju sted by the degree of vo lta g e changes.
th e ir couplin g. As I m entio ned at the be ginning of th is
a rtic le , there are m yria d a p p lic a tio n s for
VARIABILITY in d u cta n ce in e le c tro n ics . I d id n 't dw ell on
As the c la s sic v a ria b le c a p a c ito rs, re so n a n t c irc u its because I a d d ressed

COLUMNS
in d u c to rs are also v a rie d by m e ch anical them in my C irc u it C e lla r 283 a rtic le ,
m eans, w h e th e r by sq u ee zin g and "W ire le ss Data L in k s." In the fu tu re , I'll
s p re a d in g a ir-c o re in d u c to r tu rn s or by retu rn to the su b je c t to exam in e som e
m oving the fe rro m a g n e tic co res inside the s p e c ific a p p lic a tio n s such as RF and pow er
coils. Som e la rg e r co ils m ay have a w ip er tra n s fo rm e rs , in d u c tiv e se n so rs, RLC
slid in g a cro ss it, e ffe c tiv e ly chang ing the filte rs , and m ore. 0
n um ber of tu rn s. G e n e ra lly sp ea kin g ,
v a ria b le in d u c to rs are used in the sam e
sense as trim pots. T h ey 're set once and ABOUT THE AUTHOR
fo r all. There are m o n o lith ic, e le c tric a lly George Novacek is a professional engineer with
c o n tro lle d v a ria b le in d u c to rs w here MOS a degree in Cybernetics and Closed-Loop Con­
sw itc h e s co nnect to d iffe re n t ta p s of an trol. N o w retired, he was most recently president of a multinational m a n u ­
in te rn a l inductor. facturer for embedded control systems for aerospace applications. George
A lso, M EM s-based e le c tric a lly v a ria b le wrote 26 feature articles for C ircu it Cellar between 1999 and 2004. Contact
in d u c to rs have been developed. They
him at [email protected] w ith "Circuit Cellar"in the subject line.
d o n 't seem to be used v e ry m uch. I

Wide Temp. Panel PC


• Vortex86DX2 933M H z Fanless
• Up to 1GB of Onboard Memory ■»
• Low Power Consumption
• 2 R S 232/422/485 serial ports
• 3 USB 2.0 Host Ports
• 1 0 /100 I
• PS/2 KB porTH
• Compact Flash Slot / SD Slot / Sfl
• 9 inch 1024 x 600 WSVGA TFT LCD
• Resistive Touch Screen A
• DC-IN +12VD C / +24VD C
• IP65 Front Panel
• W i-Fi (Optional)
• Giga Ethernet (Optional)
• Wide Temperature (Optional)

The PP C -090T com es ready to run w ith the O perating S ystem installed on flash
disk. A p ply pow er and w atch the Linux X -W indow s desktop user interface appear
on the vivid color LCD. Interact w ith the PP C -090T using the responsive integrated
touchscreen. Everything w o rks out of the box, allow ing you to concentrate on your
application rather than building and configuring device drivers. Just W rite-It and
Run-It... P r ic in g s ta r ts a t $ 4 9 5 f o r Q t y 1.

http://www.emacinc.com/sales/cc9

Since 1985 C
OVER
29
YEARSOF
\IT An
Phone: (618) 529-4525 • Fax: (618) 457-0110 • www.emacinc.com
BOARDS, BOOKS, DVDs AND MORE AT WWW.ELEKTOR.COM/STORE
ADVANCED CONTROL

Elektor.STORE
The world of electronics
at your fingertips!
Theory and best practices

Advanced Control
Robotics
It doesn’t matter if you’re building a line-follow­
ing robot toy or tasked w ith designing a mobile
system fo r an extra te rre stria l exp lo rato ry
mission: the more you know about advanced
robotics technologies, the better you’ll fare at
your workbench. Hanno Sander’s Advanced
Control Robotics simplifies the theory and best
practices o f advanced ro b o t technologies.
You’re taught basic embedded design theory
and presented handy code samples, essential
schematics, and valuable design tips (from con­
struction to debugging).

160 pages • ISBN 978-0-963013-33-0 • $54

qw ptfny Pi'

Êli-krür
Fun to build and use projects!
The RPi in Control Applications
Create 30 PIC Microcontroller Projects
with Flowcode 6 Raspberry Pi

This book covers the use o f Flowcode® version 6, a state-of-the-art, all-graphical based code
Hardware Projects
development tool, for the purpose o f developing PIC microcontroller applications at speed and This book is about the Raspberry Pi computer
w ith unprecedented ease. W ith o u t exception, the 30 projects in the book are fun to build and and its use in con trol applications. Dogan
use. A secret doorbell, a youth deterrent, GPS tracking, persistence o f vision (POV), and an Ibrahim explains in simple terms, w ith exam­
Internet Webserver are ju st a few examples o f projects in the book waiting to be explored and ples, how to configure the RPi, how to install
mastered. This makes the publication a perfect source o f projects constantly challenging your and use the Linux operating system, how to
hardware and software skills as you progress, resulting in advanced microcontroller applica­ w rite programs using the Python program ­
tions you can be proud of. All sources referred in the book are available for free download, in­ ming language and how to develop hardware
cluding the support software. based projects.

232 pages • ISBN 978-1-907920-30-1 • $48 290 pages • ISBN 978-1-907920-29-5 • $54

Prices and item descriptions subject to change. E. & O.E


"\ r— '

110 Elektor Editions, Over 2500 Articles


Learning to Fly W ith Eagle
DVD Elektor
Eagle V6 2000 through 2009 Android Breakout Board
Getting Started Guide This DVD-ROM contains all circuits and pro­ The FTDI FT311D is a flexible bridge th a t
The book is intended for anyone who wants an jects published in Elektor magazine’s year can inte rface you r c irc u it to an A ndroid
introduction to the capabilities o f the CadSoft’s volum es 2000 th ro u g h 2009. The 2500+ sm artphone or tablet. This Elektor Android
Eagle PCB design software package. The reader articles are ordered chronologically by release B reakout Board offers op tio n s fo r seven
may be a novice at PCB design or a professional date (month/year), and arranged in alphabet­ digital outputs, four PWM outputs, asynchro­
wanting to learn about Eagle , w ith the intention ical order. A global index allows you to search nous serial and I2C and SPI interfaces. The
o f migrating from another CAD package. After specific content across the whole DVD. Every board is com patible w ith A ndroid 3.1 (H o­
reading this book while practicing some o f the article is printable using a simple prin t func­ neycomb) or higher (Android Open Accessory
examples, and com pleting the projects, you tion. This DVD is packed w ith ideas, circuits Mode should be supported).
should feel confident about taking on more and projects that are ideal for any electronics
Ready-builtmodule
challenging endeavors. This book is supplied enthusiast, student or professional, regardless
w ith a free copy o f Eagle on CD-ROM for o f whether they are at home or elsewhere. Art..# 130516-91 • $41
MS Windows, Linux and Mac.
ISBN 978-1-907920-28-8 • $121
208 pages • ISBN 978-1-907920-20-2 • $47

Elektor is more
than just your favorite
electronics magazine.
It’s your one-stop shop
for Elektor Books,
CDs, DVDs,
Kits & Modules
The Ultimate Guide! IO-Warrior Expansion
and much more!
The LTspice IV Simulator Board
In a sturdy, hard-cover form at, The LTspice IV
www.elektor.com/store
Don’t throw o u t your old PCs and notebooks
Simulator describes the operation o f the pro­ or leave them gathering dust in the basement!
gram , all available com mands, the various They can be a useful resource: by adding this
editors, dealing w ith SPICE models, the use of universal interface card an old PC can be pres­
non-linear components and more. This book is sed into service as a measurement and control
more than just a manual. It also offers a variety ( R e k t o r hub. An IO-Warrior module on the I/F board
o f tips, m ethods and examples, all carefully takes care o f USB communication, and source
illustrated using alm ost 500 drawings, dia­ Elektor US code is available th a t w orks w ith the free
grams and screenshots on high-quality paper. 111 Founders Plaza, Suite 300 version o f Visual Studio.
The book is designed so th a t it is suitable for East Hartford, CT 06108
both beginner and veteran SPICE users. USA Ready-builtmodule
Phone: 860.289.0800
744 pages • ISBN 978-3-89929-258-9 • $67 Art.# 130006-91 • $54
Fax: 860.461.0450
E-mail: [email protected]
COLUMNS

he Sears Kenmore Model 158 sewing to obsolete collectibles; entire com puter
T machine that M ary received as a college arch itectu res rose and fell; all while that
graduation present has produced hundreds purely mechanical sewing m achine ticked
of her projects, ranging from sim ple pillow along, decade after decade.
covers to com plex free-m otion quilts. Contem porary sewing m achines offer
Fashions cycled in and out of favor; electronic far more features, but m em bers of the local
com ponents went from new -and-innovative quilting club report that five years of operation
seems typical. Even if the machine doesn't fail,
its m anufacturer m ight not keep pace with the
consequences of Moore's Law. For example, a
friend still boots an ancient PC, because her
fancy sewing machine includes a proprietary
interface card and softw are that w on't run on
any version of Windows beyond 98.
Rather than buy a new sewing machine,
M ary asked me to add a few specific features
to her dependable Model 158, including better
lighting, precise speed control, and the ability
to stop with the needle at the top or bottom
of the stroke. That doesn't seem like much,
does it?
The "b etter lighting" part involved placing
3-D printed brackets and LED strip s along
the m achine's arm , with high-pow er LEDs
replacing the incandescent lamp in its end
cap above the needle, with a DC supply to
prevent strobing. Any Circuit Cellar reader
can build that easily enough!
In th is colum n I'll describ e the fir s t steps
along the w ay to im plem enting the other
features on her list. C o n tra ry to w hat you
m ig h t e xp ect, co n tro llin g the m otor speed
PHOTO 1
poses the h a rd e st pro b lem , because the
T h e o r ig in a l fo o t p e d a l u se d s ta c k s o f g r a p h it e d is k s in a c e r a m ic c a s e a s a v a r ia b le r e s is to r th a t c o n v e rte c
p ro ject sp e cifica tio n s include low noise:
e x c e s s p o w e r in to h ea t; th e s m a ll a lu m in u m h e a ts in k s lig h t ly in c re a s e s th e s u r f a c e a r e a in s id e th e B a k e lite

c a se . T h e s m a ll ro d n e a r th e to p o f th e p ic t u r e s lid e s fo r w a r d , a p p ly in g p r e s s u r e to th e g r a p h it e d is k s
she likes the Model 158's qu iet m echanical
th r o u g h a c o n ic a l s p rin g .
sound.
circu itc el lar .c om 59

OLD-SCHOOL SPEED CONTROL FIGURE 1

The Model 158, like m ost classic sewing Kcnmore Modci 15B Sewing Machine T h e s e w in g m a c h in e 's m o to r has a

m achines, contains a single universal motor AC Motor on OC lin e a r r e la tio n b e tw e e n speed anc

v o lta g e . T h e b lu e c u rv e r e p r e s e n ts th e
belted to the central shaft driving the cams, 9000
u n lo a d e d m o t o r re s p o n s e a n d th e re d
crank arm s, eccentrics, and accessories.
c u rv e s h o w s it d r iv in g th e M o d e l 1 58 's
The m otor data plate proclaim s "100/120 V m a c h in e r y . The m o to r ru n s e q u a lly
50/60 HZ AC 1.0 AMP," but it obviously cannot w e ll fr o m a n A C o r D C s u p p ly ; th e se
dissipate 120 W on a continuous basis. m e a s u r e m e n ts u se d a 5 0 V D C be n ch
The series-connected rotor and arm ature s u p p ly .

w indings have 43-Q DC resistance and about


100-mH inductance.
The white ceram ic block in the foot pedal
shown in Photo 1 contains a graphite-disk le 15 ¿0 25 y> 35 40 45 SO 55

COLUMNS
rheostat that controls the m otor speed by OCvtils
changing the resistance in series with the
w indings: lighter foot pressure means higher
resistance, lower current, and slow er rotation; For exam ple, the m otor ran at 3 kRPM while
heavier pressure com presses the disk stacks, M ary quilted an intricate series of leafy vines.
reduces the resistance, and increases both Figure 1 shows that speed requires 50 V across
current and speed. The "control loop" closes the motor, w ith the rem aining 70 V across the
through the operator's eyes and foot, with rheostat. Assum ing 700 mA of m otor current,
su rp risin g ly good results. the graphite disks have a resistance around
With no pressure on the foot pedal, the 100 Q and dissipate 50 W in the foot pedal.
brass strip near the top of the picture doesn't She generally stops sewing when the pedal
connect the graphite disk stacks, removing surface reaches 140°F, generally after half an
power from the motor. Just before the pedal hour of interm itten t use.
reaches full travel under heavy pressure, a As you m ight im agine, the aged brass
brass disk em erges from the hole visib le near contacts and w orn graphite disks inside the
the fron t of the ceram ic insulator, shorts the foot pedal don't produce a clean analog signal,
two brass tabs, and connects line voltage particula rly when operated at logic-friendly PHOTO 2
A 3 -D p r in te d f r a m e a lig n s th e b ra s s
directly to the w indings. In between those voltages, so updating the sewing machine's
tu b e h o ld in g a n e o d y m iu m m agnet
lim its, the graphite disk rheostat acts as a perform ance m ust sta rt with m odernizing the
w it h th e H all e ffe c t m a g n e t ic s e n s o r
resistance between 1 kQ and 30 Q. foot pedal.
at th e b o tto m of th e r e c ta n g u la r
A universal motor can run equally well from o p e n in g . In th e tr u e s p ir it o f ra p id
an AC or DC supply, although AC is far more MAGNETIC PEDAL POSITION p r o to t y p in g , I s a n d e d about 1 mm
common these days. Figure 1 shows the motor SENSING fr o m th e f r a m e to c le a r th e p e d a l a t
speed as a function of voltage using a 50-V DC Contem porary sewing m achine foot its fu ll s p e e d p o s itio n ; th e fin a l f r a m e
bench supply; the blue curve from the unloaded controls use linear potentiom eters or optical v e rs io n w ill f it c o rr e c tly !

motor and the red curve with the sewing


machine's normal mechanical load. In both
cases, the motor speed varies linearly with the
applied voltage and you can easily extrapolate to
higher voltages. For example, the motor's 120 V
maximum corresponds to 11 kRPM while driving
the sewing machine's mechanical load and, in
fact, I've measured almost exactly that speed.
The m otor current depends more strongly
on the mechanical load than the speed, from
500 mA for the bare m otor to 700 mA driving
the sewing m achine, varying about 10% over
the entire speed range. Although the drive
belts slip before the m otor stalls, the locked-
rotor current approaches 3 A, lim ited by the
w inding resistance.
Unlike contem porary digital or analog
controls, the foot pedal operates at power line
voltages while conducting the entire m otor
current. Because the rheostat dissipates
all of the power not used by the m otor at
a given voltage and current, it can become
uncom fortably hot during long free-m otion
quilting sessions.
60 CIRCUIT CELLAR • NOVEMBER 2014 #292

FIGURE 2 My November 2013 column used an SS49


The H all e ffe c t s e n s o r s a tu ra te s at
sensor to control LED current, with an op-
e a ch e n d o f its tra v e l, w it h a s m o o th
am p circuit rem oving the sensor's zero-field
t r a n s it io n o v e r th e e n t ir e p e d a l tra v e l.
VCC/2 bias and am plifying the signal. In the
W ith p r o p e r s c a lin g , t h is c u r v e w o rk s

p e rfe c tly fo r s p e e d c o n tro l.


foot pedal, I sim p ly epoxied a sm all bias
m agnet to the back of the sensor, so that
the output saturates at 0.8 V w ith the larger
m agnet at its distant "pedal up" position. At
the closer "pedal down" position, the larger
m agnet's field overw helm s the bias magnet
and saturates the sensor output at 4.4 V.
Figure 2 shows the sensor output voltage
as a function of pedal position: the voltage
COLUMNS

sensors m echanically linked to the pedal saturates sm oothly at each end of the pedal
motion. While I could probably reverse­ travel, with a nearly linear slope in the
engineer one of those controls and adapt it middle. A potentiom eter or optical encoder
to the Model 158, a m ore direct approach would generate a linear slope over the entire
seemed easier: replace the rheostat inside m echanical range, with abrupt transitions
the old pedal housing with contem porary at each end, so this sm ooth m agnetic curve
circu itry using a low -voltage supply. seem s much more suitable for direct speed
Photo 2 shows a prototype sensor with control w ithout any fu rth er shaping.
an SS49 linear Hall effect sensor m easuring The first 3-D printed fram e supported and
the m agnetic field produced by a neodym ium aligned the telescoping brass tubes with only
m agnet that approaches the sensor as the a bit of shim m ing, which certainly came as
ABOUT THE AUTHOR foot pedal moves downward. The white 3-D a pleasant surprise. The ragged honeycomb
Ed N is le y is a n EE a n d
printed fram e uses the sam e mounting holes visib le along the fron t edge shows w here the
as the ceram ic rheostat, with the m agnet on a block didn't quite fit under the fully depressed
a u th o r in Poughkeep­
brass tube attached to the original actuating pedal. I thinned that edge with a belt sander,
s ie , NY. C o n t a c t h im a t
bar near the rear of the housing. A larger brass updated the solid model, and the next
e d .n is le y @ p o b o x .c o m
tube in the fram e surrounds the m agnet tube version will look much more finished: rapid
w it h " C i r c u i t C e lla r " in
to ensure exact fron t-to-back motion with low prototyping at work!
th e s u b je c t lin e to a v o id
friction. The Hall effect sensor, barely visible The num bers look good, but there's
s p a m filte rs .
as the thin black rectangle near the fron t of nothing like an actual test to v e rify how it
the rectangular opening, attaches to the three works.
w ires passing below the cylindrical magnet.
STEPPER MOTOR ELIMINATION
Photo 3 shows one of the m ost astonishing
coincidences I've ever seen: a NEMA 23 stepper
m otor fits perfectly into the space vacated
by the original AC motor, its 1/4 inch shaft
m atches the original pulley, and the pulley
co rrectly aligns with the drive belt. I filed a
flat on the stepper shaft to accom m odate the
pulley setscrew , but that was the extent of
the hardw are m odifications.
The 3-D printed adapter plate isn't
suitable for long-term use, because the
stepper m otor case approaches the PLA
plastic's 60°C glass tra n sitio n tem perature
during extended operation, but it sufficed for
my initial tests. As you can tell, a 3-D printer
sim p lifie s designing the m echanical parts of
a project, even if I m ust m achine the final
parts from metal or a m ore rugged plastic.
Of course, a NEMA 23 stepper m otor can't
possibly run at the sam e 11 kRPM as the
original AC motor, but it has such sim ple drive
requirem ents that I lashed together the test
PHOTO 3
setup in Photo 4 to check out the m odified
A N E M A 2 3 s te p p e r m o t o r on a 3 D p r in te d b r a c k e t f it s p e rfe c tly in th e s p a c e in te n d e d fo r th e o r ig in a l A C
foot pedal control. The stepper inside the
m o t o r. I t 's a p o o r r e p la c e m e n t (fo r re a s o n s d e s c r ib e d in th e te x t), b u t it s u ffic e d to c h e c k o u t th e H all e ffe c t sewing m achine connects to a M542 stepper
s e n s o r in th e m o d if ie d fo o t pedal. driver powered from a 36-V DC supply. The
E X P E R I E N C E

C -R U N F O R A R M
In I A R E m b e d d e d W o r k b e n c h

C-R U N is a high-performance runtim e analysis add-on


product, fully integrated with world-leading
C/C++ compiler and debugger tool suite
IAR Embedded Workbench.

C-R U N performs runtim e analysis by monitoring applica­


tion execution directly within the development environment.
The tight integration with IAR Embedded Workbench improves
development workflow and provides each developer with access to
runtime analysis that is easy-to-use.
Join us at ARM TechCon! ft IAR
Booth 5 1 2 SYSTEMS
62 CIRCUIT CELLAR • NOVEMBER 2014 #292

PHOTO 4 in the foot pedal, maps that value into the


T h e A rd u in o U NO b o a rd c o n v e rts the
range of speeds that the stepper m otor can
an a lo g s ig n a l fro m th e foot pedal
handle, com putes the num ber of hardw are
(not sho w n ) into a v a ria b le -fre q u e n c y
tim e r ticks between each stepper pulse, and
pu lse tra in fo r th e M 5 42 s te p p e r d riv e r

p o w e re d fro m th e 3 6 V D C b ric k o r
updates the tim e r accordingly. Because the
th e left. A ll o f m y te sts use a d u p lica te
Hall effect sensor presents such a sm ooth
" c ra s h te s t d u m m y " M od el 158 on m y curve, the direct linear m apping produces a
w o rk b e n c h , n o t M a ry 's fa v o r it e s e w in g very nice pedal response.
m a c h in e . The constants baked into the map()
function show why the stepper m otor w on't
w ork in this application: it cannot turn faster
than about 2500 RPM and, because its torque
drops off dra m a tica lly w ith increasing speed,
COLUMNS

the slightest additional load at full speed


stalls the motor. Although d ifferent steppers
have different lim its, this is typ ical of sin g le­
stack NEMA 23 stepper m otors and there's no
way to increase the top speed by a factor of
Arduino UNO reads the analog voltage from four w hile also boosting the available torque.
the foot pedal, which sits out of sight on the A few m inutes after the m otor started
floor, and sends a corresponding pulse train turning, M ary walked into the Basem ent
to the driver. Laboratory to find out w hat I was doing. Even
The Arduino code in Listing 1 reads the w ith 1/8 m icrostepping, the m otor excited
analog voltage from the Hall effect sensor howling m echanical resonances in the rigid
sewing m achine fram e which w ere clearly
audible throughout the house. Because the
motor m ust operate over a very w ide speed
PedalV = ReadAI(PIN_PEDAL);
range, there seem s to be no way to silence
StepRPM = (float)map((long)(1000.0*PedalV),940,4200,0,2500);
the m ultiple resonances.
StepRPM = constrain(StepRPM,0.0,2500.0);
M ary can also hear the supposedly
ultrasonic current chopping w aveform with
if (StepRPM >= MIN_RPM) {
the stepper m otor at rest. I think she's
hearing m echanical su b-harm o n ics excited in
StepPPS = (StepRPM * STEP_PER_REV) / 60.0;
the m otor w indings and fram e, but, in any
event, the high noise level im m ediately ruled
StepPd = 1.0 / StepPPS;
out fu rth e r testing with steppers, current
StepPdCt = StepPd / TICKPD;
choppers, and PWM drives. She sews in a
quiet room , w ith classical m usic playing in
if (StepPdCt != OldStepPdCt) { // changed?
the background, and any changes to her
sewing m achine m ust not intrude on that
noInterrupts();
tranquility.
TCCR1B &= 0xf8; // stop Timer1
In engineering term s, that's an Absolute
ICR1 = StepPdCt; // set new period
M axim um Rating.
TCNT1 = StepPdCt - 1; // force immediate update
TCCR1B |= TCCRxB_CS; // start Timer1
CURRENT LIMITING SPEED
interrupts();
CONTROL
W ithout the "no audible noise"
OldStepPdCt = StepPdCt;
requirem ent, a buck-topology DC power
}
supply would make sense, but I decided
}
that a brute force approach would be both
else {
sim pler, more likely to succeed, and certainly
noInterrupts();
faster to im plem ent.
TCCR1B &= 0xf8; // stop Timer1
The original foot pedal acted as a variable
interrupts();
resistor, so a current lim iter should have much
the sam e effect. The RMS voltage across the
OldStepPdCt = 0xffff; // force update
w indings w ill still determ ine the m otor speed,
}
w ith the rem aining voltage appearing across
the lim iter w henever the line voltage exceeds
LISTING 1 the m otor's requirem ents at the preset
T h is A r d u in o ro u t in e re a d s th e a n a lo g v o lta g e fr o m th e fo o t p e d a l, s c a le s it to s p a n th e s te p p e r m o t o r's current.
a llo w a b le s p e e d r a n g e , a n d lo a d s th e c o r r e s p o n d in g t ic k c o u n t in to th e h a r d w a r e t im e r . I t tu r n s o ff th e t im e r Because a universal m otor runs equally
to p re v e n t o u t p u t p u ls e s w h e n th e in p u t v o lta g e in d ic a t e s th e p e d a l is n 't b e in g p re s se d .
well on AC or DC, powering the motor
Join The Elektor Community
ecom e a GREEN M em b er Now!

Y o u r G R E E N M e m b e r s h ip
C o m p r is e s :
EXCLUSIVE OFFER
FREE E-BOOK on AVR/Software
• 10 Editions of Elektor magazine in digital
Defined Radio with an Elektor
format (pdf)
• Direct access to Elektor.LABS; our virtual,
GREEN Membership!*
online laboratory Order Today at
• Direct access to Elektor.MAGAZINE; our www .elektor.com /m em bership
online archive for members * Available through www.elektor-magazine.com after you have received your magazine download login details.

• A minimum of 10% discount on all


products in Elektor.STORE
• Elektor.POST newsletter sent to your email
account each week
• 25 Extra Elektor projects per year (through
Elektor.POST)
• Exclusive GREEN Membership card con­
taining a state-of-the-art Mifare Ultralight
RFID/NFC chip usable with NFC-compatible
smartphones

Take Out Your GREEN Membership Now at www.elektor.com/qreen-membership

Connect with us! j t ¡¡| w w w . f a c e b o o k . c o m / e i e k t o r im www.twitter.com/eiektor


64 CIRCUIT CELLAR • NOVEMBER 2014 #292

mA/div) during m ost of each half-cycle. The


j 5 0 .0 V I 1 0 .OS ‘- 0 , 0 0 5 g .O O ^ / fL STgP tra n sisto r collector voltage in the top trace
ranges from nearly zero when the current
falls below the lim it to nearly 200 V during
com m utation spikes during the current-
lim ited part of the cycle. The com m utation
noise also occurs w ith the o riginal resistive
control and is com pletely inaudible, even to
M ary's ears.
The lethally dangerous test circuit in
Photo 6 produced the traces in Photo 5. The
heatsink under the bridge re ctifie r on the
right w asn't stric tly necessary, but provided
COLUMNS

a bit of m echanical sta b ility fo r the probes.


The blocky ET227 tra n sisto r atop the huge
■........1"....... j........ *H...... ¡'-j.........- f ........ ...........j*.........j-" CPU heatsink may come as a su rp rise, but
the brute force approach requires more
_____ é_____ :______:____ _______ I _____ _ l____ :_____ :______:___ power handling capacity than a typ ical TO-
t l = S .d d ih r , = lO.dPirr, i\t = Fi. MOmr, l/'flt = 15fi.il H i
220 power MOSFET can provide.
The schem atic in Figure 3 shows the
PHOTO 5
connections, with an isolated variable
T h e E T 2 7 7 tr a n s is t o r c o lle c to r v o lta g e ris e s a s it c la m p s th e m o t o r c u r r e n t to 6 2 0 m A . T h e 50 W d is s ip a tio n tra n sfo rm er providing the power to allow
d u r in g th o s e p e a k s a v e r a g e s o u t to 3 0 W o v e r th e e n t ir e p o w e r lin e cy cle . grounding the tra n sisto r em itter w ithout
shorting the oscilloscope ground to the power
line. The final c irc u itry will require optically
through a bridge re ctifie r allow s a single isolated signals and careful insulation, but
series tra n sisto r to control the current in for this test I m anually controlled the base
both halves of the AC cycle. Both the rectifie r drive using an isolated bench power supply.
and the tra n sisto r m ust w ithstand the full The ET227 NPN power tra n sisto r I used
line voltage and m axim um m otor current: dates back to the sam e era as the sewing
this circ u itry lies fa r outside the usual machine. My buddy Eks found a set in his
m icro co n tro lle r-frien dly realm of digital logic! collection when he realized I'd need them ,
The bottom trace in Photo 5 shows the w hich was several m onths before I came to
m otor current lim ited to ju st over 600 mA (200 that conclusion. The datasheet of scanned
page im ages gives the tra n sisto r's m axim um
DC ratings: 1 kV collector voltage, 100 A
PROJECT FILES -------- , " L o w -lo s s Hall E ffe ct C u rr e n t S e n s in g ,” collector current, and 960 W dissipation. The
C ir c u it C e lla r 28 0 , 2 013. DC current gain is less than 10 for collector
currents under a few am ps, so the tran sisto r
A. S a tt a r a n d V. T sukan ov, " L in e a r P ow er w ill require over 100 mA of base drive to pass
M O S FE T S B a s ic an d A p p lic a tio n s ,” A N 6 8 , IXYS 1 A of collector current.
C o rp ., h ttp : / / ix y s .c o m /D o c u m e n ts / A p p N o te s / Those ratings seem gro ssly excessive
IX A N 0 0 6 8 .p d f. for a sewing m achine m otor that runs from
120 VAC at no m ore than a few am ps and,
W ik ip e d ia .o r g , "U n iv e rs a l A C -D C M o to rs,” in fact, the ET227 would be overqualified in
c ir c u it c e lla r . c o m / c c m a t e r ia ls h t tp s : / / e n .w ik ip e d ia .o rg / w ik i/ U n iv e r s a l_ m o to r. the usual sw itching power supply. In this
case, however, the Safe Operating Area plot
RESOURCES in Figure 4 shows why it's barely adequate.
SOURCES The tra n sisto r's m axim um ratings define
E. N isle y, "K e n m o re 158:
SS49 E Hall effe ct s e n s o r the upper edge and right side of the Safe
Hall E ffe c t S p e ed C o n ­
H on eyw ell | h ttp : / / s e n s in g .h o n e y w e ll.c o m / Operating Area: the ET227 can w ithstand 1 kV
tro l P e d a l,” h ttp :/ / s o fts o ld e r.
p r o d u c t-p a g e ? p r_ id = 3 6 5 2 6 or 200 A for no more than 50 |js! Although the
c o m /2 0 1 4 / 0 7 / 0 9 /k e n m o re -
1 5 8 -h a ll-e ffe c t-s p e e d - c o n tr o l- 200 A pulse current rating is twice the 100 A
IX T N 6 2 N 5 0 L E xtend e d FB SOA MOSFET DC rating, that's for a single, very sh o rt pulse.
p e d a l/.
IXYS C o rp . | h ttp : / / ix y s .c o m / P a r tS e a rc h R e - As the pulse becom es longer, the transistor
s u lt s .a s p x ? s e a r c h S tr = ix tn 6 2 n 5 0 l must operate w ithin a sm aller part of the SOA
---------, "K e n m o re M odel 158
S e w in g M a c h in e : Cool W h ite plot, eventually being lim ited to the DC region
M S e r ie s s t e p p e r d r iv e r below and left of the innerm ost boundary.
LED S t r ip L ig h ts ,” h ttp : / /
L e a d s h in e T e c h n o lo g y Co. | w w w .le a d s h in e .c o m Because I'm applying 60 Hz full-w ave rectified
s o fts o ld e r.c o m / 2 0 1 4 /0 4 / 0 2 /
k e n m o r e -m o d e l-1 5 8 -s e w in g - AC, the pulses repeat every 8.3 ms and the
m a c h in e - c o o l- w h ite - le d - s tr ip - single-pulse lim its don't apply: the transistor
lig h ts / . must operate w ithin its DC lim its.
c ir cu itc e ll ar .c om 65

The red point in the lower right shows the


conditions applied to the tra n sisto r in Photo
5: about 200 V and 600 mA, barely w ithin the
DC SOA.
The "L im it Locked" point shows what
happens w ith the collector current lim ited
to about 1 A and the rotor locked. The base
drive lim its the collector current to 1 A, the
w inding resistance drops about 50 V at 1 A,
and the tra n sisto r collector m ust support the
rem aining voltage. The peak voltage on a 120
VAC power line is 170 V, w hich I round up to
200 V to account for high line conditions, and

COLUMNS
the point at 150 V, 1 A lies even closer to the
DC boundary.
The "Locked Rotor" point shows the
conditions when the base drive allow s more
than the 3 A of m otor current a locked rotor
w ill draw from the power line. The collector
would saturate at about 1 V, because the
tra n sisto r doesn't lim it the current, and the
entire line voltage appears across the motor.
PHOTO 6
That's deep inside the DC SOA, w here the
T h e h u g e E T 2 2 7 NPN t r a n s is t o r on th e h e a ts in k a c ts a s a c u r r e n t lim it e r c o n t r o llin g th e m o t o r sp e e d . U n lik e
ET227 rem ains perfectly happy.
a m o r e c o m p le x a n d e f f ic ie n t PW M d riv e , it s im p ly d u m p s e x c e s s p o w e r in th e la rg e a lu m in u m h e a ts in k . T h e
Homework: given the m otor
s m a lle r h e a ts in k h o ld s a b r id g e r e c t if ie r th a t p ro v id e s p u ls a tin g D C to th e m o t o r a n d ET 227.
ch aracteristics, fill in the points for locked-
rotor conditions w ith the collector current
lim it set between 500 mA and 3 A.
Contem porary sw itching power supply
designs can sw itch sim ila r loads with
relatively sm all MOSFETs, but only a fter
ensuring that the tra n sisto rs operate fully on
or fully off. With a stric tly lim ited transition
tim e and tight control over the energy stored
in reactive com ponents, the tra n sisto rs
venture only briefly into the up per-rig ht
corner of th eir SOA diagram and live to tell
the tale.
FIGURE 3
The ET227 dissipates about 30 W under
B e c a u s e a u n iv e rs a l m o t o r c a n ru n on e it h e r A C o r D C, a b r id g e r e c t if ie r a n d a b r u t e - f o r c e lin e a r tr a n s is t o r
the conditions shown in Photo 5, but a quiet ca n s u b s t itu te f o r a n e la b o ra t e PW M d riv e . T h is p ro to t y p e la y o u t u se s a n is o la tio n t r a n s f o r m e r a n d an
fan should keep that under control. There's is o la te d p o w e r s u p p ly , w h e r e a n a c tu a l c ir c u it w o u ld d e p e n d on o p tic a l is o la to rs , g ro u n d e d e n c lo s u re s , an d
no sw itching noise, M ary's foot w on't get hot, a d e q u a te in s u la tio n .
and I think this w ill w ork out quite well.

CONTACT RELEASE
The sew ing m achine appearin g in this
colum n is a duplicate Kenm ore Model 158
I bought on eBay as a crash test dum m y
that allow s me to develop m o d ifica tio ns
in my shop w ith my tools and instru m ents
nearby, then update M ary's m achine with
m inim al dow ntim e. Eventually, the dum m y
w ill becom e a donor filled w ith spare parts.
Your favorite parts d istrib u to r w on't
c a rry long-obsolete ET227 tra n sisto rs, so FIGURE 4

you should consider MOSFETs rated for linear D e s p ite its 1 kV a n d 1 00 A ra tin g s ,

use. IXYS offers several MOSFETs th e S a fe O p e r a t in g A re a p lo t fo r th e


E T 2 2 7 NPN t r a n s is t o r b a re ly in c lu d e s
characterized near the DC boundary and the
th e s e w in g m a c h in e 's ty p ic a l o p e ra tin g
App Note link in the Resources section - x t irtm w s c o n d itio n s : a m e r e 2 0 0 V a t 6 0 0 m A .
provides much m ore detail about line ar­
A lo ck e d r o t o r s ta ll w it h a 1 A c u r r e n t
mode SOA lim itatio ns. G
Sjlr OfWJtiqf A#«« lim it c o m e s v e ry c lo s e to th e e d g e o f

th e S O A .
66 CIRCUIT CELLAR • NOVEMBER 2014 #292

FROM THE BENCH

Embedded Voice
Recognition (Part 2)
COLUMNS

The first article in this series introduced the EasyVR module


for embedded voice recognition. This article details how
to add and access sound files with your module.

By Jeff Bachiochi (US)

ast month, I dem onstrated how to use The module also has one audio file that is
L the TIGAL EasyVR recognition module
to control a PC application. The module's
preprogram m ed. It is a "beep," which I
used to indicate an error in recognition. The
serial port accepts ASC com m ands from an EasyVR module has room for many m inutes of
application and perform s speech recognition additional sound files.
on live audio input looking for a match within Last month, I introduced the EasyVR
a selected word group. It reports status back Com m ander application that aids in adding
through the serial port and your application and training your own SD w ords to your
uses the results to determ ine w hat to do EasyVR module. This month, I'll concentrate
next. The PC application I w rote began as on how sound files are added and accessed
a manual shape-draw ing program , which with your EasyVR module.
included circles, boxes, and ellipses. Each
shape has param eters like color, size, and AUDIO
position that are in itially random ly selected. If you don't have an audio editor application
Once debugged, I added serial routines to on your PC, I recom m end checking out
com m unicate with the EasyVR module. The A udacity (http://audacity.sourceforge.net/),
param eters were added into word groups which is a free, open-source, cross-platform
on the EasyVR module. The result enables all audio editor available for Windows, Mac,
the param eters to be controlled via speech and Linux. With Audacity, you can im port or
recognition. record, edit, analyze, and export audio files.
The EasyVR has 28 preprogram m ed Of interest here is the a b ility to record a mono
speaker-independent (SI) standard words 16-bit WAV file using your system 's sound
divided into four groups that are available card and an internal or external microphone.
w ithout any training. You can add up to 32 You can record a sound effect, speech, music,
additional speaker-dependent (SD) words by or other noise to be played back through a
training each using the attached microphone. speaker connected to your EasyVR module. I'll
circu itc el lar .c om 67

be using audio output to not only indicate an recognition as well as high-quality, low -data-
error using the preloaded "beep" file, but also rate com pressed speech (audio). EasyVR
add an audio list of the acceptable vocabulary comes with a design tool to help create and
should a user need a hint. manage speech and sound synthesis. Quick
A few m onths ago, I showed how an IR Synthesis 5 (QS5) gathers together your
remote can be used to access a num ber of WAV files and checks that they are in a legal
different IR com m unication form ats. This form at. Before building an indexed sound file,
project used a way to define IR protocols using each WAV file is com pressed using a user-
a readable descriptive form at. This descriptive selectable form at. Each com pressed file can
TABLE 1
form at was used to identify IR form ats and be played so you can review the effects of
For t h is p r o je c t I began c o lle c tin g
recreate them. The m icrocontroller handling com pression.
u s e fu l com m ands in to w o rd g ro u p s
the IR receiver and tra n sm itter used an Photo 2 shows my files after com pression.
and c r e a t in g lo g ic a l p a th s b e tw e e r
available serial port for user I/O. Initially, this There are a few other interesting things that

COLUMNS
g ro u p s . I u se th e c o m m a n d " W h a t? "
was used to investigate som e IR rem otes I you can do with QS5. The WAV files can be to p r o m p t th e u s e r w it h a u d io o u tp u t.
had collecting dust. In the end, I was able to used to create sentences from individual th a t lis ts th e w o r d s in th e 'a c tiv e ' w o rd
replace my TV/cable rem ote and control the words or phrases. Perhaps your scrip ts have g ro u p .

equipm ent from my laptop's serial port.


I wanted to take that IR project a step
beyond serial port laptop control with the use Group Listening For Audio Goto
of speech recognition to send IR commands.
0 Forever Remote Which Device? l
Adding som e audio prom pts to EasyVR can
guide and rem ind a user w hat com m ands are l 1 second TV TV Function? J
available. With the vocabulary broken down Cable Cable Function? 3
into a few word groups as shown in Table 1,
What Devices — Menu l l
I had to prepare a few WAV files containing a
list of each words from the group. The audio J 1 second Power J
file plays whenever EasyVR hears the word Louder
"W hat?."
Softer
I use the word "R em ote" as the trigger.
EasyVR begins in a mode that looks for Mode
a single trig g er word. This enables it to What Devices — Menu J J
disregard all other input until this trig g er is
3 1 second Power 3
recognized. Once this word is recognized,
the EasyVR plays a WAV file that include the LAST 3
w ords "W hich Device?." This lets me know Channel Cable Channel? S
that it has heard and understood my trigg er
MENU Cable Pad! 4
word. I can change the active word group
and continue recognition using a com pletely GUIDE 4
different group of words. What Devices — Menu 3 3
To create this file, I ran the Audacity
4 1 second DOWN 6
application and recorded the phrase "W hich
Device?." My 22" LED flat screen m onitor has UP
a built-in cam era and m icrophone that I use LEFT
to video chat with friends. This m icrophone
RIGHT
w orks well for recording audio (once I pause
Pandora to elim inate the background music OK
I listen to during the day). Using Audacity TV J
enables me to playback the audio clip and What Devices — Menu 4 4
m odify it, clip out leading and trailing silence,
and am p lify and filter it prior to saving it in S 1 second 0 S
the proper form at. The recording is displayed 1
in tim eline fashion, which makes it easy to edit 2
(see Photo 1). While you can record and save
your audio on the fly, it's a good idea to w rite 3
down a scrip t of ju st what you w ant in each of 4
the files. This way you can be most productive 5
by finishing your "recording session" quickly
6
and moving on to the next step.
7
QUICK SYNTHESIS 5 8
Last month, we found that EasyVR uses the
9
Sensory RSC4x m icroprocessor for speech
68 CIRCUIT CELLAR • NOVEMBER 2014 #292

once, but I will save all this for som e future


projects. Right now, we ju st need to build the
com pressed files into a single indexed sound
file. Use the Build Linkable Module option to
do this. Once built, this file can be downloaded
directly using the EasyVR developm ent kit
board. Just select the correct port and DevKit
will place the module in the correct state,
download the audio file, and you are done.
Now it's back to the EasyVR Com m ander
application. Last month, I explained how to use
the program to docum ent and train groups of
w ords for recognition. A demo PC application
COLUMNS

used a serial port to com m unicate w ith the


EasyVR and make use of its recognition skills.
That application received recognition status
PHOTO 1
inform ation as control for the application.
T h e fre e a u d io e d ito r A u d a c it y is s im p le to u se . T h e r e c o rd e d a u d io is p re s e n te d in a tim e lin e th a t c a n be
In Photo 3 you can see that the sound file
e d ite d w it h v a r io u s to o ls u n til it s o u n d s ju s t rig h t.
I created was ingested into the sound table
area in the EasyVR module.
I loaded my speaker-dependent word
groups (back in Table 1) and completed
the required training for each w ord, which
involved saying each word twice. Refer to
|sxr, # ion M'rY.tv*i Part 1 of this article series for a complete
0 Wtwh Dim-»
3 ry CflUn'MfrafPMV ISC6¥■ im frefrrcti Is CwMritt »p list of all the com m ands available when using
0 -■'.t . SL*nHi, ■V"I- ¥ im ■ BtLvutr fi.G
0 WlaLChS”1 .mi Chwv We !5XfcBC. ifif' Wtt br*-: C&HUdl t/SQft&l* the EasyVR module. In Table 2 I list the few
0 5 V « _ i; J . i . l
0 OOnTi'.If-L«SIbtfl’111. j Vi-I. » HIJ LlEtrtyvi com m ands that are necessary to make use of

the system . This tim e around, my PC w asn't
running the application. It was com pletely
standalone using the m odified IR project as
the application that could com m unicate with
J; the EasyVR module.
It is im portan t to note that com m unication
w ith the EasyVR module contains only
printable characters. All com m ands are
Lj lowercase characters and each data byte is
represented by characters "@ " through "'"
VMtiwmmuI(t31)*jao§fnurt he (the apostrophe character). 0x40 m ust be
subtracted from each data byte to obtain the
PHOTO 2
actual represented value. For exam ple, "@"
Q u ic k S y n t h e s is 5 c o lle c ts , c o m p r e s s e s , a n d p a c k s W A V file s in to a s in g le in d e x e d a u d io file th a t c a n be
(ASCII value = 0x3F) represents 0x3F-0x40
im p o rt e d in to a n E a s y V R m o d u le .
(minus-1), "A" = 0, "B " =1 , and so on.
a num ber of phrases that are repeated, such
as the folllowing: INTEGRATING EASYVR
A fter I finished program m ing the EasyVR
"T his is phrase num ber 1." module for the application, I had to include its
"T his is phrase num ber 2." hardw are in the project. I chose to integrate
"T his is phrase num ber 3." the EasyVR module into this project instead of
designing in a Sensory RSC4x m icrocontroller
You can create four files: "T his is phrase If I had been tryin g for the most low -cost
num ber," "1", "2", and "3". While there is an design, and if I'd had the tim e to develop the
extra file, you can create three sentences of project in a single m icrocontroller, I might
phrase 1 and 2, 1 and 3, and 1 and 4. These have used one of Sensory's developm ent and
will take up less space than repeatedly saving prototyping platform s. But since those w eren't
the sam e phrase over and over. my priorities, using the EasyVR module was a
The next feature is used in puppetry definite tim e saver.
w here you m ight want mouth movement The EasyVR module requires a m inim um
to coincide w ith the speech. Lip Sync can of four signal connections to operate: TTL,
autom atically create a mouth position track TX and RX, plus power (+3.3-5 V) and
based on the audio. Also, the device is capable ground. You don't need to be concerned with
of MIDI output of up to eight instrum ents at m icrophone and speaker connections, as they
circu itc el lar .c om 69

connect directly to the module. However, " E a s y V R C o m m a n d e r - V 3 .7 .2 5

if you refer to the schem atic in Figure 1, File Edit lo o ls Help

you'll notice I brought these signals out to ü IICOMIOO H I ^ I Q Q Q I S Q Q I i ? ! hs 1 ^ Jfc I - 1


phone jacks to allow for som e easy external
Group List 5entence List
connections. Doing so also provided access to
H Inde:-: Description Commands r - Index Label
the audio for a future expansion I'm looking 0 T r ig g e r 1 i: 0 SND_BEEP ¡¡Sill
p
into (m ystery bus). For now, I'll deal with the 53 1 G ro u p 3 Q 1 SNDJR.VOICE.COMMANDER.MENUSJ
RX and TX lines and external jacks for the mic P 2 G ro u p 5 Q 2 SNDJR.VOICE.COMMANDER.MENUSJ
and speaker. P 3 G ro u p 6 Q 3 SND_IR_V0ICE_C0MMANDER_MENUS.3
5) 4 G ro u p 7 Q 4 SND_IR_V0ICE_C0MMANDER_MENUS_4
If you followed the IR remote project, 5 G ro u p 10 5 SND_IR_V0ICE_C0MMANDER_MENUS_5
P O
you m ight rem em ber that I had used the Ç) G Group 0 O 6 SND.IR.VOICE.COMMANDER.MENUS.G
serial port on the M icrochip Technology 7 Group 0 Q 7 SNDJR.VOICE.COMMANDER.MENUSJ
P 8 Group 0 o 8 SND_IR_V0ICE_C0MMANDER_MENUS.8
PIC18F26K22 m icrocontroller as a user I/O
0 Q

COLUMNS
P 9 Group 9 SND_IR_V0ICE_C0MMANDER_MENUS_9
and debug port. The user I/O now comes 10 0
P Group Q 10 SNDJR.VOICE.COMMANDER.MENUSJ 0
from the EasyVR module. Anyone fa m ilia r with P 11 Group 0 Q 11 SNDJR.VOICE.COMMANDER.MENUSJ 1
this m icrocontroller knows that it includes P 12 Group 0 Q 12 SNDJR.VOICE.COMMANDER.MENUSJ 2

a second serial port that is shared with the P 13 Group 0 P 13 SNDJR.VOICE.COMMANDER.MENUSJ 3

ICD debug and program m ing header. I made


P 14 Group 0 P 14 SND.IR.VOICE.COMMANDER.MENUS.U
P 15 Group 0 Q 15 SNDJR.VOICE.COMMANDER.MENUSJ 5
use of TX2 as a m onitor that reproduces any P 1G Password 0 o 16 SNDJR.VOICE.COMMANDER.MENUSJ S
com m unication taking place w ith the EasyVR P - S o u n d T a ... 18 O 17 SNDJR.VOICE.COMMANDER.MENUSJ 7
P 1 W ord se t 8
module.
P 2 W ord se t 6
The data rate for this interface is 9,600 bps P 3 W ord se t 11
(the default), but this could be changed to a
Ready Connected to EasyVR (Rev 2) on COM 100
num ber of higher rates (up to 115,200). While
there are som e param eters (like data rate)
PHOTO 3
that I could've initialized, I used the module
T h e S p e a k e r D e p e n d e n t w o rd g r o u p s a n d th e s o u n d ta b le file a r e s to re d in s e p a r a te a r e a s a n d c a n be e d ite c
in its default states so I only had to check
in d e p e n d e n tly .
for com m unication at power-up. To get the

Command Value Name Additional Data Possible Responses


b 0x62 break none Success, Interrupt
d 0x64 SD Recognition Group # Result, Sim ilar, Tim eout, Error
w 0x77 WAV playback WAV index (2 Bytes) Success, Error
" " <space> 0x20 ACK to Response Next Data Byte
Response Value Name Additional Data Comment
e 0x65 Error Error Code 03h = too noisy
04h = spoke too soft
05h = spoke too loud
06h = spoke too soon
07h = too complex
11h = recognition failed
12h = recognition result
doubtful
13h = recognition result maybe
14h = invalid SD/SV command
17h = bad pattern durations
4Ah = bad release number
4Eh = bad data in speech file
80h = not found
i 0x69 Interrupt none OK
o 0x6F Status none OK
r 0x72 Result Vocab Index 0-31 (0x40-0x60)
TABEL 2
s 0x73 Sim ilar Vocab Index 0-31 Com m ands and p o ss ib le

re s p o n s e s u se d in th is
t 0x74 Tim eout none OK
p ro je c t.
70 CIRCUIT CELLAR • NOVEMBER 2014 #292

FIGURE 1
I added an E a sy V R m o d u le to th e

c ir c u it th a t I u se d p re v io u s ly to

in v e s tig a te IR c o m m u n ic a t io n s .
COLUMNS

EasyVR module's attention, I sent the break of any word in the "active" group. Only
command "b." This forced the module to drop one group is "active" at a time. While you
everything and send back the "o" response. I could put the total vocabulary into a single
stayed in a loop of sending and looking for the group, breaking this into smaller groups of
response (with a few-second timeout) until words with similar functions gives some
communication was established. organization to the process and allows the
Refer to Figure 2 to get a feeling for a recognition algorithm to be more accurate,
command's flow, its response, and how the especially when two words may sound similar.
application should proceed upon recognition It is worthwhile to pause a minute here to
cover error responses. If you refer back to the
"d " response in Table 2, you'll note that there
FIGURE 2
are a number of error values that might be
T h is is th e g e n e ra l flo w of
returned as opposed to the recognized ("r"),
c o m m u n ic a t io n s b e tw e e n th e E a sy V R

m o d u le a n d th e a p p lic a t io n . A g ro u p
similar ("s"), or timeout ("t") responses. An
can h a v e 1 to 3 2 w o r d s tr a in e d fo r error code is available after an "e" response.
re c o g n itio n . All g ro u p s h a v e a d e fa u lt As you can see by referring to Table 2, most
t im e o u t a s s o c ia te d w it h th e m . For of the errors relate to what you might have
th e f ir s t g ro u p 'A ' (0), th is is n o rm a lly done wrong. Others have to do with a level
in fin ite . T h is m e a n s th e re w ill be no of confidence or other nonrecognition errors.
t im e o u t o r re s p o n s e u n til its " t rig g e r"

w o rd is re c o g n iz e d .
DO TASK
As depicted in the generalized flow chart,
recognition begins when the application
sends the SD Recognition command "d "
along w ith a group number. The application
now w aits for the EasyVR module to respond
w ith " i," "e," "o ," "r," "s," " t ," "v," or "w ."
The last two responses are not necessarily
connected to a particular command. The
"v " response is sent whenever the module
is "vexed" or has received a character it
doesn't understand or expect. The "w "
response is a indication that the module
"woke up" from Sleep mode. Of all these
responses, only "e," "r," and "s " include
addition data values. The responses " r " and
"s " have 1 byte, the word index "recognized"
or "sim ila r." The e rro r ("e") response has an
Unlock the power of embedded design

This pocket-sized vault comes fully loaded with every issue


of Circuit Cellar magazine and serves as an unparalleled
resource for embedded hardware and software design tips,
schematics, and source code.

From green energy design to ’Net-enabled devices,


maximizing power to minimizing footprint, CC Vault*
contains all the trade secrets you need to become a better,
more educated electronics engineer. __

BONUS! Build your archive by downloading your latest-issue PDFs straight to


the drive! Personalize your CC Vault by adding Elektor or audioXpress issue archives,
available as an add-on during time of purchase, or your very own project files.

'C C Vault is a 16-GB U S B drive.


72 CIRCUIT CELLAR • NOVEMBER 2014 #292

When a response has additional data, the


user m ust issue a space character (0x20),
to let the module know you are ready to
receive it. For the " r" or "s" responses, the
module will then respond with a character
that will be interpreted as the index value
of the word it recognized from the word list
in the active group (the second character in
the "d" command). Each recognized word will
most likely require its own action. This m ight
include perform ing som e IR transm ission,
selecting a new group of words to use as
recognition targets, or both.
COLUMNS

I added a menu option to all groups,


which w ill audibly list each word that can be
recognized in the active group, in case you
were to forget w hat is available. The ab ility to
offer feedback to users is a great com plem ent
to the recognition a b ility of this module.
While the output volum e available from the
on-chip am plifier is hardly sufficient to be
heard in a room full of cheering sp orts fans,
it is adequate for most norm al environm ents.
In addition to menus, I added som e sim ple
prom pts that are spoken when the active
group has been changed. This reinforces the
PHOTO 4
upper nibble (A-P) and a lower nibble (A-P) path taken by the application and helps to
I a d d e d a s e c o n d s e r ia l o u t p u t to s h o w
th a t together indicates the type of e rro r (as keep the user focused on w hat should be said
all th e a c t iv it y th a t g o e s o n b e tw e e n

th e IR a p p lic a t io n and th e EasyV R


seen back in Table 2). next since there are no visual prompts.
m o d u le . A f te r e a c h c o m m a n d is s e n t
While tim eout values can be changed, I Let's take a look at another area where
to th e E a s y V R m o d u le (p re fa c e d h e re left the default values, which in the case of speech m ight be helpful. If it's not entirely
w it h C M D :), it re s p o n d s (p re fa c e d w ith group "0 " ("A") is infinite since you will want obvious by the num ber of error codes
V R:) a s in g le c h a r a c t e r a t a t im e . to w ait until a user speaks the trig g er word, associated with an error ("e") response,
in this case "rem ote." Other tim eouts can it would be useful to have this as a spoken
be set to a num ber of seconds (1-31) or to message suggesting ways of im proving
infin ity (0). You m ight want to create different recognition. For instance, for error response
actions for each possible response. While the "4" ("D"), spoken too softly, your action might
application branches allow for this, if I don't include playing back a WAV file that says,
receive an " r" or "s" response, the action is to "Please speak louder." This is a great way to
stay in the sam e word group and reissue the use the m odule's a b ility to output speech as a
"d" com m and, SD Recognition. The tim eout com plem ent to its recognition function.
("t") response is different. The action for this In som e cases, you m ight want to repeat
response is to abort and reissue the "dA" a word group if a " t " response (timeout)
com m and, looking for recognition in Group 0 occurs. However, when you are finished
(Trigger). using the recognition of any group and want
to return to the idle mode (looking for the
trig g er word), you m ight w ant to keep track
PROJECT FILES E asyVR M o d u le and E asyV R d e v e l o p m e n t kit of tim eouts and suspend active operation if
T IG A L KG | w w w .v eea r.eu a tim eout occurs for the sam e group more
than x times.
L ib e r t y B AS IC
S h o p ta lk S y s te m s | w w w .lib e rty b a s ic .c o m ZAP
I was raised on S ta r Trek. Along with
P IC 1 8 F 2 6 K 2 2 M ic r o c o n t r o lle r S ta r Trek and other sci-fi program s came
M ic r o c h ip T e ch n o lo g y , Inc. | w w w .m ic ro c h ip . som e pretty cool sound effects. Most would
co m recognize the sound of the transporter
c ir c u it c e lla r . c o m / c c m a t e r ia ls
and door (Star Trek), the Cylon (Battle Star
R S C - 4 x S p e e ch r e c o g n it io n and s y n t h e s is Galactica), Heat Ray (War o f the Worlds),
SOURCES m i c r o c o n t r o lle r s Tardis (Dr. Who), and the lightsaber and R2D2
S e n s o ry , Inc. | w w w .se n s o ry .c o m (Star Wars). As a "tip -o -th e -h a t" to the sound
A u d a c i t y a u d io e d it o r
engineers of my youth, I used a hand phaser
h ttp :/ / a u d a c ity .s o u r c e fo r g e .
sound from S ta r Trek as the audio clip played
ne t/
circu itc el lar .c om 73

whenever an IR transm ission occurs. A fter all, With a sim ple toggle flag, I prefaced the
that's the im petus for this project. eavesdropping with "CMD:" when the
Based on my IR-related articles in Circuit characters came from TX1 and "VR:" when
Cellar issues 289 and 290, I have a m echanism the characters came from RX1 (see Photo 4).
to duplicate the IR transm issio ns of my IR You can see the debug com m unication on
remotes. While those a rticles introduced a TX2 between the application and the EasyVR
descriptive way of defining differing types of module during operation. This came in handy
IR protocols, the end product gives access to when I made the m istake of looking for a
sending those protocols. Basically, you choose single additional response character after
the protocol necessary and the application receiving the "e" response. Because I only
builds a list of tim ing instructions to reproduce asked for one character, the next command
button data in the chosen protocol. You may was seen by the EasyVR module as a m istake
need to expand the code I presented to cover and responded with a vexing ("v") response.

COLUMNS
a particular protocol, but that's all part of the The extra tim e spent coding a debug trail
learning experience, right? turned out quite handy! ABOUT THEAUTHOR
The B u t t o n P u s h routine is responsible for
Jeff Bachiochi (pro­
building the transm ission characteristics for THE END?
an IR protocol. The data carried in the protocol I'll need som e tim e to play with this
nounced BAH-key-AH-
indicates which function should be preformed project a bit to figure out w hether it is w orthy key) has been writing
by the device receiving the IR transm ission. of continuing. To me it makes little difference. for C irc u it C ellar since
For instance when you push the Power Button A fter all, I'm not trying to hit pay d irt here 1988. His background
on your IR remote, a coded message is sent by inventing the next w idget that will set includes product design
out by m odulating an IR LED. All IR receivers in me up for life. No. I have bigger fish to fry. and manufacturing.
your AV equipm ent may see your transm ission, I w ant to keep helping readers understand You can reach h i m at
but only those understanding a particular w hat kind of technologies are out there, show jeff.bachiochi@imagine
protocol (m anufacturer's preference) can 'em how to use it, and just let it sim m er on thatnow.com or at www.
make use of it. A fter consum ing the protocol's the their back burner. Here's hoping all this imaginethatnow.com.
transm ission data, they m ust interpret the will heighten your passion for curio sity and
data as a particular function (i.e., toggle the provide alternative paths to follow. I think we
state of system power). all win no m atter what the outcome.
In this application, Recognition of a word I noted a couple of things while using
in an active Group brings with it an associated EasyVR that I think would make for a better
action. The word "Cable" in Group 1 has an product. While QS5 has a COM port lim itation
action of defining an IR protocol and making of 1-16, this is not practical with today's USB
Group 3 active. The word "Channel" in Group ports that can be assigned port num bers
3 has an action of making Group 5 active. much higher than this. Fortunately, the VR
A num ber recognized from Group 5 has an Com m ander does not have this lim itation and
action of selecting which button 0 -9 will can be used to im port the sound files built
be sim ulated, building an IR transm ission, by QS5.
sending the IR transm ission, playing the While this sound file can be saved and
"Z A P " audio clip, and reissuing a command to edited (to add m ore audio files), the Speaker
recognize another num ber in Group 5. When Dependent groups built and trained cannot be
finished entering (recognizing) num bers, no saved to a file. It is uploaded from the EasyVR
audio will respond w ith a tim eout, which will module every tim e it's connected so it can be
revert back to Group 0, looking for the trigger. edited, ju st not duplicated!
The cable box will receive som e num ber of You'll notice I used the sam e word in a
digits (IR transm issions) and change the num ber of word groups. Each tim e the word
channel autom atically when tra nsm issions is used, it reduces the word count and must
cease. be trained for that group. It would be nice to
The previous project used UART1 as user enter and train a word once and then assign
I/O for function control. For this project, it to any group or groups.
I needed the port for com m unication to While I think this is a great product and
the EasyVR module; however, I still wanted fills a void that makes recognition available
som e feedback as to what was going on. This for the sm all projects, it would be nice if they
helps with debugging when things don't go replied to subm issions using their support
as expected. The PIC m icrocontroller actually form . Hey, I know I'm just a little guy. But I
has two UARTs. The second UART uses the ca rry a big stick! O
sam e I/O lines as the ICD debug/program m er
port. This will mean that I can use it only if
the ICD is not connected. I added code to both
the RX1 and TX1 routines to send whatever
was coming in or going out to UART2 TX2.
74 CIRCUIT CELLAR • NOVEMBER 2014 #292

CROSSWORD NOVEMBER 2014

The answers w ill be available at circuitcellar.com/crossword.

1 2

5 6

8 9

10 11

12 13
& CHALLENGES

14

15

16
TESTS

17

18

19

20

ACROSS 19. Short wire connecting components


1. A nibble is 4 of these 20. A diode, used for converting AC into DC
4. Electronic device that received and am plifies a weak signal
before retransmitting it DOWN
5. Metric Prefix for 0.000001 2. High-speed diode that has very little junction
6. To re-route a signal to a different circuit capacitance
8. Used for authentication 3. P2P
11. A switch that is actuated by another electrical signal 7. A sudden input current surge
13. The deviation of some aspect of a digital signal's pulses 9. The ratio of the peak value to the RMS value (two
14. A variable resistor words)
15. Lx 10. 1,000,000 pF
16. Italian physicist who invented the first batteries 12. Constant signal processing
17. Ge
18. Wire piping
circu itc el lar .c om 75

What's your EQ?


The a n sw e rs are posted at w w w .circuitcellar.
com /category/test-your-eq/. You can con tact the
q u izm a ste rs at eq@ circuitcellar.com .

TEST YOUR EQ
C ontributed b y D avid Tweed

PR O BLEM 1 PR O BLEM 3
Let's talk about noise! There are different types When you have m ultiple sources
of noise that might be present in a system, and of noise in a system , how can you
it's important to understand how to deal with characterize their combined effect on
them. the overall system perform ance?
For example, analog sensors and other types
of active devices will often have AWGN, or PR O BLEM 4
Additive White Gaussian Noise, at their outputs.
Broadband analog sensors and other
Any sort of analog-to-digital converter will add
active devices often specify their noise
quantization noise to the data. What is the key
levels in units of "m icrovolts per root-
difference between these two types of noise?
H ertz" (pV/VHz) or "nanoam ps per
root-H ertz" (nA/VHz). Where does this
PR O BLEM 2 strange unit come from , and how do
Signal-to-noise ratios are most usefully you use it?
described as power ratios. How does one
characterize the power levels for both AWGN
and quantization noise?

TESTS & CHALLENGES


GetPUBLiSHED. GetNOTICED. GetPAiD.
Circuit Cellar feature articles are contributed by professional
engineers, academics, and students from around the globe.
Q C
Each month, the editorial staff reviews dozens of article
proposals and submissions. Only the best make it into the
pages o f this internationally respected magazine.

Do you have what it takes?


I . OCT

Contact C . J. Abate, Editor-in-Chief, today to discuss the


embedded design projects and programming
applications you’ve been working
on and your article could be
featured in an upcoming issue
or online at circuitcellar.com.

Email: editor@ circuitcellar.com

G circuit cellor
76 CIRCUIT CELLAR • NOVEMBER 2014 #292

CC SHOP

A Guide to Powerful Programming


circuit cellar for Embedded Systems
VWULl

A sse m b ly
Q CC VAULT Language
CC Vault is a pocket-sized USB that
comes fu lly loaded w ith every issue of E ssen tials
C/raMml I ¡m|i M m ipre- Larry Cicchin e lli

henswe ¡archive provides an unpa ralleled


amount of embedded hardware and
software design tips, schem atics, and
source code. CC Vault contains all the
trade secrets you need to beca me a bet­
ter, more educated electronics engineer!

Item #: CCI/E E H i

2 \CC 2013 CD T ASSEMBLY LANGUAGE


ESSENTIALS
circuit c e lla r 2013 was an exciting year for
electronics engineers! The continued Looking to brush up your p ro gram ­
success of open-source solutions, ming skills? Get back to to the basics
Internet of Things (IoT) revolutions, with this m atter-of-fact guide to A s­
and green-energy consciousness has sem bly language. Perfect for advanc­
changed the face of embedded design ing students and academ ics, this book
indefinitely. In C ircuit Cellar's 2013 introduces you to a processor's most
archive CD, you can find all of these fundam ental program m ing language.
hot topics and gain insight into how It includes essential term inology per­
experts, as well as your peers, are taining to higher-level program m ing,
putting the newest technologies to the im portant algorithm s that can be built
test. You'll have access to all articles, into high-level language, a free dow n­
schem atics, and source code published loadable Assem bler program , and
from January to December 2013. much more.

Item #: CD-018-CC2013 Author: Larry Cicchinelli

Microprocessor Design _3_ MICROPROCESSOR


U s ir f c g 9-
DESIGN USING VERILOG HDL
o A fter years of experience, Monte
D alrym ple has com piled his knowledge
of designing em bedded a rch itectu re
and m icro p ro cesso rs into one
com prehensive guide for electronics
engineers. M icro p ro cesso r Design
U sing Verilog HDL provides you with
m icro a rch itectu re, w ritin g in Verilog,
Verilog HDL review, and coding style
that enables you to depict, sim ulate,
and synthesize an electronic design on
your own.

Author: Monte Dalrymple


Item #: CC-BK-9780963013354
ci rc u itc e ll ar .c om 77

ADVANCED CONTROL

B O B M ftS HANNO SANDER

_6_ ADUC841 MICROCONTROLLER DESIGN


MANUAL
This book presents a com prehensive guide to design­
ing and program m ing with the Analog Devices ADuC841
m icrocontroller and other m icrocontrollers in the 8051
5 ADVANCED CONTROL ROBOTICS-NEW! fam ily. It includes a set of introductory labs that detail
When it comes to robotics, the future is now! This how to use these m icro co ntro llers' most standard fea­
book sim plifies the theory and best practices of advanced tures, and includes a set of m ore advanced labs, many
robot technologies by providing insight to com m unication of which make use of features available only on the
technologies, control robotics, em bedded technology, ADuC841 m icrocontroller.
program m ing, and more. Complete with code sam ples, The m ore advanced labs include several projects that
schem atics, and design tips. Great reading for beginners introduce you to ADCs, DACs, and their applications.
and experts alike. Other projects dem onstrate som e of the many ways you
can use a m icrocontroller to solve practical problems.
Author: Hanno Sander The Keil |jVision4 IDE is introduced early on, and it is
Item#BK-ELNL-978-0-963013-33-0 used throughout the book. This book is perfect for a
university classroom setting or for independent study.

Author: Shlomo Engelberg


Item #: CC-BK-9780963013347
c ir c u it c e lla r
READY TOJEÇONFIGURE.

T CIRCUIT CELLAR ISSUE


PDFs
Have you ever missed an issue of
Circuit Cellar and didn't know where
to find it? Grab a digital version!
From 1998 to the present, dive into
more than 100 issues of embedded
Further inform ation and ordering
electronics insights that you may have
missed. Can you envision the evolution www.cc-webshop.com
and developm ent across a decade? CONTACT US:
With technology advancing every day, Circuit Cellar, Inc.
don't fall behind. Learn about wearable 111 Founders Plaza, Suite 300
w ireless transceivers from Mathew East Hartford, CT 06108
Laibow itz and Joseph Paradiso or a USA
DIY single-board com puter (SBC) from Phone: 860.289.0800
Oscar Verm eulen and Andrew Lynch. Fax: 860.461.0450
The topics and projects are endless. E-mail: [email protected]
78 CIRCUIT CELLAR • NOVEMBER 2014 #292

the directory of
IDEA BOX PRODUCTS & SERVICES

AD FORMAT: The Vendor D irectory at


circuitcellar.com /vend or
Advertisers must furnish digital files that meet our specifications
(circuitcellar.com/mediakit). is yo u r g uide to a v a rie ty of
engineering products and
ALL TEXT AND OTHER ELEMENTS MUST FIT WITHIN A 2" x 3" FORMAT.
services.
E-mail [email protected] with your file.

For current rates, deadlines, and more information contact Peter Wostrel
at 978.281.7708 or [email protected].

Rapid USB Prototyping


ConnectN
with engineers
Stick & Single-chip
C Compiler

Electronic
seeking your
and Electro-mechanical design solutions.
Devices, Parts
and Supplies. Magazine, e-newsletters, Includes IDE for PIC16F1459
Many unique items. website, advertorials, and more. with direct access to USB
We have what RESERVE ADVERTiSiNG
SPACE TODAY!
\
I
G et S tarted Q uickly!
you need 14 example projects:
5 “Y%yv Strategic Media Marketing, LLC -Analog I/O - PWM Output
- TTL RS-232 - I2C ...& More!
project
978.281.7708 www.ccsinfo.com/CC1114
PIC® M C U is a registered trademark of M icrochip Technology Inc.
[email protected]
www.allelectronics.com sales@ ccsinfo .co m
F r e e 9 6 p a g e catalog 1 - 8 0 0 - 8 2 6 - 5 4 3 2 www.smmarketing.us 2 62-52 2-6 50 0x 35

FPGA Boards HUMANDATA


$20 for 5PCBs from JAPAN
SA V IN G C O S T = T IM E with
2 layer,4x4inch, FR4(RoHS),0.063” ,1oz, readily available FPG A boards
2LPI,Green,1SK,Lead fre e HASL K i
XCM Series
Standard PCB: Promotion code:

CC14061
zm
;,i ■j i i £
Kintex-7, Spartan-6, Virtex-5
and other m any FPG A boards
are available . * i* o C

A CM Se ries
PCB & PCBA Cyclone V, Arria II,
M AX II and other
m any FPGA boards
*
•/.I
are available ;
Small to Mass QTY ■Basic and sim ple features, single power operation
■Over 100 varieties of FPGA/CPLD boards are available
INSTANT Q UO TE AT:
PLCC68 Series
www.myropcb.com Designed for 68-pin PLCC socket
Very small size (25.3 x 25.3 [mm])
OR CALL: 50 I/Os (External clock inputs available)
3.3V single power supply operation

1-888-PCB-MYRO w w w .h d l.co .jp /C C /


circu itc el lar .c om 79

MaxBotix
H ,gh t^ rtQ rm M nc* V H r ifa n lf X m n g a tü K ie ii

Save 20%
O n lin e W e b -O rd e r C ode:
CC111430
V alid thru Decem ber 1, 2014

BECOME
HRXL-MaxSonar®-WR™
- H ig h n o is e to le r a n c e
- IP 6 7 rate d
- 1 m m re s o lu tio n
- M u lti-S e n s o r o p e ra tio n
- C a lib ra te d b e a m pa tte rn
- S ta rtin g a t $ 1 0 9 .9 5

a member of
XL-MaxSonar®-EZTI
- G re a t fo r U A V ’s a n d ro b o tic s
- In c re d ib le n o is e

Circuit Cellar!
im m u n ity
- S m a ll in siz e
- 1cm r e s o lu tio n
- A u to m a tic c a lib ra tio n
I - S ta rtin g a t $ 3 9 .9 5

[ P h o n e : 218-454-076 6 E m a il: s a le s @ m a x b o t ix .c o m |

www.maxbotix.com

Powerful & Easy Ladder


+BASIC Program ming
Ethernet integrated
MODBUS TCP/IP
DI/Os & AI/Os integrated

OEM Prices as low as $119


Project articles and for full-feature Nano-10 PLC
design applications
Embedded industry te l : 1 877 TRI-PLCS
w eb : w w w .trip lc .c o m / c c i.h tm
news and announcements
12 issues annually TRIANGLE
I I? ' RESEARCH
CC.Post e-newsletter INTERNATIONAL

m icroEngineering Labs, Inc.


c'rcurf cellar www.m elabs.com 888-316-1753

Programmers for Microchip PIC® Microcontrollers


PC-Tethered USB M odel (show n) :
•Standalone software
•C om m and-line operatio n
•H ide GUI fo r a u tom a ted use
•O verride c o n fig u ra tio n w ith d ro p -d o w n s

Stand-Alone Field Programmer:


•Power from ta rg e t device o r adapter
•Program file stored on SD-CARD
•P rogram m ing o p tio n s stored in file
•S ing le-bu tton op eratio n

drcuitcellQr.com/ P ro g ra m in -circu it o r u s e a d a p te rs for u n m o u n te d c h ip s .


Z e ro -In se rtio n -F o rce A d a p te rs a va ila b le fo r DIP, S O IC , S S O P , T Q F P , a n d m ore.

subscriptions PIC is a re g istere d tra d e m a rk o f M ic ro c h ip T e ch n o lo g y Inc. in th e USA a nd o th e r coun trie s.


sc CIRCUIT CELLAR • NOVEMBER 2014 #292

The World Is Analog


By Peter Kinget he world we live in is analog. We are analog. SoCs need more interfaces and better interfaces, the
T Any inputs we can perceive are analog. For analog performance of highly miniaturized devices like
example, sounds are analog signals; they are nanometer CMOS transistors has steadily degraded.
continuous time and continuous value. Our ears Making nanoscale transistors is great to increase the
listen to analog signals and we speak with analog functional density, but has its drawbacks when designing
signals. Images, pictures, and video are all analog analog circuits. Nanoscale transistors can only withstand
at the source and our eyes are analog sensors. small supply voltages. For example, circuits designed
Measuring our heartbeat, tracking our activity, all with the latest CMOS transistors can only work with a
9 æ requires processing analog sensor information.
Computers are digital. Information is represented
supply voltage of up to 1 V or so. Traditionally analog
circuits operated from voltages as large as +5 V/-5 V,
with discrete time and amplitude quantized signals but steadily their supply voltage was forced to reduce to

¿i using digital bits. Such representation lends itself to


efficient processing and long-term storage of signals and
information. But information and signals come from the
5 V, to 3.3 V, to 1.8 V, to 1.2 V and projections for future
devices are as low as 0.5 V or even 0.2 V since reducing
supply voltages also helps digital designs reduce energy
Peter Kinget is a Professor of Electrical
physical world and need to move back into the physical consumption. However, for analog circuits, reducing the
Engineering at Columbia University in
world for us to perceive them. No matter how "digital" supply voltage increases their susceptibility to noise
New York. He received his engineering
our electronic devices get, they always require interfaces or interference and degrades signal quality. To add to
and PhD degrees in Electrical
that translate signals from the physical world into the the difficulties, nanoscale transistors also exhibit more
Engineering from the Kathol ieke
digital world of electronics. mismatches, leading to random offset errors, more
Universiteit in Leuven (Belgium).
Even when computers talk to computers, analog flicker (1/f) noise, and have poor gain performance.
His research group focusses on the
interfaces are required. To transmit information over But analog designers always like to rise up to a
design of analog and RF integrated
long distances (e.g., over a high-speed bus between challenge. Research in academic and industrial groups
TECH THE FUTURE

circuits in scaled technologies and


the memory and the processor or over a wired network has devised a number of novel analog design techniques
the novel systems or applications they
connection), the digital information needs to be moved to build better analog circuits while relying less and
enable in communications, sensing,
into an analog format at the transmitter to drive the less on the performance of an individual device. In my
and power management. (For
communication channel. At the receiver, the signals group, for example, we have developed a set of design
more information, visit http://www.
typically picked up from the channel do not look anymore techniques to design analog circuits that operate with
ee.columbia.edu/~kinget.)
like digital signals and need to be processed in the supplies as low as 0.5 V.
analog domain before they can be converted back into Scaling also offers new avenues for designing analog
digital information. This is even more so if we consider circuits. In nanoscale processes transistors are not
wireless communications, where the digital information able to handle large voltages, but they can intrinsically
needs to be modulated on a high-speed radio-frequency switch very fast. That allows us to introduce different
(RF) carrier in the transmitter and demodulated at the signal representations at the transistor level for analog
receiver. RF electronics are also analog in nature. functions. Instead of using the traditional voltages or
The semiconductor industry has lived through currents, we can now use time delays to represent analog
tremendous advances fueled by what is known as Moore's information. This opens a whole range of opportunities
law: about every two years, thanks to increasing device to explore new circuits. Technology scaling is driving a
miniaturization, the number of devices on a chip doubles. paradigm shift in analog design away from the transistor
This exponential scaling has led to unprecedented used as a current source or voltage-controlled current
advances in computing and software and has made the source towards the transistor used as a fast switch
digitization of most information possible. Our literature, even when processing analog information. In fact,
music, movies, and pictures are all processed and stored analog circuits are being built out of what traditionally
in digital format nowadays. Digital chips make up most of are digital blocks like switches or ring oscillators. But
the volume of chips fabricated and it is thus economically with the appropriate signal representation and circuit
desirable to fine-tune CMOS technologies for digital arrangements, they can process analog information to
circuits. But electronic systems need analog interfaces provide interfaces between the real world and the digital
to connect the bits to the world and most consumer world.
products now rely on System-on-Chip (SoC) solutions The analog electronics field is going through very
where one integrated circuit contains the whole system exciting times. The digital revolution in electronics has
function, from interfaces to digital signal processing and made analog even more necessary. And the future is
memory blocks. SoCs need a lot of analog interfaces, but looking bright. Mobile devices are packed with analog
their area is mainly composed of digital blocks (often interfaces and a host of analog sensors, whose count
over 90%). As technology scales, the performance of increases with each new generation. The Internet
the digital core improves and this in turn increases the of Things is all about massively gathering sensor
requirements of the analog interfaces. information in one form of another, under strict power-
Today's analog designers are thus asked to design consumption and cost constraints. All this while the
more interfaces with higher performance but using traditional analog design techniques are clearly showing
circuits that are as compatible with digital circuits as their limitations in the face of aggressive device scaling.
possible. This trend emerged a few decades ago and has This makes for a very challenging but a very interesting
grown stronger and stronger driven by the continuing time for analog designers with plenty of opportunities to
increase of the functional density of SoCs. Not only do make an impact. Analog is the future! £
; ■ *■
* * ■
% . 1

davos ? th e illum inati? billionaire su m m its ?

t h e y ’ve got nothin g on th e power of this p l a c e .


* 1 * ■
+ 4
■ -
* ' " V 1 ■ i

W hen it com es to gatherings o f pow erful p eo p le w ho shape business and innovation,


C E S is in tru ly elite com pany. Best o f all, you d o n ’t have to be in cre d ib ly w ealthy to be here.
Then again, the co n ta cts you m ake here m ight just g e t you in that club. R egister at CESw eb.org.

'
4 V ' 4 v ^

l* ¿ v S t vfc
l+ \

THE G LO BA L STAGE FOR INNOVATION

JAN. 6-9, 2015

L AS V E G A S , N E V A D A

CESWEB.ORG

#CES2015
MULTIPLE PCBA
NO MORE
LINES W A / T i t o

ACROSS THE liLOBE!


Imagineering utilizes the Jet Printer Technology which has been proven
successful in five continents. This breakthrough innovation allows us to achieve
high-precision solder deposits at speeds of more than one million dots per hour.
H ig h -S p e e d N o n -C o n ta ct Jetting N ozzle • C o m p le te V olum e Control • 100% Softw are Driven
M ore C om p on en ts, M ore P o ssib ilitie s • H igh-Perfo rm ance Platform

hew customers :
et.com
SET $500 TOWARDS
(8 4 7 ) 8 0 6 - 0 0 0 3 • sales@ PC B net.com FREE PAKTS!

You might also like