[Music]
welcome back to the open hardware mini
conf so for the next session we have
julian goodwin who is a veteran of open
hardware mini conf he's been coming
along for years we've seen him before
and this particular subject is something
that is
very very interesting to me as you would
have seen in my earlier talk i had the
onscreen display for my multimeter i
love the idea of connecting test
instruments
to the network and automating things
so julian please take it away
hi
so yeah i'm julian by day i do tech
operations at google uh
i am once again doing networking
by night i'm a bit of a time nut i
literally use an atomic clock as a foot
rest uh i
have a cesium clock that sits under my
desk at work
uh
basically being a foot warmer uh my
house atomic standard here at home is
under my desk at home
i'm very slowly designing my own ntp
server from the chip level up
a few years ago
at lca 2019 i gave a talk on
designing the
spc the single board computer
uh and getting that all manufactured and
at the moment i'm designing the
digitally controlled ivanized oscillator
for it
because i actually want to do something
a bit better than the original prototype
i did i've also
done stuff and continue to do stuff with
linux australia do some photography do
various other things
so
automated test equipment let's kick
right in
early digital test equipment we're
talking
late six uh well late 50s early 60s
through the 60s
started to have pins for iowa's
environments major research labs
universities were starting to get
computers they were usually just simple
parallel bcd
buses for data with individual pins for
control and users would provide their
own interface
that's
off an old piece of hp kit that i can't
even remember what it is
then uh released in 1972 agilent
hp keysight choose your name
uh created
the hp interface bus which then became
the general purpose interface bus and
then got standardized as ieee 488 which
is a multi-drop serial bus it's about
eight megabit absolute peak but
really don't try and do that
the connector stacks
it's a bit weird you can sort of do star
topology or bust
a straight bust apology
don't try and get too fancy
if you try and stack four connectors on
top of each other you'll end up with a
real mess because those are not small
connectors
uh
commands uh
new line terminated ascii
it is still extremely common on
montessori this is a 50 year old
standard this year
brand new test equipment designed
released comes out with gpib
because it is the standard
they've got more modern interfaces but
the old stuff still exists and
uh
in that era
it was actually used as an interface for
hard drives tape drives etc on hp and
commodore computers although the
commodore variant is not
basic gpib
so i mentioned the commands are ascii
a few decades later in 1990
the command format was actually
standardized as something now called
skippy
which
originally just used in gpib now
essentially any transport major
equipment will use commands like
this if you look in documentation you'll
see a command sequence like colon
trigger colon sequence colon source
and what that means is
trig is required the ger is optional
the c entire sequence section is implied
if you don't provide it
uh again sour needs to be specified
the ce is optional
it's a little weird but you get used to
it pretty quickly
it's ugly but it's a command format
and yeah more modern interfaces will
have rs-232 on a d9
or usb
there is a test and measurement
class for generic devices
but there's also basic serial class
devices as usb serial or usb acm
these on devices that are either
made by major manufacturers or also
support gpib will almost certainly be
the same command set
so
once you have built support
in rs232 it'll probably work unchanged
on gpib
it'll probably work unchanged over a
network socket as well
that for example is a keithley
multimeter variant that uh we'll
actually talk about a bit later
and
because they ran out of physical space
they dropped the gpib port it gave you
an ethernet port
so
as i said there's lots of equipment that
supports it you've got uh pretty much
any
major piece of test equipment bench
multimeters power supplies dc loads
power sensors frequency counters sql gen
generators oscilloscopes spectrum
analyzers vnas
it
really is
pretty much any piece of major test
equipment
that you're used to using
at least the higher end versions will
have it as an interface option uh some
more modern stuff will no longer have
gbib but it will still support the same
command sets through different
interfaces
there's also uh in hp terms what's
called system test equipment and this is
stuff intended for automated use
so
it might have little or no local control
local interfacing
uh a front panel with a few indicator
leds or nothing at all even
the two really common ones of these are
what's called a data acquisition
device
which are actually
big switch matrixes uh usually in fact
just a chassis for a big switch matrix
that you then plug in a relay board or
an rf switchboard
uh many of these
can have built-in multimeters
um they are usually
called multimeters
although in practice they are just
voltmeters this
turns out not to be a huge limitation in
practice but
um
just by their very nature doing current
sensing is a bit more of a pain so
you would typically do remote shunts and
measure the voltage over those shunts
there are system power supplies
the old
wonderful old hp system power supplies
are great if you need lots of power
either lots of current at low voltage or
high
voltage their ui is not great
but
they implement a lot of stuff on the
gpib interface and you can control them
that way
the other thing is they're often really
cheap because the ui is not great and if
you're buying them used you're probably
wanting to use it yourself
this is where building a remote front
panel
like john's multimeter example
you can make a much more useful
tool for yourself
and those power supplies can be had for
almost the cost
almost nothing plus the cost of shipping
unfortunately those big old hp power
supplies are extremely heavy
so
the cost of shipping can often be quite
significant
there are also system versions of other
test equipment um oscilloscopes
multimeters are parameters
those are rarer
simply because
people that spec
the integrated rat test racks that they
are for
will tend to actually spec the full
version unless they're space constrained
because you don't save much money
um yeah
next talking to a computer so
historically there were all sorts of
forms pci cards iso cards
uh raw bus interfaces on some really old
systems
these days what you actually do is you
use a usb interface or an ethernet
interface
uh
although it's surprising it doesn't seem
that any testimony i'm aware of
with both the usb port and gpib port
will actually act as a gpib interface
with the possible exception of some of
the really grunty stuff that actually
runs full desktop windows
i suspect some of those can be made to
be a gpib host as well but i've never
tried that
you can get nice generic open source
hardware gpib interfaces that's a
galvant gpib usb it's the sword i use
it works fine
both keysight slash agilent hewlett
packard and national instruments so the
two companies that are most known for
gpib equipment
have usb interfaces the really big
warning here is clones of those devices
do exist the clones are known to be
buggy it's
a little hard to actually get good
options which sort of means unless you
have a reason to use them
to use the keysight or national
instruments tooling
probably just use the generic ones
and the generic ones are nice and cheap
so wonderful
now second interface so
gpib is great when i've got big test
equipment but
what about more custom stuff what about
more weird stuff i can get
system temperature sensors but
they're big and chunky and
not necessarily integratable but we have
this wonderful thing called i squared c
so
i squared c created in the 80s by
philips as a way to simplify tvs which
were starting to add heaps of digital
features and
such at the time
so the way to
con
connect peripherals to microcontrollers
it's now
extremely common uh
when i was riding this deck i thought to
check and my laptop has 11 i squared c
buses exposed to the kernel
it probably has more i squared c buses
than that
they're just not exposed to the kernel
and it really has become the de facto
load speed low speed interface
for pretty much anything if you've heard
of sm bus or pmbus those are i squared c
variants
yeah
there are some limitations though you
get up to 127 endpoints on a bus
but in practice
most chips can only be selected to an a
few addresses so you very quickly run
out of
address space that you can actually use
there are bus switches to work around
this
uh
the notable case for that is some
network devices where
i squared c is a standard interface for
them or multi-output video again where i
squid c is a standard
for plug-ins
uh long bust length can be a bit of an
issue
as was mentioned the previous talk there
are chips to help here
and it's an open drain bus
you really should try and share the same
ielts i o voltage and you absolutely
must share a ground
again
we'll talk about working around this on
the next slide
now
one of the really nice things that's
happened recently in the last few years
is adafruit have standardized
a connector format called stemma qt
which is nothing more than a pin out
standard for a jst
uh
jst sh
connector
that means
any
i squared c sensor test board
they just plug in and chain it's
wonderful
um
adafruit themselves have
many many breakouts it's probably
certainly in the dozens
and this means if you just want to chuck
a temp sensor
on a project it's really easy
uh the little board in the top right
there is
a ti
temp 117 which is an incredibly
sensitive temperature sensor it's a
lovely little thing
works wonderfully
it is an absolute bear of a chip to
solder as we'll see later
now as i mentioned i could see it's
meant to be intra board
depending on your sort of project you
might want to use an isolator
uh
it's
in my case i'm doing some pretty
sensitive power supply stuff so
i want an isolator even though i don't
really need one
and again if you're using crossboard
it's a way to avoid noise
if things are working and you're not
doing very sensitive power rail or
signal stuff you might not need it
ti have an iso 15
15 50 15 60 15 40 series
now
be careful if you're looking at
isolators some of them care about
where the clock is coming from some of
them care about
which side has a higher i o voltage
um
just read the data sheet when you're
looking this up you don't want to design
the board and realize oops that's never
going to work
now computer interfaces so as i
mentioned my laptop has 11i squared c
buses great i can just plug into one of
them because
well it turns out uh display interfaces
actually use i squared c to do some
sensing
so you can piggyback off that and you've
got an i squared c interface on your
desktop computer already exposed to the
world that's not a great idea to use
on embedded boards you actually have
some buses that are intentionally
exposed
check if those buses are actually unused
reusing a bus that's in use for a
general purpose on a machine
you might have some issues
uh for my own test use i simply used a
usb breakout even though i was using a
raspberry pi because
it's just
easier to be isolated it also meant i
could do my development on my laptop
which is a big chunky thing
over usb and then just plug it into the
pi
i don't really care that it's an extra
step when i could be a little bit more
efficient if i was actually building a
permanent install sure i'd be more
efficient but testing let's solve the
problem and move on not be perfect
so my project was
characterizing a dac
uh i as i mentioned i'm building a
digitally controlled urbanized crystal
oscillator
and they're digitally controlled
there's a dac that does that digital
control i want to understand what the
linearity is of that dac as it is
actually used in circuit
i then want to understand how that
affects the output frequency
and unfortunately i didn't get to that
and we'll
maybe talk about that if we do have a
few minutes
so
here's the test board uh there's the
actual
uh ocxo board in the middle uh minus the
oven which is in the enclosure
and there's a carrier board i originally
didn't have the carrier board however
i discovered that breadboards are
terrible
and
this is not really news to anyone who's
tried to do even
megahertz level signals
uh this is a 26 megahertz oscillator
because that happens to be what i need
but
it turns out breadboards are so terrible
that they actually invalidated a bunch
of my results so i ended up built
designing my own board
uh and i'll make it clear i didn't do
any effort at signal integrity on this
board it is quick tracers everything
just chucked where i wanted for quick
layout
and it is
massively better than the original
board
so
what is on the board
in the center on the pop-out board you
have the little silver thing is a
crystal
the ic right next to it is
the oscillator itself which is a
slowable oscillator
the
ic in the middle is the dac the ic at
the bottom
is
the just some power supply filtering
the
collection of passives to the left of
the dac are some
output filtering and then the silver pad
you can just see to the right of the
oscillator
is meant to be the pads for a tnp triple
one seven sorry double one seven
unfortunately they are really small
this is surprisingly hard to solder
and i if i actually want to get one
soldered i'm going to have to learn to
use solder paste stencils
this was reflowed by hand but
the paste is just an issue
uh i should have actually brought one of
those boards to hand to see just how
tiny it is but it is really quite tiny
the carrier board simply has some power
supply filtering i also chucked an i
squared
c isolator footprint set on that as you
can see that's not populated because
well
it turns out you can't buy chips at the
moment for some strange reason so oops
that is why there's also a non-isolated
stem qt port
and answer my problem and there's an
output buffer because
the oscillator board can't drive a 50
ohm load and i want to be able to plug
into some of my rf test equipment
so the actual test set up in this
progress because
i need to test a dac i need to test its
values that's going to take time
spare raspberry pi
uh
through usb to a nice squared c m c p
two one as i mentioned through an
isolator to a tempe 117
just to have a temperature sensor
because there should be one
to my test board
uh test board is powered off a nice lab
power supply
i half got through integrating the lab
power supply but it turns out
i can't even though i have a very nice
one with extremely good power
sensitivity measurements it's not
actually useful
for rail measurements so i couldn't
couldn't really use it as a source of
input
and
i ended up just using it as an extremely
nice five volt source so i
part automated it but didn't really
finish
then there's a gpib usb with a ke3
multimeter
nice it is actually a basic low end
keithley multimeter not one of their
really crazy ones
and a originally a stanford research
frequency counter which was
going to be to use the
uh
to actually then close the loop and i do
for dac
values what is the output frequency
in the end
i had enough weird issues with the
stanford research counter that i
actually retired it
for that use
and bought a very nice hp counter that
you can actually see that thing just
there is a very nice hp counter
that blew a power supply right after i
got it and by the time i got the
replacement power supply i had to
actually clear everything up so i
haven't gotten around to finishing that
part of the testing
because well
that was in the first round of testing
and
underneath all that equipment was my
dining table
so
it kind of turned into a hp catalog
photo shoot of equipment
and that's not even the worst case stage
it got to
so unfortunately i'm in a bit of a messy
situation where
uh i moved house in march 2020 and never
quite got this room set up as a lab
so instead it became my office for the
last two years and it is a small house i
don't have another room for a lab
but
yeah
big unfortunate mess and um
helpful to have somewhere to eat dinner
so the test setup only lasted a few days
and the code i'll put the actual full
code file up somewhere useful because
this is
a summary and not complete but it's
actually most of the code
essentially
there's python libraries for the gpib
usb
adafruit has the blinker library set
which lets their circuit python
interface code run on general desktop
python
and the two of them combined work fine
in a single program
so i connect to the multimeter through
gpib
i connect to the i squared c devices the
dac and the temperature sensor
through the interface
uh do some configuration of the
multimeter
tell it to clear itself back to defaults
essentially go into voltage meeting uh
measurement set the range to a fixed
value
set the power line cycles so that does
the best measurement i can get it to do
turn off averaging
uh measure on a trigger
set the trigger to manual
tell the temperature sensor to turn on
averaging because i do want it there
and then i simply do a loop of for every
value in the dac range set the dac
let it settle for a little bit
measure the voltage measure the
temperature
and write it to a log
and that's just a csv and then
i can graph the result on the csv so i
can see that
the real bottom of the range in the real
top of the range it's not so great but
actually we're hovering around point one
percent absolute error
and relative that's
0.04 ish percent plus or minus
which
okay
um i don't quite like that dip
just before half scale and it
unfortunately turns out that half scale
is extremely important so
i might do some design changes there but
i've got the information to do those
design changes now
uh
yeah
and
as i said i would have liked to have
closed the loop a bit and done frequency
measurements using the actual dac app
the oscillator output
unfortunately
for reasons i didn't fully determine the
stanford research counter
got out of sync when i used it on gpib
uh it was measuring
something was buffering measurements and
i didn't figure out why
and the new hp frequently comparatively
new to me hp frequency counter
unfortunately dropped a power supply
right as i went to actually put it in
use
so
i haven't gotten back to that project
since all those repairs happened
uh
yeah
so
that's
test interfaces test
and then putting it together
into a system
and so any questions
ah thank you julian
um
i haven't seen any questions there is
still time if anybody wants to jump in
and put questions into the questions
section of the chat
what i have noticed is that a couple of
people have been putting
i2c detect dumps
computers into the chat to show how many
um how many buses are exposed on their
computers
yeah there's also a cfs
tree
somewhere in somewhere in slash this
there's a bus list for i squared c which
is
where i got the 11 number
um it's
it was just such an absurd outlier by
comparison to all my other machines that
like
how
and what are they doing like
yeah i i can only assume that
both usb-c ports the hdmi port
like two or three for sensing or
something and i i still can't figure out
what they're all doing but yeah somehow
we have 11 other things
yeah well perhaps there are some
associated with um drive controllers uh
maybe
yeah there are a few things they could
be yeah exactly yeah
bob just pointed out fan control
so yeah there are lots of things where i
squared c is useful inside a system
yeah so often with embedded projects
we're used we're accustomed to having um
the i squared c bus there's one
not a dozen of them
yeah a lot of modern micros will give
you two or three you might have to pin
max them
uh
or do other things and as i say you can
you can end up in some weird cases where
you end up needing three i squared sea
buses for three devices
oops they can only do one dress and that
one address is the same for all three
devices
yeah
so um i have a couple of questions for
you since we have a
a minute or two
and i i personally have an interest in
this so
um
gpib has been around for a very very
long time and so just from my
observation not really knowing a whole
lot about test equipment it seems that
a lot of vendors have been moving to um
like skippy and um
so could you explain a little bit about
where things are now with modern test
equipment that don't necessarily have
those old style connectors on them
yeah so modern
modern test equipment will end up having
usb quite often
exactly what the transport is over usb
can be a couple of things uh and
ethernet for a lot of interface for
devices where that makes sense which
tends to be
anything that's expected to be in a sort
of system integrated use
is more likely to have ethernet almost
than usb
so the usb can be usb serial on some
devices
on
the sort of devices that would
historically have had gpib from that
vendor it's more likely to be the test
and measurement class which is
a closer definition um
i've not played with it even though some
of these devices i've used have usb
ports that probably are class compliant
because
i have gpib and i have the cables this
is in part the reason why test equipment
for the last 15 years has still had gpib
ports
because we have the interfaces and we
keep using them
yeah
well the the follow on from that when
we're talking about connectivity on
devices is how you pull
data from multiple devices together into
a single interface and many years ago of
course the standard for that was labview
or you know various other pieces of
software um so do you
see um
basically what is the modern sort of
equivalent to labview or how would you
go about that i
i've seen various attempts at it uh the
company that makes the power supply
that's just on my shelf there um
evox which is an open source power
supply project they've got an
interesting little experiment thing i
don't know if it supports generic gpib
but it's it's an interesting project
that's sort of a
uh for those of you that have seen the
various python notebook style
environments it's a similar one aimed
around test equipment
i
i would write python because
most of my uses are going to be
run a test and i probably want to run it
headless somewhere i don't have to
listen to the fans of the test equipment
yes and you probably want to be um
logging the data for future analysis
you're not necessarily sitting there
watching virtual gauges move and that
sort of thing which is more what the
labview
ui is designed exactly um there is one
trick that i did use that is was really
helpful
my
although my multimeter actually has a
scan card so it has eight inputs
i couldn't be bothered configuring that
but my multimeter has front and rear
connectors
so i put one and i needed one
measurement from a different place so i
put it on the rear connectors
and my multimeter knows which connectors
it's using
so
at the start of the measurement it would
instruct
the multimeter to switch to rear
connectors which is to say it would put
on the display switch to rear connectors
and i push the button
because
a nice feature on a bunch of test
equipment
is that you can make it a display
which means
you don't just have to have the computer
controlling it display things you make
the equipment you want to touch
tell you which button to push
yeah so that was a cool feature there's
this is why there's an image on twitter
of my multimeter saying pc load letter
because i was making a very bad hp joke
[Laughter]
oh cool
okay um
now are there any other questions i'm
just checking we don't think we have any
other questions from the chat
um but thank you very much julian that's
been really interesting this is a
personal area that's really interested
to me i'm always trying to figure out
ways to
capture data coming off instruments and
share them on live streams in particular
so things like capturing the scope
interface
and my multimeter and various other bits
of equipment
so yeah things
it was very useful um
the evox software is probably the the
one i've most seen that seems like it
would actually be really interesting
i'll dig up a reference to it and put
that in the
open hardware discussion
that'll be brilliant thanks julian okay
well thank you very much for your
presentation and everybody else
please hang around we will have another
presentation coming up starting i
believe at five o'clock so
thank you everybody and thanks julian