Professional Documents
Culture Documents
SEPTEMBER 2014
circuitcellar.com ISSUE 290
circuit cellar
Engineer a Data
Acquisition System
^ LED Pul^e Current
& Duration countermove
om logic tree J
Position Coordinates
f t
force data
$ 9 . QOUS $ 1 0 . 0 0C AN Electrical Engineering Tips (Update) |Q&A: FPGA Enthusiast DIY Force-
0 9>
Sensing System |Build a Camera Stabilization Platform |Update to a Classic
Electronic Game Pooling Microarchitectural Resources |Variable Resistors |
Improved PWM MOSFET Gate Driver |IR Transmissions
Q 74470 75349 o
3-D Printed Electronics
Ethernet Core Modules with
High-Performance Connectivity Options
> MOD5270
147.5 MHz processor w ith 512KB Flash & 8MB RAM • 47 GPIO
3 UARTs • l2C • SPI
> MOD5234
147.5 MHz processor w ith 2MB flash & 8MB RAM • 49 GPIO ■3 UARTs
l2C • SPI • CAN • eTPU (for I/O handling, serial communications, *
m otor/tim ing/engine control applications)
> MOD54415
250 MHz processor w ith 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 w ith 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.
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
TS-8820-4700
Pricing starts at
5659 5608
Q ty t QtylOO
• 1x m icroS D Socket ■ 16x ADC, 4x DAC Ports ■ 1x m icroS D Socket - 24 VAC o r 8 - 24 VDC Power
B e n e fits: Benefits:
■ P rovides a v a rie ty o f e le c tric a lly is o la te d IO ■ L ow p o w e r a n d lo w co st in d u s tria l g ra d e SBC
EDITOR'S LETTER
C IR C U IT C E L LA R ® (ISSN 1 5 2 8 -0 6 0 8 ) is p u b lis h e d m o n th ly by: It never fails. Each month, I find myself telling someone—sometimes it's a reader, other
times it's a client—that the latest edition of Circuit Cellar is the most diverse to date. And each
C irc u it C ellar, In c.
111 F o u n d e rs Plaza, S u ite 300
time I do, I truly believe it. Well, I'm doing it again. Why? In this issue we cover a variety of
East H a r tfo r d , CT 06108 topics ranging from a DIY data acquisition system to a video camera stabilization system to an
upgraded classic electronic game to 3-D printed electronics. By publishing articleson so many
P erio dic al ra te s p aid a t East H a r tfo rd , CT, a nd a d d itio n a l o ffic e s .
O n e -y e a r (12 issues) s u b s c r ip tio n ra te US and posse ssio n s
different topics, we're sure to pique your interest more than once.
$ 50 , C a na da $6 5, F o re ig n / ROW $75. All s u b s c r ip tio n o rd e rs We start the issue with an in-depth interview with Chris Zeh, a young hardware design
p a y a b le in US f u n d s o n ly v ia V isa , M a s te rC a rd , in te rn a tio n a
engineer at STMicroelectronics who blogs about his interests and considers himself an FPGA
p o s ta l m o n e y o rd e r, o r c h e c k d ra w n on US bank.
aficionado (p. 6). Chris tell us about some of his most innovative projects, including the
S U B S C R IPT IO N S
"HyperSniffer," which is an FPGA-based, application-specific logic analyzer.
On page 22, two Camosun College graduates explain how they engineered sensor-to-
C ir c u it C ellar, PO. B ox 4 6 2 2 5 6 , E sco n d id o , CA 9 2 0 4 6
human data acquisition system. They built it to monitor the forces exerted by rowers on a crew
E-m ail: c ir c u itc e lla r@ p c s p u b lin k .c o m
team, but you can build a similar system for measuring, displaying, and logging force data for
Phone: 8 0 0 .2 6 9 .6 3 0 1
any number of other applications.
In te rn e t: c irc u itc e lla r.c o m
Next, a group of Cornell University students present their well-designed, microcontroller-
A d d re s s C h a n g e s /P ro b le m s : c irc u itc e lla r@ p c s p u b lin k .c o m
based video camera stabilization platform (p. 32). After providing a high-level overview, they
P o s tm a s te r: S end a d d re s s c h a n g e s tc delve into the details about the project's hardware and software. They includeinformation
C ir c u it C ellar, P.O. B ox 4 6 2 2 5 6 , E sco n d id o , CA 9 2 0 4 6 about how the system reads and processes data.
In "DIY RGB Game Design," Mitch Matteau details an upgrade to a classic electronic tic
A D VE R TIS IN G
tac-toe game system (p. 40). He describes his original design and then explains his recent
S tr a te g ic M edia M a rk e tin g , Inc. upgrades.
2 M ain S tre e t, G lo u c e s te r, M A 01930 USA
Turn to page 48 for columnist Ayse Coskun's article on the topic of pooling microarchitectural
Phone: 9 7 8 .2 8 1 .7 7 0 8
resources. She explains how pooling your resources across applications can improve overall
Fax: 9 7 8 .2 8 1 .7 7 0 6
energy efficiency.
E -m ail: c ir c u itc e lla r @ s m m a rk e tin g .u s
A d v e r tis in g ra te s a n d t e r m s a va ila b le on re q u e s t
On page 54, George Novacek continues his series on resistors. In this installment, he takes
N e w Produ cts:
a close look at variable resistors and covers their power ratings and different styles.
N e w P ro d u c ts , C irc u it C ellar, 111 F o u n d e rs Plaza, S u ite 300 Mitch Matteau isn't the only engineer in this issue who revisits a previous design. This
East H a r tfo r d , CT 0610 8, E -m a il: n e w p ro d u c ts @ c irc u itc e lla r.c o m month, columnist Ed Nisley returns to his Arduino PWM MOSFET gave drive (p. 58).
Turn to page 66 for the second part in Jeff Bachiochi's article series on IR remotes. In
HEAD OFFICE
this article, he tackles the topics of identifying,
C irc u it C ellar, In c . 111 F o u n d e rs Plaza, S u ite 300
decoding, and reproducing IR transmissions.
East H a r tfo r d , CT 06108
P hone: 8 6 0 .2 8 9 .0 8 0 0
Dr. Martin Hedges wraps up the issue with an
essay on the future of one of the most exciting
COVER PH O TO G R A PH Y developments in our industry—3-D printed
C h ris R akoczy, w w w .ra k o c z y p h o to .c o m
electronics (p. 80). As you'll see, this promising new
field is poised to revolutionize the way engineers
C O P Y R IG H T NOTICE design and manufacture electrical systems.
E n tire c o n te n ts c o p y r ig h t © 2014 by C irc u it C ellar, In c . All
r ig h ts re s e rv e d . C ir c u it C e lla r is a re g is te re d tr a d e m a r k o f
C. J. Abate
3-D chip packaging (Courtesy o f F raunhofer IKTS)
C irc u it C ellar, In c . 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
o r in p a r t w ith o u t w r itt e n c o n s e n t fr o m C ir c u it C ellar, In c. is
cabate@ circuitcellar.com
p r o h ib ite d .
D IS C LA IM E R
US/UK
Don Akkerm ans
+31 46 4389444
OUR NETWORK
d.akkermans@ elektor.com
ELEKTOR LABS
Wisse Hettinga
circuit cellar VOICE HI COIL
+31 46 4389428 o
w .hettinga@ elektor.com
GERMANY
Ferdinand te W alvaart
+4 9 241 88 909-17 ^ W T fflx p r e s s ( R e k to r
f.tew alvaart@ elektor.de
FRANCE
Denis Meyer
SUPPORTING COMPANIES
I +31 46 4389435
d.m eyer@ elektor.fr
12th In t'l SoC Conference 45 IAR Systems 17
NETHERLANDS
H arry Baggen
+31 46 4389429 2015 Interna tiona l CES 37 Im a ginee ring , Inc. C4
h.baggen@ elektor.nl
ITALY
M aurizio del Corso
All Electronics Corp. 79 M axBotix, Inc. 79
+39 2.66504755
m .delcorso@ inw are.it
BRAZIL
Joao M artins
Custom C om puter Services 78 MyRO Electronic Control Devices, Inc. 78
+31 46 4389444
j.m artins@ elektor.com
electronica 2014 25 N etBurner, Inc. C2
PORTUGAL
Joao M artins
+31 46 4389444 Elektor 60, 61 R.E. S m ith, Inc. 43
j.m artins@ elektor.com
RUSSIA
Nataliya Melnikova EMAC, Inc. 21 Scidyne 78
+7 965 395 33 36
elektor.russia@ gm ail.com
CHINA
Cees Baay
NOT A SUPPORTING COMPANY YET?
+8 6 21 6445 2811
ceesbaay@ gmail.com Contact Peter Wostrel (circuitcellar@ smm 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 C I R C U I T CELL AR • S EP TE MB E R 2 0 1 4 # 2 9 0
CONTENTS
circuit cellar
DATA ACQUISITION
CC COMMUNITY FEATURES
06 i CC WORLD 20 : Engineer a Force-Sensing System
Sensor-to-User Data Acquisition Made Simple
OS i QUESTIONS & ANSWERS By Steven Liu and Albert Ruskey
Engineer, Blogger, & FPGA Enthusiast Build a sensor-to-user data acquisition system for
By Nan Price measuring, displaying, and logging information
San Jose, CA-based engineer Chris Zeh on working
with FPGA dev boards and a variety of projects 32 : Position Control
Build a Microcontroller-Based Stabilization Platform
By Evan Chen, Zequn Huang, and Geo Xu
INDUSTRY & ENTERPRISE A DIY, hand-held, microcontroller-based stabilization
14 i PRODUCT NEWS system for camera control
COLUMNS
48 : GREEN COMPUTING
Pooling Microarchitectural Resources
Towards Flexible Heterogeneity
By Ayse K. Coskun
How pooling microarchitectural resources across
applications improves energy efficiency
FPGA-BASED "HYPERSNIFFER"—AN APP-SPECIFIC LOGIC ANALYZER
c ircu itce lla r.co m s
CONTENTS
@editor_cc n
VARIOUS POTENTIOMETERS AND TRIMMERS @circuitcellar circuitcellar
6 C I R C U I T CELL AR • S EP TE MB E R 2 0 1 4 # 2 9 0
CC WORLD
EE TIPS UPDATE
By CC & EIM Staff (US & Netherlands)
1 1
EMBEDDED SECURITY
Embedded security is one of the most im portant topics
in our industry. You could build an amazing m icrocontroller-
based design, but if it is vulnerable to attack, it could
COMMUNITY
WE DARE YOU.
-_r BEST Wfc?
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!
* F ro m s a m e d a y q u ick turn p ro to ty p e to
p ro d u c tio n in u n d e r 10 days
* Full C A D a n d C A M re v ie w plus design ru le c h e c k
on A L L G e rb e r files
* M a te ria ls : Fr4, R igid, Flexr M e ta l C o re (A lu m inu m ),
P o ly m id e t R o g ers, Isola, e tc .
* H D I C ap ab ilities: B lin d /B u rie d M o cro vias,
1 0 + N + 10, V ia -ln -P a d T e c h n o lo g y ,S e q u e n tia l
L a m in a tio n , A n y Layer, etc,
* O u r H D I A d v a n ta g e : D ire c t L a s e r Drilling, P la s m a
D e -S m e a r T echno logy, L a s e r M ic ro via
C o n d u c tiv e P la te S h ut, e tc .
www.PCB4u.com ■ sales@PCB4u.com *
8 C I R C U I T CELL AR • S EP TE MB E R 2 0 1 4 # 2 9 0
NAN: Tell us about Idle-Logic.com. Why and State University with a BSEE. I realized that after
when did you decide to start a blog? graduating it was important to continue working
on various projects to keep my mind and skills
CHRIS: I started blogging in the winter of 2009, a sharp. I figured the best way to chronicle and
little more than a year after I graduated Colorado show off my projects was to start a blog—my
little corner of the Internet. Initially, I didn't really Chris used a USB-to-UART technique
expect many people to visit the site, thus the main to b it bang an FPGA configuration
file.
purpose was to act as a personal journal for the
projects I was working on.
During the summer of 2009, Katie, who
was then my girlfriend and is now my wife,
was finishing her Master's degree in Biomedical
Science and about to start four more years of
schooling to get her DVM. I figured a good way to
be a supportive significant other was to join her in
the library. While she furiously studied cardiology,
oncology, and all the other "ologies," I was busy
putting together my website and working on
projects (at the same time I also started University
of California Berkeley Extension's Integrated Circuit
Design and Techniques certificate program). logo and came up with a minimized BOM solution to
provide power to the nine different voltage supplies,
NAN: What types of projects do you feature on both linear regulators and switched-mode supplies.
your site? One aspect of FPGAs that can make them costly for
COMMUNITY
hobbyist is that the programming JTAG cable was
CHRIS: I like working on a wide range of on the order of $300. Fortunately, there are a few
different types of projects, varying from software more affordable off-brand versions, which I used at
development to digital and analog design. I've first. After many weeks of work, I finally had the
found that most of my projects highlighted on total solution for the main FPGA board. The total
Idle-Logic.com have been ones focusing on FPGAs. cost of the prototype system was about $150.
I find these little reprogrammable, multipurpose Eventually I came up with a way to bit bang the
ICs both immensely powerful and fascinating to FPGA's programming bitstream using a simple
work with. $15 UsB-to-UART IC breakout board driven by a
My initial plan for the blog was to start a tiny Python application, eliminating the need for
development project to create an FPGA equivalent the pricey cable. This Future Technology Devices
to the Arduino. I wanted to build a main board with International FT232RL USB-to-UART IC also
all the basic hardware to run an Altera Cyclone II provided a clock output enabling me to further
FPGA and then create add-on PCBs with various reduce the component count.
sensors and interfaces. My main FPGA board was The project was a success in that I was
to be named the Saturn board, and the subsequent compelled to completely digest the FPGA's 470-
add-on "wings" were to be named after the various page handbook, giving me a solid grasp of how to
moons of Saturn. work with FPGAs such as the Cyclone II. The project
The project proceeded nicely. I spent some time was a failure in that the FPGA breakout board I
brushi ng up on my Photoshop skills to put together a wanted to use for the project was discontinued by
Chris is w o rkin g w ith a Terasic Technologies DE0-Nano evaluation board to s u p p o rt a fu ll-c o lo r TFT LCD touchscreen display.
10 C I R C U I T CELL AR • S EP TE MB E R 2 0 1 4 # 2 9 0
Chris designed the HyperSniffer logic analyzer, w hich is shown w ith the HyperDrive m ain board. (The PCB was designed by Vincent
Himpe and Albino Miglialo.)
the manufacturer. Creating and fabricating my lately with the DE0-Nano is creating and adding
own four-layer board and hand soldering the 208- support for a full-color 4.3" (480 x 272 pixel) thin-
pin package was both prohibitively expensive and film transistor (TFT) touchscreen LCD. Because of
also a little daunting. the large pin count available and reconfigurable
Fortunately, at that time Terasic Technologies logic, the DE0-Nano can easily support the display.
introduced its DE0-Nano, a $79 commercial, $59 I used a Waveshare Electronics $20 display, which
academic, feature-packed FPGA evaluation board. includes a 40-pin header that is almost but not
The board comes with two 40-pin general I/O quite compatible with the DE0-Nano's 40-pin
plus power headers, which has become a perfect header. Using a 40-pin IDC gray cable, I was
alternative base platform for FPGA development. able to do some creative rewiring (cutting and
I now intend to develop add-on "wings" to work swapping eight or so pins) to enable the two to
with this evaluation board. mate with minimal effort. Eventually, once all the
features are tested, I'll fabricate a PCB in place of
NAN: What do you enjoy most about working the cable.
with FPGAs? There are many libraries available to drive the
display, but for this project I want to develop the
CHRIS: The FPGA is such an amazing invention. hardware accelerators and video pipeline from the
The possibility to create a digital design using ground up, purely though digital logic in the FPGA.
hardware description language (HDL) and I recently picked up an SD card breakout board
immediately see your creation working on your and a small camera breakout board. Using these
bench is fantastic. The ability to create multiple I would like to start playing around with image
functional blocks that operate in parallel all in one processing and object recognition algorithms.
device is so powerful.
I can recall how perplexed I was when first NAN: What is your title at STMicroelectronics.
learning about the FPGA. The idea of creating What types of projects are you working on?
various tasks that operated in parallel seemed
so foreign compared to a microprocessor's more CHRIS: My official title is Senior Hardware Design
familiar sequential operation. The ability to create Engineer. This title mainly comes thanks to the
complex digital designs without having to fabricate first project I worked on for the company, which is
an application-specific integrated circuit (ASIC) ongoing—an FPGA-based serial port capture and
unlocked a whole world of possibilities. Working decoding tool named the HyperSniffer. However,
with an FPGA comes with a steep learning curve, my main role is that of an application engineer.
but I believe it is definitely worth the time and I spend most of my tim e testing and
effort. debugging our prototype mixed-signal ASICs
prior to mass production. These ASICs are built
NAN: Tell us more about how you've been using for the hard disk drive industry. They provide
Terasic Technologies's DE0-Nano development several switch-mode power supplies, linear
and education board. regulators, brushless DC motor controllers, voice
coil motor actuation, and a shock sensor digital
CHRIS: The main project I've been working on processing chain, along with the various DACs,
DATA ACQUISITION FROM MEASUREMENT COMPUTING
Great Products
Great Prices • Great Support
USB-1608G USB-201
16-Channel, 16-bit DAQ 8-Channel, 12-Bit DAQ
"Great value for the m oney." - Frank260 "Great value and ease of use." - David52
mccdaq.com
Fa a1 MEASUREMENT Contact us
COMPUTING,
The Value Leader in D ata Acquisition
1.800 .234.4232
© 2 0 1 4 M e a s u re m e n t C o m p u tin g C o rp o ra tio n , 10 C o m m e rc e W ay, N o r to n , M A 0 2 7 6 6 • in fo @ m c c d a q .c o m
12 C I R C U I T CELL AR • S EP TE MB E R 2 0 1 4 # 2 9 0
ADCs, and monitoring circuits all integrated into design team and our customers to help discover
a single IC. and document bugs and streamline the system
Our ASIC's huge feature set requires me to stay integration.
sharp on a wide variety of topics, both analog and A few years back I was able to join my
digital. A typical day has me down in the lab writing colleagues in writing "Power Electronics Control
scripts in Python or Visual Studio, creating stimuli, to Reduce Hard Disk Drive Acoustics Pure
and taking measurements using my 1-GHz, 10- Tones," an Institute of Electrical and Electronics
GSPS LeCroy WavePro 7100A oscilloscope, several Engineers (IEEE) paper published for the Control
6.5-digit multimeters, dynamic signal analyzers, and Modeling for Power Electronics (COMPEL)
and noise injection power supplies among other 2010 conference. I presented the paper, poster,
instruments. I work closely with our international and demonstration at the conference discussing
COMMUNITY
a novel technique to reduce acoustic noise FPGA manufactures. Much of the work was
generated by a spindle motor. spent creating tools to collect data and generate
visualizations for comparisons and marketing
NAN: Tell us more about the HyperSniffer purposes.
project.
NAN: How long have you been designing
CHRIS: The HyperSniffer project is an FPGA- embedded systems? When did you become
based digital design project I first created right interested?
out of college. (My colleagues Vincent Himpe and
Albino Miglialo did the board design and layout.) CHRIS: The first real embedded system I worked
The tool is basically an application-specific logic on was during my senior design project at
analyzer. It enables us to help our customers Colorado State University. I was the project leader
troubleshoot problems that arise from serial port for a group of four students. Our goal was to
transmissions between their system-on-a-chip develop an embedded system that would provide
(SoC) and our ASIC. Through various triggering a clean user interface to assist in the calibration
options it can collect and decode the two or of the internal combustion engine. The device
three wire data transmissions, store them on on was developed to communicate with an engine
board memory, and wait for retrieval and further controller to modify parameters such as fuel
processing by the application running on the PC. quantity and spark timing.
COMMUNITY
One of this tool's nice features is that it is capable The team built a prototype enclosure that
of synchronizing and communicating with an housed a Digi International ConnectCore9
oscilloscope, enabling us to track down problems evaluation board, a 5.7" TFT LCD, several
that happen in the analog domain that arise due quadrature encoders, and various buttons. The
to commands sent digitally. ARM microprocessor ran Digi International's
NET+OS RTOS. We were able to quickly develop a
NAN: Tell us about your software developer GUI using the wxWidgets cross-platform library.
internship at Nestle Purina. Can you share any The project was a success and we placed third in
interesting experiences? a year-end competition among all the other senior
design project groups.
CHRIS: I took this internship right out of high
school, in the summer before starting at Colorado NAN: What do you consider to be the "next big
State University. Initially, I was hired to help thing" in the industry?
convert 300 database-backed web applications
from an old programming language to a new one. CHRIS: Judging by the number of people I see
I've been programming since I was very young, walking down hallways or sidewalks staring down
so I had a talent and a knack for writing software at their smartphones, I have to believe that optical
to make life easier. I was able to automate the head-mounted displays (e.g., Google Glass) are
conversion process and finished a full two months going to be ubiquitous one day soon. In my opinion,
early. After demonstrating my abilities, the scope the biggest drawback to these types of wearable
of my internship was expanded to include a full computers, aside from cost, is the interface. Not
redesign of the internal website. I continued to only do you stand out in a crowd just by wearing
work for Nestle Purina for the following two the glasses, but you further alienate yourself by
summers and holiday breaks, writing applications having to verbally control the hardware. I would
to process manufacturing data and help automate imagine that adding small tactile remote control
report generation. It was a fun introduction to would be a big improvement. Maybe even just
the working world. I had a lot of autonomy and adding a few buttons (up/down/left/right, enter,
they really let me take on any project I wanted. and back) on the reverse side of a smartphone—
I spent a lot of time learning how to write clean, which you could use without having to look down—
reliable, and professional code—an experience would improve the head-mounted display's
that benefits me to this day. usability and reduce the awkwardness factor.
The market for wearable embedded systems
NAN: You also did an internship at Xilinx. Can you for fitness really seems to be taking off. The ability
elaborate on the FPGA research you conducted? to track and monitor fitness goals using motion
tracking armbands seems to be a real hit. I think
CHRIS: This was a short internship for a few the gamification of fitness using these wearables
months between semesters. My research mainly really helps to encourage healthy habits. For
focused on evaluating the accuracy of the power many, the desire to achieve their target step count
planning tools integrated into the Xilinx ISE or distance each day while having their
design suite, comparing the projected power accountability literally strapped to them is quite
consumption vs the actual. Additionally, I was motivating. Some of the new technologies on the
tasked to compare the power performance of horizon capable of tracking even more metrics
several designs on hardware from the various (e.g., heart rate) are really intriguing. O
14 C I R C U I T CELL AR • S EP TE MB E R 2 0 1 4 # 2 9 0
PRODUCT NEWS
PRODUCT NEWS
RASPBERRY PI MODEL B+
The Raspberry Pi foundation announced what it calls "an long as there's demand for it.
evolution" of the Raspberry Pi SBC. Compared to the previous At $35, the new model B+ is the same price as the older model
model, the new Raspberry Pi Model B+ has more GPIO, and B and is already available fromFarnell/element14/Newark and RS/
more USB ports. In addition, it uses Micro SD memory cards and Allied Components.
improved power consumption.
The GPIO header is now 40 pins, with the same pinout for Raspberry Pi Foundation
the first 26 pins as the Model B. The B+ also has four USB 2.0 www.raspberrypi.org
ports (compared to two on the Model B) and better hotplug and
overcurrent behavior. In place of the old frictio n -fit SD card socket
is a better push-push micro SD version.
In line with today's electronic concepts, the
new board also lowers power consumption.
By replacing linear regulators with switching
ones, the power requirements are reduced
by between 0.5 W and 1 W. The audio circuit
incorporates a dedicated low-noise power
supply, enabling better audio applications.
The new board is well organized. The USB
connectors are aligned with the board edge,
and the composite video now has a 3.5-mm
jack. The corners are rounded with four
squarely placed mounting holes.
The Raspberry Pi Model B+ uses the same
BCM2835 application processor as the Model
B. It runs the same software and still has 512
MB RAM.
If you want to adapt a current project to
the new platform, be sure to study the new
GPIO pins and mechanical specs. To ensure
continuity of supply for industrial customers,
the Model B will be kept in production for as
16 C I R C U I T CELL AR • S EP TE MB E R 2 0 1 4 # 2 9 0
PRODUCT NEWS
« IAR
SYSTEMS
18 C I R C U I T CELL AR • S EP TE MB E R 2 0 1 4 # 2 9 0
PRODUCT NEWS
Measurement Computing
www.mccdaq.com
PRODUCT NEWS
PRODUCT NEWS
perform ance and qu a lity of Xilinx fabric. The hardware and softw are
Zynq-7000 All Program m able SoC and p ro g ra m m a b ility of Zynq-7000 AP
eT-Kernel. Since eT-Kernel inherited SoC enables system developm ent
the functions and a rchitecture of w ith high perform ance, fle xib ility,
ulTRON, the m ost popular RTOS in and scalability, w hile achieving lower
Japan and Asian countries, developers power consum ption and cost. The eT-
can reuse th e ir uITRON-based Kernel/Zynq-7000 All Programmable
so ftw are assets w ith o u t fu rth e r work. SoC Evaluation Kit allows developers
Runtime softw are in the Evaluation to ju m p -s ta rt th e ir evaluation
Kit includes the eT-Kernel M ulti-core using packaged device drivers,
Edition, eSOL's PrFILE2 FAT file system, w hich saves the tim e and money
the SD m em ory card driver, and the of developing them . Zynq-7000 All
CLIENT PROFILE
Logic Supply
www.logicsupply. com
• 1 0 /100 I [ Hr.fi « U M *
• PS/2 KB porT
• C om pact Flash S lot / SD S lot / Sfl
• 9 inch 1024 x 600 WSVGA TFT LCD
• R esistive Touch Screen ■ ZxjBeePro Industrial Bfueloolli
• DC-IN +12VD C / +24VD C (Hl'J'dfu.'rkirtiJijJÎli JndP Of.V, M w J v 'n .ffjre J ic s iö iv k i k n m f l S - U J
• IP65 F ront Panel JfiV** AlKiIWFJilHfin jf f Isjfig rc n g i cp-!ions. lotv coj-!
t ig ft ring1Arp-McdT/om
• W i-F i (O p tio n a l)
• Giga E thernet (O p tio n a l)
3 .x x KE R N EL
• W ide Tem perature (O p tio n a l)
The PP C -090T com es ready to run w ith the O perating S ystem installed on flash
disk. A p p ly pow er and w atch the Linux X -W indow s desktop user interface appear ¡LowjKower. Hiyli Performance
on the vivid color LCD. Interact with the PP C -090T using the responsive integrated
touchscreen. Everything w o rks out o f the box, allow ing you to concentrate on your
fe e m ic W a u c io rs
EkceIlent s en-silivltv tfüiïiniclenl Power amulilitrs
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.
Need a data acquisition system for gathering and sending analog data to
a user in real time? This article details the process of building a sensor-to-
user data acquisition system. Although this project is intended to monitor
forces exerted by rowers, you can use it as a guide to build a system for
measuring, displaying, and logging forces for a variety of applications.
PHOTO 1
This is the finished force-sensing
u n it m ounted and attach ed to row ing
m achine for d e m o n s tra tio n . You can
see the LED and A n dro id displays.
c ircu itce lla r.co m 23
FEATURES
the V ic to ria row ing p ro g ra m s. She
tu rn e d us on to the idea th a t system s
fo r m o n ito rin g force s exerted by
ro w e rs —and then re la tin g th a t data
to th in g s like a c c e le ra tio n —w ere
e x tre m e ly lim ite d . The idea was to
develop a system to m o n ito r forces
in re a l-tim e and p ro vid e fee d b a ck to
ro w e rs fo r e ffic ie n c y a nalysis. To do
so, we w anted to m o n ito r the force
a t a ro w e r's fe e t and re la te it to the
b o at's a cce le ra tio n . A d d itio n a lly , we
w anted tra c k the ro w e r's balance
of m o tio n to the rig h t or to the le ft.
Our e n d -to -e n d , s e n s o r-to -u s e r
data a c q u is itio n system was b u ilt
s p e c ific a lly w ith row in g in m in d ,
b u t you could easily m o d ify it to
m easure, display, and log forces
fo r any num b e r of a p p lic a tio n s (see
Photo 1).
v o id A D C _ C o n f ig u r a t io n ( v o id )
{
A D C _C o m m o n In itT y p e D e f A D C _ C o m m o n In itS tr u c tu re ;
A D C _ In itT y p e D e f A D C _ I n i t S t r u c t u r e ;
/* ADC Common I n i t */
A D C _ C o m m o n In itS tru c tu re .A D C _ M o d e = A D C _ M o d e _ In d e p e n d e n t;
A D C _ C o m m o n In itS tr u c tu re .A D C _ P r e s c a le r = A D C _ P re s c a le r _ D iv 2 ;
A D C _ C o m m o n In itS tru c tu re .A D C _ D M A A c c e s s M o d e = A D C _D M A A cce ssM o d e _D isa b le d ;
A D C _ C o m m o n In itS tru c tu re .A D C _ T w o S a m p lin g D e la y = A D C _ T w o S a m p lin g D e la y _ 5 C y c le s ;
A D C _ C o m m o n In it(& A D C _ C o m m o n In itS tru c tu re );
A D C _ D M A R e q u e s tA fte rL a s tT ra n s fe rC m d (A D C 1 , ENABLE);
/* E n a b le ADC1 DMA * /
ADC_DMACmd(ADC1, ENABLE);
/* E n a b le ADC1 * /
ADC_Cmd(ADC1, ENABLE);
}
LISTING 1
This setup is fo r the ARM boa rd's b u ilt-in ADCs. I t was created for continuous 1 2 -b it conversions on data acquired fro m fo u r d iffe re n t GPIO pins.
Messe München
International
Welcome to Planet e.
The entire em bedded universe at a single location!
s ta t ic v o id D M A _ C o n f ig u r a t io n ( v o id )
{
D M A _ In itT y p e D e f D M A _ I n it S t r u c t u r e ;
FEATURES
/* DM A2_Stream0 e n a b le * /
DMA_Cmd(DMA2_Stream0, ENABLE);
}
FIGURE 3
This is the com plete p roje ct featu rin g
the ARM and PIC circu its. The ARM
b oa rd and co nd itioning c irc u its are
located a t the top. The PIC and LEDs
are displayed a t the bo tto m .
c ircu itce lla r.co m 29
FEATURES
c o n fig u ra tio n , we chose a 1 2 -b it re s o lu tio n G P IO _ In itS tru c tu re .G P IO _ M o d e =
so o u r rang e o f value s w as fro m 0 to 2 12. G PIO_M ode_AF;
To in te rp r e t th is as a v o lta g e , we to o k G P IO _ P in A F C o n fig (G P IO D ,
o u r m a x im u m know n v o lta g e o f 5 V and G P IO _ P in S o u rc e 8 , GPIO_AF_
d iv id e d by 2 12, w h ich gave us o u r le a st USART3);
s ig n ific a n t b it and a w ay to re la te back to
o u r analog u n it. Next was to se tu p the USART its e lf. We
used s ta n d a rd s e ttin g s fo r an 8 - b it s e ria l
TALK TO US! c o m m u n ic a tio n w ith o u r data ra te selected
A fte r we a c q u ire d o u r d a ta , we depending on w hich device we were
needed to c o m m u n ic a te w ith th e w o rld . c o m m u n ic a tin g w ith . To tra n s m it o u t via
We p ro v id e d tw o w a y s fo r a u s e r to see B lu e to o th , we used an S T M icro e le ctro n ics
fe e d b a c k fro m th e ir d a ta . We c re a te d SPBT2632C2A B luetooth m odule. We were
an A n d ro id a p p lic a tio n th a t a ccepted able to p o rt our s e ria l c o m m u n ic a tio n
in fo rm a tio n via B lu e to o th , and we also d ire c tly o u t over B lu e to o th . The m odule
c re a te d a 15-LED a rra y c o n tro lle d by a comes p re c o n fig u re d to accept s e ria l in at
P IC18F1330 m ic ro c o n tro lle r th a t received 1 1 5 ,2 0 0 bps (data ra te ), so c o n fig u rin g our
PHOTO 3
Here you see ARM and PIC PCB boards
w ith o p -a m p cond itio n in g c ircu its
and MUX included. The overall system
on separate ARM-based (b o tto m )
and PIC-based (top ) PCB boards. We
used A ltiu m D esigner to create the
schem atics and PCB layouts.
30 C I R C U I T CELL AR • S EP TE MB E R 2 0 1 4 # 2 9 0
There are numerous options for communicating new data a rriv e s before the receive re g is te r
has had a chance to clear. To get around
with the user, such as LCDs, buzzers, and LEDs th is , we in tro d u c e d a delay betw een each
USART co m m u n ic a tio n . A 10-m s delay was
... We implemented an array o f 15 LEDs that m ore th a n enough to slow o u r system down
to avoid any chance of o v e rflo w , w hile s till
would move back and forth in order to provide g ivin g us a high enough sam ple rate fo r
our data to be useful.
additional information to the row er...
SHOW US THE WORLD
The end goal fo r our p ro je c t was to see
our data. There are n u m e ro us option s fo r
co m m u n ic a tin g w ith the user, such as LCDs,
buzzers, and LEDs. We needed som ething
USART to the c o rre c t data ra te and then th a t could p ro vid e in s ta n t fee d b a ck w ith o u t
passing data o u t was dead sim p le . Creating re q u irin g th e user to focus too long. To this
A n d ro id a p p lic a tio n s is a broad to p ic th a t's end, we im p le m e n te d an a rra y of 15 LEDs
o u tsid e the scope of th is a rtic le . W e'll leave th a t w ould move back and fo rth in o rd e r
it to you to in v e s tig a te it fu rth e r. to p ro vid e a d d itio n a l in fo rm a tio n to the
ro w e r a b o u t th e ir p e rfo rm a n c e so th a t th ey
PIC US could c o rre c t th e ir le ft- r ig h t balance (see
Much s im p le r th a n cre a tin g an Photo 3). The LEDs w ould a c t as a bubble
A n d ro id a p p lic a tio n fro m scra tch was level and w ould be co lo r coded to ind ica te
o u r second USARTc o n fig u re d to be used ju s t how in or out of sync the ro w e r's fe e t
fo r c o m m u n ic a tin g w ith o u r PIC18F1330 w ere.
m ic ro c o n tro lle r. The PIC18F1330 is lim ite d The PIC18F1330 c o n fig u ra tio n was not
to a data ra te of 9,600 bps a t the given too d iffic u lt to fig u re out using the b u ilt-
in te rn a l o s c illa to r speed. This lim ita tio n in USART lib ra ry . The PIC18F1330 had a
m e a n t th a t, u n fo rtu n a te ly , we w ere not m a xim u m in te rn a l o s c illa to r speed of 8
able to d riv e both the PIC18F1330 and the MHz, and as a re s u lt a m a xim u m data rate
B luetooth u n its fro m a single pin on the of 9,600 bps. The setup fo r the PIC18F1330
ARM. USART is:
When cre a tin g these c h ip -to -c h ip
co n n e ctio n s, we also had to pay special OpenUSART(USART_TX_INT_OFF
a tte n tio n to our tim in g . They say th a t in & USART_RX_INT_OFF
com edy tim in g is e v e ry th in g , b u t we th in k & USART_ASYNCH_MODE
& USART_EIG HT_BIT
& USART_CONT_RX
PROJECT FILES SOURCES & USART_BRGH_HIGH, 5 1 );
A ltiu m D e s ig n e r s o ftw a re
Once we had the data on the
A ltiu m | w w w .a ltiu m .c o m PIC18F1330, it was tim e to do som e thin g
w ith it. Processing the raw data was done
on the ARM board f ir s t to c o n v e rt the value
PIC 18F1330 M ic ro c o n tro lle r
in to a s m a lle r num ber. This processing was
M ic ro c h ip T e chno lo gy, In c . | w w w .m ic ro c h ip .
done f ir s t on the ARM due to the seria l
com
c irc u itce lla r.co m /ccm a te ria ls co m m u n ic a tio n o n ly being 8 b it and our
data being a 1 2 -b it value. The PIC18F1330
SPBT2632C2A B lu e to o th M o dule and STM32F4 s im p ly receives a value th a t is easily
To d o w n lo a d th e code, go to D is c o v e ry Board parsed to betw een 0 and 14, w hich then
c irc u itc e lla r.c o m /c c m a te ria ls . runs a fu n c tio n to sw itc h on an LED. This of
S T M ic ro e le c tro n ic s | w w w .s t.c o m
course creates som e c o m p lic a tio n s as the
PIC18F1330 does not come equipped w ith
C E A -13-2 40U Z -12 0 120-Q S tra in g a uge enough I/O pins to handle 15 LEDs!
V is h a y /M ic ro -M e a s u re m e n ts | w w w .v is h a y p g . The fin a l piece of th is puzzle was to add
c o m /m ic ro - m e a s u re m e n ts / in a m u ltip le x e r to add to o u r usable I/O
c ircu itce lla r.co m 31
ABOUT THEAUTHORS
A lb e r t R uskey (a ru s k e y @ sh a w .ca ) s t u d ie d a t C a m osu n College in V ic to r ia , BC,
w h e re he an e a rn e d E le ctro n ics a nd C o m p u te r E n g in e e rin g T echnology d ip lo m a .
He is p u rs u in g fo r a d e g re e in C o m p u te r E n g in e e rin g , w ith a fo cu s on e m b e d
ded syste m s, a t th e U n iv e rs ity o f B ritis h C o lu m b ia . P reviously, A lb e rt w o rk e d as
FEATURES
a m a rin e te c h n o lo g is t fo r Ocean N e tw o rks C anada and an e le c tro n ic s te c h n ic ia n
fo r th e D e p a rtm e n t o f N a tio n a l Defense.
TURN IT ON
The only th in g le ft to do is tu rn it on and push off. T u rn in g it on m ig h t o
G
r c u it ce n Qr
be a pro b le m th o u g h because a lth o u g h e le c tric ity o fte n feels like m agic,
ügggasL m
it does in fa c t re q u ire a source of pow er to w o rk. For o u r a p p lic a tio n in a
ro w ing scull to be e ffe c tiv e , we could not increase the w e ig h t o f the scull
by m ore than a b o u t 1 lb. This ruled o u t th in g s like bu lky b a tte ry packs and
m u ltip le pow er sources. W ith th a t in m in d , all of o u r co m p o n e n ts—the ARM,
op -a m p s, PIC18F1330, and the MUX—w ere chosen to be able to run o ff of 5 V.
To keep the w e ig h t down fu rth e r, we decided to use an LM7805 lin e a r voltage
re g u la to r to re g u la te 9 V, w hich p rovides the g re a te s t vo lta g e fo r th e lig h te s t
w e ig h t of any sta n d a rd a lka lin e b a tte ry available.
H opefully, th is a rtic le has as p rovided some in s ig h t in to w h a t is re q u ire d
to create a data a c q u is itio n syste m . B u ilding a system to m easure w o rld
aroun d you can be both easy and inexpensive. I f we ig n o re the s tra in gauges,
w hich w ere do nated, the e n tire cost of the p ro je c t was close to $50!
We created our setup w ith ro w in g in m in d , b u t y o u 'll fin d it an excellent
s ta rtin g p o in t fo r any data a c q u is itio n system in w hich the end goal is to get
analog data back to a user in real tim e . It's easy. S im p ly re m e m b e r yo u r
drcuitcellor.com /
a cronym s: ARM to GPIO to ADC to DMA to USART to PIC to MUX to LED! O subscriptions
32 C I R C U I T CELL AR • S EP TE MB E R 2 0 1 4 # 2 9 0
Position Control
Build a Microcontroller-Based
Stabilization Platform
FEATURES
HIGH-LEVEL OVERVIEW
As you can see in Photo 1 at the core of
our design are tw o servo m otors, a main
board containing an Atmel ATmega1284p
m icrocontroller, a three-axis accelerometer,
and a three-axis gyroscope. The
m icrocontroller board and servo m otor are
attached to an L-shaped wooden fram e th a t
enables you to hold the apparatus in different
ways. A b a tte ry pack is on the other side of the
wooden fram e. The servo m otor attached to
the main L-shaped wooden fram e controls the
pla tfo rm 's roll. Its sh a ft is d irectly screwed
into a wooden support fram e, which supports
the second servo m otor th a t controls the
pitch of the p latform . The sh a ft of the second
servo m otor is connected to a metal bracket
supporting the actual p la tfo rm th a t contains
the test camera, three-axis accelerometer,
PHOTO 1
and three-axis gyroscope.
This is the basic setup fo r o u r self-sta bilizin g p la tfo rm . The m a in board contains an ATmega1284p
When the device is switched on, the
m icro co n tro lle r w ith an AA b a tte ry pack m ounted behind the handle. A servo m o to r controls the roll o f the
pla tfo rm is initialized to the neutral position
p la tfo rm . The servo m o to r controls the pitch o f p la tfo rm . Also included are a trip le -a x is gyroscope, a trip le
axis accelerom eter, and a w ebcam attached to the p la tfo rm fo r testing.
(level to the ground). Using specific algorithm s
c ircu itce lla r.co m 33
FEATURES
tw o separate pulse-w idth m odulation (PWM) P itch
outputs th a t control the servo m otors'
positions, bringing the p la tfo rm back to the
neutral position.
HARDWARE DESIGN
Configuring the mechanical fram e was
one of the most challenging aspects of the m otor are connected to the PWM outputs
hardware design process. Since we have to of Port D, which correspond to the PWM
control both the platform 's pitch and roll, the generated fro m Timer3.
fram e has to allow a platform to freely rotate To supply power to both the servo
along tw o different axes. The servo motors are m otors and the m icrocontroller board, we
able to rotate ±90° from a neutral position, so used a circu it to reduce the noise between
we make sure we have adequate clearance in all the diffe re n t power lines through the use
directions. To reduce the torque and load on the of capacitors. In particular, a b a tte ry pack
servo motors and frame, ideally, the platform containing fo u r AA batteries in series supplies
should be at the center of the system, with the the power. The operating voltage fo r our servo
servo motors attached on different sides of the m otors was 4.8 to 6 V, while the operating
platform . However, this is difficult to achieve voltage fo r the ATmega1284P m icrocontroller
w ith our given resources. So, the servo motor is 1.8 to 5.5 V. Since the b a tte ry pack outputs a
that is currently connected to the main frame voltage of 6 V, the servo m otors could use the
supports both the platform and the second power directly. From there, we added a diode
servo m otor (see Photol). to safely supply power to the m icrocontroller,
To connect the electronic components, we bringing the voltage to a little more than 5 V.
started with soldering the gyroscope and the W ithout the capacitors added between
accelerometer to a board on the platform. From the power and servo m otor control lines, the
there, we used headers and a ribbon header cable m icrocontroller resets when the servo m otors
to connect the sensors to the main microcontroller attem pted to make large and sudden changes
board (see Figure 2). Since the accelerom eter upon large p erturbations. We deduce th a t this
uses the SPI protocol, is it connected to the is the result of noise along the power lines.
SPI pins in the ATmegea1284p's Port B (see So, we cu rre n tly have capacitors between the
Figure 3). Since the gyroscope uses the I 2C power lines, as shown in Figure 3, to reduce
protocol, it is connected to the SDA and SCL noise between the power lines of the servo
pins of Port C. The control lines of the servo m otor, the m icrocontroller, and the control
8888888888nnnm m m n8888i
m i m m n m m n n n m n n ;
FIGURE 2
The m ain m ic ro c o n tro lle r board is
m ounted on an L-shaped wooden
fra m e . The board was designee
by Professor Bruce Land a t Cornell
University.
34 C I R C U I T CELL AR • S EP TE MB E R 2 0 1 4 # 2 9 0
FIGURE 3
Take a look a t the com plete circ u it.
The accelerom eter is connected tc
the SPI in p u t pins. The gyroscope is
connected to the m ic ro c o n tro lle r's I2C
in put pins.
FEATURES
lines to the servo motor. As a result, the device it allows the user to fine tune how fast and
now functions sm oothly w ith o u t ever having steady the user wants the device to respond to
the m icrocontroller reset unintentionally. perturbations. For example, the proportional
te rm and derivative te rm can be increased
SOFTWARE OVERVIEW to make the design respond faster, although
Our m icro co n tro lle r program is w ritte n this results in less s ta b ility as the m otors may
using the m ultitasking kernel called overshoot the ta rg e t position.
TinyRealTime (TRT), which was w ritte n by Dan
Henriksson and Anton Cervin. This enables us PID & MOTOR CONTROL
to achieve the concurrent execution of several To im plem ent TRT Task 2, w hich drives
necessary tasks fo r our design. the servo m otors, we tried tw o approaches to
TRT Task 1 interacts w ith the PC keyboard control the servo m otors. The firs t was direct
to take user input. I t then set up proportional angle control and other was PID control, which
integral derivative (PID) controller param eters we u ltim a te ly settled upon. The d irect angle
to control the servo motors. control method sim ply involved changing the
TRT Task 2 runs the PID control loop about PWM ou tp u t to make the servo m otor rotate
50 tim es per second using x-axis and y-axis a certain angle th a t was equal in m agnitude
tilt angles measured fro m another task. It to the cu rre n t tilt angle and but opposite in
then assigns the PID calculation result to the direction. This, however, provided less user
PWM o u tp u t to drive the servo motors. control than using a PID.
TRT Task 3 acquires the data fro m the Our p ro g ra m 's PID co n tro l a lg o rith m is
gyroscope and the accelerometer. It then a standard a lg o rith m provided by Cornell
calculates the corresponding x-axis and y-axis Professor Bruce Land (ECE 4760: Laboratory
tilt angles at about 50 Hz. 4 —"T achom eter and M otor C ontroller,"
To im plem ent TRT Task 1, we used 2013). The m o to r is m odeled as a second-
predefined function f s c a n f ( ) to get the o rd e r system w hen it's powered and a fir s t
input strin g fro m the UART p o rt, which is o rd e r system when it's c o a stin g. In th is
the PC keyboard in this case. Also, tw o TRT a lg o rith m , we use the calculated p itch and
sem aphores, SEM_RX_IS R _SIGNAL and roll angles as the feedback to the PID. The
SEM_STRING_DONE, are required fo r serial a lg o rith m 's core is the fo llo w in g line o f code
com m unication. The fo rm e r is used in UART in the pro g ra m :
receiving in te rru p t service routine (ISR). The
la tte r is fo r detecting w hether or not the user m _ in p u t = p i d _p * c _ e r r o r + p i d _i
typed <enter> key. A fte r getting a valid input, * p id _ in t e g r a l / 1000 + p i d_d *
we assign the input value to corresponding (c _ e rro r - c _ e rro r_ p re v );
variable such as PID param eters.
While this task is not necessary fo r the P id _p, p i d _i , and p i d _d are the
actual function of the device, this enabled us PID param eters fo r the proportional term ,
to fine-tune the default PID param eters, and integral term , and derivative term . C _ e r r o r
c ircu itce lla r.co m 35
FEATURES
p la tfo rm , we made some m odifications to the axis accelerometer. We used the standard
original algorithm . First, we put a lim it on the SPI protocol to com m unicate between the
integral te rm 's m axim um value to prevent accelerom eter and the m icrocontroller. To
instabilities when the integral changes sign. read and w rite to the ADXL345 accelerom eter's
We also scaled the integral te rm by 1,000- registers, we utilized and modified code
fold sm aller to make the p i d _i param eter provided by SparkFun. To convert the raw
easier to input. In addition, we introduced data to angular acceleration, we use the
an additional variable, SCALE, to scale the follow ing equation:
m axim um value of the to ta l PID calculation
result m _ in p u t to control the change rate of
the control PWM signal. Finally, the calculation
result is mapped to the PWM o u tp u t control
registers OCR1A and OCR1B, w hich output
to the m icrocontroller's pin D4 and D5,
respectively.
To d e te rm in e the e xa ct value fo r the
PWM o u tp u t, we had to vie w the specs
fo r o u r p a rtic u la r servo m o to rs , FEETECH
m odel FS5106B servo m o to rs purchased
fro m S parkFun. In p a rtic u la r, the c irc u itry
o f the servo e xpects a c o n sta n t 50-H z PWM
signal (p eriod o f 20 ms). The actual in p u t
we send the servo is th e w id th o f the high
sig n a l d u ra tio n in the w hole p e rio d . As
show n in Figure 4 , the w id th o f the high
sig n a l d e te rm in es the p o sitio n o f the servo
co rrespo nd ing ly.
Since th e p ro p e r fre q u e n c y fo r the PWM
signal is 50 Hz, we could n o t use the fa s t
PWM m ode, w hich generates a v e ry h ig h -
fre q u e n cy signal. So, we decided to use
th e Phase and Frequency C orrect m ode o f
T im e r1. Only T im er1 and T im er3 s u p p o rt
th e Phase and Frequency C orrect m ode and
have 1 6 -b it tim e rs . Since T im e r3 o u tp u ts
its PWM to Ports B3 and B4, w hich the
a ccelerom eter needed fo r the SPI pro to co l,
we use T im er1 fo r the Phase and Frequency
C o rrect m ode. T im er3, in the m e a n tim e , is
used fo r the TRT kernel.
In Phase and Frequency Correct mode,
we firs t set the Prescaler value, N, to 8, and
we then calculated our ICR1 (In p u t Capture
Register 1 = TOP) register value fro m the
equation below.
f PW M
2 x N x TOP
■ PRODUCED BY
CES I «CEA
TH E GLO BAL STAGE FOR INNOVATION
J A N . 6-9, 2015
C E S W E B .O R G
# CES2015
38 C I R C U I T CELL AR • S EP TE MB E R 2 0 1 4 # 2 9 0
The original Kalman filte r code we used was fro m SparkFun. We modified it to suit our
m icrocontroller and sensors.
FEATURES
COMPLEMENTARY FILTER
The com plem entary filte r provides another way to combine diffe re n t sensor data and it is
much easier and more intuitive. In fa ct, this filte r manages both high-pass and low-pass filte rs
sim ultaneously. The low pass filte r filte rs high frequency signals (such as the accelerom eter in
the case of vibration) and low pass filte rs th a t filte r low frequency signals (such as the d rift of
the gyroscope). In its sim plest fo rm , the filte r looks as follows:
The com plem entary filte r we used in our program is a second order filte r w hich is more
complicated. The a lg o rith m looks like PID and is given as follows:
e r r o r T e r m = (n e w A n g le - p r e v io u s A n g le ) * k * k
i n t e g r a lT e r m = in t e g r a lT e r m + e r r o r T e r m * d t
PIDTerm = i n t e g r a lT e r m + (n e w A n g le - p r e v io u s A n g le ) * 2 * k + n e w R a te
f i l t e r A n g l e = PIDTerm * d t + p r e v io u s A n g le
k is the tim e constant. d t is the derivative constant. n e w A n g le is the tilt angle calculated
fro m the accelerometer. n e w R a te is the
angular acceleration calculated from the
gyroscope. In our code, we made several
PROJECT FILES m odifications to this a lg o rith m to make the
Le tsM a ke R o b o ts.co m , "K a lm a n f ilt e r vs C o m p le tilt recovery process faster. We introduced a
m e n ta r y F ilte r,” 20 11, h ttp ://le ts m a k e r o b o ts . variable to control the p ro portion of n e w R a te
c o m /n o d e /2 9 1 2 1 . in P ID Term . We also scaled e r r o r T e r m in
i n t e g r a lT e r m to make it proportional to
the n e w R a te .
S p a rkF u n , " T rip le A x is A c c e le ro m e te r B re a k o u t We cu rre n tly use the com plem entary
- A D XL345,” 20 13, h ttp s ://w w w .s p a r k fu n .c o m / filte r to calculate the tilt angles because
p ro d u c ts /9 8 3 6 . the result fro m the com plem entary filte r
circ u itce lla r.co m /ccm a te ria ls
was v e ry close to the one calculated by the
--------- , "T rip le -A x is D ig ita l- O u tp u t G yro -
Kalman filte r. Also, the com plem entary filte r
scop e— IT G -3 2 0 0 ,” h ttp s ://w w w .s p a r k fu n .c o m /
is m ore m icro p ro ce sso r-frie n d ly because it
RESOURCES requires a small num ber of flo a tin g -p o in t
p ro d u c ts /9 7 9 3 .
S. C o lto n , "T h e B alance operations.
F ilte r,” 20 07, h t t p : / / b i t .
ly /1 jL r9 O Z . PERFORMANCE
SOURCES With our default PID settings, we see
ADXL345 A c c e le ro m e te r relatively fa st and smooth transitions. The
B. Land, "A P re e m p tiv e Kernel m otors can tra n sitio n fro m -9 0 ° to 90°
A nalog D evices, In c . | w w w .a n a lo g .c o m
fo r A tm e l M e ga12 84 M ic ro w ith in 1.2 s. We can decrease the tra nsition
c o n tro lle rs ,” C orn ell U n iv e r tim e by increasing the proportion term and
s ity , 20 13, h ttp ://p e o p le .e c e . A T m ega1284p M ic ro c o n tro lle r the derivative term . However, this results
c o rn e ll.e d u /la n d /c o u rs e s / in rougher tra n sitio n s, and the platform
A tm el Corp. | w w w .a tm e l.c o m
e c e 4 7 6 0 /T in y R e a lT im e /in d e x . w ill som etim es oscillate as a result of
h tm l overshooting the ta rg e t position. In any case,
ITG -3200 T rip le -A x is D ig ita l-O u tp u t G yroscope
it is possible to reduce the response tim e,
S ervo— G eneric High Torque (S tandard Size)
---------, "ECE4760: Laboratory 4 - and the theoretical m inim um response tim e
Tachom eter an d M o to r C on
SparkFun (d is trib u to r) | h ttp s ://w w w .s p a rk fu n . seems to be lim ited by the slew rate of the
tro lle r,” C orn ell U n iv e rs i
c o m /p ro d u c ts /9 7 9 3 motors.
ty , 2 0 1 3 , h ttp ://p e o p le .e c e . While the p la tfo rm rem ains in a relatively
c o rn e ll.e d u /la n d /c o u rs e s / neutral position, the p la tfo rm occasionally
e c e 4 7 6 0 /la b s /f2 0 1 3 /la b 4 . oscillates back and fo rth . This e rro r seems
h tm l. to be caused by m ultiple sources. On the
c ircu itce lla r.co m 39
softw are side, since we had to reduce the position, it experiences slight vibrations. So,
num ber of samples taken fro m the gyroscope while it can be suited to taking steadier action
and accelerometer, accuracy suffered where video shots, it is not as suited to taking still
we saw variations in angles of about a degree pictures, and many im provem ents can be
or two. In addition, on the hardw are side, the made, especially on the hardware side.
bearings on the m otor th a t controls the roll of For example, to reduce the load on the
FEATURES
the platform became a b it loose. In particular, shaft of the m otor controlling the roll, we can
its sha ft is directly connected to a wooden distrib u te the load by adding another support
support th a t holds the w eight of the second panel having a second point of contact on the
m otor and the entire platform . A fte r many opposite end of the motor. In addition, instead
tria ls and tests, the rather heavy loads that of m ounting the gyroscope and accelerom eter
we had placed on it have probably caused the on top of tw o separate pin socket connectors,
bearings to loosen. Combined, these sources we can tr y placing both together flush against
of e rro r make the pla tfo rm v a ry at around the platform . This may help increase accuracy
±2.5° from the neutral position. in the angle calculations. Of course, if budget
When tested w ith a webcam, the platform was not an issue, m otors w ith b etter torque
kept the video oriented in the landscape and slew rates can be used instead. A larger
position as we tilted the apparatus to the and more refined p la tfo rm can also be
extrem es of ±90° in both roll and pitch. attached so th a t it can hold a larger v a rie ty of
However, when the device was held in place cameras and objects.
w ith o u t any perturbations, due to the sources
of e rro r mentioned previously, the platform Authors' Note: Full code is available on Circuit
would continue to adjust its position up to Cellar's FTP site. The code and further details
±2.5° fro m the neutral position. are also available at http://bit.ly/1mLH4MX. A
Overall, the self-stabilizing pla tfo rm works video demonstration o f our camera stabilizing
as expected. However, while it is able to keep platform is also available at http://bit.
a camera oriented in a relatively neutral ly/lqRYtZJ.
4 lk
< AP CIRCUITS
PCB Fabrication Since 1984
F9.95 each!
Two Layers
Two Masks
One Legend
www.apcircuits.com
<JPC>
40 C IR C U IT CELLAR • SEPTEMBER 2 0 1 4 # 2 9 0
^ ----------*--------------------------------
IS
I 've always been fascinated by the sim p licity my m ost recent version. I'll explain how
of Tic-tac-toe (or "Noughts and Crosses"). I brought the game to life w ith a modern
About 40 years ago, Popular Science published upgrade—a red-green-blue (RGB) 8 x 8 LED
the a rticle , "E lectronic Tick-Tack-Toe in a m a trix display.
Cigarette Box," which detailed an interesting My original interpretation of the Popular
electronic version of the classic game. Since Science game was based on a 40-pin DIP
then, I've designed a few variations of that Motorola 68HC705C8A m icrocontroller and
electronic system. In this article, I'll present bipolar LEDs. The green wires shown in
Photo 1 go to off-board push-button switches.
The controller was atypically mounted on the
solder side of the PCB. And you'll probably
notice th a t the single-sided PCB was drawn
out freehand and m anually etched. Ah, the
good old days! The software counter-move
algorithm used in th a t version was based
on the one described in the original Popular
Science article. That same algorithm was
ported to the newer m icrocontroller fo r the
current im plem entation, which saved a bit of
coding tim e. I'll explain th a t algorithm later on.
SYSTEM OVERVIEW
The latest incarnation of the game is
shown in Figure 1 . The heart of the design
is a Freescale Sem iconductor HC908JB16
(U1) m icrocontroller, which I chose fo r a few
reasons. One, I've been coding Freescale
processors in assem bler fo r years, and I'm
com fortable w ith Freescale devices and
softw are tools. Two, this p a rticu la r va ria n t
includes a sim ple USB interface fo r in -circu it
Photo 1
program m ing (ICP). And three, there were
This design, b u ilt in the 1980's, usee
a 68HC705C8A m ic ro c o n tro lle r ane
enough p o rt pins available to connect to the
b ipola r LEDs to d ire c tly in te rp re t the
in p u t/o u tp u t peripherals, requiring only a
o rig in a l gam e a lg o rith m . small num ber of outboard devices.
c ircu itce lla r.co m 41
FEATURES
Surrounding the m icrocontroller are the Products DS2408 used as the keyboard input. Figure 1
interface components. M icrocontroller U1 port Port D also dire ctly interfaces to SW5, which This is the RGB T ic -ta c -to e gam e's
c irc u itry . A Freescale 68HC908JB16
A dire ctly drives the display rows. U1 p o rt E is used as the center switch of the Tic-tac-toe
(U1) is the h e a rt o f the gam e.
drives U2, U3, and U4, which are 74HC595's game as well as the control mechanism fo r
used as display column drivers. Port E also ICP during reset. U1 Port C is used only fo r a
serves as the USB interface, which is needed debugging serial interface; it isn 't used in the
fo r ICP. U1 p o rt D provides the 1-Wire final product. U1 does not have a p o rt B in the
interface to U5, which is the Maxim Integrated package style th a t I selected.
* P a ra m e te r E q u a te s
ICP_FLAG EQU $F7FE ; ICP f l a g
o
GO
^ *
CÛ
_I
C
P
* M ain P rog ra m
*
ORG $F800 ; h a rd - c o d e d lo c a tio n fo r th is r o u t in e
I C P _ R e s e t _ I n it :
BCLR 3,DDRD ; s e t PTD,3 as i n p u t ( i . e . , use SW5 f o r th is app)
BRCLR 3,P T D ,U S B _IC P ; e n t e r ICP i f s w it c h i s p re s s e d
jm p RESET ; e ls e jm p t o th e a p p l i c a t i o n p ro g ra m
*
* USB ICP
*
USB_IC P :
sei ; d i s a b le i n t e r r u p t s
mov #% 00000011,C 0N FIG ; e n a b le STOP and d i s a b le COP
mov #% 00000100,UCR3 ; e n a b le USB p u l lu p
jm p Mon_USB_ICP ; c h e c k f o r new f l a s h p ro g ra m
LISTING 1
This is the Power-On ICP check A s im ple check fo r SW5 being depressed (logic zero) is m ade a t pow er-on tim e , and the re s u lt dete rm in e s w h e th e r or n o t to enter ICP m ode,
w h ich is a call d ire c tly in to the m ic ro c o n tro lle r's fa c to ry ROM code
42 C I R C U I T CELL AR • S EP TE MB E R 2 0 1 4 # 2 9 C
Figure 2
As you'd expect, the m ain gam e
a lg o rith m is s tra ig h tfo rw a rd . W ait
fo r a m ove fro m the player, check
fo r a cou n te r-m o ve , see if the gam e
outcom e has changed, and then do it
FEATURES
again.
I chose the DS2408 as a keyboard interface out the reset capacitor, but soon found out
because it offers a ve ry simple processor th a t the controller would not always boot into
connection, only one p o rt pin, and I have a ICP mode properly w ith o u t it.
ve ry extensive softw are lib ra ry th a t I have Listing 1 shows the s im p lic ity of the ICP
developed over the years fo r interfacing to softw are interface. As stated in the Freescale
1-Wire devices. The 74HC595's were ideal application note AN2399: "Routines embedded
fo r driving each color of the display columns in the m onitor ROM area ($FA00-$FDFF and
w ith only a th re e -w ire interface required to $FE10-$FFCF) are available to s im p lify the
com m unicate w ith all of them . A fo u rth pin ICP process. A USB com m unications handler
fro m p o rt D is used to reset the 74HC595s and is already in the m onitor ROM."M The code
the DS2408 during power-on. shown in Listing 1 makes use of those built-in
Nine input switches are available, one m o n ito r ROM routines a fte r checking fo r the
fo r each position of the Tic-tac-toe display. request fo r ICP. This check is done at power-
The DS2408 decodes eight of them , and, as up by looking at switch SW5's state. If SW5 is
I mentioned previously, the center switch is depressed during the power-up process, the
connected dire ctly to a m icrocontroller port ICP m onitor ROM code w ill be entered. If it
pin. The bootloader also uses the center is not, norm al program code is entered. By
switch to determ ine if Normal mode or In chip design, if the program flash m em ory is
Circuit Program m ing mode is required. blank, the ICP m onitor code w ill be entered
The ICP circu it comprises SW5, the USB im m ediately at power-up, which is handy for
connector, J1, capacitor C4, and the tw o a surface-m ounted device.
470-kQ resistors, R2 and R3. Except for The last m ajor com ponent is, of course,
a 12-MHz crystal, w hich is required for the RGB m a trix display, DS1. I found mine
proper tim in g of the USB interface, no other on the In te rn e t. Others are readily available
components are required fo r ICP. A Windows fro m a v a rie ty of sources.
XP program , provided by Freescale, handles I added a piezo beeper SP1 to provide
the flash m em ory program m ing. ( If anyone some feedback on key entries and w ins/
can provide me w ith a w orking Windows 7 losses. The USB connector J1 is used as the
v a ria n t of this softw are, I w ill gladly donate power interface to the circu it, as well as the
a w orking Tic-tac-toe game!) Power-on reset program m ing interface. Since 5-V USB power
capacitor C4 is an absolute necessity fo r ICP adapters are so common and inexpensive
as it handles the processor's reset circuitry. these days, I was able to s im p lify the power
When firs t sta rtin g to use this controller, I left circuit.
c ircu itce lla r.co m 43
FEATURES
serial-to-USB "frie n d ." I used this interface
extensively during the softw are debug 3 2
process, but it is not required in the finished 4 7
product. Counter-move to
5 N/A the m andatory
FIRMWARE
starting move
At sta rt-u p , follow ing the ICP check, a
sequence is entered th a t resets the peripheral 6 8
devices, sets up all m icro co n tro lle r registers, 7 4
and then displays a "W elcom e" message that
8 6
scrolls across the LED m a trix display. A simple
flash pattern of Xs and Os is then shown. That 9 8
was o rigin ally put in the code as a lamp test
feature. It could have been deleted, but I left
it in fo r the nice effect.
Figure 2 shows firm w a re 's main loop. The
code is extrem ely linear and sim ple since I 1 2 3
wanted to finish the project fa irly quickly. In
Table 2
the flow diagram , the player is G (green) and
This is the w a y th a t the softw are
the softw are is B (Blue). 4 5 6
in te rp re ts the position o f any move.
The softw are continuously scans fo r a All moves m ade are m apped into
key press. Once any key has been pressed, a th is fo rm a t before checking for
check is made to see if the pattern indicates 7 8 9
counterm oves.
J i
$45.00 board only ' Enclosures, Cables,
* * * ■ Power Supplies and Other
Accessories
S O M H z SCOPE m a fia s
Best «Htng TFT-UO& INTRODUCING THE SMFCOMX!
•Extended Distance Units
•Converters Serial to Digital I/O
lO OM Hz SCOPE WlTJl
:r • -i". I •Repeaters
• * mi I Large M ulti-Drop Networks
•M ulti-Repeaters
Custom Units &
• Hubs
Sm art Units
7 0 - 3 0 0 M H T j •Fiber Optics
Isolators •Industrial, 3.0 KV Isolation
i ^ S ^ - a5ag0DA5erWS $ 8 3 3 + -
THE HARDWARE
I chose to im plem ent this game on a
custom PCB, w hich let me use surface-m ount
com ponents fo r the m ost part. This kept the
game small enough to be hand-held.
The PCB was sized to fit into a standard
PacTec enclosure, which I happened to have
on hand. Only half of the enclosure is used fo r
sim plicity.
The interesting aspect of the PCB design is
th a t the com ponent side was used fo r all the
a w in by the player. If not, a response is surface-m ount and th rough-hole components;
calculated and, a fte r an intentional 1-s however, the solder side was designed to
delay, the counter-m ove is presented. If a p e rm it the m ounting of the display and
w in, loss, or draw occurs, a corresponding switches. I did this to keep the visible portion
"W in", "Loser," or "D ra w " message is scrolled of the game as clean as possible. This made
across the display and the program resets all fo r an interesting exercise in m irro rin g the
registers, a fte r which it returns to a known pinouts of the display m a trix while designing
sta rtin g point. the PCB, but th a t d id n 't take too long.
The counter-m oves are calculated in two Photo 2a shows the final product in its
d iffe re n t ways. The firs t is the sim plest. If the case, which is the bottom half of a standard
sta rtin g move is a corner square, a table look PacTec case. In the tim e I had, coming up
up is perform ed. This table is based on the w ith a clean way to have the display visible
a lg o rith m used in the original Popular Science w hile still allowing the switches to be pressed
article. That a lg o rith m requires a corner prevented the use of a full case. Photo 2b
sta rtin g move and was devised by the original shows the component side of the final product.
authors to p e rm it a w in by the player every
now and then, although not as often as the THEORY OF OPERATION
player would like! A draw is by fa r the more My game's operation is simple. A player
likely outcome. always begins w ith X and is represented
The second method checks fo r counter by green LEDs. The Player presses a switch
moves to a sta rtin g move in either the center (any switch) and then chases the Os (blue
1 2 th I n t e r n a t i o n a l S y s t e m - o n - C h i p ( S o C )
C onference, E x h ib it & W o rksh o ps
O cto b e r 22 & 23, 2014
U n iv e rs ity o f C a lifo rn ia , Ir v in e - C alit2
www.S o C c o n fe r e n c e .com
C a ll f o r S p e a k e rs a n d S p o n s o rs . . . Don't Miss Out!
This Year's Them e: "Innovative SoCs Empowering the Communications Market."
P la tin u m S p o n s o rs
FinFET Te ch n olog y & Design C om p lex M ixed-Signal SoCs
Analog & M ixed-Signal Designs SOI vs. C M O S
Sub 14nm D esigns & Beyond RF Design
3-D ICs Designs FPG As -T re n d s & Designs
IC S ecu rity & Challenges
M ulticore S oftw are D evelopm ent
SoC D esign & V erification
yci H igh-Speed I/Os
S m arter M obile D evices
M ulticore SoC Platform s
Innovative ED A Tools N etw ork-on -Ch ips (NoCs)
C om p lex Ip S ubsystem s Inform ative Panels
Low -P ow er Tech n iqu es IEEE Stu d en t D esign Contest
M em ory Tren d s & T e ch n olog ie s Netw orking O pportunities
Table-Top Exhibit (Free p a sse s)
C a lit2 And Much More. . .
Keynote Speakers
U P IX
Microsemi Skyworks Solutions
Jim Aralis, Chief Technology Dr. Peter L. Gammel,
Officer (CTO), and Vice Chief Technology Officer
President of R&D. (CTO).
The SoC Conference brings together a very targeted and sophisticated audience from leading-edge
technology com panies as well as key universities for two exciting days devoted to groundbreaking
products, technologies, and business disclosures, focused exclusively on designing com plex
System -on-Chip and the related technologies driving the SoC/ASIC/ASSP/FPG A/Foundry industry.
For More Inform ation or Questions, Please Contact the SoC Conference Organizing Com m ittee at:
SoC@ SoCconference.com o r (949) 851-1714
m yself a redesign and PCB layout change. a proper fit in my available enclosure. That
Lesson learned: read the freaking manual resulted in changing the standard USB-B ABOUT THE AUTHOR
(RTFM). That oversight led to changing the connector to a m ini-B type of connector. M it c h M a t t e a u ( m it c h @
column drivers from DS2408s to 74HC595s. The beeper th a t I had on hand was also a midondesign.com) founded
The HC595s are driven w ith a 3-m s in te rru p t physical problem . The PCB size did not leave Midon Design, a co mpany
to keep the flicker of the display to a m inim um . me w ith enough space to m ount it on the
t h a t p ro v id e s h o b b y is ts
FEATURES
1-Wire tim ing is ce rta in ly fa st enough to solder side, and the available vertical space
w it h 1-W ire control solu
detect switch presses, so I le ft a DS2408 in as w asn't enough to m ount it on the component
tio ns. He holds a Bache
the keypad scanner. side. So, I squeezed the connection into a
lo r's o f Ap p lie d Sciences
What I did not th in k through ahead of tim e spot on the com ponent side and extended the
f rom O ttawa University in
was th a t the LEDs' forw a rd voltage varies connection via w ires. Adding a b it of length
Ottawa, Canada. Mitch en
so much between the colors of the chosen to the PCB would have left me the space I
joys both th e h a rd w a r e -
8 x 8 m a trix display (from 1.9 to 3 V). This needed to add the beeper below or beside the
difference leads to the dim m ing of green LEDs switches. Of course, this would've resulted in and s o ftw a re -re la te d
in a row th a t also has red LEDs on. Use of an enclosure change, but th a t w ould've been a s p e c ts a s so c ia te d w i t h
a constant cu rren t supply, such as provided easy enough if planned ahead. d e s ig n in g embedded
w ith a MY9221 or MY9268 fro m MY-Semi Lastly, if I'd had m ore tim e, I could've devices.
m ig ht have been an option; however, the tim e designed the softw are m ore elegantly—that
I had available and the space available on the is, the look-up, check, and branch routines
PCB did not p e rm it the lu xu ry of such a m ajor could have been contained w ith in a routine
change to the circuit. Thus, I changed the accessing a look-up table or group of tables.
color scheme fo r the game fro m green and
red to green and blue, because the blue and RESULTS
green LEDs have sim ila r fo rw a rd voltages. Modernizing my original m icrocontroller
The red LEDs are still used fo r te x t o utput design was a lot of fun and the resulting game
since there is only one color used fo r text. looks p re tty nice. Hopefully, this a rticle and
I had o riginally planned on using a the accompanying softw are w ill help you
standard USB-B connector fo r this design, but understand a b it about the game th e o ry and
it was so large (relatively) th a t it prevented driving m a trix LED d is p la y s .©
F la s h P r é 43Û
flash P ro -C C
CONNECT WITH F Ia sh P ro 2 0 0 0
C a n g P ro 4 3 0
m n
Circuit G a n g P rO rC C
■ca n a s s ig n u n iq u e se ria l n u m b e r
For people who are passionate up to eight programmers can be connected to one
about hardware and software design, PC a n d pnewjram ta rg e t d e v ic e s s im u lta n e o u s ly
Connect.
On* Pi- «tld
B pi u ÿ iM iit m t
GREEN COMPUTING
Pooling Microarchitectural
Resources
Towards Flexible Heterogeneity
M a jo rity of com puting system s today may go through a num ber-crunching phase
include m ulticore processors. These th a t is heavily using the a rith m e tic units
m ulticore systems typ ica lly include a followed by a m em ory-intensive phase
"hom ogeneous" set of cores, meaning that including lots of reads and w rites to /fro m
all the cores w ith in the processor are of caches and memory).
the same kind and have the same size and Overall, different softw are applications, or
types of m icroarchitectural components. In different tasks w ithin an application, thrive
addition, in such homogeneous system s, the (i.e., achieve high performance) under different
external resources given to each core, such as architectural configurations. For example, one
the L2 caches or ne tw o rk interfaces are also application may benefit from a larger L2 cache
typ ica lly identical. while another one may not need much cache
While such sym m etrical homogeneous space and instead may operate better w ith a
m ulticore design provides ease of circu it larger instruction issue queue.
design, placement, and routing, there are Considering most systems are
potential lim ita tio n s as well. First, resources homogeneous by design but run a
on a m ulticore system are often under-used as heterogeneous set of applications, how can
the systems are not necessarily designed fo r we design efficient architectures th a t can
the typical or average use case, b u t instead provide desirable perform ance and power
they are designed w ith some "he a d ro o m " tradeoffs fo r a v a rie ty of applications?
considering th a t some applications may need One approach is to design the processor in
a larger am ount of resources. This headroom a heterogeneous way, such as by employing
indicates over-design such as placing a large d iffe re n t cores in the same chip (e.g., ARM's big.
am ount of on-chip cache th a t may be under LITTLE architecture) or by including GPUs or
utilized fo r a significant portion of the time. accelerators along w ith a set of homogeneous
Obviously, over-design increases the area and CPU cores (e.g., AMD's APU systems).
power costs. (Note th a t alm ost all processors include
Over-design is less of an issue when a heterogeneity as they include many d iffe re n t
m ulticore a rchitecture is highly optim ized for components. Here heterogeneity specifically
a specific application, such as in the case of refers to including d iffe re n t types of cores in
an embedded processor th a t is responsible of a m ulticore processor.) Heterogeneous design
perform ing a few tasks only. Most systems has its challenges, too, as it may bring higher
today, including many embedded systems, design com plexity and potentially longer
however, run a v a rie ty of tasks throughout tim e -to -m a rk e t. Nevertheless, I expect to
th e ir lifetim e. In addition, applications often see a larger set of heterogeneous m ulticore
have d iffe re n t phases (e.g., a single application systems in com m ercial products in the near
c ircu itce lla r.co m 49
FIGURE 1
Cache pooling on a 3-D m ultiprocesso r
system . Each core has fo u r dedicatee
cache banks by default. Each bank,
how ever, can be pooled to the core ir
the a d jacent layer if needed. In this
exam ple, A p plication 1's perform ance
benefits s tro n g ly fro m using a larger
L2 cache. Thus, A p plication 1 is given
a la rge r am ount of priva te cache
banks by b o rro w in g cache banks from
the core rig h t underneath.
COLUMNS
fu tu re as such systems have the potential to Many processor architectures today have
achieve better energy efficiency. private L1 and L2 caches fo r the cores, and
Instead of designing the system w ith some also have large shared L3 caches. L1
a heterogeneous set of cores, this article caches are small-sized and are often highly
discusses a novel design alternative: utilized as a result. L2 usage among the
flexible heterogeneity. The goal of flexible applications, however, changes dram atically.
heterogeneity is to achieve higher energy L2 cache is also where over-design occurs
efficiency through low-cost, simple more often to accomm odate fo r the
reconfigurations of the homogeneous system application diversity. A 1- or 2-MB private
based on applications' needs. This low-cost L2 cache per core is fa irly common in high
reconfiguration "pools" the perform ance- perform ance desktop and server processors.
critical a rchite ctu ral components among the As a result, caches occupy a large portion of
cores and allocates more hardw are resources the silicon area.
to cores th a t need them . At the same tim e , it Note th a t designing a system w ith a shared
lim its the resources given to cores th a t are L2, where all cores are connected to the same
running less intensive applications. In this cache, reduces the cache coherence overhead
way, a pool of resources can be shared more and provides a more flexible d istrib u tio n
efficiently. Also, in this way, it is possible to of cache resources to the cores, compared
reduce the need fo r over-design. to assigning a private cache to each core.
(Private caches require hardw are or softw are
FLEXIBLY HETEROGENEOUS coherence protocols th a t m aintain correct
PROCESSORS program operation and data consistency.)
The key idea of flexible heterogeneity Still, shared cache design at the L2 level is
is to determine the application needs while often not preferred due to several reasons.
the system is running and allocating the First, applications generally perform better
architectural resources in a way that matches w ith dedicated resources as they do not
this demand. Which resources should we pool in te rfe re w ith each other's cached data in
among the cores? In my research lab at Boston this way. Second, shared caches are larger
University, my students and I developed a and may have longer access tim es as a result.
cache pooling technique fo r tw o reasons.^ One, Most im p o rta n tly, shared L2 cache approach
caches significantly affect the performance is not scalable to su p p o rt a large num ber of
of many software applications. And two, cores because of the high access latency and
applications strongly differ in their cache needs routing overhead th a t occur when each core
(or in other words, in their "cache-hungriness"). needs to reach a centralized resource.
FIGURE 2
Job allocation policy to m axim ize
resource pooling efficiency. Jobs (J1-
J4) are ranked based on th e ir cache
needs and IPC, w h ich is an in dicator
of pow er consu m ptio n. Jobs w ith
c o n tra s tin g cache needs are then
placed on adjacent layers. Higher IPC
jo b pairs are placed closer to the heat
sink to ease heat rem oval.
50 C I R C U I T CELL AR • S EP TE MB E R 2 0 1 4 # 2 9 0
Private caches generally provide better hand, does not need much cache space and
perform ance and easier design, b u t they therefore is given only tw o banks. As the
re s tric t the cache size given to each core, applications running on the system change,
as discussed above. Thus, if we can pool the the cache allocation can be reconfigured.
L2 cache resources dynam ically according to An essential step in resource pooling is to
application resource needs, each core can determ ine the application demand. In cache
then get a private but appropriately-sized pooling, one needs to estim ate the cache-
cache. hungriness of each application. One way
Cache pooling can be performed at the to do this is to firs t determ ine how much
granularity of cache banks, where each bank instructions-per-cycle (IPC) im provem ent
can be used by its dedicated core or can be any application should get fro m using an
borrowed by another core when needed. As additional cache bank in order to achieve
the number of cores and caches increase, this better energy efficiency (e.g., lower energy
COLUMNS
approach is not easily scalable in traditional delay product, or EDP). This threshold of
design, sim ply because a core would need to im provem ent can be determ ined by the
ABOUT THE AUTHOR access cache banks potentially at the opposite designer through a rchitectural perform ance
Ayse K. Coskun (acoskun@ side of the chip. Long access distance means and power sim ulations using tools such as
b u .e d u ) is an a s s is t a n t longer w ire length, which indicates larger gem5 (www.gem 5.org/M ain_Page) a nd McPat
professor in the latency. For example, sharing m icroarchitectural (w w w .hpl.hp.com /research/m cpat/).
Electrical and C o m p u te r resources across a short distance incur only A fte r determ ining a threshold, it is possible
Engineering D e p a rtm e n t a few picoseconds of additional delay, while to ite ra tive ly converge on the best cache bank
a t Boston University. She accessing a unit across the chip may cause d istrib u tio n among tw o applications running
hundreds of nanoseconds.[2] on cores above/below each other on adjacent
re ce ive d MS a n d PhD
3-D stacking, where sm aller chips are layers as follows. First, run each application
d e g re e s in C o m p u t e r
stacked v e rtic a lly instead of building a single using a small num ber of banks. Then, add
Science and Eng ineering
big chip, provides low -latency resource another cache bank to each core, run the
fr o m th e U n iv e rs ity of
sharing opportunities across the different application fo r a sh o rt interval, and see if
C a l i f o r n i a , San D ie g o .
layers in the stack. This is because the IPC im proves beyond the predeterm ined
Ayse's research interests
through-silicon vias (TSV) th a t connect two threshold. If it does, add another cache bank.
include t e m p e r a tu r e and
a rchitectural components on adjacent layers If the perform ance im provem ent is less than
e n e rg y m a n a g e m e n t, are only tens of microns a p a rt (as opposed the predeterm ined threshold, then use the
3-D s ta c k a rc h ite c tu r e s , to m m -scale w ire -le n g th to connect tw o units last cache bank setting fo r th a t application.
c o m p u te r a rc h ite c tu re , across the chip). In addition to the advantage If both applications continue to th rive w ith
and e m b e d d e d systems. of the sh o rt distance, it is possible to place a a larger num ber of cache banks, then one
She w orked at Sun larger num ber of TSVs th a t can be clocked at a approach would be to favor the application
Microsystems (now high rate, and thus, provide a wide bandwidth th a t is getting larger perform ance benefits.
O r a c le ) in San D ie g o , fo r data transfer. Any unused cache banks can be selectively
CA, p r i o r to h e r c u r r e n t Figure 1 dem onstrates the cache pooling turned o ff to save energy.
position at BU. Ayse idea. In this example 3-D system , there are Clearly, one would need to add some
s e rv e s as an a s s o c ia t e fo u r cores on each layer and each core has hardware into the tra d itio n a l processor
editor of the I EEE fo u r private cache banks. A cache bank can be a rchitecture to be able to pool the cache
Em bedded S y ste m s configured to be used by its main dedicated banks across the layers. To ease the design
Letters. core, or it can be taken over by the core rig h t of this reconfigurable system , my students
above/under the main core. In this example, and I restricted the cache pooling mechanism
Application 1 thrives when running w ith a such th a t only a pair of cores th a t are rig h t
larger L2 cache size, so it is given a total of above/below each other on a 3-D stack can
six cache banks. Application 2, on the other share resources. The hardware we added
m ainly included registers (status bits) for
keeping tra ck of the cache bank assignm ent,
REFERENCES selection logic (m ultiplexers) fo r determ ining
[1 ] J. M eng, T. Z h a n g , and A. K. C oskun, "D y
which layer to read fro m /w rite to, and TSVs
n a m ic C ache P ooling fo r Im p ro v in g E nergy
to enable data transfer.[1] Overall, the total
E ffic ie n c y in 3D S tacked M u ltic o re P roce ssors,” area overhead is on the order of a few
in P ro c e e d in g s o f th e IF IP /IE E E I n t e r n a tio n
thousand tra n sisto rs and a few hundred TSVs.
al C o nferen ce on V ery Large Scale In te g ra tio n
This overhead is negligible fo r a m ulticore
(VLSI-SoC), 2013. processor.
Another source of overhead is the
c irc u itce lla r.co m /ccm a te ria ls
[2 ] H. H o m a yo u n , H., V. K o n to rin is , A. cache flushing th a t is needed a fte r a cache
S haya n, T.-W . L in , and D. M. T u llse n, "D y reconfiguration to ensure the data in the
n a m ic a lly H e te ro g e n e o u s Cores T h ro u g h 3D
caches are relevant. In our experim ents,
R esource P o o lin g ,” in P ro ce e d in g s o f IEEE 18th
we used a 100-ms interval to check for
In te rn a tio n a l S y m p o s iu m on H igh P e rfo r the need of cache pooling ad ju stm ent and
m a n c e C o m p u te r A rc h ite c tu re (HPCA), 2012.
AN ELEKTOR INTERNATIONAL MEDIA PROMOTION
1OneRobot.org/about
ADVERTISEMENT
52 C I R C U I T CELL AR • S EP TE MB E R 2 0 1 4 # 2 9 0
a) b)
Normalized Normalized 08
EDP EDAP '
to 2MB to 2MB
Baseline Baseline 0.6
Non Low Med High All Non Low Med High All
COLUMNS
FIGURE 3 reconfigure if needed. Flushing the caches intensive application may consume higher
Energy-delay pro d u ct (EDP) and causes a "cold s ta r t" as the application needs power than an integer application even
ene rgy-delay-are a p ro d u ct (EDAP)
to bring its relevant data fro m memory. when they have the same IPC). It is possible
results fo r using 1-MB priva te caches
My students and I measured the cold s ta rt to use a larger set of perform ance counter
and fo r using cache resource pooling
overhead to be less than 1 ms fo r SPEC CPU m easurem ents to im prove power estim ation
(CRP) on a 3-D stacked system w ith
2006 applications using the gem5 sim ulator. accuracy if needed.
equ ivalent to ta l cache size. X axes
provide the cache-hungriness o f the
Thus, cache pooling causes at most 1% High tem peratures are among the
app lica tion m ix , increasing fro m left delay when it is run w ith a 100-m s period. im p o rta n t challenges of 3-D stacking. I
to rig h t. Low er EDP and EDAP are This delay is easily compensated w ith the discussed some of the te m perature modeling
m ore desirable. perform ance im provem ent achieved by and m anagem ent issues in 3-D systems in
efficiently d istrib u tin g the cache banks. Cache my January 2014 and March 2014 Circuit
pooling frequency can be adjusted as needed Cellar articles. If high-pow er cores are
to capture application phases at a negligible integrated into a 3-D stack, therm ally-aw are
overhead fo r other application suites. job allocation may not be sufficient and novel
cooling solutions such as liquid cooling may
INTEGRATING JOB ALLOCATION need to be considered. In our cache pooling
& CACHE POOLING experim ents, we used 1-GHz m edium -pow er
Job allocation im pacts the potential cores. For these experim ents, the proposed
benefits of cache pooling as it determ ines job allocation method was sufficient to keep
on which core each application runs. For the tem perature below critical levels.
example, if the OS allocates tw o cache-hungry I f we integrate a larger am ount of cores
applications on adjacent cores on top of each into the 3-D stack, each layer w ill likely have
other, cache pooling benefits may be lim ited. m ultiple cores. In this case, one can envision
On the other hand, placing applications w ith the 3-D stack as a collection of "colum ns of
contrasting cache needs on top of each other cores," where a column is sim ply cores stacked
would increase the pooling efficiency. on top of each other. W ithin each column of
In my lab, we designed a job allocation cores, one can apply the job allocation and
policy th a t maximizes benefits of cache cache pooling policies described above. Across
pooling. Figure 2 dem onstrates the main these columns, it is possible to balance the
idea of this policy. We firs t estim ate the num ber of cache-hungry jobs using additional
cache needs of each application using L2 job m igrations to m aximize pooling efficiency.
misses and L2 replacem ent rates over a given Figure 3a shows the EDP when using a
num ber of cycles. We also observe the IPC of 1-MB static private cache configuration and
each application as IPC is often an indicator when using cache resource pooling (CRP)
of the power consum ption. We then pair the on a four-core 3-D system. The results are
applications w ith contrasting cache demands, norm alized w ith respect to the EDP results
and use the IPC m easurem ents to place fo r a system w ith 2-MB private L2 caches.
potentially higher power applications closer The x-axis shows the cache-hungriness of
to the heat sink. the application m ix running on the system.
Placing applications w ith higher power For example, medium means some of the
consum ption closer to the heat sink eases applications are cache-hungry, none refers
cooling and reduces the th e rm a l hot spots. to the case where none of the applications
Note th a t IPC alone may not always be are cache-hungry, and all means all of the
sufficient fo r accurate power estim ation applications are cache-hungry.
as the in stru ctio n m ix also determ ines the Lower EDP is m ore desirable as it indicates
power consum ption (e.g., a flo a tin g -p o in t lower energy consum ption and lower delay
c ircu itce lla r.co m 53
COLUMNS
area-delay product (EDAP) results fo r the I believe there are trem endous efficiency
same experim ent and indicates over 50% im provem ent opportunities in designing a
reduction in EDAP. This means th a t CRP can fle xib ly heterogeneous com puting fa b ric that
sim ultaneously achieve lower energy and can be configured using simple and low-cost
good perform ance at a much lower area hardw are and softw are methods. For
compared to using large static L2 caches. example, envision a set of cores, a set of
poolable caches, a group of scratchpad
OTHER POOLING OPPORTUNITIES m em ories, and on-chip DRAM banks, whose
Caches are not the only resource on a p a rtitio n s and bandw idth can be allocated to
m ultiprocessor th a t can be dynam ically applications based on th e ir demands and
pooled. For example, recent w o rk by Houman characteristics. In this way, each application
Homayoun et a l.H introduces resource pooling can be provided w ith a customized set of
fo r pe rfo rm an ce-critica l m icroarchitectural resources and energy efficiency of the
units such as reorder buffer, register file, processor can be substantially improved. I
load/store queue, and in stru ctio n queue. As th in k 3-D stacking technology is a great
3-D stacking enables placing on-chip stacked candidate to realize this vision. £
Email: editor@circuitcellar.com
circuit cellar
COLUMNS
RHEOSTATS
Rheostats a djust cu rre n t flow ing through
a circu it (see Figure 2). Sim ply put, their
resistance is added to the load, thus
m odifying the current through it and, in
COLUMNS
effect, the voltage across the load. Before
power sem iconductors, such as th y ris to rs ,
PHOTO l
made th e ir way into power control, high pay for.
Various pote n tio m e te rs and trim m e rs
power rheostats had been used to dim lights I tr y to lim it the use of variable resistor
in theaters or control the speed of electric trim m e rs . They are sim ple to im plem ent,
m otors. sm all, some types are fa irly inexpensive, but
Rheostats need only tw o term inals, th e ir re lia b ility is not great compared w ith
although potentiom eters w ith three term inals other resistive components and methods of
can be w ired as rheostats too, provided th e ir trim m in g . Their setting can change w ith age
power rating is adequate. As you can see in due to vib ra tio n or accidental movement.
Figure 2, in the presence of the th ird term inal, When I do use them , I m inim ize th e ir
it is a good idea to connect it to the w iper as a d ju stm e n t range to the absolute m inim um
shown. W iper contacts can become flakey due needed. Often a series/parallel com bination
to the wear and tear, vib ra tio n , corrosion, and of fixed resistors can p e rfo rm the trim w ith
so fo rth . Because the rheostats' resistance excellent long te rm stability.
when used to trim value of a cu rre n t is often Potentiom eters are still used in feedback
only a small percentage of the total resistance, control systems fo r position command as well
a small overall resistance increase in case of as feedback. For critical applications, ro ta ry or
the w iper contacts failure may be preferred to linear variable diffe re n tia l tra n sfo rm e rs (RVDT
complete loss of the current. or LVDT), or some of many digital encoders
This is an im p o rta n t consideration fo r all are, in my experience, better, m ore reliable
trim m e rs , be it potentiom eters or rheostats. solutions. It depends on the application, its
Their ad justm en t range should not be any safety requirem ents, and the cost.
greater than needed. For example, an I like to use solid-state potentiom eters.
integrated circu it (IC) analog am plifier, due They have many advantages over th e ir
to m anufacturing tolerances, may require mechanical brethren, such as sta b ility,
some adjustment of its bias current. A 50-kQ accurate tracking and so fo rth . You can find
resistance has been calculated to provide them in a lot of audio equipm ent in volume
the nominal cu rrent value. You calculate the and tone control circuits. Essentially, they
needed a dju stm e nt th a t can be achieved w ith are a strin g of resistors w ith taps connected
a 1-kQ pot. Don't use a larger one! You'll through solid-state switches to the output. A
also have to analyze the repercussions of num ber of m anufacturers make them , such
the potentiom eter's w iper failing and thus as In te rs il, Maxim Integrated Products, and
the bias then determ ined by an additional 1 Analog Devices. They have some idiosyncrasies
kQ. You may find th a t the p ro b a b ility of this compared to electrom echanical resistive
happening is very small or th a t the effect products. For instance, they do not provide
is not serious. Otherwise, you may take
additional steps to m inim ize the effects of the
trim m e r failing or consider some other way
of trim m in g .
TIPS
Packaging is ve ry im p o rta n t for
potentiom eters of all kinds. It has several
fundam ental functions: it provides reliable
means of varying the resistance, mechanical
sta b ility, m ounting of the potentiom eter
assembly, and protection fro m the elements. FIGURE 1
In term s of quality, you usually get w hat you P o tentio m eter usage
se C I R C U I T CELL AR • S EP TE MB E R 2 0 1 4 # 2 9 0
p r o d u c t.h tm l. d o c s /3 1 0 2 3 /e rl.p d f.
? drcuit cellar
cc- webshop
When it
comes to
robotics,
the future
is now!
From home control systems to
animatronic toys to unmanned
rovers, it's an exciting time to
be a roboticist. Advanced Control Robotics
simplifies the theory and best practices of
advanced robot technologies, making
it ideal reading for beginners and experts
alike. You'll gain superior knowledge of
em bedded design theory by way of
handy code samples, essential schematics,
and valuable design tips.
Improv
MOSFf
COLUMNS
FIGURE 1
A dding M axim In te g ra te d MAX4544 analog sw itches to the schem atic fro m m y "A rd u in o PWM vs MOSFET T ransdu ctance " (C ircuit C ellar 284, 2014) a rtic le im proves the MOSFET
gate w a vefo rm s. The analog sw itches connect the MOSFET gates to e ith e r ground or the PWM filte r o u tp u t, so the pulse edges no longer depend on the filte r response. The code
can also change the PWM voltage w ith the gate ground ed, thus allow ing m ore tim e fo r the voltage to stabilize.
c ircu itce lla r.co m 59
LISTING 1
// Timer 1: PWM 9 PWM 10 - Hall o ffs e t The A rd u in o 's d efault c o u n te r-tim e r
TCCR1A = B10000001; / / Mode 5 = fa s t 8- b i t PWM with setup produces re lative ly slow PWM.
T
O
=
P
F
F
These s tatem ents set 1:1 clock division
TCCR1B = B00001001; // . . . WGM, 1:1 clock scale -> 64 kHz
and 8 -b it Fast PWM Mode fo r T im er1
and T im e r2 , and then set th e ir ou tp u t
// Timer 2: PWM3 PWM11 - MOSFET gate dr ive A, B voltage to zero.
TCCR2A = B10100011; / / Mode 3 = fa s t PWM with TOP= FF
TCCR2B = B00000001; // . . . 1:1 clock scale -> 64 kHz
COLUMNS
bicycle and deep knowledge of Atm el's AVR 1 mA through the resistor w ill change the
m icrocontrollers, so his suggestions obviously ou tp u t by 1 V/ms. Reducing the PWM period
came from experience. by a fa cto r of tw o reduces the voltage change
In this article, I'll take a second look at a by a fa cto r of two: exactly - 6 dB.
design I'd considered nearly finished and, by No m a tte r how you figure it, doubling the
blending some of Hage's suggestions w ith a PWM frequency or halving the period should
few tweaks of my own, explore how the result reduce the ripple by about a fa cto r of two.
im proves on the original design. Comparing the 100 mA of ripple in Photo
As before, the circu it uses a Hall-effect 3 fro m my March a rticle ("Arduino PWM vs
sensor to measure the cu rre n t flowing MOSFET Transductance") w ith the 40 mA
from the b a tte ry to the LEDs, then controls of ripple in Photo 1 here shows th a t the
th a t current w ith PWM outputs th a t set the reduction is about a fa cto r of two. A close look
MOSFET gate voltages. A single-supply op- shows th a t slig h tly d iffe re n t PWM values in the
am p removes the sensor's VCC/2 offset and tw o photos affect the exact ripple amplitude.
am plifies the result fo r the A rduino's analog In all of the oscilloscope photos, the LED
inputs. Figure 1 presents the key p a rt of the cu rre n t trace comes fro m a Tektronix AM503
revised circuit; you can download the entire Hall-effect c u rre n t probe scaled at 50 mA/div,
schem atic from Circuit Cellar's FTP site. w ith a bandwidth fa r exceeding my circu itry:
PHOTO 1
you can depend on those traces!
Less than 20 mV o f ripple in the PWM
FASTER PWM = LOWER RIPPLE The A rduino tim e r configuration allows
filte r voltage (upper tra c e ) produces
My original design selected the 1:1 clock only 256 PWM values: 0 through 255,
40 m A o f LED c u rre n t v a ria tio n (lower
prescaler fo r T im e rl and Tim er2, which corresponding to the range of each tim e r's trace, 50 m A /div). D oubling the PWM
produced a 32-ps PWM period. Hage pointed eight bits, w ith about 20 mV separating freq uency to 62.5 kHz reduced the
out th a t the default A rduino PWM configuration successive PWM values at the filte r output. c u rre n t ripple by a b o u t a fa cto r of
uses the dual-slope Phase-Correct mode that As I showed in my March article, a 20-mV tw o. The 0-V level fo r the gate voltage
w orks well fo r m otor drivers, but runs at half change in gate voltage produces a 50-m A trace is fa r o ff screen, w ith the cursor
the m axim um possible rate. In contrast, Fast change in drain c u rre n t when the MOSFET readou t show ing its 1.2-VDC level.
E le k t o r .S T O R E
The world of electronics
at your fingertips!
Theory and best practices
Advanced Control
Robotics
It doesn’t m a tte r ify o u ’re building a lin e -fo llo w
p ra c tic e s o f a dva n ce d r o b o t te c h n o lo g ie s .
w ith unprecedented ease. W ith o u t exception, th e 30 projects in th e b oo k are fu n to b uild and and its use in c o n tro l a p p lic a tio n s . D ogan
use. A se cret d o o rb e ll, a y o u th d e te rre n t, GPS tra c k in g , persistence o f visio n (POV), and an Ibrahim explains in sim ple te rm s, w ith e xam
In te rn e t W ebserver are ju s t a fe w exam ples o f proje cts in th e b o o k w a itin g to be explored and ples, h ow to co n fig u re th e RPi, h o w to install
m astered. This makes th e p ub licatio n a p e rfe ct source o f projects c o nsta ntly challenging yo ur and use th e Linux o p e ra tin g system , h o w to
hardw are and so ftw a re skills as you progress, re sultin g in advanced m ic ro c o n tro lle r a pplica w r ite p ro g ra m s using th e P y th o n p ro g ra m
tio n s you can be prou d of. All sources referred in th e b oo k are available fo r free d o w n loa d , in m ing language and h ow to develop hardw are
232 pages • ISBN 978-1-907920-30-1 • $48 290 pages • ISBN 978-1-907920-29-5 • $54
Eagle PCB design softw a re package. The reader articles are ordered ch ron o log ically by release B re a k o u t B oa rd o ffe rs o p tio n s fo r seven
may be a novice a t PCB design or a professional date (m o nth/ye ar), and arranged in alphabet d ig ita l o u tp u ts, fo u r PWM o utp u ts , asynchro
w anting to learn a bo u t Eagle , w ith th e intention ical order. A g lobal index allow s you to search nous serial and I2C and SPI in te rfa c e s . The
o f m ig ra tin g fro m a no the r CAD package. A fte r specific c o n te n t across th e w h o le DVD. Every b o a rd is c o m p a tib le w ith A n d ro id 3.1 (H o
reading this b oo k w h ile practicing som e o f the a rtic le is p rin ta b le using a sim ple p r in t func neycom b) or higher (A ndroid Open Accessory
exam ples, and c o m p le tin g th e p roje cts, you tio n . This DVD is packed w ith ideas, c irc u its M ode should be s u p p o rte d ).
Elektor is more
than just your favorite
electronics magazine.
It’s your one-stop shop
for Elektor Books,
CDs, DVDs,
Kits & Modules
The U ltim ate Guide!
and much more! IO-Warrior Expansion
The LTspice IV Simulator Board
www.elektor.com/store
Kits & Modules
In a s tu rd y, hard-cover fo rm a t, The LTspice IV
D on ’t th ro w o u t y o u r old PCs and notebooks
S im ula to r describes th e o p e ra tio n o f th e p ro
o r leave them gathering d u st in th e basement!
g ra m , all a va ila b le co m m a n d s, th e va rio u s
They can be a useful resource: by a dding this
edito rs, d ealing w ith SPICE m odels, th e use o f
universal interface card an o ld PC can be pres
non-linear com ponents and m ore. This b o o k is
COLUMNS
VGateDriveB = Events[EventIndex].drive_b;
SetPWMVoltage(PIN_SET_VGATE_B,VGateDriveB);
delay(PWM_Settle);
i f (!(Events[EventIndex].en_a Events[EventIndex].en_b))
FindSensorNull(); / / both LEDs now o f f -> null sensor
LISTING 2
This code tim e s each pulse, stores the PWM drive voltages, and fetches the next outputs. When both LEDs w ill be off, it nulls the H all-effect sensor output.
Photo 2 shows th a t th e ha rd w a re
d o e s n 't look q u ite as im p re ssive as its LISTING 3
o u tp u t. R ather th a n bu ild an e n tire ly new An a rra y o f s tru c tu re s defines each LED pulse's c u rre n t and d u ra tio n . The pulse gen era tion code saves the
PCB, I s im p ly epoxied a M axim In te g ra te d PWM o u tp u t req u ire d to produce each pulse and restores it when th a t pulse happens again.
64 C I R C U I T CELL AR • S EP TE MB E R 2 0 1 4 # 2 9 0
PULSE SHAPING
Producing a single blink requires little
more than tw o tim in g loops th a t produce the
on and off durations, but th a t code doesn't
scale well fo r a complex sequence of blinks
w ith d iffe re n t durations, am plitudes, and
delays. The easiest way to generate a series
of events is to put the com plexity in a table
(or a rra y) and use a simple routine th a t steps
fro m one e n try to the next.
The s t r u c t e v e n t in Listing 3 defines
PROJECT FILES the values required to produce each pulse,
--------- , S o fts o ld e r.c o m , "H a ll-E ffe c t C u rre n t including its duration and total current, as
C o n tro l PCB: F ir s t L ig h t,” h ttp ://s o fts o ld e r . well as the delays between successive pulses.
Because the hardw are includes one current
sensor and tw o MOSFET drivers, it can sense
--------- , S o fts o ld e r.c o m , "H a ll-E ffe c t C u rre n t only the total cu rre n t in both LED strings. The
C o n tro l PCB: V o lta g e V a ria tio n s ,” h t t p : / / s o f t s - en_a and e n _ b values determ ine which
o ld e r.com . outputs w ill be active during each pulse. If
both are active, the firm w a re m ust adjust
circ u itce lla r.co m /ccm a te ria ls both gate voltages.
SOURCES Each e n try of the E v e n t s [ ] a rra y is a
MAX4544 S O T23-6 Package single s t r u c t pulse defining a single pulse
RESOURCES
M a x im In te g ra te d | w w w .m a x im in te g r a te d . or delay. The firs t i f statem ent in Listing 2
E. N isley, "A rd u in o PWM vs
com steps the E v e n tI n d e x variable to the next
MOSFET T ra n s d u c ta n c e ” Cir
cuit Cellar 28 4, 2014. e n try at the end of each pulse.
AM 503 AC/DC c u r r e n t p ro b e a m p lifie r The A rduino runtim e copies the values
--------- , "Lo w -Lo ss H a ll-E ffe c t T e k tro n ix , In c . | w w w .te k .c o m form ing the E v e n ts [ ] a rra y into RAM
C u rre n t S e n s in g ,” Circuit Cel during sta rtu p , so you could change the
lar 28 0, 2013. pulse durations and currents on the fly.
c ircu itce lla r.co m 65
COLUMNS
produces crisp edges w ith the preset PWM SetPWMVoltage(PIN_SET_VGATE_A,VGateDriveA);
values requiring little or no a d ju stm e n t at the
s ta rt of each pulse. VGateDriveB += Events[EventIndex].en_b ? PWMStep : 0.0;
The small bump following each pulse in the SetPWMVoltage(PIN_SET_VGATE_B,VGateDriveB);
top trace occurs when the code adjusts the
offset value th a t nulls the Hall-effect sensor delay(PWM_Settle);
output. When both LED outputs are off and no
current flows through the Hall-effect sensor,
the nulling routine ensures the op-am p output LISTING 4
is exactly zero. Even though the sensor output The LED c u rre n t control feedback loop closes th ro u g h the firm w a re 's m a in loop, w h ich adjusts the PWM value
doesn't d rift enough to require nulling a fte r by one PWM coun t when the m easured LED c u rre n t falls outside the deadband around the desired setpoint.
every pulse, there's no harm in doing so.
I f the Hall-effect sensor ou tp u t d rifts
below the offset value, the op-am p output
rem ains at zero, so the code begins the
nulling process by reducing the offset until
the op-am p output goes slig h tly positive and
then increasing the offset until it becomes
zero again. Hage suggested nulling the output
to a slight positive offset to elim inate the
need fo r p re-adjustm ent, then subtracting
th a t ze ro -cu rre n t offset fro m subsequent
m easurements. I th in k either method w ill
produce the same results, so I reused the
existing routine.
Homework: im plem ent Hage's suggestion,
perhaps w ith a deadband around the setpoint.
With all th a t in m ind, the code
in Listing 4 closes the cu rre n t feedback loop.
On each iteration of the main loop, it reads the
LED cu rrent and, if the values fall outside the
deadband, adjusts the gate voltages upward
or downward to compensate. Because V S te p
PHOTO 5
equals the voltage corresponding to a single W ith the deadband set to 25 mA, the c u rre n t control loop hunts back and fo rth on each ite ra tio n , because
PWM count, the gate voltage changes by the a single PWM co u n t changes the c u rre n t by abo ut 50 mA. The to p trace shows the c u rre n t sense a m p lifie r's
sm allest possible amount. o utput. The botto m trace shows the actual LED c u rre n t a t 50 m A /div.
I reduced the deadband's value to 25 mV
in Photo 5, which shows the loop hunting
back and fo rth on each side of the 200-m A CONTACT RELEASE
setpoint. In this situation, none of the possible Hage thinks the A rduino hardware hasn't
gate voltages produce an LED c u rre n t th a t lies come close to its lim its, but he has definitely
inside the deadband, so the cu rre n t alternates pushed it much closer to the edge. In any
between 200 and 250 mA on successive passes event, the results you see here w o rk better
through the main loop. than my original design did, so I'll call it a
I th in k the value of IG a in th a t converts success.
the op-am p output into cu rre n t is a bit too The info rm a tio n on Circuit Cellar's FTP site
low, because the cu rre n t should settle at 200 contains the new firm w a re and schematic; I
mA. Fixing th a t is a simple m a tte r of softw are, haven't revised the PCB layout to accommodate
of course. the new parts. O
66
COLUMNS C I R C U I T CELL AR • S EP TE MB E R 2 0 1 4 # 2 9 0
1. S h a rp MODULATION
2. { 3 8 k , 2 64} While using an IR dem odulator fro n t
68 C I R C U I T CELL AR • S EP TE MB E R 2 0 1 4 # 2 9 C
FIGURE 1
My p roje ct's schem atic includes
a few LEDs th a t display
app lica tion status along w ith
an IR dem o d u la to r receiver, IR
receiver, and IR LED. The USB
connection is used to display
user functions like those shown
in Photo 2.
Join The Elektor Community
Become a GREEN Member Now!
LISTING 1
COLUMNS
This is a code snippet fo r the IRPs I placed in m y app lica tion. IRP0 is fo r the S harp TV. IRP1 is fo r the Acer tablet. IRP2 is fo r the AT&T cable box.
be no shorter than 792 |js and no longer than bits according to the GeneralSpec section.
1,848 j s (w ith an average of 1,056 js ). I use If we make it through a protocol w ith o u t
a tolerance value along w ith each expected any samples being out of tolerance, we have
Mark or Space tim e to calculate acceptable id entified the protocol. Next, we w ill w ant to
lim its fo r each sample. If a sample falls know w hat data is produced fo r each button
w ith in the calculated acceptable lim its , the press. I t tu rn s out we are e xtre m e ly close to
process proceeds w ith the next sample and this w ith the code we have ju s t used. If we
next elem ent (or p a rt th e re o f). Any out of add one m ore routine to th is process, we are
tolerance fa ilu re is flagged and the process there. We ju s t need to gather the actual data
fo r the present protocol is abandoned. we find in the sample b u ffe r as we are going
The protocol lists each elem ent that through and testing each data b it to see if
makes up its transm ission in the IRStream it's w ith in acceptable tolerance. It tu rn s out
section. Previously we saw th a t the Sharp we can do th is w ith in the tolerance testing
protocol uses tw o variable elements (D and routine fo r variables. Remember when I
F), a constant elem ent, and Mark and Space m entioned the average b it tim e above? A fte r
elements. Mark and Space elements are testing a sample fo r tolerance, a second te st
s tra ig h t fo rw a rd and we can easily determ ine is done on the sample using the average
w hether a sample tim e falls w ith in a Mark
or Space tolerance. But firs t we need to deal
w ith the variable and constants. A variable
0 - Sharp Protocol
elem ent has a b it count associated w ith it. 1 HEC2 P r o t o c o l
2 - Protocol
The firs t elem ent D in the Sharp protocol has 3 - JtCS Protocol
5 bits. This means th a t we w ill need to check HE&Z Protecel
01 - p S M C -r
fo r 5 Mark and Space samples fo r th is variable. - n in u s
The next elem ent, variable F has a bit count “
■■
p
p
lu s
p e v ia u s
of 8. So the next 8 Mark and Space samples - p i
6 - netx!
m ust be checked to cover this element. The ? ~ tele
ft - k l Itr
th ird elem ent is a constant value of 1 w ith a
fl ^ up
b it count of 2. With a variable we do n 't know B - left
if any p a rticu la r b it w ill be a b it l or a bit0 ‘ ” rak
D - rig h t
IE - io w r»
so we m ust te st fo r m axim um and m inim um
tim es. With a constant we know exactly w hat
the bits should be and w here, so we can test
(C *»w |fVt j | CGtaPoi | ift | tacwitt ] M«t L Claarj Fmt)*»| _>J
accordingly. A value of 1, w hich is represented
r SUlK
by tw o bits, would be 01, a bit0 followed by I- pwtrwnwdf _:Om fvwt
a bit1. Next, the protocol has a Mark element r |rwefl ¿Hdi fiMJCI
P :■■: 13»
and a Space elem ent. You may have observed CTSpj
th a t the same elem ents are repeated again By»! j? i j
w ith slight differences in variable F and &
f£ i‘ r Spif c * J DSRJE|
fir * »
the constant. Finally the + indicates that BREAK
f
this whole shebang (transm ission) could be r Hat C hoi
COLUMNS
to display what's there. If I reproduced data db "D ",0x01, " F " , 0xF7,0
correctly, the graphs of both should be the
same. Again, I was not surprised when I saw IRP0_MUTE org IRP0_ENTER+IRPButtonSize
tw o different graphs. It d id n 't take too much db "D ",0x01," F " , 0x17,0
w ork to figure out w hat was going on.
The hard part is done: identifying the IRP0_TV org IRP0_MUTE+IRPButtonSize
protocol from a graph. Knowing the protocol db "D ",0x01, "F",0xFC,0
allows you to identify actual data values
from a graph. By comparing the data values IRP0_INF0 org IRP0_TV+IRPButtonSize
each graph represents, you should be able to db "D ",0x01, " F " , 0x1B,0
determ ine the error's location. For example,
my error was in the bit sequencing. While I IRP0_D0WN org IRP0_INF0+IRPButtonSize
shifted the data correctly, note that the earlier db "D ",0x01, " F " , 0x58,0
discussed Sharp fo rm a t consists of a 5-bit
variable D. I forgot to sh ift 0s fo r the last 3-bit IRP0_UP org IRP0_D0WN+IRPButtonSize
used bits. My value 00001 looked like 00001000 db "D" ,0x01, " F " , 0x57,0
and not 00000001.
IRP0_LEFT org IRP0_UP+IRPButtonSize
SUCCESS db "D" ,0x01, " F " , 0xF5,0
Until I started this project, I w asn't using
my Acer 7" tablet solely as a storage device for IRP0_RIGHT org IRP0_LEFT+IRPButtonSize
my music collection because it came w ith an db "D ",0x01, "F",0xF6,0
IR remote and I thought I'd make use of it. I
added the NEC32 fo rm a t it uses to this project. IRP0_0K org IRP0_RIGHT+IRPButtonSize
With Realterm running on the PC, I can instruct db "D" ,0x01, " F " , 0xF7,0
the project to select and play music from the
Acer. All right! Now for the real test, the cable IRP0_MENUorg IRP0_0K+IRPButtonSize
and TV located in my den. db "D ",0x01, " F " , 0x20,0
I often sit in fro n t of the tube and pluck on
a laptop while watching cable programming IRP0_TV_VIDEOorg IRP0_MENU+IRPButtonSize
on our ancient CRT TV. (I've yet to purchase db "D ",0x01, " F " , 0x13,0
an HDTV. If it ain't broke, don't replace it.) My
wife Beverly seems to be getting a little hard
of hearing. She likes flipping the channels and LISTING 2
upping the volume past my com fort level. Here is a code snip p e t o f the butto n en trie s fo r the Sharp TV. W hen used w ith the cable box, only volum e
controls are necessary. The TV_Video butto n cycles th ro u g h the a u x ilia ry TV inputs, w hich is useful for
So, tonight I connected up this project to my
selecting the DVD player.
laptop and kept the circuit out of sight while I
did my normal investigative surfing. Every once To reduce the workload on this project, I
in a while, I issued a few VOL- commands. It added only the protocols fo r which I have
didn't take her long to boost it back up, but remotes. This means that this project does
this went on fo r a while before she made a not tout com patibility w ith every remote out
comment about the cable company. I let these there. It is an educational tool developed for
pass and changed tactics. This tim e I kept my requirem ents and may require extra w ork
sending commands to change to my favorite if you want to add additional form ats. There is
channel, "NASA select." Wowsers! This was my certainly plenty of room for that.
downfall. I should have selected something like This IR project, while not the end of this
the shopping channel. She quickly realized that story, stands on its own. I am planning to
I was somehow involved w ith this evil trickery. morph this project into something else. Are you
She's a good sport. curious? Stay tuned. O
74 C I R C U I T CE LLA R • S EP TE MB ER 2 0 1 4 # 2 9 0
10
11
TESTS & CHALLENGES
12 13
14 15
16
17
ACROSS DOWN
2. T rivalent valence 1. PCB path
3. Kilby's Noble Prize in 2000 3. Quick fix
5. Converts DC to AC 4. Used to m o n ito r ne tw o rk tra ffic
8. BAT file 6. A Gauss is one of these per square centim eter
9. Founded ARRL in 1914 7. "Big Blue"
10. If you are AFK, w hat are you away from? 8. "An Investigation of the Laws of T hought" (1854)
11. Un iversity th a t housed the ENIAC in a 30' x 40' room 13. Move fro m setting A to B
12. 1 cycle per second 15. Screen of death
14. 4 bits 16. A nonet is a group of what?
17. Asi mov was the great what? 17. Exawatt
circuitce lla r.co m 75
What's your EQ? The answers are posted at w w w .circu itce lla r.co m /
ca te g o ry/te st-yo u r-e q /. You can contact the quizm asters at
eq@ circuitcellar.com .
TEST YOUR EQ
Contributed by David Tweed
PROBLEM 1
What is an R-C snubber, and w hat is a typical application fo r one?
PROBLEM 2
How do you pick the resistor value in an R-C snubber?
PROBLEM 3
How do you pick the capacitor value in an R-C snubber?
PROBLEM 4
What additional concern is there w ith regard to an R-C snubber when sw itching AC power?
CC SHOP
2 A m S t APPS:
A n d r o id A p p s p r o g R F J D in g I
w w w .e le kto r.co m /a n d ro id
puters are powered by an A ndroid OS.
These p o rta b le devices' speed and
com puting p o w e re n a b le them to run
applications th a t would have p re vi
ously required ¡a desktop PC or cus
tom -designed hardw are. Android Apps
introduces you to the p ro g ra m m in s
required to design a p p s fo r A ndroid
devices. Operating the A ndroid system
is explained ste p -b y-ste p to show how
personal applications can be easii
>Vj|jj|jj||g||jffl med.
3 CC VAULT
CC Vault is a pocket-sized USB that comes fully loaded w ith every is
sue of Circuit Cellar magazine. This comprehensive archive provides an
unparalleled am ount of embedded hardware and software design tips,
schematics, and source code. CC Vault contains all the trade secrets
you need to become a better, more educated electronics engineer.
Item #: CCVAULT
c ircu itce lla r.co m 77
CC SHOP
P r a c tic a l ^ 5 c ir c u it c e l la r
Digital Signal Processing R E A D Y T O r e c o n f i g u r e ..,M F K k
x u s in g M ic r o c o n tr o lle r s
* ■ ---------
sntt ( - M / . 2i
V m M I) 1 r . . ,
■
■ , 2ngL -J
X \ M ■ y-
Hm r b j- 1 . , , D o g a n Ib r a h im
■\ „
Glektor
6
0 MASTERING
MICROCONTROLLERS: HELPED
BY ARDUINO
Arduino boards have become hugely
successful. They are simple to use and
inexpensive. Mastering Microcontrollers
will teach you how to program m icro F urther info rm a tio n and ordering
controllers and help you turn theory into
practice using an Arduino program m ing www.cc-webshop.com
environment. Become a master today! CONTACT US:
Circuit Cellar, Inc.
111 Founders Plaza, Suite 300
East Hartford, CT 06108
Author: Clemens Valens
USA
Item #: BK-ELNL-978-1-907920-23-33
Phone: 860.289.0800
Fax: 860.461.0450
E-mail: custservice@circuitcellar.com
78 C I R C U I T CELL AR • S EP TE MB E R 2 0 1 4 # 2 9 0
For current rates, deadlines, and more information contact Peter Wostrel
at 978.281.7708 or circuitcellar@smmarketing.us.
$20 for5PCBs
2 layer,4x4inch, FR4(RoHS),0.063” ,1oz,
2LPI,Green,1SK,Lead free HASL
CC14061
www.myropcb.com
OR CALL: sales@ccsinfo.com äß *
262-522-6500 x 35
3.3V single pow er supply operation | Phone: 218-454-0766 Email: sales@ maxbotix.com
^Qrammaoie n oi
Powerful & Easy Ladder
+BASIC Program ming
Ethernet integrated
MODBUS TCP/IP
DI/Os & AI/Os integrated
T
web : www.triplc.com/cci.htm
*n TRIANGLE
■7 ' RESEARCH
■ \ INTERNATIONAL
T hree-dimensional (3-D) printing for prototyping has been around for nearly three decades
since the introduction of the first SL systems. The last few years have seen this technology
receiving considerable attention to the point of hype in the mainstream media. However,
there is a new emerging 3-D printing market that is increasing in importance: 3-D printed
electronics (3-D PE). Whilst traditional 3-D printing builds structural parts layer by layer, 3-D
PE prints liquid inks that have electronic functionality on to existing 3-D components. 3-D PE
is achieved by combining advanced printing technologies, such as Aerosol Jet, with specially
designed five-axis systems and advanced software controls that allow complex print motion
to be achieved. The integrated print systems allow the full range of electronic functionality
to be applied: conductors, semiconductors, resistors, dielectrics, optical, and encapsulation Photo 1
materials. 3-D PE d e m o n s tra to r—T a n k -fillin g sensor produced
These can be printed on to virtually any surface material of almost any shape. Once deposited in the FKIA p ro je c t funded by the Bavarian Research
the inks are post processed: sintered, dried, or cured to achieve their final properties. Multiple Foundation (C ourtesy o f Neotech AMT G mbH)
materials can be printed to build up functionality, or surface mount devices (SMD) can be added
to make the final electro-mechanically integrated system (see Photo 1). In this example, two
capacitive sensor structures have been printed on the ends of an injection-molded PA6 tank. The
TECH THE FUTURE
sensors are connected by a printed circuit (conductive Ag) and SMD components are added to
complete the device. When water is pumped into the tank, the sensors register the water level as
it rises, lighting the LEDs to indicate the fill level. When the tank compartment is full, the circuit
senses the water fill level and reverses the pump direction.
3-D PE has the potential to provide enormous technical and economic benefits in comparison
to conventional electronics based on 2-D printed circuit boards. It allows the combination of
electronic, optic, and mechanical functions on shaped circuit carriers. Therefore, it enables entirely
new product functions and supports the miniaturization and weight-saving potential of electronic
products. By eliminating mechanical components, process chains can be shortened and reliability
Photo 2
is increased. As a digitally driven, additive manufacturing process materials are only applied where
3-D chip packaging (Courtesy o f F raunhofer IKTS)
needed, improving the ecological balance of electronics production. With no fundamental limitation
on substrate material, the user is able to select low-cost, easy-to-recycle and more environmentally
friendly materials. The novel design and functional possibilities offered by 3-D PE and the potential
for rationalization of production steps indicate a potential quantum leap in electronics production.
Advances in this field have been rapid since the first developments that focused on 3-D chip
packaging. In this field, printing is conducted over small changes in z-height to connect SMDs.
Photo 2 shows an example where wire bonds are replaced by printing interconnects, from the PCB,
up the side of a chip, and over onto the top contact pads. Such applications only require relatively
simple print motion. The current "state of the a rt" is to use five axes of coordinated motion to
print high complex shapes. This capability enables the production of truly 3-D PE systems, such
as a 3-D antenna for mobile devices (see Photo 3). This application is well advanced and moving
Photo 3
towards high-volume mass production driven by the benefits of a flexible manufacturing, novel
3-D p rin te d antenna (Courtesy o f Lite-O n Mobile)
design capabilities, and cost reduction compared to the current methods based on wet chemical
plating processes. 3-D PE is also being scaled to print on large components beyond the size range
possible with current manufacturing methods. For example, in the automotive field, 3-D prints of
heater patterns are being developed for molded PC windscreens of up to 2 m x 1 m in size.
Currently, 3-D PE applications are mainly limited to circuits, antennas, strain gauges, or sensors
using conductive metal as the print media with additional electronic functionality being added as
SMDs. However, the technology also has the potential to leverage new material and process
developments from the printed and organic electronics world. In this field, many different material
systems are currently being applied on planar surfaces to create multi-material and multi-layer
devices. Functionality such as resistors, capacitors, sensors, and even transistors are being
incorporated into fully printed 2-D electronic systems. As these print materials and processes
mature, they can be adapted to 3-D applications. It is expected that the coming years will see a
rapid increase in the range of fully printed 3-D electronic devices of novel functionality. ©
Dr. Martin Hedges (mhedges@neotech-amt.com) is the Managing Director o f Neotech A M T GmbH based in
Nuremberg, Germany. His research includes aspects o f additive manufacturing, materials and processes. His
company projects focus on the development o f integrated manufacturing systems for 3-D printed electronics..
eerin
embedded
electronics
W a n t to ta lk to us directly?
information
S h a re your in te re s ts and opinions!
news
C heck out our New Social M e d ia
O utlets fo r d ire c t engagement!
MULTIPLE PCBA
M MOKEWAITING
LINES
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.
High-Speed Non-Contact Jetting Nozzle • Complete Volume Control • 100% Software Driven
More Components, More Possibilities • High-Performance Platform
h ew custom ers :
SET $500 TOWARDS
(847) 8 0 6 -0 0 0 3 •
et.com
sales@PCBnet.com FREE PAKTS!