
-NOVEMBER 2008-
Sean
Donnelly, Publisher – Circuit Cellar
Magazine
I love being
able to administer sample distribution programs during challenging economic
times such as these. While the media bombards us with dismal news about
mortgage meltdowns and massive point losses in the stock market, a more
positive story is being told by the average embedded designer. With each sample
request I receive, I’m also seeing unique descriptions of R&D and big plans
for the future. This certainly isn’t an audience sitting on its hands waiting
for an economic turnaround.
Fortunately, Circuit Cellar advertisers agree with my
assessment. Our advertisers are a pretty intuitive bunch. They “get it.” They
understand that Circuit Cellar
readers really are the hands-on developers responsible for much of the de facto
design decisions in the world. This is why many of these advertisers are
signing up for a Circuit Cellar
sample distribution pool. It’s time for an “embedded” stimulus package.
In the email version of this November’s News Notes, you’ll see a column of products being offered by Circuit Cellar advertisers. (If you’re not receiving the email version of News Notes, please make sure to fill out the subscriber form at the end of this page for future issues.) In addition to the discounts being offered, these advertisers are placing products like these in a Circuit Cellar sample distribution pool. From oscilloscopes to development boards, there’s an impressive array of samples our advertisers are giving away to those who qualify. So check out their products and special offers. Then be sure to register here for the November issue’s sample distribution pool. http://www.circuitcellar.com/sample/CC_Readers/
EQ Interactive
Problem: An electric solenoid is being driven in a conventional manner, as
shown below, but the solenoid is being used in a mechanical brake and the brake
is releasing too slowly when the control signal is turned off. What can be done
about this?

Think
You Have a Great EQ Challenge of Your Own?

E-mail your best EQ question and answer to eq@circuitcellar.com.The
next contributed EQ that is published by Circuit Cellar will receive an Esensors EM01b HVAC Monitor.* All published EQs will earn
the author a Certificate of Appreciation from Circuit Cellar.
Answer: When the control signal is turned off, the current
that was flowing through the transistor continues to flow through the diode,
and this maintains the magnetic field until it dies away.
The
current is reduced by the application of a voltage to oppose it. There are
several ways to produce this voltage. One way is to rely on the distributed
resistance of the circuit (mainly the solenoid and diode), which is normally on
the order of a few tens of ohms.
In this
case, the current collapses at an exponential rate, with a time constant of
L/R, where L is the inductance of the
solenoid and R is the total resistance.
Increasing the resistance can reduce the time constant. This is accomplished by
putting a resistor in series with the diode, where it has no effect when the
transistor is on. The resistor must be sized so that the voltage across it
(produced by the initial value of the coil current) doesn’t exceed the voltage
rating of the transistor. In the example shown, a fivefold improvement in time
constant (1.6 ms versus 8.3 ms) is achieved.

Another
way to produce an opposing voltage is to put a Zener
diode back-to-back with the existing diode. Again, the Zener
should have a value that doesn't exceed the rating of the transistor. With this
approach, the Zener voltage directly opposes the
current, which ramps down linearly: dI/dt = V/L. In this example, the current decays from 200 mA to zero in approximately 2 ms.

In
either case, the energy stored in the coil at switch-off (10 mJ) gets dumped into the resistor or Zener
diode. If this happens often, it also will be necessary to make sure the device
can handle the ongoing power dissipation.
![]()
By Tom Cantrell,
author of Circuit Cellar's "Silicon Update"
In a recent of Circuit Cellar’s News Notes, I
told the story of how I resurrected my first circa-70s IMSAI computer. In terms
of the modern (i.e., electronic) age, the IMSAI is pretty old school. But, in
fact, the roots of computing go much farther back to the pioneers who had
visions of “thinking machines” long before silicon made them pervasive.
Flash back to England in the mid-1800s and
Charles Babbage (1791–1871), an independently wealthy “gentleman scientist” and
member of London’s upper crust (www.computerhistory.org/babbage/). Far from
being one of the idle rich, Babbage occupied his time in a whirlwind of inventive
pursuits, everything from a proposed scheme for “tidal power” once the coal ran
out (sound familiar?) to designing the first “cow catcher” for locomotives.

(Source:
www.computerhistory.org/babbage/)
But as a trained mathematician, one of
Babbage’s passions rose to the forefront and ultimately became all consuming.
Recall that at the time the ability to reason mathematically far exceeded the
means to actually calculate an answer. That left scientists to rely on
reference books containing, for example, tables of numbers painstakingly
calculated by legions of pencil (’er, make that quill
and ink, I guess), pushers.
Babbage was disillusioned by the fact that
various numerical reference books had errors that yielded different answers, at
least one (if not both) wrong. Perhaps he rightly foresaw the calamity that
might arise from a tired clerk’s transposed number. Consider that these
“bibles” were widely used for navigation calculations. Needless to say, it just
wouldn’t do for the Royal Navy, Ruler of the Seas, to be making wrong turns and
getting lost (kind of the Victorian-age equivalent of the Pentium
floating-point bug, or that spaceship that crashed into Mars because designers
got their miles and meters mixed up).
Obsessed by his vision, Babbage embarked on a
quest to build a machine, the “Difference Engine,” that would eliminate the
possibility of human error. Keep in mind the conceptual design of such a
contraption, remarkable in itself, was only half the battle. There was also the
nontrivial issue of “implementation,” considering the metalworking precision
required to get the incredible lash-up of gears and levers to work. Even though
he was a wealthy man, the challenge of actually building the Engine would call
for investment far beyond Babbage’s own means.
Known for his stubbornness, Babbage was able
to cajole the government into granting his project funding (think DARPA), and
indeed he was able to complete the initial design (beautifully intricate
drawings) and even prototype a subset of the Engine calculating mechanism.

(Source:
http://ed-thelen.org/bab/bab_tech.html)
But ultimately, in the face of criticism from
rivals and naysayers, Babbage’s stubbornness spiraled into irascibility and he
was infamously rejected in his quest for an additional round of government
funding to complete the project. Of his dream left unfulfilled, Babbage could
only say that “another age must be the judge.”
LIVING
HISTORY IRON
Flash forward to modern-day Silicon Valley,
home of the Computer History Museum (www.computerhistory.org). It’s just off
the 101 in Mountain View, CA, so chances are you’ll be driving right by if
you’re in the area. Surprisingly, for someone so into all things computing, I
visited only recently. I was prompted to get off my butt when I heard the
museum actually had a Babbage Difference Engine on display. And I encourage you
to stop by soon if you have the chance, because it’s only a loaner on display
until May 2009. After that, it goes back to the personal collection of the
wealthy patron of the computing arts (Nathan Myhrvold)
who paid to have it built. Then your only option will be a trip to England to
see the first (and only other) example at the London Museum of Science.
Modeled on Babbage’s refined design for
‘Difference Engine #2,” the machine on display at the Computer History Museum
is a 5-ton, 8000-part marvel to behold.

Starting at the right is the “power supply”
in the form of a hand crank. It’s testimony to Babbage’s genius that the modern
day builders were able to stick quite closely to his plans, making only minor
changes here and there, and doing so in a way they felt would have been
feasible in Babbage’s time. In the case of the “power supply,” it was
discovered Babbage’s design was a bit under-geared, so it takes four turns of
the crank to complete a cycle rather than one. Underneath the “power supply”
(crank) is the “control unit,’ a system of cams and followers that are
essentially the Engine’s “microcode,” responsible for sequencing the mechanical
actions responsible for handling each step in the calculation.
In the center is the towering “ALU” that
crunches the numbers, step-by-step evaluating 7th order polynomials,
to 31-decimal digits of precision
(www.computerhistory.org/babbage/howitworks/). This is rather overkill and it’s
speculated that Babbage may have had thoughts of splitting the work and
performing two independent calculations in parallel. This was more than 100
years before Cray and others latched onto the same concept with vector (i.e.,
SIMD) processors.
Although attention naturally centers on the
Engine’s calculating capability, I find the “printer” on the left side equally
enchanting. Amazing enough to actually get the result of a calculation onto
paper, but Babbage went further with features like adjustable line and
character spacing and even “wordwrap.” There’s also
an “out of paper” feature (i.e., a long cable from the printer to a clutch on
the crank) that prevents the Engine from cycling beyond the end of a page.
Going further in his quest for accuracy,
Babbage recognized that even the seemingly small step of getting the numbers
from a “printout” into a mass-produced book left the door open for human (e.g.,
transcription, typesetting) error. Thus, the printer also includes the ability
to handle different “media,” notably a tray of plaster of Paris, which enables
the Engine itself to stamp the molds for printing plates.
I was hoping to see the Engine in action, but
when the museum’s in-house expert—coincidentally, it was a gentleman named Jeff
Katz whom I’d worked with at Intel many years ago—tried to crank it over, it
jammed up.

In the nearby photo you can see Jeff
“debugging” the Engine with the 19th-century equivalent of a “logic
probe.” He related that jams do occur from time to time, but they can
eventually be cleared.
Although I didn’t get to see the Engine in
action, even that disappointment provided a teachable moment. As another docent
related, Babbage consciously designed a measure of “fault detection” into the
design along the lines of a blade arrangement to check the alignment of the
gears each cycle. If something is amiss, the Engine will jam rather than risk
delivering an incorrect answer. Better yet, over by the “control unit” is a
wheel engraved with various indicators of the Engine state that can be examined
post mortem to help isolate the particular cause of a jam.
Fittingly, the modern-day descendants of
Babbage’s “thinking machine” (i.e., the PC and Internet) give us the ability to
see the Engine in action. YouTube has more than a few videos including an
excellent overview of the entire Difference Engine story
(www.youtube.com/watch?v=KBuJqUfO4-w) and others showing Jeff and the Engine
having a better day (www.youtube.com/watch?v=nUtbZ1uU5hE).
YOU
BE THE JUDGE
As I write this, there are a zillion micros
cranking away in all corners of the globe (and even beyond if you count the
ones in space). I like to think each instruction executed is a handclap for
those pioneers who’ve gone before.
“Another age must be the judge,” Babbage
said. Well, who can deny that he created one of the first “killer apps,” even
if it couldn’t be realized during his lifetime? As far as I’m concerned, we
mere mortals simply aren’t worthy of judging Babbage and his work.
More like the other way around. With the
miracle of electronics and virtually infinite MIPS and megahertz at our
command, only time will tell if we’ve lived up to the legacy of Engineering
vision and passion left to us by Babbage.
Another age will have to be the judge of that.
![]()
An interview with Chris Paiano, Part 2
CIRCUIT CELLAR: In your two-part
series titled “PSoC Design Techniques” (Circuit
Cellar 216–217, 2008), you described how to build an eight-channel mixer and
enhance the single-chip design with DSP effects and more. What was the purpose
of that project?
PAIANO: I had already done a
similar thing for a client (Griffin), and squeezing as much functionality as
possible into one active component is a challenge I like to take on. When I
have some free time, I often will start a project that is of personal interest
to me (or a new challenge, such as getting this all to function on a single PSoC with no external active components). I find it keeps
my engineering skills sharp, with more direct experience to draw from.
This single-chip mixer also provides a handy,
inexpensive device for musicians to control their own
personal/scratch/headphone mix in a studio. My family has a couple musicians in
it, so I always end up working on musical projects from time to time. For
example, I’ve made a PSoC “Wah-Wah”
effect pedal and several microphone automatic gain control (AGC) systems that
have been used in live performances.
CIRCUIT CELLAR: Regarding the
eight-channel mixer project, do you have any tips for Circuit Cellar readers who are interested in following your lead?
PAIANO: I designed a printed circuit
board (using ExpressPCB) and now have experimentation
kits available on my website (www.cpeproto.com) that will allow readers to play
with the eight-channel mixer with all the features I described in the articles.
The kits are available fully either assembled and tested or not assembled (for
those that like to solder), with partial kits also available to the more
advanced users. This is the quickest way to get started working with the design
techniques involved.
In addition, multiple versions of the source
code/project files are included to allow readers to have a few things.
They can have a basic eight-channel mixer
with adjustment knobs (as described in the first half of the article), on the
less-expensive CY8C27443, with partial knob scanning test modes selectable in
the code (separate firmware versions are included for each test mode, for users
that do not own a C compiler but have a programmer and want to experiment).
Or they can have a basic 8-channel mixer with
adjustment knobs (as described in the first half of the article), on the
more-expensive CY8C29466, with partial knob scanning test modes selectable in
the code (separate firmware versions are included for each test mode, for users
that do not own a C compiler but have a programmer and want to experiment).
Or they can have a fully-featured,
eight-channel mixer with adjustment knobs, selectable DSP/intercom modes,
speech feedback, and permanent setting memory (as described in the second half
of the article), on the more-expensive CY8C29466 (not possible on the
less-expensive PSoC due to resource shortages), with
no test modes.
The kits come with a CY8C29466 (the
more-expensive 28-pin DIP PSoC) and a CY8C27443 (the
less-expensive 28-pin DIP PSoC). The 29466 will be
preprogrammed with the full mixer with all the bells and whistles. The 27443
will be preprogrammed with the basic mixer with adjustment knobs (not in test
mode, in full operation mode). You will only need to purchase a programmer if
you want to try programming your own firmware—or one of the test mode firmwares. If you want to try altering any of the
mixer source C code, you will need one of the supported C compilers (Imagecraft is the standard, Hi-Tech is the professional) in
order to compile it into a programmable HEX file. See www.cypress.com for details.
If you can’t afford the C compiler and/or you
would prefer to work in assembly (assembly compiler comes with free PSoC Designer software), the compiled LST (list) files for
the various mixer software projects are available on my web site. These
show what assembly instructions the Imagecraft
compiler interprets the C code as. Although it’s not pretty, you can almost
copy and paste that into a main.asm file (removing all the addresses and
replacing any destination addresses with labels) and it should work the
same. However, this is a lengthy process, so be prepared to spend some time
editing and tracing jumps.
I recently created a variety of options for
the mixer kits. These now range from only a PCB and PSoC
(with parts list) to a fully-assembled and tested kit. As of now, kits are
priced based on single-quantity components and PCB orders. My father and I
still hand-assemble and test the mixers here. I will never outsource to a
country with sub-standard wages.
If it becomes necessary to keep up with
increasing demand, I will locate an American pick-and-place company to stuff my
boards. This goes for all my kits and products. As it becomes
possible with increased interest and order quantities, the prices on the web
site will drop accordingly.
CIRCUIT CELLAR: Signal processing
figures heavily in many of your designs. Examples include your Eight-Channel
Audio Mixer project, your Personal DSP design, and your OmniSoc
project. Is there a specific reason for this? When and why did you start
experimenting with digital signal processing?
PAIANO: The reason is mainly
the musical nature of my family. Most of us play one musical instrument or
another. I grew up playing the violin in the Suzuki program, and have always
experimented with computer-based music creation. I’ve worked on several
MIDI-based projects (the animatronics control system I mentioned earlier was
based on MIDI), and I always look for ways to add more cool sounds or effects.
DSP seemed a natural area of interest for me once I began experimenting with a
basic real-time echo/reverb effect on the PSoC. It
just grew from there.
CIRCUIT CELLAR: Based on the
information posted on your web site (www.chrispaiano.com), it’s clear that you are using your
design/programming skills to address the huge problem of over-reliance on oil.
What is driving you to actively address this international problem? Are you
driven by your concern for the environment, your political views, or potential
business opportunities? Please explain.
PAIANO: All of the above.
The environment is being destroyed by our dependence on fossil fuels. The
problem is mainly political. Special-interest groups wield all the
decision-impacting power, while the general public’s interests are poorly
represented (if at all). The public is forced to depend on fossil fuels because
all viable alternatives are put well out of reach, with government incentives
and programs focused on the wrong things. It really makes one wonder.
With Al Gore’s recent 10-year challenge to
produce ALL of our electricity from renewable sources and to switch our
vehicles to electric power, there will be plenty of customers wanting
conversion kits for the existing fleet. Not everyone can afford to just buy a
new electric vehicle. The majority of car sales are used cars. The wheel motor
design referred to on my web site will be a “bolt-on” solution to easily make
any vehicle a hybrid—or even to resurrect a dead junkyard chassis in a
completely electric form instead of sending it to the crusher.
On the subject of renewable energy sources, I
was recently contracted to develop a system to automate the production of a
combustible gas with a controlled arc. It is an inefficient process; however,
certain types of energy are inexpensive in certain locations (such as
geothermal and hydroelectric), and it seems as though this fuel is stable and
has a high energy content.
A two-stroke gasoline engine has successfully
run on this fuel, and it apparently burns clean. From what we’ve been
told, it makes for an excellent direct cooking fuel—as well as a cutting fuel
more powerful than acetylene. It is by no means a total solution, but
every new form of renewable (and especially, storable) energy helps if it is
funded through all the necessary research and development phases to reach a
production phase. This is the type of project I truly enjoy working on.
CIRCUIT CELLAR: You have defined two new electric vehicle
(EV) projects that you are working on: a high-current/high-power electric
vehicle controller (called “The Gorilla”) and retrofittable
electric wheel motors. What is the purpose of each project and how far along
are you?
PAIANO: The Gorilla is a
new, efficient method of mounting as many FETs, diodes, and capacitors as are
needed directly on to a length of aluminum extrusion heat sink, with buss bars for connecting to a load (with a PSoC control circuit). The TO-247 packages allow for a
sandwich-type, minimal fastener design.
As you know, I was building golf cart
controllers in early 2000. The closed-loop throttle current control and
Palm-based monitoring systems were used as a base on which to build The
Gorilla. Current, voltage, speed, mileage, and battery condition are all
shown on the display. I am currently in the process of slowly building a larger
garage with enough room to work on The Gorilla again. It has been stalled for a
couple years due to financial and space constraints. I have several vehicles
available to use as test beds when the garage is ready. I plan to scale
everything up to work with the fleet of vehicles currently on the road to help
address the growing energy crisis.
The Gorilla controller prototype
controls up to 1,000 amps. It was designed for high-performance and off-road
golf carts (of which there are surprisingly many in Florida). The Gorilla can
easily be scaled up to any power requirements by cutting a larger piece of the
aluminum extrusion and lengthening the unit with more FETs, diodes, and caps to
match. The PSoC control circuitry remains the same,
with only firmware current limit logic adjustments.

I have also been working on a wheel motor
concept since I was an undergraduate. I had planned to use the wheel motors as
my senior design project, but they were entirely too complex for the
two-semester time limit. I settled on solar power conversion and PSoC-based AC sine wave generation instead for my senior
design. I am looking forward to resuming development on the wheel motor
project; however, I will need to complete construction of my garage beforehand.
Smaller projects will be on my bench until then.
I plan to develop an AC drive controller for
the wheel motor shown in the CAD drawing, with the dsPIC.
This will allow bolt-on modification of existing vehicles to convert them to
hybrid plug-in electric without changing the existing drive train - which is
the ultimate goal. I would also like to use a high current "six-pac" IGBT module for the wheel motor.
|
*EQ award of Esensors unit:
recipient responsible for any applicable duties and taxes. No cash alternative.
Awards will be made at sole discretion of Circuit Cellar editorial staff. By
submitting an EQ Q&A, Circuit Cellar is granted the right to publish the
submitted material and the author’s name. Submissions must be original (not
published in print or online previously).