We eliminate v– by using the op-amp relation:
The Figure 5 circuit applies gain only to the original
(no DC pedestal) signal and preserves the 1.65V pedestal
at the output. In this way, an entire board full of analog
circuits can operate from a single power supply while using
a reference that is halfway between the supply voltage and
ground. In many instances, the mid-level reference can be
achieved with just a two-resistor voltage divider. Although, in
instances where the reference must sink or source current, it
may need to be buffered by a voltage follower.
Setting the Threshold for
An important consideration in designing receivers of this
sort is what to make the threshold. What signal amplitude is
high enough to indicate that an object is reflecting back?
With conventional aircraft radar, the method usually
adopted is to choose a threshold that is some multiple of
the noise amplitude. Signals at this threshold voltage will
have a signal-to-noise ratio that produces a sufficiently low
probability of a “false alarm” (that is, a false detection of an
object). This approach to setting the threshold is known as
Constant False Alarm Rate (CFAR).
In the case of our ultrasonic sensing, the random noise
that is referred to when people talk about signal-to-noise is
so very low that we typically don’t need to worry about it.
Our main concern will instead be offset voltage which — for
typical op-amps (that is, an input offset of 1 mV) and with a
gain of 10 — will be on the order of 10 mV maximum at the
output, regardless of which amplifier stage is used (because
the stages are AC-coupled to one another).
A threshold on the order of 100 mV should provide
good probability of detection while making probability of a
false alarm quite low.
The I2C Interface to the
The MSP430G2553’s I2C interface is fairly
straightforward and is well-documented in TI literature. In
addition, there have been some very good explanations of
the I2C protocol in this magazine, so the description here is
just a high-level summary.
The I2C interface has just two signals. One of these,
SDA, contains the data while the other, SCL, serves as the
clock. These two signals also initiate and terminate data
transmission and perform other special functions in addition
to their data and clock roles.
Note that, unlike SPI (Serial Peripheral Interface) or
RS-232 and its variants (usually just referred to as “serial
links”), the data line in I2C is bidirectional. In order that all
the devices connected to the data line can use that single
SDA line for both input and output, the line is “pulled up”
with a resistor to the supply voltage and the individual I2C
transceivers can then pull the line low with their output
transistor (a logic ‘0’), or leave the line pulled up by leaving
the output transistor off (a logic ‘1’).
To orchestrate the activity between devices, one I2C
device is designated “master” while all the other devices are
“slaves.” The master generates the clock and makes sure
that only one slave talks at a time.
Another very helpful feature of I2C is the fact that the
addressing of nodes is built into the protocol. Each slave
node has its own unique address; that way, the master can
designate which slave it wants to talk to.
The final article in this series will discuss the details of
getting the ultrasonic radar to detect not only range but
bearing as well. In addition, the full schematic and the
assembly language code for the radar will be included. SV
The Microcontroller Used in
For most of my projects, my microcontroller choice is the MSP430G2553 made by Texas
Instruments (TI). It has all the A/D, multiple timers,
and comm features that you’d find on other
microcontrollers and is extremely low power. In
addition, MSP430 devices are 16-bit, making them
well-equipped to handle greater-than-a-byte data
which happens a lot in the sensor applications
that I work on. Plus, they’re inexpensive — some
less than a dollar. In fact, I like the MSP430 family
of microcontrollers so much that I wrote a book
about them: MSP430-Based Robot Applications.
Iknow that some who may be interested in these advanced ultrasonic radar applications would
rather buy the system completed (or in some
stage of completion) rather than building the
system from scratch. For that reason, a Kickstarter
project is being organized through which these
items will be made available. More details will be
provided in the next installment of this series.
SERVO 09/10.2018 11