Embedded - 379: Monstrous Cable Corporation
Episode Date: July 8, 2021Tom Anderson (@tomacorp) joined us to talk about floating pins, ADCs, and teaching and learning things. Tom mentioned Horowitz and Hill’s Art of Electronics and the vintage books on TubeBooks.org. ...Tom wrote about  JFETs and vacuum tubes and Power Supply Filter Design for PCBs. He recommended the TI app note on floating inputs and a power supply book: Modern DC-to-DC Switchmode Power Converter Circuits. You can fine more of Tom’s writing on Medium and the Tempo Automation blog. Other books: Practical Handbook of Curve Design and Generation and CRC Standard Curves and Surfaces Analog Integrated Circuit Design by Johns and Martin Analog Circuit Design by Jim Williams Other Vintage Books: Abramowitz and Stegun Handbook of Mathematical Functions (Applied mathematics) Typical Oscilloscope Circuitry by Tektronix Radiotron Designer's Handbook (TubeBooks.org) Dynamical Analogies (TubeBooks.org)
Transcript
Discussion (0)
Welcome to Embedded.
I am Alicia White alongside Christopher White.
This week we're going to talk about the things we wish new college graduates knew
and the things we wish we knew when we were new college grads.
Tom Anderson will be joining us to discuss the hardware side of things.
Hi Tom, are you doing?
Hello.
We're going to treat this kind of like a panel.
What?
And so, Tom, will you introduce yourself as though you were on a panel about new college grads and what they should know for engineering work?
Sure. My name is Tom Anderson, and I work for a test equipment company that keeps changing
its name, but I'm not here on behalf of Keysight today.
I'm just speaking for myself.
Okay.
We usually do lightning round where we ask quick questions.
We want quick answers.
But lightning round went on summer vacation without telling us.
Where'd it go?
I don't know.
Probably someplace very sunny.
It did leave one question for you, though.
What is your favorite component and why?
Oh, I like the inductor.
And maybe it's because most people seem to have trouble with them.
And I learned how to wind my own coils a while back and how to figure them out.
And I think they're fun.
What does an inductor do?
Obviously, it inducts.
Is this how you get to be in Hall of Fames? You get a lot of inductors?
Well, in some sense, it's the opposite of a capacitor. It's like a capacitor except for current. And so, if you think of a capacitor
like accumulating charge, the inductor accumulates current. And I always think of it as spinning.
The inductor stores the spin, but it's really acceleration of charge is what it's
really storing but since the electricity flows in loops when you move something in a circle
it's accelerating towards the center and so that acceleration stores this this energy in it and as
the things go round and round it it stores up a bunch of energy. And that's
that one half Li squared thing that is the equivalent of one half CV squared in a capacitor.
And you also, you get a differential equation that's pretty cool. They're great for a little
switching power supplies. They make the little DC to DC converters efficient. They're a handy device,
and you can resonate them. The other feature is you get them for free with every component
that you buy. You get resistors for free, don't you? Yeah, but they all come with a little tiny
inductor and a little tiny capacitor, more than one little tiny capacitor as well.
But the inductor is the really fun one.
And even if you get a capacitor, it's got a little bit of inductance.
And so that tends to cause problems.
And that's where I like to work is in those little regions where you start to get in trouble.
And you have to fix things.
Darn magnetic fields.
Electromagnetic fields.
They don't like to just be one or the other.
Well, it's just shift between them that's the trouble.
Okay.
So, we got a long email from Mike,
a professor who'd like this show to be homework for his class.
And he wanted us to talk about all kinds of things,
and mostly the challenges of engineering life after college.
Is this going to be on the test?
This is the test.
Thank you for joining us.
You did this voluntarily.
Okay.
Mostly.
Okay, so let's start with the easy stuff um about pins because a lot of people when you take the micro controller class you hear about gpio pins you and you you work on
an arduino you know pin up pin down but there's a whole lot more to it. And I think floating is where people start to
realize it's not as simple as it looks. So, what does floating mean when it describes an I-O pin?
Hmm. Well, can I say it's complicated and it depends?
Of course. That is the traditional answer for all experts. Okay.
A floating pin is, well, typically it's not an output unless the output's turned off.
So it could be what's called a tristated output where you say, please turn off this output.
I don't want it to be either a 1 or a 0.
I'm going to let something else control this level.
Or it could be an input that doesn't have anything driving it, like another logic gate.
And that's usually where you get in trouble with floating inputs.
And they are trouble.
Most things don't like to float, except when they do. Microcontrollers usually have inputs that can tolerate being floated or floating.
They have extra circuitry, either a pull-up resistor or pull-down resistor or something else,
that means that you don't have to drive the pin.
Pull-up and pull-down resistors tend to burn up power,
and so it's not great in a battery-operated system.
And so they actually have a little transistor circuit that can hold on to the pin for you.
The problem is, and what you run into with things like little simple logic gates,
is when you have an input, say, to an inverter or an NAND gate or something, and it's floating,
it can float to a weird voltage that's in between a 1 or a 0.
And what happens is at that input stage, there's a transistor going up to the supply,
and there's a transistor going down to the ground.
And both of those transistors can turn on a little bit at the same time. And that can cause a bunch of current to flow through that input.
And the chip can get really hot when that happens, particularly if there's a lot of gates in one package that are all floating.
And so if you have a floating input like that and you want to test it, you know, you're sort of walking.
Like you notice that there's a lot of
power coming from your power supply and so you want to figure out which chip it is what you
should do is you should lick your thumb before you press it onto the chips because one of them
is going to be really hot um and it can even latch up uh which is a case where the current just keeps flowing. And even giving it a logic level
won't even save it. The transistors won't turn off. Most IC manufacturers don't like to admit
that their parts latch up. But you kind of learn which ones do. And a lot of them do. The cheaper ICs often have latch
up problems. And kind of what you're paying for in a premium chip a lot of times is
something that won't latch up. Latch up is, it's actually
an SCR. There's a parasitic SCR. What the heck
does that mean? There's extra
transistors that we hope never turn on.
They're inside these CMOS chips.
When they do turn on,
there's no way to turn them off.
They latch.
And SCR is kind of a latching transistor.
So the only way to turn them off
is to shut the power off.
And then you can turn them back on.
And if you haven't burned out the chip, then they're fine. only way to turn them off is to shut the power off uh and then you can turn them back on and if
you haven't burned out the chip then they're fine they don't um they don't keep conducting after
that uh and and they happen when you put too much current through a pin so that's one of the failure
modes when you have a pin and you ask for too much current sometimes uh you can get that state where
it latches up and so if you're trying to do things like you drive a little servo motor
directly from a pin of something that is maybe just a logic gate,
and you say, yeah, but it can put out 20 milliamps,
and my servo only takes 45 milliamps or 50 milliamps,
so I can probably get away with it.
Well, you might get a latch up, and then it'll work just fine until your demo,
and then it latches up during your demo and gets hot, and it's very embarrassing.
I remember from my first job where I had to deal with microcontrollers or pins and things directly,
the EE had all sorts of other terms that he threw around, open collector and open drain.
And those went along with tri-state, I think.
I cannot remember what they mean.
I knew what they meant.
Hi-Z was a good one for me.
Hi-Z, which is tri-state, I think.
Yeah.
Does anybody know what open drain and open collector mean?
I'm sure that Tom does.
I'm sure he does, too.
I do, actually. So, in your old school transistors from a while back, they were open collector because they use bipolar junction transistors, which have collector, base, and emitter instead of drain source or drain gate and source.
But they're fundamentally,
they do the same thing.
The base or the gate provides the control.
And the typically in these things,
when you talk about open collector,
it means they were open drain.
It means they grounded the source or the emitter.
And so what that means is that there's nothing pulling the output up.
It's only pulling the output down.
Right, okay. Yeah, I remember now.
So you have to hang a resistor on it or something.
You have to hang a load on it if you want to see it on a scope.
Otherwise, it just pulls current.
And in fact, you can think of like a switching power supply or something.
You might put an inductor up there.
And when you do, you need that reverse diode.
Like say you're driving a relay with an open collector.
That relay has a coil on it.
Hey, my favorite component is in a relay.
And so when I pull down on that collector,
well, one end of the inductor or the coil,
I put on the power supply.
And the other end of the coil,
I put on the open collector output. And when I turn on that gate,
it does, it's actually the logic low state.
And so on is at a zero.
That's inconvenient, isn't it?
So I turn it on and the current flows from the power supply through the coil and then through the collector or drain of the output stage and it winds up the energy in the coil and that makes a
magnetic field and it pulls the switch when that when i turn that stage off there's all this energy
in the coil and it's got to go somewhere uh what happens is uh when you when you open circuit a coil that has current flowing in it, that current wants to keep flowing.
And it will.
And the voltage will rise across the coil until it finds a path out.
And that path could easily be destroying your output transistor.
And so what people do is they put in a diode that dumps that current back into
the power supply. So there's a diode pointing from that collector back up to the power supply.
And so that's another pattern that you'll see is when you're driving a relay is you'll see this
diode across there. And if you don't uh the circuit will work um for a little while
until your demo um and then it fails when i started in this industry i seem to recall
that micro controllers didn't have those diodes on every gpio and most chips that I work with now seem to. Is that right? Are we getting fewer latch-ups
because the chips have more built-in surrounding the GPIOs? Well, you'd like it to. I think some
of them are pretty good, and some of them are still pretty fragile. It depends on part sort
of what the application of it is and
how good a job they did and what process they use, you know, what's available in their process
and how much energy are we really talking about. In these coils, it's quite a bit of energy.
What they're better at now is ESD. Oh, yes. Good old electrostatic discharge. And that's really
what those diodes are for mostly in general you
don't want to turn those diodes on if you can help it um they don't like to be on a lot they can be
i mean in some cases there are reflections that happen where you send a signal down a line and it
reflects off the end and comes back and you get a pulse that turns on those those diodes but that's actually
pretty rare um because microcontrollers are usually in pretty slow circuits so it's less of
a problem and their traces aren't too long because you used a microcontroller and put it close to
your device so that that helps as well but forD, there are plenty of things that still really zap stuff.
One of them is machine ESD.
So they have the human ESD everybody's familiar with.
You touch it and it zaps it.
And there's a model for it people use.
I think they charge up a little tiny capacitor to 1,500 volts or something.
And that's supposed to represent somebody static zapping it,
um,
which is a level you can't even feel really.
Um,
and so the,
the zaps are pretty much invisible.
Uh,
if you really get a wallop to something,
it's,
you know,
more like 10,000 or 15,000 volts.
Um,
you know,
if you get out of a new Honda,
uh, for some reason hondas just have
amazing esd buildup there's something i don't know maybe the tires are really clean or something like
that you can get just huge huge static zaps and so it's really the machines that give the biggest
esd machine esd is just huge you know something like a vacuum cleaner, like a Roomba,
in fact, make huge amounts of ESD and they have to do a lot to control it.
I still have yet to destroy anything that way.
Okay. So we've kind of talked about what's inside, but I still want to do,
what does floating mean? Because we've gotten it depends, which it totally does.
But what if I had a power supply and it was driving a chip?
And I also had the power supply, I had another probe.
And I touched a pin that was floating and not connected to anything else.
If the pin was an input, now it would read high. And if the pin was an output, I could be,
and it was high, probably nothing was going wrong. If the pin is an output and it was low,
and I'm touching it with my power supply voltage, they're going to fight and maybe let
the magic smoke out. What about pull up and pull down in that case? Am I less likely to blow things
up if my chip is using a resistor to do pull up and pull down instead of driving it? I guess pull down, since I'm torturing it with power supply.
Okay, so in either a pull-up or a pull-down resistor case,
you're allowed to use some other device to pull it down.
The problem is if you have two outputs, I think is what you're describing,
and they disagree about what the direction is.
And that can happen even for a very small amount of time. That can cause a problem.
Even, you know, for nanoseconds.
And so a typical way that that happens is when you design something.
We used to have to design with RAM chips.
Remember that?
When we had RAM in our
systems? And it didn't just come as part of our controller. Yes. Yeah. Yeah. It was a separate
chip. And I had to work with that once. And one time I actually had RAM with no processor. And so
I had a little state machine that was controlling the RAM and it was running through a sequence.
It had a counter to run through the addresses and then I would grab data from it and I could read data from it and write data with a
little state machine. And so it had read write lines on it and an output enable. And that's kind
of a complicated set of things to control because there are several operations. You have your read operation,
which is mostly what it was doing, which was reading values out of a lookup table. And
the lookup table address was based on a counter, so it would just cycle through the memory.
And that was great, but I had to initialize that every now and then,
or change a value. And so it would have to do a write. And in that case, the thing that's
driving it has to change. So instead of the RAM chip driving, it was my IO interface that was
driving. But in my state machine, the line that switched between the two had a little tiny overlap of just
a few nanoseconds uh between and so for a few nanoseconds they were both trying to drive the
line at the same time both my io system and my ram chip and the ram chip was really fragile and so after it would work for about two weeks
and then it would fail um the ram chip would fail and the ram chips were expensive and uh they were
also very yes d sensitive so it was you know very unclear as to what was what makes it a ram chip
fail um but it turned out that it was my state machine. And what I needed
was a state machine that used a thing called a gray code, which is where you don't have any,
where you don't have two bits that you're controlling that change state at the same time.
And I think in FPGA synthesis now, when you make a state machine,
you can just check a box that says,
yeah, I want a gray code on that.
And it does that for you.
But at the time,
I had to redesign with these gray codes,
which was actually pretty complicated to do.
I can imagine.
Yeah, it's like,
I think it's a state machine where only one bit flips at a time.
So you don't have the thing like the carrier.
So if you want zero to one, that's fine.
But going one to two, you wouldn't do that.
You'd go one to three because you only want one bit to change.
And then you could go from three to two because that's a one-bit change.
So you can get to all the states, it's just you get there not by counting.
You get there by changing one bit at a time so that it doesn't have too much current effect,
which causes the rest of the system to behave unhappily. Well, it doesn't have the overlap where for that brief instant in time between the two codes,
like going from, if I'm going in state from one to two,
I'm turning off the first bit and turning on the second bit at the same time.
But for a brief moment in time, I may actually visit state three where both of them are on. And that would be the problem.
Okay. So, what else should we talk about with IOPINs? What else do people coming out of college
believe that maybe we should alleviate them of that misconception.
Well, I'm not sure we got through the floating, actually, if I ever answered your question.
The floating is when the chip itself doesn't have any opinion about which state the line should be
in. And so, it's not driving or sucking up any current.
I was going to say that's the opposite of driven.
Driven means someone cares and they're putting energy into making it one or zero.
Right.
And it might be a very small amount of energy, like in a pull-up or a pull-down that has a very large value.
So it just barely pulls it up or down anytime a chip is is driving an output does that mean somewhere there is a pull up or pull down or is it there a way to drive an output without
having a resistor well that's where the the c and cmos comes from it's complementary which means it
has both p channel and n channel N-channel transistors,
and the P-channels pull up and the N-channels pull down. There's other logic families. Some of them
don't have both directions, like P-MOS only pulls up and N-MOS only pulls down. And then there's
other logic families that are used for high-performance applications that you hardly ever see in school.
Some of them have pull-ups and pull-downs, and some of them don't.
Microwave stuff, in general, is all N-channel because the P-channel devices tend to be slower.
Okay, so back to my question. If I have a chip and I say I want it
to have a driven output, does that mean that somewhere in the chip it's connecting me to
VCC, or does that mean there's a pull-up? Well, the pull-up is turned on and off.
Okay.
It's a transistor.
And so that's the PMOS transistor that pulls the signal up.
You could use a resistor to do the same thing, but it would take up power.
Whenever the line was low, there would be some power being burned across the resistor.
And so the clever thing they
did with CMOS is they have one transistor that pulls the signal up and one that pulls it down,
and they're both not supposed to be on at the same time, although they are very briefly. And
you get a little tiny pulse where there's current from the plus supply to the minus supply, you wish that was zero because only
one of those transistors is turned on at a time.
And so if you can maintain that, then it doesn't use any static power.
It can just sit there and you don't use up any current from the supply, but you're still holding the line
high or low. One other thing about outputs is that they have current limits. I mean,
I usually think about outputs as just logical signaling things, but you can drive things with
them to a certain extent on certain chips. If you look at the data sheets, they can source certain
amounts of current. So knowing that your limits there is also probably important you
don't just hook up random things you want to drive and don't hook motors direct to your chip you'll
regret it well but that's where the fun is it's so fun to see the little servo wave the little flag
around right hanging off the arduino pin for a few minutes um until it's not but uh then you just use a different pin
because you burn that one out until you burn that one out that's why you get the one that's
where you get the big chips with lots of lots of pins so you can burn them out sequentially
why they give you more than one gpios yeah yeah um and you can add another transistor to it or
it it helps a lot to put that diode in i talked about earlier because the
motor has the same problem as the coil and then it stores up this energy uh in the coil and it
needs to dump it out and that's if you put a diode um from the output so the little arrow on the diode
is pointing from the output up to the supply, then it gives a spot for that
current to flow. And most chips can do about 20 milliamps. And if you have multiple,
if you have devices in one package and you're careful, you can parallel the pins
and get more current that way. So for example, you can have a pack of inverters maybe you get six inverters in
a pack and you can put them all in parallel and drive you know bigger stuff um it's not a great
way to do it but it does work so if i want 120 milliamps to go to my motor i just use five pins
all at the same time is that what you believe the number would be six six but yeah
i chose that because he said six and then i just got it wrong
um in principle yes uh in practice the power supply pin also has a limit and so you have to
obey whatever that is um because all that 120 milliamps has got to come through the one power supply pin.
So that's the limitation of that approach.
Yeah, but I have seen it work to great effect where people paralleled a couple of things, usually because they wanted something not really so much power for like a motor or something.
They just wanted a lower output impedance so you put them
in parallel and the output impedance goes in half and that's that's kind of what you're getting at
with you know how much current can you drive another way to say that is what's your output
impedance and so if i take a five volt logic chip and i short the output to ground, how much current do I get?
And so let's say I got 50 milliamps. I could say, well, my output impedance is therefore
V over I equals R. So that would be 5 volts over 50 milliamps. I guess it would be 100 ohms.
And so if I wanted lower, I could just parallel more of them. It usually doesn't come up because
usually people don't want to do that. But if you're charging up like a really small capacitor,
you can probably get away with it if you want to just charge it really quickly.
Like a line driver.
People normally use a line driver for that sort of thing.
That's what they're designed for is to have more output current.
Okay, to sum up, floating in IOPins means nobody is driving it
and it's not attached to a pull-up or a pull-down.
It is floating in the middle.
Nobody can tell you what the value is.
If it's an input, it may read zero, may read one.
If there's nothing pulling it or driving it, floating is floating.
And that is bad if you're trying to read it as an input that means something.
It's good if you want it to not be sucking a lot of power.
Well, it can be bad for power,
because if it floats to that magic voltage where both the input transistors are turned on at the same time,
because they're in a structure that's just like the output
with an N channel and a P channel.
And so if both of the N and the P turn on at the same time,
like they do in that little glitch
during the transition then it'll draw a bunch of current and that's not good and i've definitely
seen that happen and had that problem and so a lot of chips have a specification actually for
rise time they'll say make sure your rise time is quicker than some certain amount
of time. And the reason for that is they don't want to spend too much time at this funny voltage
where it draws a lot of current. So you need to be careful about that. Now, some chips don't have
that problem. They're designed to not have that, but it's something to look for. And they'll often,
there's not really a name for the specification that I know of, but there's often a graph of input current versus input voltage.
And you'll see this funny little shape in the middle. It's kind of a fuzzy shape.
And I think one of the reasons fuzzy is because the circuit also tends to oscillate at that
frequency. And in fact, there's a whole app note about this problem from Texas Instruments
on this floating input or rise time problem. And like a lot of things,
the manufacturer's app notes tell the long story because they're tired of having people call and
having to tell them the same story over and over again, they write it down for everybody to look at.
And so that's what you should look at.
I guess we can – you have references in the show notes?
We can put them in there.
We will reference that in the show notes.
Okay, so floating is not always a low current state.
Is Hi-Z different?
Yes.
The Hi-Z is an output and it is designed to not have both transistors turn on at the same time during that.
And it will happily sit there and float.
And Hi-Z means I am not participating. just pretend that there is no wire attached. Is
that kind of a mental model? Yeah, usually there's a little bit of current that can flow,
but not very much. And in fact, if you look at, say, an address or say a data bus,
which goes high Z every now and then because no one is driving the data bus,
you'll see the lines get really slow and you'll see these long sort of smooth RC time constant
things going through the, you know, in the graph on the scope. Have you ever seen that?
Probably, but I probably didn't know what I was looking at.
So it looks really weird.
Because you see all these ones and zeros in there.
And then every now and then things just get really smooth and slow.
Okay.
And so that waveform can spend too much time in this forbidden region.
Because it's driving other inputs that have this input current problem.
And so people put pull-up resistors on a bus to deal with that. But that would burn power. So in something like an embedded system or battery
operated system, what people do is they actually have a special chip that you can put on that's,
I think it's called a bus hold, I see, that keeps it from doing that. It keeps it either low or high based on
where it just was. So it's in effect
a little latch that sits there
and keeps the bus from
floating
on those
tri-stated outputs.
Okay, that's a new word.
Tri-state
means undriven?
Ah, yes. Yeah, When they're turned off.
When the output is turned off.
Hi-Z and tristate are the same thing.
Tristate, yeah.
There's different words for the same thing.
Like all good
words, there's so many to choose
from.
And the Z in Hi-Z is impedance.
Yes. Yes, it is.
Right. Because ZZ is impedance. Yes. Yes, it is. Right.
Because Z is for impedance.
Of course it is.
The invisible Z in the word impedance.
Yes.
Yeah, and you're ready for it to be a complex number because Zs are weird and complex numbers are weird.
And so we got a Z there.
I always think it's hilarious because audio interfaces, if you look at the one on the desk right in front of you there's a thing on the front that says high z for one of the plugs as if musicians
know what that means no offense musicians but but what what do they put the magnitude around there
no you know you need the little the little absolute value sign with the z in it you know to
it's the magnitude of the impedance that gets you.
Because, you know, at some frequency, it's low Z, right?
Yeah.
If you go to a high enough frequency.
Okay, so moving on from question one from Professor Mike, we only have about 45 more, so.
That's good, because we've got about 45 more minutes.
I'm torn between asking about ADCs because I know that you probably know so much more about ADCs or about how you figure out all of these details and all of this jargon without knowing. I mean, floating, Hi-Z, Tri-State. If we've learned about impedance and resistors and inductors and all of those things in school, how do we get to Tri-State?
Well, let me interject briefly. And then it's sort of overwhelming because we're talking about
everything all at once here. And that wasn't at least how I encountered this stuff.
It wasn't I just suddenly appeared as a software engineer
and somebody said, hey, do you know all of these
electrical engineering terms?
There was like one thing came up a week
and I could spend time understanding it.
So was that your experience?
Is it suddenly everybody was throwing out high Z
and floating and ADC this and that?
Or as you worked through problems, you encountered them individually?
Well, I got really good training.
And I think one of the benefits of working at a big company is that you'll find people there that know a lot of stuff and can teach it to you. Unlike, say, maybe a startup where there might not be
anybody else around who's got a lot of experience and time to teach you all the material. And so,
in addition to that, there were a lot of people hired at the same time that I was because there
was a big hiring boom at the time, which was really
fortunate for me because otherwise I probably wouldn't have gotten hired.
There must have been desperate.
So, so what happened was they even had a program for training people.
And so once a week we would go into a conference room and somebody who was an expert in oscillators or filters or amplifiers would get up
and just walk through it completely from a totally practical point of view and using the jargon and
the devices and the schematics of the type that were in our products so that everybody could get on the same page.
And so I was just really fortunate to have all that.
And I actually still have the notebooks from that,
and they're still quite valid.
So my fundamentals education was really strengthened by my work education.
And I really recommend that people get a lot of fundamentals in school,
at least from the point of view of, like, hiring.
You know, do you want to have – who do you want to hire?
Do you want people with, like, practical experience that have done a lot of projects
and are all excited about building things?
Or do you want people who are really heavy on the theory
and really understand the basis for how devices work
and how to analyze circuits?
And it's kind of a trade-off because you want people who are excited
and are going to be engaged about what they're doing,
but it's really expensive to teach everybody all the theory that
they need to go with it um it helps if you have a lot of people learning it at once like like
happened with me but um yeah it's it's difficult i i went into it thinking that i already knew
everything because i had built these projects and then i found out when I got there that I didn't know nothing, hardly.
And there were all these other people that knew so much more.
And so I just tried to absorb it as quickly as I could.
And that was really my main focus for a few years.
It's really tough because you and I went to, I think, the same large company, which no longer exists.
Well, it exists.
No, it doesn't.
Well, the same people are doing the same thing.
All right.
That they were when we were there.
Protect the innocent.
The door has a different name on it.
But really, it's, in my case anyway, a lot of the same people are still there.
When I go to the 40-year service award anniversary, if they ever have it because it was during COVID, but there's a lot of people that have been there for 40 years.
It's really the same culture.
The culture lives on from HP in Keysight, actually. The good part of awesome. But I did have people I high Z, that all happened pretty quickly.
Uh, cause they gave me a manual to read and told me what they wanted things to do.
And, and I had to, to figure out the words.
Um, and it wasn't easy.
It wasn't really like I couldn't Google for it because
Google was barely a thing. But even if Google was a thing, it was so many words. You can't
Google for the whole dictionary. And so classes like Thomas saying would be really helpful.
Yeah, no, no.
I just had a different experience because I went to a startup and I was already somewhat of a senior engineer.
You were a senior software engineer.
So I was a peer with the electrical engineer.
And so we worked through a design and basically, you know, over the course of time, I learned all of these things just kind of working with him.
So much different experience, but yeah. So if you're, if you're a new college grad and you're being dumped into a situation as a software engineer with maybe some microcontroller experience and you don't know all this stuff, it probably can be overwhelming. I was just trying to inject a little bit of don't panic because if I listen to this podcast as a new college grad, I'm going to get a little scared because I think Because I think we're talking about a lot of stuff here. Well, that's true.
Yeah.
And a lot of my job is actually teaching this stuff to people.
That is a fairly big percentage.
Not as much anymore, but for about 10 years, that's mostly what I did.
So, I think I've given some back.
And there's plenty of people to teach you this stuff when you get there, if you get to a good place.
That's maybe something to think about is when you're looking around, figure out how you would learn things.
You know the part of the interview where they ask, do you have any questions for us?
One of the questions should be, how am I going to go from a new college grad to a senior engineer?
And they should have a path.
And it shouldn't just be, well, once you've been three years in the job, you'll be engineer
and another three, you'll be senior.
It's not like that.
There should be some training.
Okay.
So my question was, do you want to talk about ADCs or do you want to talk about learning
things as we go along?
We can talk about ADCs, but I fear that it will be even much worse than the floating pins.
But we can perhaps brush on it lightly.
Okay. brush on it lightly. So different ADCs, I think the question, well, it was like,
what kind of ADC should I use and does it matter, right?
Yeah, and some of the real world challenges. And when we say ADC, we do mean analog to digital
converter. Right. So we're starting with an analog signal. And analog signals have this problem in that if you pollute them in any way, it's an analog signal you have to take great care to keep it well
shielded and um you know be careful that there isn't um interference coming from the power
supplies or from uh electromagnetic interference um you or even things like es, you don't want to get a pop in your audio from a static zap.
So the advantage of the digital is that you can clean up a signal after it's been digitized much easier if it's digital than if it's analog.
But more importantly, you can transfer a signal. If I want to send something six feet away, a shielded cable is likely to get noise.
But if I send it digitally over SPI or something, it's likely to arrive entirely intact.
Well, the digital part of it does um and whether or not you captured the analog part of
it depends on your on how good your analog to digital converter is um and also you can get a
really good cable uh is another way to do it uh triple shielded cables are um what we use in
instruments for that um and or even fancier cables are available.
But then the connectors, there's always,
there's always something with the cable that goes wrong.
Yes, there is.
Cables are, but there's digital cables too.
I mean, and they're not perfect either.
But yes, you're right.
Analog cables are much
more sensitive and much more expensive than digital cables. Although, if you look at USB-C,
it's actually got some very exotic coaxial cable in it. There can either be what's called micro coax,
which is this very thin strand of wire inside a shield,
and then there's another shield around it,
and there's more shields,
and it's a microwave signal
because the data rate is very fast.
Or they have what's called twin twin acts where they have a twisted pair
uh inside of a shield uh so it's like coax except instead of one wire on the inside it's two that
are twisted uh so yeah so digital signals can be quite sensitive um particularly when they get into
the higher performance systems.
And in fact, there's whole sets of test equipment just about that.
Do the gold cables really make a difference in audio?
I think, I fear we're way off track here.
Remember, we're talking about ADCs.
Right, okay.
Not low oxygen cables.
Focus.
All right.
Thank you for bailing me out on that one, Chris.
I won't get hounded by the big cable, monstrous cable corporation.
So, let's see.
ADCs, yes.
So, the different ADCs for different applications.
So if you're doing audio, you would use probably an audio ADC.
And you would look up in your book, you know, start with analog devices and figure out what you need.
And then maybe look for something cheaper if you can find it.
But at least you'll know that if it exists, they have it.
And so for something like an audio ADC,
it's totally different from the little ADC that's in your microcontroller.
They work in a different way, and they have a whole different set of problems and a whole different set of solutions for it. I mean, there are Sigma Delta ADCs,
and I don't know, I'm just going to make up words
to describe the other ADCs.
Do I care about that sort of thing,
or do I just care, can it sample in the range I want
and give me the number of bits I care about?
Ah, but the number of bits you care about is a deep question.
That is a very deep question.
And it's also things like, do you want to have a multiplexer in front of your A to D converter?
The answer to that is always no.
Okay.
So you never want to look at more than one thing?
No, I want to have multiple ADCs.
Oh, okay.
Well, I could never afford that, but yes, okay.
I mean, I have done systems where I needed four or eight signals to happen at a time,
fast signals. And kind of like cables, the changeover for the
multiplexer is always a little, it's like the connector, you know, it works. And if you get
it all right, it works fine. But if you get it the least bit wrong, it all goes very bad.
What are the most important things to consider when looking at an ADC? There's a few
big numbers, right? There's the sampling rate, and there's the bit depth, and then there's the full
bandwidth, the analog bandwidth, and then there's the full range voltage and all those kinds of
things, right? Some of those, I think, are a bit intimidating for someone who's never seen one before. Sure. And there's also the question of, are you sampling a fixed voltage?
Or is it like a sine wave or like a music waveform or something like that?
Because that will affect the answer also.
Does it have some sample and hold functionality because if the signal changes
while the conversion is going on what do you want to have happen
um and usually you want to say well i want to just sample it for a little bit of time and then
you know use that use the voltage when when you started to finish the conversion.
Because if you don't, you can cause really bad problems.
Could you define conversion?
Ah.
So, typically there is a signal somewhere that says, start conversion. And you hit that bit or that pin and it says, okay, whatever the voltage is here, I'll remember that.
And typically it holds it on a capacitor.
Kind of like the red light that happens when you're recording.
I'm measuring now.
Yes, but this one is only good for one sample.
Because the, so when I, okay, so I hit this pin and I say, all right, turn on the light.
I'm, I've chosen the voltage that I want to convert. I've sampled it. And after it's sampled, it's going to sit at that fixed voltage. the minimum of zero to the maximum of all ones.
There are, for just about everything I've said, there are many exceptions.
Exactly.
Because it's a really big topic, right?
There's all different kinds.
And, yeah, you can go crazy trying to
figure out all the different kinds of adcs if you don't know which one you need well and you can go
from from ones that cost five cents to ones i've worked with which cost thousands of dollars and so
there's a big difference yes uh imagine one that would allow you to manufacture a 100 gigahertz oscilloscope.
Yeah.
That's a really fancy ADC in there. It's really fast. It's very expensive.
And it only does that one thing well. You won't find it anywhere else. Okay. So, conversion is when it is measuring. And when you say capacitor,
that's usually inside the ADC package. Well, it could be, or it could be in a sample and
hold circuit or a track and hold, depending on which kind you have. But yes, the trend is to go
towards more integration where everything is consolidated.
And in that case, you would have the sampling and the ADC and everything is all inside of a microcontroller.
And it just does whatever the microcontroller does.
And you just have to live with it.
And if you need a better one, then you shop around and see if you can find a better microcontroller.
And usually you can't because the ADCs and microcontrollers aren't very good um and so you're you just have to put up with it
okay so the adcs and microcontrollers this is like uh the one in say arduino um the arduino
chip the at mega three three thousand six 3623, I don't know.
8 something.
Yeah, 328. That sounds right.
And so I can read the ADC and often it's hooked up to like a temperature sensor or to a light sensor and I can make a little light theremin.
And I sample it, you know, as fast as I care to, which if you could measure this, it probably
would be a few times a second, maybe 50 times a second. But that's totally different than if you
are recording audio at a professional level where you want to record something 96,000 times a second or 44.1 thousand times a second.
It's a very different piece of hardware.
Well, for one thing, you've got to find a place to put all that.
Right.
I don't even want to talk about how the data works
because that's all software.
So there's that area of what is it you want to sample?
And you mentioned gigasampling ADCs.
That, what is the, what is the difference between bandwidth and sampling?
It's not just NyQuest.
Yeah, that's a, that's, seem to some really complicated stuff um yeah well let me let me
my understanding and you can tell me i'm wrong tom uh the bandwidth part is the analog electronics
part like what the input of the the whole circuitry that gets before the thing that does
the conversion what it can handle whereas the sampling is purely how fast can the conversion
thing happen.
And those don't necessarily have to be in lockstep. You can have ones with a narrow analog bandwidth or a wider analog bandwidth than their sampling rate would indicate.
Right. Yeah, that's a good way to say it. I worked on a system once where there wasn't any signal inside the band that you would normally use.
So it was sampling at 6.4 kilohertz.
Let's call it 6.4 kilohertz.
But I didn't have any signal in the Nyquist area between 0 and 3.2 kilohertz.
All the signal was between 3.2 kilohertz and the 6.4 kilohertz.
And through the magic of signal processing.
I mean, that works.
You can recover that signal.
Mathematically, that's totally fine.
Yeah.
And yet I'm screaming here going, no!
And it's one of these things where, you know, like when you have a lot of inverters in a chain and all the logic is turning upside down in your head so many times it makes you want to scream?
It's like that.
You just decided aliasing is your friend, is what you're telling me.
Yes.
Okay.
So it was carefully controlled aliasing.
I mean, if you have a really good high-pass filter.
And you know what your signal is and what your, yes, okay, all right.
Right, right.
So in my case, I had a very good band pass filter
and i knew exactly where where the signals would be
and i was actually only interested in a small bandwidth around the center of the pass band of
my filter yeah that became the system and so yes, the bandwidth of the system needed to be higher to handle this higher frequency, but it also couldn't have the lower frequency signals present.
And you'll see this same trick really is used, or a similar trick is used, in that you can actually make a much more accurate measurement often of an AC signal
than a fixed DC signal. Because when you get down to DC, there are extra sources of noise
in circuitry. It's called 1 over F noise. So when you're looking in the frequency domain and you want to look at zero frequency or DC, you get an infinity when you talk about 1 over f noise.
It basically says that the noise becomes infinite at low enough frequency.
What the heck is that at low frequencies, you hear this sort of popcorn noise or this sort of pink noise instead of the regular white noise that you get from like a broadband noise.
There are these extra noise sources.
I'm not sure.
This may be too advanced to talk about here.
It isn't that. It's that we have told them how to use aliasing to get filtering, which I believe is not something we should be encouraging new college graduates to do.
That's sort of the story you tell.
Like, can you believe I have ever done that?
But that's the sort of thing where I tell like can you believe i have ever done that but that's the sort
of thing where i have this part unfortunately right and i have to make it work um which can
be useful but that's another thing is is understanding understanding your adc by by
way of understanding the kind of signal you're going to put into it i think that's what we've
been kind of dancing around right that the right adc depends greatly on what you're going to put into it. I think that's what we've been kind of dancing around, right? The right ADC depends greatly on what you're going to be sampling.
And that goes to all of those little numbers you have to choose,
bit depth and sampling rate and all that, and analog bandwidth.
Like even bit depth.
You can say, oh, a higher bit depth is always better.
I should always get the highest bit depth I can, right?
But it doesn't actually turn out to matter.
If your signal has a lot of noise in it
and the actual input dynamic range of your signal is low,
then you shouldn't pay extra for four extra bits
or eight extra bits.
You can probably get by with,
because one of the main things that bit depth goes to
is dynamic range,
which is like,
what is the biggest difference between the noise
and my
signal that i can that i can actually sample excellent point yes there's usually some distortion
for high level signals and so you have a limit up there as to how big a signal your system needs to
reproduce at some point it's limited by distortion and then
at the low end it's limited by noise and so in general you want to avoid the noise
and then have some nice linear range where you're doing your analog to digital conversions and all
your a to d codes are spread across this this region and then you have your high end where the ADC,
you'd rather that your ADC didn't limit your system on the distortion end.
So very often you'll see systems where they don't use the whole range of the ADC.
They leave a lot of the top bit even of the AD D converter doesn't get used very often.
Not intentionally.
And this is intentionally, yeah, to stay away from the distortion region of the ADC.
Because ADC distortion, when you go to the very end and you try to take a conversion that's out of range,
it can cause a lot of problems in the system.
And so usually you want to avoid that in the system
and have the distortion be somewhere else.
So yes, I agree.
That's a great way to say it.
I think the other thing that it really brings up
is that you need to be prepared to keep learning when
you come out of school. Because
wherever you go, there are going to be some tricks that you need that you don't
know yet. And so it's going to
be a long road to learn everything you need. And you need
to plan on putting a lot of time in for that.
As you're approaching or have unfortunately missed
your 40 years at Keysight HP,
are you still learning?
Yes. Yes, I have to do things all the time.
I just switched departments a few months ago. And so I have a whole new set of things to learn about. We make ICs at Keysight and I work in Keysight Labs and I recently switched to the section that works on ICs. And so I have a whole new set of things. I've worked on circuit boards for the past 40 years, and now I work on ICs mostly. So that is a whole new...
That's a switch. Cool.
Yeah, that's a whole new set of challenges.
How do you learn things? Do read do you watch videos well i have some tricks that i use
most of the things about circuits are actually very old and you're just applying them in
different ways and so i don't worry too much about the circuits part of it.
I have, you know, a bunch of references that I like.
You know, The Art of Electronics is a really good book.
There are old, I tend to go for the vintage things. There's old instrument manuals.
The best ones are from about 1976 to 1996. That was back when we published all the schematics for the HP test equipment. And they had service manuals that explained how the circuits worked. The theory of operation, they called it. There's the old HP Journal articles,
Bell System Technical Journal. You can go and look up designs and chip suppliers that have reference designs, that have
data sheets, that have application notes.
In many cases, they actually have the IC designs that are in the
data sheets. They have little schematics. And if you're designing an IC,
that can be really helpful
to have someone else's schematic right there. There's particularly some older books that are
for devices that are a lot slower, you know, because they're from the 1970s or whatever,
but they gave you the full schematic. And so if you just build that with modern transistors,
you end up with a high performance circuit especially because they were really trying to squeeze the most
performance they could out of the devices that they had at the time so they came up with really
great designs there's there's nothing wrong with a bunch of them um but i have a a method you know
if for design now i'm not actually designing ICs.
I'm actually working on tools for IC design.
But I do have a methodology that I use for design in general.
And I don't really teach much design in school.
I don't think it's mostly analysis, right?
You don't have on an exam, design me a circuit that
does this. Not very often. There's a few classes that have that filter synthesis maybe, or,
or, you know, simple analog things, but even those are usually analysis problems.
And so what I do is, is a different path. I like to work from the equations and the topologies of the circuits.
And so I start with the specifications, like what are all the inputs and what are all the outputs?
And so I put the inputs on the left and the outputs on the right.
I say, well, something goes in the middle.
Not quite sure what it is.
Maybe I draw a guess in there.
And then I can take the constraints that I have, which is what the circuit needs to do.
And I can use that to generate the design because the topology gives me the equations.
The specifications give me the numbers that go into the equations.
And so if I solve the equations and plug in the specifications, I can actually get the design out of that.
And so in analog electronics, that's kind of a cool way to do it.
And the problem is you tend to get these big algebra problems you can't solve.
But they have symbolic algebra programs you can just plug in the um the equations into i don't know maxima or mathematica or
whatever and it can it can help you with that um i don't think that's a really common way to do it
but it's what i like to do when there and there are some things that happen when you do that like
you'll solve for the value of a resistor and it comes out negative.
What does that mean?
Well, that actually means something.
Like if I have a voltage divider, think about this.
I have a voltage divider.
The equation for a voltage divider, if I have an R1 and an R2, the gain or attenuation, I guess you'd say, is R1 divided by the quantity R1 plus R2.
So if I have R1 is 1k, I have 1k over 1k plus, and then maybe it came out to negative 200 for R2. That was my problem is I got negative 200.1, which is 1,000, divided by 800.
R1 plus R2 is 800.
And so that means it's got gain.
It's 1,000 divided by 800.
And so I don't need a voltage divider there.
What I need is an amplifier.
So in this case, a negative resistor means I need an amplifier. So, in this case, a negative resistor means I need an amplifier. So, I could have
guessed an attenuator, and the math would tell me I need an amplifier.
And so, I mean, I like the idea of constraints, goals, inputs, outputs. So many people forget that that's a huge part of engineering. And I also tend to put, you know, magic goes here and then slowly work out what the magic's going to be. Although for me, it's not usually equations. It coming in at 16 bits per sample and you need to output something about that, you have to keep up.
You have to figure out the buffering system is one piece of the puzzle.
When you talk about breaking this down, did you do that in an hour, a day, a month?
What kind of timeline are you looking at when you talk about doing this breaking down?
Well, the first time you do it, it takes a while to learn the tools.
And what I'm talking about is a bit different in that I'm mostly dealing with analog things. And so the equations are linear
and you can actually solve them.
And that way, it comes out real nice
because if you write the equations properly anyway,
they can be solved. I guess it took me
maybe a month to learn the technique and then
it actually saved some time because I had a whole lot of stages to design and I could get one out
in a few days, I suppose. But yeah, it's not a really fast way to work. It might be over-engineering
for a lot of things.
When you're doing test equipment,
you sort of have to over-engineer
because, well, it's not over-engineering
because everything has to be really good
because you're competing
not only against competitors,
but what you did last year
and what you did last year
was really, really good.
So to make things better is hard.
You know, anytime you have a system that's optimized
and you try to improve it, it's really tough,
right? First-pass optimization is pretty easy.
Thousandth-pass optimization is really hard. Right.
You almost have to say, well, what's your secret weapon going to be?
What do you have that's new that's going to do something new for you?
So you plug in your secret weapon into the equations and hopes that you can get a new optimum.
Maybe it's a new kind of device that is somehow better or cheaper.
So if I'm doing a really
good job of this, the other sort of feature of it is that I can
derive the same thing in two different ways.
That is sort of a hallmark of expertise
in how to do something, is to be able to analyze the same problem from two different angles and show that you get the same result.
And it's also the basis of measurement and metrology and standards and that sort of thing, is to say, well, I can measure things mechanically and electrically
and I get the same answer.
That's kind of the basis of network analysis, for example.
And it depends on a model.
So there's a lot to know to be able to do that.
So you have to have these models that work well
that you can use to analyze things in different ways.
And if you're really good with that model,
what that means is that you can take the actual specifications of the product,
the things that really go in the brochure for the product,
and you can say, well, this specification meant that my circuit had to do these exact things.
And since my circuit had to do these exact things, I had to use these exact components.
So you can actually trace from the data sheet, you can trace down to the resistor values.
And that feels really good when you can do that.
It's tough, though.
I mean, it's really hard to be able to be in a position to do that, where your work can stand alone that far.
Well, it's the system engineering.
Somebody is responsible for the system as a whole.
The default condition is when you come into a project, there's no specifications.
Who would do that?
Who would write down what you need?
That would be weird.
Unless you have a systems engineer.
And then they would be that person.
And that's great. But they may not have a lot of detail that you need yet because the whole system design is sort of interactive.
Like, how good does it need to be?
Well, how good can you make it?
So, if I'm going to talk to people, actually, I made a list.
Who do I have to talk to about my circuit, right?
I have the system engineer.
There's the power supply designer.
I've got the firmware person.
Somebody's doing digital controls.
There's another system somewhere that's sending me an input signal and another person who's receiving my output signal.
I've got a mechanical engineer.
I've got a production test engineer, a marketing engineer. I've got a mechanical engineer. I got a production test
engineer, a marketing engineer. I got a project manager. And so if I understand the system,
I can talk to each one of these people and say how it relates to them. And when I'm first learning
the system, I have to talk to all those people and find out, you know, what their
expectations are and what they really need. And that's actually more difficult than the design
in many cases. Once you understand all those things, then you can sort of plug in the topology
and you can run all these things backwards and you can, you know, run the analysis backwards
and you can calculate out and synthesize the circuit.
Well, sure, except one of those people changed their mind and now you have to do it again.
Well, if you keep that thread alive, then you can deal with change much easier. Because unlike the other person who sat on the bench with the soldering iron and fiddled with the values until it worked, you're able to plug in new values into the equations.
Simulators go a long way to doing the same thing.
Everything I said you can do with the computer algebra and the equations, you can also do with simulator and fiddle with the values in there.
That's probably the more common way to do it now.
So with schematics especially, they're very hard to search for solutions.
How do you solve engineering challenges you can't Google the solution for?
Well, some people claim to be able to Google for schematics.
I've never had much luck with it.
I really like reading schematics, and I have over the years gotten faster and faster at it.
In effect, I can turn the pages more quickly and sort of absorb what I'm looking at because I've looked at a really lot of schematics because one of my jobs involved
sort of design reviews for a large very large number of designs and so I ended up with
the sort of uncanny ability to read schematics quickly which looks really weird and feels really
weird while I'm doing it I don't know how works. I don't know how I can read a schematic like a book. Um, it's a very strange
sensation. Yes. Uh, well it's, it's like, if you think about how do I know how to read, um, you can
get into a really weird mental loop. Uh, and then same with schematics, right? You just kind of
learn to look at them and understand what they do without
seeing the details. You just see the overall flow and then if something catches your eye,
you can drill down and see what's interesting about it. Much like scanning a data sheet,
you know, when you first look at a data sheet for an 800-page, you know, microcontroller data sheet, that's very intimidating, right?
But eventually you learn, you know, well, there's a whole bunch of boilerplate and things that, you know, are kind of boring.
And so I'll go find the part that I'm interested in.
So where do I find those parts that I'm interested in?
There's actually not that many.
The Art of Electronics is really good.
The old books.
I have a really weird way of doing it.
I look at really old schematics made with vacuum tubes.
And it's really good to be able to learn to read those because a lot of things that people claim to be a new state-of-the-art
or whatever are actually very old vacuum tube circuits
or their equivalents to them.
And so there's a website called tubebooks.org,
and it has all these old books about vacuum tube circuits and other things.
There's one called Dynamical Analogies.
That's really good.
It's all about analogies to circuits and how they work or don't work.
And there's.
I have a list of books, actually.
I could put my list of books, actually.
I could put my list of books in a show note.
All right.
We can do that.
And they are, you know, they're, they're different because there are books that are just specialty books.
Like I have one on power supplies that I really like, and it's the abstract case of power
supplies.
Like we don't really do that much with abstraction and circuits. It's not like software where you say, what would an ideal power supply look like? And then how do I slowly piece in one practical component at a time? That's sort of an unusual approach to understanding power supplies. But there is a book that does that. Modern Switch Mode DC-to-DC Converters,
I think it's called, or something like that,
by Severance and Bloom.
And it's, I think it's out of print,
but it's really good.
And so that's what I use.
Some of these rare books I may have cornered
the market in, because I tend to buy them for
other people. And so that's why
you probably want to go to tubebooks.org.
They have a lot! Oh, it's pretty amazing.
Yeah, they have so many old books.
And many of them are from the golden age of
books, which is basically about 1955
to 1963 or so.
I think it was associated with Sputnik,
like the response of the U.S. to Sputnik
was a large effort in education,
and they made everything really clear.
They wrote in a different style
that was much more urgent and clear
than modern textbooks or application notes
or anything else. And so there's the Radiotron Designer's Handbook from 1955. That's sort of
the classic. And that's on that two books. But you have to know how to design with tubes. And if you want to learn tubes, I have a shortcut that I wrote, actually, using vacuum tubes to learn JFETs.
And it's a Medium article that I wrote, and it actually explains both vacuum tubes and JFETs, how they work and why they work.
And I think it's short and it's pretty good.
Well, Tom, you have imparted a great amount of knowledge
and given us paths to look for more.
Are there any thoughts you'd like to leave us with?
Yes, I have a tip.
Okay.
My tip is check the power supply first.
That's it. That's the whole tip.
That's the whole tip.
That's it.
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.
Thank you to Professor Mike for your list of questions.
We'll probably ask some of these other guests as well.
And thank you for listening.
You can always contact us at show at embedded.fm or hit the contact link on embedded.fm. I have a quote to leave you with from Renee Watson's Piecing Me Together,
a book I read this weekend that was pretty good.
It makes me feel like I'm learning a secret code or something.
I don't know. It's powerful.
Knowing how to read words and knowing when to speak them
is the most valuable commodity a person can have.