Embedded - 398: Clocks Get Into Everything
Episode Date: January 14, 2022Tom Anderson explains radio frequency electronics (RF). Elecia and Christopher try to keep up. We also took a detour into bass guitar electronics. One confusing jargon part is that radio power (in d...Bm) is discussed as though it is voltage. For example, 10 dBM is 2V peak-to-peak; there is an implied 50 ohm resistor in the P=V*V/R calculation. The the wiki for more about decibel-milliwatts. Tom talked about dollhouses, aka Smith charts (wiki). (We also talked about Bode plots (wiki).) Light travels about 1 foot in 1 nanosecond (11.8 inches, 30 cm). Admiral Grace Hopper is well known for giving out nanoseconds. The guitar company Tom mentioned working with is Alembic. Find Tom’s writing on Medium and the Tempo Automation blog. He is on Twitter as @tomacorp and was previously on Embedded 379: Monstrous Cable Corporation.
Transcript
Discussion (0)
Welcome to Embedded. I'm Alicia White, alongside Christopher White. This week, we are talking
about invisible intangibles and how they interact with each other and us. I'm pleased to welcome
Tom Anderson back to the show.
Hey, Tom, how are you doing?
Doing great. Thank you. Could
you tell us about yourself as if we met at a technical conference that was for some weird
reason in person? I remember that. Sure. I'm Tom Anderson. And right now I work for Keysight
Technologies, although I'm not speaking for Keysight today.
And before that, I worked at Agilent and HP.
And I've also done a lot of hobby electronics.
And lately, I've been helping at Alembic, where they make basses and guitars.
Very nice basses.
Very, very nice basses. Oh, they oh they're so nice i just tried one recently it
was it was absolutely amazing it has on it what's called ghost frets so it's a it's a fretless bass
but it has inlays where the frets are that are that look just like the fret so it looks like
a regular
fretted bass and when you pick it up you know where your fingers go because there's frets
that's cool except they don't they're not they're just inlaid they're not um
they don't so when you play it's uh amazing and fretless see that would just confuse me because
you have to put them right where the frets are in that case. Whereas I'm used to putting them sort of, you know, behind the frets on a fret.
No, they go a little behind the frets, just like in a regular bass.
I picked it up, and I didn't realize it was that way.
And I thought, wow, why is this bass perfectly in tune?
How do they do that?
Because usually, you know, because of the 12-tone scale or whatever, they're slightly off.
The 12 tones don't, you know, it's not a perfect, what do they call it, a just intonation.
And so, it actually sounds more in tune than a regular instrument with frets.
I fear I've derailed our podcast already already into bass talk so we can we can move
on to lightning round it can be bass talk okay well let's do lightning round and then maybe we'll
get back to basses okay copper tape or kapton tape copper favorite frequency um 10.7 megahertz
actually now let me pick another one 159 kilohertz pick another one. 159 kilohertz.
Least favorite frequency.
So 159 kilohertz is magical because that is one mega radian per second. So I can do all the math
in my head. Oh, all right.
So one microfarad is minus J one ohm.
I can't do that math in my head no um what is your least favorite frequency
uh dc i knew you were gonna say dc zero hertz yeah it's the worst yeah so many problems
four five or six strings oh four uh favorite fictional robot i'm gonna go with talos because i don't think he's been picked yet
what is talos from uh ancient greek uh he was a robot that oh right defended crete or something
like that and jason and the argonauts had to had to kick him cool Cool. The oldest robot. Yeah. Yeah, I believe it's the original that people know about now.
Although there are some other things you could call robots.
They weren't shaped like a person or anything.
They had things like little carts that would move themselves around and things like that.
Active or passive?
You can interpret that however you like.
Let's go active.
Okay.
And you have a tip everyone should know.
Yes, it's a soldering tip.
Keep your sponge clean.
You know, our sponge isn't clean.
We have the wire thingy.
Well, that's true.
Yeah, that's okay.
Those are pretty good, actually.
So we invited you on the show to talk
about RF, radio frequencies, because that's magic, at least according to some. According to some,
it's the blackest of magic. Is that true? Well, so I'll tell you what I'm going to do. I think I can teach it to you
really quick right now, and then you can decide. And so, are you ready? Yes. Okay, there'll be just
a little bit of homework afterwards if you want to actually say that you know RF afterwards, but not very much. You'll get most of it right here, right now. So the problem with RF is wire.
The problem is that when you draw a schematic, you have components, and those are fine with the pins,
and then there's wires that hook them together. And the wires on the schematic correspond
typically to traces on printed circuit
boards that connect the components, like where you solder things down and there's a wire.
And that works pretty good until you run into the situation where
there's a different voltage on each side of the wire. And that can happen for a variety of reasons one is that it takes time for a signal to go from
one pin from the driver to the receiver and that's related to the speed of light and
a few other constants like the what the board is made out of but mostly it's the speed of light and so the the when you drive say a digital signal there's a step and and so this step
at on one side of the wire it's gone from say zero to three volts but at the other side of the wire
it's still at zero volts it hasn't because the signal hasn't gotten there yet.
And so now we have a different voltage at both ends of the wire.
And that is the condition for RF.
That is an example of RF happening.
Now, if the rise time is slow on your digital signal,
where the wire is sufficiently short,
then there's very little delay between, uh, you know, this, the driver and the receiver.
And so that voltage comes up, uh, slowly enough that the voltages is, it tracks at the same.
And so say you're halfway to three
volts, you're at one and a half volts on the driver. You're also at one and a half volts on
the receiver or maybe 1.49 volts or something close enough. Okay. That is not RF. Okay. So
the problem is, is when, when there's a wire, uh, what do you do about that? And so in RF, they talk about transmission lines.
But usually in the schematic, they don't draw it any differently.
It just looks like a wire.
But when it comes time to go to layout, there's all these rules about, well, what are we going to do with this transmission line?
And how to handle it. And so that's just totally confusing because now the schematic doesn't really say what you're doing anymore.
And when you have a question about it,
the person who's the designer sort of mumbles about signal integrity or something,
and they don't communicate that very well and it's a problem
with our tools okay i'm going to stop you for a second make sure that i understand um rf comes
about because the driver and the end of the wire may not be the same voltage.
There's some sort of potential between them.
And that will be temporary because it will be communicated via the wire at the speed
of light or thereabouts.
And a wire in this case is any piece of metal.
It could be the copper mask, it could be a wire, it could be an antenna.
Well, it is an antenna, that's the problem.
But yes.
It could be an antenna, but we're going to handle those slightly differently.
And that's going to be our graduate school course.
But it's mostly about voltage potentials being transmitted from one side to another at the speed of light.
Because that is a constant speed.
And even though it feels instantaneous to us, it's not as fast as everybody thinks.
That's my claim for right now, yes.
Okay.
Grace Hopper had those nanoseconds.
Right.
And it's the length of wire,
usually they're wires,
that it takes light to go a nanosecond.
A nanosecond.
A nanosecond's worth of light distance.
And it's about 30 centimeters long, about a foot.
Yes, one nanosecond per foot is a time-honored tradition of approximation.
Which is why imperial units are better.
But it's important to think about the whole one nanosecond per foot, because when you are doing things like communicating to space
that's a lot of nanoseconds yes okay okay rf back on track back on track there's a a voltage
difference and a wire i got it go ahead okay so we're gonna deal deal with that voltage difference.
But the other thing about RF is there's some jargon they use.
And it can really put you off because they use a different word for voltage, actually.
They talk about dBm.
What the heck is dBm?
And dB.
They talk about dB a lot.
Now, we're kind of used to dB from Bode plots or frequency response plots, right?
So 20 dB is a factor of 10 in voltage. But what they want to do is they want to talk about dBm,
which is comparing a, which is a power level.
So that's like plus 10 dBm.
Well, what do they mean by that?
Well, in RF, it turns out you need a resistor for that to make any sense.
And so they use 50 ohms because they love 50 ohms in their RF.
It's their favorite resistor.
And so what I always remember is that plus 10 dBm is two volts peak to peak.
And so when you ask somebody, you know, what's the voltage coming out of this oscillator they might say 10 dbm or 27 dbm or something and you say well okay we're not actually driving 50 ohms
but what they really mean is the voltage level as if we were driving 50 ohms
and is there a 50 ohm load or not it's very confusing it is super confusing and it's totally
legitimate to ask the rf engineer but what would that be on my scope oh yes well what is this what's
the origin of that i don't well dbms are power according to wikipedia. Yes, yes, they are. And you just mentioned like 10 dBm is 2 volts.
At 50 ohms.
But on Wikipedia, it's saying 526 dBm is a black hole collision.
And those don't seem like very many orders of magnitude apart.
Well, remember, it's logarithmic.
526 is quite a lot.
Yeah, that's a big number.
A lot of zeros. So I can't justify the DBM other than to say that the test equipment, the vertical scale on it, you know, or like a power meter or whatever, they're all historically in dBm. So I just have to apologize for that.
But what you do is you practice it a little bit and you learn P equals V squared divided by R.
And you just need to know that R is equal to 50 ohms.
You can horse the math around and figure out some formula that you like.
And so I just take plus 10 dBm.
I actually remember that it's one volt from the
peak to zero or two volts peak to peak uh into 50 ohms and then i scale everything from that
and usually they're referring to a voltage into 50 ohms is what they really mean um but it's it
gets thrown around a lot and it's just totally annoying so um so that's kind of the insider club jargon
uh they have a little more of that but that's probably the worst offender and so so now we're
we're like two-thirds of the way through rf um but we got we got one more one more piece so you got your your bode plots right which are uh db on the vertical axis
so it's like um 20 times the log of some ratio of voltages
typically say v out over vn if it's a bode plot. And you'll see that all over the place.
You'll also see it for things like the gain of amplifiers versus frequency.
And we take the log of the frequency because when we do that, it's really a log-log scale, right?
Because dB is a log kind of a thing and log frequency on the other axis.
And there's kind of that principle that if you take enough logs everything is a straight line um and so so that's almost true
but in rf there's a problem actually um just one sorry uh the the problem is that transmission
lines which is which is the wire you know my my wire that had the problem where there's a delay across it.
If I plot what that does on a Bode plot, it doesn't make a straight line.
And it will drive you crazy.
Because you, well, you can imagine like an RC filter, right?
It has a 3 dB point point it has a at low
frequencies it's it's zero db and it's this flat spot and then it kind of rolls goes curves neatly
down to 3db and then there's another straight line where it goes down 20 db per decade or 6 db per
octave you know nice straight lines with nice little curved segments
hooking them up.
And let's say instead of a resistor
and a capacitor,
I put in a transmission line
and a capacitor
and I made that same Bode plot.
Well, it's not pretty anymore.
And so we need some sort of a diagram
that's going to make that pretty.
And so these are typically, well, these are called Smith charts.
But that, to me, the Smith chart, that's a terrifying name.
Because my name is Tom Anderson, and I'm naturally afraid of Agent Smith.
Why didn't we ask any matrix questions i'm sorry mr anderson and so i'm not going to call
them smith charts i'm going to call them dollhouses okay um for reasons that i'll go into uh and so
what we're going to do is we're going to make a dollhouse where transmission lines are pretty. Don't you
think that's a more friendly way to do it than RF? Than black magic? I think it's pretty.
Someone who thinks DMA should be a dry cleaning assistant, sure. Okay, so I'm going to start off with some math that kind of shows sort of how it works.
It's a little bit different.
It's a simplified case of the math, but it's easier to understand and it's easier to describe in words than the full-blown dollhouse.
So, call it a slightly differentblown um dollhouse so let's call it a different slightly different kind of
a dollhouse it's it's a dollhouse in the same neighborhood but it's gonna it's it's a slightly
different design and it's it's called sometimes it's called inversion in a circle and so the idea
is this i can take a graph uh of say any old function, or it could be a picture of something
in two dimensions, and I'm going to draw a little circle at the origin with a radius of one.
So, I got a little circle sitting down there, and i'm going to take every point in my picture
and i'm gonna i'm gonna have everything outside the circle and i'm going to take its reciprocal
or its inverse one over one over right so if i'm down on the uh x-axis where y equals zero, so I'm down on that nice horizontal line on my graph,
and I go to the spot three, then I'm going to draw that little point at one-third
inside the circle. And if I have something at 10, it'll be at 1 tenth.
Or I can go clear out to infinity, and it's at 0.
But what about the stuff between 0 and 1?
Well, we're going to leave that out for now.
Okay, okay.
And so then I can go off of the axis and give,
have some Y to it.
Uh, so I can step up off of my axis a little bit.
And the way,
the way that I do it,
the way that I invert that number is,
uh,
I take the length of,
from the distance from the origin to that point, which is what the square root of some of the squares of the X and Y is that radius.
And then I take one over that radius.
And so if I had, I don't know, say a 3, 4, 5 triangle, say I would be at 3 on the x-axis and 4 on the y-axis.
So that would be a 0.5 away from the center.
I would go to 1-5th, but it would be in the arrow to my 1-5th.
It would be at the same angle as it was going to the five.
It just goes to one fifth now.
And so that's how I got my Y axis.
And so now I can draw my picture out in the X,
Y space and whatever I have,
I can map it inside the circle.
And you can still recognize the picture in there.
It still looks like the the big thing
it's just small and kind of curved um everything is kind of cute and curvy inside there uh and you
can plot it with a you know you can write a program or something you just map all the points
and plot a bunch of them and just try it it works works great. Um, you'll notice that things like, like a
triangle on the outside becomes a triangle on the inside, except the lines are curved a little,
um, or a circle on the outside becomes a circle on the inside.
Um, and so that's, that's kind of nice. That's kind's kind of um that's a little dollhouse version of the
whole plane that's why you said dollhouse okay sorry yeah so it's a little dollhouse yeah yeah
it stores all the the plane in and it has all the information from the great big plane in it except
for the stuff that was inside the circle. Which you've mapped over.
Yeah, yeah, which I covered up.
And so, now one of the cool things about it is that everything that's infinity maps to the origin.
So, there's a whole bunch of different kinds of infinity, right?
There's all these complex numbers or infinity maybe not infinity say
really big numbers they're all all the really big numbers are so close to the origin that
that they're they might as well be zero so so let's and that why is that handy well
say you have a a meter and an ohm meter and you don't connect any component to it.
So it's just open wires.
So that's infinite resistance, right?
So that's going to map to that point at zero.
Now let's say I take a capacitance meter and I leave its wires off.
It reads zero picofarads.
And so that's sort of an infinite impedance.
But, well, it was going to be a capacitor.
So I'll call it minus J infinity.
Well, that also maps to zero.
And same with shorted inductors.
You know, if it was, or actually an open inductor is, an open for inductance looks like an infinite inductor.
Instead of a zero inductance, it looks like an infinite inductance.
Which is a weird thing. If you're ever using a meter that has an inductance button on it, and it goes open, they don't read infinity much like um you know an
ohm meter reads many ohms an inductance reader will need read many henrys and you wonder where
your many henry inductor is but you don't have one it's just open so um so that that maps all
those infinities into one point and that's's very nice. That's a nice feature.
Now the dollhouse we're going to use for RF is slightly different.
Instead of just using inversion with one over Z, it uses, I don't know, Z minus one over Z plus one,
or you can do the reverse of Z plus one one over z minus one it just turns it upside
down um and what that does is give you three interesting points on it it takes all of the
infinite points and it puts them on the right hand side of the circle and it takes some number
that people like you can any number you choose you can scale it and puts it in
the center and people typically use 50 ohms there or or one depending on what they're doing like
if you're mapping gain then you typically put one there and it puts zero on the left hand side of
the circle and so all of the all of zeros, like all the complex numbers close to zero
or all the impedances close to zero are in one point. And so that is a Smith chart.
And you can go online and you can find Smith charts and do tutorials. And what you do is
you take a bunch of parts,
like a little capacitor, a little inductor or something,
different values of it,
and you just plot the impedance of it,
which you get through the formula.
Like for an inductor, it's 2 pi f times the inductance.
And you just plot that versus frequency on the on the smith chart and just see how everything
traces out and very quickly you can figure out you know oh here's here's what a capacitor looks
like here's what an inductor looks like versus frequency much like a bode plot it's just
they're all circles um instead of straight lines and then what you can do is start putting things in series in parallel
and plotting those.
And those get really cool because if you put like an inductor
in series with a capacitor, it makes a little loop,
a little squiggly loop.
And so you can do all that
and you can very quickly figure out,
oh, well, now I know,
like if I add a little capacitor in series
with this kind of a component,
I can change its impedance at some funny frequency.
And you can also do that just mathematically without it,
you know, just use a calculator, but it's much more intuitive to do it inside the little dollhouse.
And in fact, that little house is in a lot of the data sheets for RF components. And so you'll see
these circles in the data sheets with plots in them, with curved plots in them.
And you wonder, what are those for?
And those are just like Bode plots, except they're on this different kind of graph paper.
Okay.
Let's see how much of that I got, because there was a lot there.
So there's the Smith chart, which
I'm looking at it on Wikipedia.
So definitely
there's a circle thing, there's some log things
going on. But it's
not everything starts at the center,
it's everything starts on the right side.
And that's where zero lives.
Except we're talking
about inverting everything.
So that's where infinity lives.
Right.
And zero lives along the outside of the circle.
Zero is way over to the left.
Zero is way over to the left.
Yeah, the axes, the y-axis is the outer circle around it.
Now, in this case, the circle, the little dollhouse only contains one half of the
plane. And the reason it's a dollhouse is because there are multiple circles as we go through,
and you can think of them as small versions of other things.
Yes. If you were to plot this in you would need really big paper to to plot this
uh in many or you could use log paper also it's just that it wouldn't it wouldn't be pretty because
the lines wouldn't be straight there might be circles on the big paper but they're very
inconveniently shaped uh and so the the advantage of the smith chart being that everything comes out as a nice
size um it fits like even if you're making bode plots it's always a problem you've got to decide
how many decades you want um because and if you wanted a bode plot to plot all the way to infinity
that would be really hard right because you would need an infinite size paper. Whereas this thing fits the whole plane in one circle. And so you don't even
have to decide how big it is when you start. It just comes in one size fits all.
And if people are curious about the mathematics behind this, this is setting off lots of
alarms in my brain to things I had to do. But this is all coming out of complex analysis,
and it's a particular case of a thing called a conformal mapping,
where you're taking the plane and doing things in the complex plane
and mapping it to a different arrangement, I guess.
It's the same information. It's the same information it's the same information but
you're doing things like uh the reason it's called conformal is all the angles are maintained even
though lines may become curves like like tom said with the triangles the angles between things are
are still preserved um so this is a particular case of that. There's other applications too. Like, for example, for similar kinds of math, if you want to draw a mirror, a round mirror, you know, like a reflective sphere.
Like M.C. Escher has this really great drawing of himself holding up a reflective sphere.
And it's the same type of math for doing that.
It's also related to perspective drawing.
Right, right.
Because you can imagine, in perspective,
you kind of want things that are farther away to be smaller.
And this is a mathematical way to make things
that are farther away smaller in the correct way.
And there is a group of different kinds of charts
that are basically charts that change
the domain or the
coordinate system to make life easier for
what you're doing.
And it says slide rules are basically charts like this,
but they're moving charts.
I never thought about how much, I mean,
I care about how information is presented,
but these charts are pretty cool.
A whole bunch of other charts.
Yeah.
If you wanted a slide rule for complex numbers, you would use a Smith chart. It'd be a good one. In fact, you can find tutorials on
exactly how to do that. It's sort of rare anymore because people have other ways to
do arithmetic on complex numbers. You just use Python or whatever. But yeah, Smith charts work too.
But the reason to use Smith charts is so that you don't have to have a computer.
You can at least make an estimate of the answer.
Well, really the reason to use them is to make your problem pretty.
Pretty as in simple or pretty as in art?
Well, they're the same thing, I think.
They're pretty in that they, well, they also match what's in the data sheet because you have to deal with these things because people put them in data sheets every now and then.
And they also put them in test equipment like a vector network analyzer.
And the people who are doing antennas, when they talk about matching an antenna, they want to show you one of these pictures.
And so you need to be able to look at their dollhouse and admire it.
I will be going up to the next electrical engineer I work with and say, show me your dollhouse.
Exactly.
Yes. Yeah.
I'm not sure this is going to take off given most RF engineers.
All right.
All right.
Yeah.
But yes.
Show me your Smith charts.
Yes.
So, we've got some basic stuff here.
We've got when wire-like things create RF. We've got we've got when uh when wire like things create rf we've got
what rf people mean when they say dbm and we've got how to sort of characterize in a visual way
things that are happening with with these these circuits but um and so the deal with wires if i
understand this correctly is that basically when you whenever you have a changing voltage on a wire, given sufficient length, the differential in voltage on either side basically causes the electric field around the wire to do its wave thing and emit things, right?
Because of E and M.
Yes, because of physics.
Yeah.
So sometimes that's not desirable, and sometimes it is desirable.
And so we haven't talked about either case yet, but how do I, a moron software engineer, use these tools to say, oh, I have a problem?
Well, usually people ask me questions when
their radio doesn't work.
And other than that, they don't really care very much. Well, maybe
EMI testing, when they get a result they don't like
from the range, yeah, from the FCC testing.
And really the reason for the FCC testing is so you don't keep other people's radios from working.
But it affects more than radios.
I mean...
Communication, serial communications, for example.
But crosstalk on my ADCs is the place that I have been able to identify,
oh, this is an RF issue,
because it only happens when my radio is communicating
and my ADCs get all noisy.
Right.
Well, a typical thing is clocks,
because the clocks get into everything,
like crystal oscillator type clocks used for processors.
Because they're going up and down all the time and they have to travel some distance.
Yeah, and they tend to have a fair amount of current because they drive a lot of different
things.
And so keeping the clock line short and keeping the crystal just really prioritizing the layout of keeping that clock as close to where it needs to be as possible.
And not running it anywhere where it shouldn't go.
That's one of the main things you can do.
More of a hardware problem there.
The other thing with clocks is they tend to have really fast rise times.
Because that's what people want they in order to have a clean edge so that you know exactly when it happens you want it to happen quickly uh and so they they're pretty bad um the good news is is
that the clock oscillators themselves are a lot smaller now.
I just bought a little strip of some, and they're a little like 2010s or something.
They're just, or 2020s or something.
They're like, you know, really small.
They're almost like a little chip capacitor or something, except it's a whole clock.
And so it's much easier to put it closer to the IC now because it doesn't take up so much space.
So as Chris was saying, as a software engineer,
who's definitely not a moron,
how do I know that I have a problem?
You said that people will come to you when their radios are not working.
Oh, yes.
So they refer to connectivity problems.
Like, hey, I can't connect to Wi-Fi.
Or range problems. Like, hey, I can't connect to Wi-Fi. Or range problems. Like, it only goes 10 feet. It's supposed to go 100 feet.
BLE is supposed to go all the way across my house to do um much of it is in hardware there's a few things in in software um there's the drive strength of pins do you ever
select the drive strength or is that just a pick thing no you have to do that on micros
yeah yeah okay you can't you don't have to necessarily some might right yeah and so uh the stronger
drive strength typically means it's going to go faster on the edge and so you're more likely to
have that condition where the line is you know is you've got a different voltage on each side of the
wire um and so that's um that's something you can. So use the weakest drive strength that works.
And that can also be related to your external pull-ups, right?
Yeah, if you don't have enough drive strength, you have to use a larger value pull-up, and it'll be slower.
I see, but I often do want to have some drive strength.
For example, if I'm using my processor to drive my little motor, which you shouldn't do.
Yeah, don't do that.
Or even an LED, and I am changing the frequency because I'm PWMing it or something.
And so there's reason to do it.
Yeah, PWMing an LED, that's a great way to make interference.
Really?
Because you've got a nice long wire going to your LED, you know, so you can put it up in an interesting place, somewhere that's interesting to the user, you know, not buried down on the board.
And you have, well, you know, 4 or 5 milliamps probably, or maybe even 20 milliamps of drive current.
And you turn it on and off as fast as you can.
It sounds great.
Sounds like a radio to me.
You don't really need all that much for a radio, do you?
I mean, when we're talking about like the basic radio circuit,
it's, I mean, it fits on a t-shirt very easily.
Oh, yeah.
A transmitter?
A transmitter is much easier than a receiver.
Yeah, the transmitter is really simple, and the receiver is a transmitter plus a few parts for the receiver it's it's got it's about a receiver is about three times
as much stuff as a transmitter but you can make a decent transmitter with one transistor
um uh you can do better with more but um You can make a transmitter with a wire and a spark gap if you want.
Yeah, you could have zero transistors.
Yeah, you just turn your car on and you're ready to go.
Yeah, so, but when you do that, you take the whole spectrum.
Sure, sure.
Who needs it?
I guess the reason I brought up that radio circuits are really, really easy is that it's easy to make an accidental radio.
Because they are such simple circuits that if you aren't familiar with what they look like and you put your pieces together like that,
you're making a radio, whether you meant to or not.
Yeah, and it's easy to make an accidental antenna also.
And an example of that is a slot.
Because if you have, say, a ground plane with a slot in it,
and it has current going across the ground plane,
and then that current has to go around the slot, that is just as good an antenna as a wire that is the same shape as the slot
with that current on that wire.
What?
Okay, so...
Slots and wires are the same thing at RF.
Yeah, it's really weird.
I feel like we're inverting material things now.
We can't invert protons.
They don't make electrons.
Basically, edges are bad.
Physical edges of things. Well, I i mean i'm so used to thinking okay if we're gonna have rf problems you put a bunch of ground planes in there and now you're telling me i'll just don't put holes in
them right don't make any cuts in them just make them perfect so if you want to look at somebody's board and do a little critiquing for your RF problems.
What you can do is you can just ask the question, oh, this is a great board.
Hey, is this the little clock right here?
And so you first find the clocks and then admire the wires that are connected to them and see that they're all nice and short and that there's nice capacitor nearby.
And then, you know, compliment the person on how nicely they did the clocks, if they did.
And then you hold the board up to the light and you see if you can see through it.
You know, where it's kind of looks kind of green, you know, kind of so you can kind
of see a green glow through a circuit board if you hold it up to the light, unless it's
all covered with a ground plane.
And so if you see a slot on the board, that's that's OK.
Well, how about that slot there?
And if there's wires going across the slot, that's even worse.
The worst would be a clock wire going across a slot.
And this is for when you have multiple planes?
Usually, yeah.
Usually, yes.
But sometimes you'll just see it on two-layer boards.
Like, a good way to make a slot is you just route, you know, they need to clear away the ground plane to put down an IC.
Like if you have a ground plane on the top layer of a board and they just cut out where all the parts are.
That's a pretty common way to make a ground plane.
Actually, you end up with holes wherever there's a part on the top that needs to be soldered down.
And then you'll have a clock.
Say one of those parts is your processor with a clock attached to it.
And so it has a wire going right across that slot.
And now you have a really nice radio.
And so if you see that, you say, yeah, nice radio.
Hand it back to him.
So, yeah, that's what you can look out for. But if, if all the wires and all of the changing signals are all radio radiating RF and, and slots cause RF and wires cause RF and how does anything ever work?
Well, fortunately we have multi-layer boards.
We have more than two layers.
Without that, we would be in a lot of trouble.
That's funny.
Somebody was trying to convince me that everything was going to go to two-layer boards.
And I was like, I don't think so, but sure.
Well, you can, and you can get everything to sort of cancel out and do a great job.
And people will do, you know, in consumer electronics or whatever with two-layer boards, and they'll spin a circuit board many times, you know, more than 30 times and test it for, you know, all these RF problems every time and then, you know, make some little tiny adjustment to the circuit and do it again.
So it's possible to make it good.
It's just not likely to get first pass success.
Unless you have really fancy CAD tools.
But if your CAD tools are that fancy, you can probably also afford a ground plane.
And,
and you also,
you learn why you need one.
And so you sort of give up on the two layer thing, unless you can route it really in one layer and you can have one solid
ground plane.
That's what I do with the guitar surface mount designs.
Whenever I can,
there's a solid ground plane on the bottom and everything's routed in one layer on the top, along with the parts surface mount designs whenever I can. There's a solid ground plane on the bottom
and everything's routed in one layer on the top
along with the parts. Works great.
And then do you put
a coating
over the bottom
so that it's not just bare metal?
Well, it's solder mask.
So it looks green.
Yeah, okay.
Okay.
Well, it looks purple because they're osh park boards but yeah
do you use osh park boards for the bass uh working with the bass what was the company again
oh alembic um makes the um basic bass instruments and guitars. And they have active electronics inside.
That's sort of their specialty is they kind of invented that.
They put op amps in the guitars back in the 1960s.
They actually used the first...
They were actually these very exotic military ICs that no one else could get, but they found a source of them, of the actual, the Rejects actually is what they used.
And the specs were slightly off for the military application, and so they would put them in guitars.
And then that, they're still at it, 50 years later years later i'm sorry i do have more questions about
antennas um okay i know that to make an antenna you want it to be about the same length as a
wavelength or maybe a half or a quarter but some something like that. But for BLE, it's 2.4 gigahertz is the
frequency. And if I divide by the speed of light, I get that that's 12.5 centimeters.
And that's not huge, but I have AirPods and they're like two centimeters long max. And I can't think that that's all antenna.
So how do antennas work if they aren't what I think of as an antenna?
Well, the AirPods are slightly larger than that.
Actually, I think they're 33 millimeters or something like that.
Yeah, that's the bottom part.
And then lambda over 4 for a monopole is just a little bit under that.
You can make antennas a little shorter.
An example of something you can do is you can put a hat on the antenna.
A top hat? A beret? What kind of hat?
Top hat. to put a hat on the antenna top hat a beret what kind of hat top hat and it's usually either a ring
or a bunch of rods sticking out or some sort of plate and uh that's that's one way to do it um
so it's like putting a capacitor on the top and it in effect shortens the antenna. Also, if the material is inside a dielectric, it slows down the speed of light.
And that shortens the antenna a little bit.
So, like an antenna inside of a capacitor?
Well, yeah, the plastic has some dielectric constant.
Oh.
Three or something.
And so, the speed of light is slower in the plastic.
It doesn't help as much as you would hope,
but it helps some.
It could also be that it's a loop antenna and loop antennas don't have any
wavelength dependency at all.
Does the loop have to be a circle or can it be any,
an oval or maybe just a square could be a can be a crazy shape
round is nice though they are independent of wavelength i believe it is a squared f squared
so you take the area of the loop and you square it and you multiply it by the frequency
and square it and you get an output that's proportional to those. And so a little loop works better and better at higher frequencies.
Right.
And more area is always better.
And so that works, that works pretty well.
You can also tune an antenna with external parts.
And so we would, we would put it down on the Smith chart,
uh, the end, a plot of the antenna
impedance and we would say where the where the impedance um is is real that is that's where the
antenna sort of resonates and that's where it um the real part is is the part that's gonna actually
do the radiating if it's a transmitter or the receiving if it's a receiver
and so it you can move that spot around by putting parts in series or in parallel with it
and tune it and so that's the thing called antenna matching so
you hear rf guys talk about matching and that's what they're doing they're adding parts to
manipulate the impedance to get the little that that the one frequency that they're transmitting
they want to move the change the impedance to something that's it's on the real axis instead of some imaginary thing
so that is matching and tuning with external parts now the challenge with tuning an antenna
is that you lose bandwidth when you do that and that is to say that if if we want to say change
the wi-fi frequency because there's some band some band of frequencies around 2.4 gigahertz, if we need to change that a little bit and the antenna is too narrow band, what happens is the signal starts to go away because we're no longer at a resonant frequency at that different Wi-Fi frequency. And so the way you can deal with that is,
one way to deal with it is to use a variable impedance part.
So you can have an electrically controlled antenna
that's tuned with an electronically adjustable capacitor,
which is usually implemented with a diode.
And when you do have that type of a
diode is called a varactor uh and so you have a varactor tuned antenna it's a real fancy way to
do it i actually made an fm antenna that worked that way once and it was very compact i needed
you know fm antennas if you do your lambda calculation for a dipole, you need, what, I don't know, six feet or something, right? Right.
To make a dipole.
And so, mine was only a few inches long, but it was tuned.
But it wasn't very broadband, and so I had to use varactors to tune it in.
So, it had to be, for every different FM station, it needed a different voltage
adjustment on the antenna. For BLE, we want a broader band because of frequency hopping?
Yeah, with BLE, yeah, we probably don't get a frequency hopping antenna,
although you could make one i suppose um that would be
pretty fancy uh maybe they did though who knows you know it's i don't think so they have engineers
but i mean that would be one reason why we don't want the bandwidth to be super small we we want
the bandwidth to be large enough so that the antenna can work for all of the frequency hopping
frequencies you would like that, yeah.
You would like it to work that way, sure.
Yeah.
But who knows?
Maybe you should prototype that and get a patent on it.
Sounds good.
Frequency hopping antenna.
It's probably already been done.
Actually, I know it's already been done.
I actually know the patent.
Okay, one more question about antennas.
I remember in school learning some of what we've been talking about, although not Smith charts.
Those are pretty cool.
But antennas were, I mean, there were like Yagi antennas, which had a different design than the straight antenna.
But now there are a whole bunch of different kindsagi antennas which had a different design than the straight antenna but now there
are a whole bunch of different kinds of antennas is it just that we're learning more about how to
make them or is it just people are making pretty things and not caring about bandwidth i like the
ones that look like trees yeah those are really cool and a lot of that's decorative, but you can make like fractal antennas.
And I've seen people talk about using genetic algorithms to design them.
The funny thing is, it's like a dipole is not a particularly great design.
It just happens to be the standard that everybody compares everything else to.
So people talk about antenna gain.
What do you mean by gain?
It's not an amplifier.
It's an antenna.
Well, what they're doing is they're comparing the signal that you get out of the antenna that you're talking about to a dipole.
And you're saying, well, it'sdb better than a dipole when you when you aim it exactly right
it's 3db better than a dipole for the same size uh and so or the actually could be a different size
and so that's what gain means for an antenna there There's no, as far as I know,
there's no theorem that says
what the limits of antenna gain are.
You can make a dish,
and a dish is pretty good,
but it's extremely directional, right?
So it's got a huge amount of gain
in one really narrow direction.
So you can think of that as sort of like bandwidth,
but for
a direction, like directionality. So, you know, if the wind blows a little bit, it stops working.
So that's another type of antenna. And they make, you know, synthetic aperture antennas where the
antenna is really just in
software um because it's really an array of things and you use some fancy matrix math to
sort of make a virtual antenna um or you can i like the idea of using genetic algorithms
and that's where you see the antennas that look like little bent up paper clips
yes yeah i've seen some microwave boards that i think somebody
posted randomly like look at this board and it's got all these weird things and little little you
know almost like bernoulli pipe things where things are stretching down and then it's very
strange things yeah now those a lot of those would be just microwave components yeah okay right right uh like couplers and
splitters and and filters and so forth matching networks because you're basically existing in rf
so just different shaped wire are components exactly yeah works great um and that's even
done at the on the ic level you know inside of ics then so there's software for that uh design software for microwave
things that help you with all those shapes uh so so we talked earlier about uh you mentioned
working for alembic uh helping them with stuff what exactly do you do for them and can christopher
have a base yeah just send me a free alembic. One of the most expensive basses known to mankind.
You know, their tagline was beyond custom, which was why I knew I couldn't afford one for you.
Well, they're not all terribly expensive.
Well, yeah, they are.
They compete with their used market. And so so very often you could find a used one
uh now a lot of the used ones need work um which is why they're being sold is there's some problem
with them and usually the worst problem is someone tried to repair them with a big old well or
soldering iron um and messed them up uh or some of them are there's you know just
corrosion right because 50 year old electronics is you know it's seen it's seen a lot of things
you know maybe it spent time in hawaii or maybe you have an active base and you left the nine
volt battery in it for a year and it leaked hmm yeah that could happen um so uh what they had a lot of um uh custom
wiring inside and so what i've been doing is making just little circuit boards for them
uh to hold their um parts down and some of them are through hole and some are surface mount the
surface mount stuff is new for them um they've typically had of them are through hole and some are surface mount. The surface mount
stuff is new for them. They've typically had everything in through hole. And so making
something reliable enough in surface mount is actually a challenge because it's actually
easier to make high reliability circuits in through hole than it is in surface mount.
And one of the things that you can do in surface mount
that's nice is um emi shielding so they go to a lot of trouble to have good emi shielding they
use a lot of copper shielding and also silver paint inside this really high quality silver
paint and they have various you know chunks of metal like brass
plates and stuff as needed so those are all you know to keep things like cell phones out of the
music another big challenge these days is lighting because the trend in lighting on stages is, since the lights aren't hot anymore, they're now much closer to the musicians.
They're just a few feet away, instead of being a spotlight 50 feet away that was making all kinds of EMI, but nobody cared because it was far away.
Now they're five feet away, and they're run with pulse-width modulators, and it's terrible.
Have you run into that uh i've not been on stage with closed lights in a long time but there's also leds in the fret
board what yeah yeah they put leds no no don't do that no i'm not on board and on the side they're they're really good for the what they're really
for is when you're on stage and they start the show in the dark oh that's cool all right sure
and you've got to play that first note and you're supposed to know where it is you fret it you fret
it while you're running on stage see i don usually, most of the live music I played is drums,
and you know, I could do that.
You know, you're just hitting things.
As long as you hit something, you're fine.
Is that how drums works?
The problem with guitars is,
like we've been talking about RF stuff,
guitars are, the design of guitars,
they have these magnetic sensors embedded in them
that detects movement of strings,
which is basically detecting extremely minute magnetic field changes.
So they're really, really good at picking up all this crap
that you don't want them to pick up and then coupling it into audio.
Yeah, that's kind of how they work.
And so there's a couple of things to do about that.
One is the idea of,
um,
humbucking,
uh,
where you have one pickup that doesn't have a magnet in it.
Um,
uh,
is one way to do it so that,
uh,
it senses the external field,
uh,
without sensing the string.
And then you subtract that off.
And then you put that into your op-amp
circuit to cancel out
the
interference in the pickup.
And so
they put that whole thing
in a test fixture
and adjust it
because all the instruments are custom pretty
much or beyond custom uh they uh they all have slightly different characteristics and they need
to be tweaked in to uh cancel out the fields versus frequency so you got to get all the frequencies uh canceled out
so that's a that's a challenge there um and they wind their own pickups
which is really cool uh so the way a pickup works is there's a permanent magnet
and the permanent magnet magnetizes the string on the guitar. And then the string moves relative to a coil and induces a voltage across the coil.
And then that voltage goes to either directly to the amplifier or through a buffer and tone circuits and then off to the amplifier. And the buffer and tone circuits, and then off to the amplifier.
And the buffer and tone circuits are usually a couple of capacitors and stuff.
It's very simple on some guitars.
Yeah, the passive ones in particular, they're very simple.
The alembic ones, they're...
Right, active is more complicated.
They're active.
The circuits are not what I would call real high complexity, but there's not a lot of room in there.
And I thought, well, with surface mount, we'll solve that problem.
We'll be able to add all kinds of complexity.
But the challenge is that these are all custom instruments.
And so the circuit boards are all in different places.
And so if you make one circuit board, it's got to fit in all the different models that they ever make.
And so they need to be pretty small.
Otherwise, they tend to run into each other.
Okay.
I have one more question about bases while I've've got you here i have several bases sorry i'm holding apologizing to alicia for having several uh i think they're all all of
mine are active yes um and they all take nine volt batteries to run the active circuitry although
one of them takes two nine volt batteries and runs at 18 volts why do they run at such why do
the that that why does that circuitry run at such high voltage?
Is it a particular reason or just it's a convenient battery?
Well, it is a common battery and you can get it.
And it's pretty lightweight for its voltage.
But it doesn't have a whole lot of charge.
So it is a challenge to get them to last.
Now, they don't have
a big duty cycle, so they don't
worry too much about
the battery might last a
few days of
playing, or 20 hours
or 40 hours or something.
They actually draw a little
bit more current
while you're playing than if you just leave it on just a little more.
Um,
well,
if you leave it on,
if you leave it plugged in and don't play,
they will drain.
Yeah.
If you unplug it,
then it doesn't do anything.
Well,
it's self discharges,
right?
It,
but,
and while you're playing,
it's,
it's maybe,
I don't know,
three or 10 times as much current as not playing and just leaving it plugged in.
So, nine volts is pretty good.
With an op-amp circuit, you can swing about three volts RMS as the maximum signal you can get out of it sort of um you know going rail
to rail uh and now you would like to have a good signal to noise ratio okay uh and so
how much noise do you think like if you just hold all the strings on the bass, how much signal do you think is coming out?
I don't know.
A couple hundred millivolts?
Well, that's while you're playing, right?
But if you just, that's if you bang all the strings at once.
If you dampen all the strings and hold it as still as you can, how much signal is coming out?
Depends on if I'm pointing at my lights,
my overhead lights here.
Or if there's something else causing a resonance.
Yeah.
You tend to get hum and hiss, right?
Are the two things that you notice.
So the hum you can take care of with this humbucker thing.
And so that's nice to have that as a feature
um the hiss and and one of ref noise the popcorn noise and all that that um
well let's say that was one millivolt that one millivolt then would be is 60 db below a volt uh and it's uh let's see a factor of three that's um
what uh another 10 db or so and so you're looking at a dynamic range between your loudest note and
your softest note of like 70 db or something which is like 69 db more than you need for rock music
well but when you stop playing you would like your instrument that's true that's true okay
i don't know i've heard some of the metal it doesn't ever stop well that that is certainly
one way to do it and and if you have inexpensive instruments, that is perhaps the preferred way to do it.
But if you're making a studio instrument, your recording engineer would appreciate it if you had a signal-to-noise ratio of 90 dB, maybe, or 100.
Would be really good. And so, well, if I had three microvolts of noise,
that would be 120 dB of dynamic range.
And that's, for Alembic stuff,
that's kind of what I shoot for, for a minimum,
is about 120 dB.
And I'd really like that number to be 130, if possible.
That's a fair number of orders of magnitude.
Yeah, and it's starting to get down into the thermal limits of the physics of, you know, what you can do.
To me, the limit should be the physics of it, not because, you know, my circuit isn't as great as it can be.
Well, and that's just what's in your
hands i mean once it leaves the base it's going to go into a preamp and some other stuff that
also has to be very clean and expensive to be quiet um but yeah yeah i'm assuming that
people are plugging it into a low noise studio yeah um and and that they want to play real soft
because the other thing is,
I'm comparing everything to three volts,
which is like hitting all the strings
as hard as you can or something, right?
It's like, that's a huge signal.
And so in reality, you play 20 dB less than that at least.
That's your 300 millivolt number.
You were talking about 100 millivolts, right?
It's being sort of a kind of normal hitting it. um that's your 300 millivolt number you're you're talking about 100 millivolts right it's
being sort of a kind of normal hitting it um and so that loses another 20 or 30 db there so we're
really talking about 100 db of range then um and then maybe you run it through a compressor yeah
uh and that boosts the noise floor as well.
So, yeah, it adds up.
All right.
Before we start asking you more questions, I think we should ask you the last one.
Do you have any thoughts you'd like to leave us with, Tom?
I do.
And that is, if you can't figure something out, you should draw more pictures.
It's a really good way to figure things out.
And if you don't figure it out, at least you have a picture.
You can hang your failures on the wall.
Well, maybe you can get somebody else to look at your picture and make suggestions.
I totally agree with this advice. I can't tell you how many times drawing a picture has shown me where my problem was.
Our guest has been Tom Anderson, engineer at Keysight Technologies.
Thanks, Tom.
This was fun.
Thank you.
Thank you to Christopher for producing and co-hosting.
A special thanks to Tom because he pitched in at the last moment.
And of course, thank you for listening.
You can always contact us at show at embedded.fm or hit the contact link on Embedded FM.
And a quote to leave you with from Albert Einstein.
If I were not a physicist, I would probably be a musician.
I often think in music.
I live my daydreams in music.
I see my life in terms of music.