Close

Hack Chat Transcript, Part 3

A event log for Low-Level Analog Measurement Hack Chat

Chris Gammell measures his Analog Life

lutetiumLutetium 07/17/2019 at 20:050 Comments

Chris Gammell12:42 PM
I'm sure you have some you could share as well

Paul Stoffregen12:42 PM
how much calibration sucks really depends on your production volume and how willing you are to invest the time & money to make it not suck

Chris Gammell12:42 PM
> I'm working on a DIY CO detector using a sensor like this:

That's a great idea @Alex Ryker! What does the circuit look like?

Chris Gammell12:42 PM
like are you pulling off a manufactured sensor...or are you creating the sensing element from scratch?

Chris Gammell12:43 PM
> I'm working on a "precision rectifier" circuit also known as a "super diode". A diode and op amp (to be sampled by an ADC).

Another good looking project @Will Patton. Any circuit you can share here?

Chris Gammell12:43 PM
> how much calibration sucks really depends on your production volume and how willing you are to invest the time & money to make it not suck

As the Teensy creator would surely know :-D Lots of volume there!

Chris Gammell12:43 PM
How much calibration is there for your designs @Paul Stoffregen ?

Paul Stoffregen12:43 PM
fwiw, I'm working right now with a relatively new "smart amplifier" chip, which requires a calibration of the speaker

Chris Gammell12:44 PM
ahh, yeah

Chris Gammell12:44 PM
so you're characterizing and then storing the variables in an EEPROM or something?

Alex Ryker12:44 PM
I'm trying to do as much from scratch as possible--more fun that way :)

I don't have much drawn out yet, but I've cleared my schedule this Saturday to change that. I'll probably make a Hackaday.io project out of it once it's a little more substantial.

monk12:46 PM
>I'm sure you have some you could share as well

Honestly, I haven't worked with much in the way of analog for a while; I've mostly been in battery and power systems, and more generalized high volume. I'm definitely always curious about everyone else's tricks. =)

Chris Gammell12:46 PM
a lot of the gas sensors have some kind of chemical element and then the output needs to be amplified somehow. So that's a good project, but there can be a lot of variability

anfractuosity12:46 PM
i've got some photodiodes with bandpass filters on, that i'm trying to find the best way to measure the light at a certain wavelength, i presume i'd need to use an op-amp like in your diagram, to convert the current to voltage? but it seems there's different modes to use a photodiode, which confuses me somewhat (the photodiodes monitor two different wavelengths, trying to measure a peak/trough of a liquid for a type of spectroscopy)

Chris Gammell12:46 PM
> i've got some photodiodes with bandpass filters on

Passband of light or of the electrical signal?

Paul Stoffregen12:47 PM
For Teensy, there's really no calibration at all during testing. The chip's ADC does have a self calibration that's done at startup, which appears to just null out DC offsets

anfractuosity12:47 PM
passband of light sorry

Alex Ryker12:47 PM
Good to know! What I've been thinking about most recently is powering the thing--ideally I'd like it to look like a lot of COTS CO detectors and have an integrated AC plug. However, I'm not quite sure how best to go about that--safety and potential noise are concerns I've had. Any thoughts on that?

Chris Gammell12:47 PM
> i'm trying to find the best way to measure the light at a certain wavelength, i presume i'd need to use an op-amp like in your diagram, to convert the current to voltage?

Yeah, you'd want to convert it. It's tough because photodiodes effectively combine all of the wavelengths they absorb

Chris Gammell12:48 PM
> However, I'm not quite sure how best to go about that--safety and potential noise are concerns I've had. Any thoughts on that?

Out of my pay grade (outside the scope of this chat, but a good subject)

Paul Stoffregen12:48 PM
For a couple products I made on a consulting basis (back in the days when Teensy was just getting started....) I used quite a lot of calibration. I even still have an Agilent 34410A on the workbench - which was used for a of that old work

Chris Gammell12:48 PM
> The chip's ADC does have a self calibration that's done at startup, which appears to just null out DC offsets

The best way to do it

Chris Gammell12:49 PM
I think a lot of sensors are piping out digital signals these days

Chris Gammell12:49 PM
so it's getting less common to have to deal with analog signals for some things

Chris Gammell12:49 PM
there are a bunch of off the shelf chips that are "analog front ends" that take care of a lot of things

Paul Stoffregen12:50 PM
One of those old products had an AVR chip, with signals coupled to its ADCs, and a 2% (but highly stable) reference chip.

Paul Stoffregen12:51 PM
the signals went through resistor dividers which used resistors in those little 4-resistor arrays (1206 size SMT), so the resistors needing ratios were on the same physical package to track with temperature, but the tolerance wasn't good at all

Chris Gammell12:52 PM
yeah, those kinds of problems can be stinkers

Chris Gammell12:52 PM
that's trading the time cost of calibration for the cost of stable parts

Chris Gammell12:52 PM
if you can get the calibration to be consistent over time

Chris Gammell12:52 PM
then that's great

Paul Stoffregen12:52 PM
pretty easy to solve with calibration - which is why I have that 6.5 digit bench multimeter ;)

Chris Gammell12:52 PM
but usually the good parts at the beginning (0.1% accurate) are also the ones with low drift

Chris Gammell12:52 PM
which brings up another good point

Chris Gammell12:53 PM
learning how to add up all of the errors in your circuit are important

Chris Gammell12:53 PM
having an "OK" resistor at the beginning of your signal chain might not seem to be a problem

Chris Gammell12:53 PM
but if you have a 10x gain stage and another 10x gain stage after that

Chris Gammell12:53 PM
that small error really adds up

Chris Gammell12:53 PM
so you need to look at the block diagram and see how errors in your circuit might compound.

Paul Stoffregen12:54 PM
one of the thorny problems I usually hit with calibration is getting close timing match between the device under test and the reference (like that 6.5 digit DMM)

Will Patton12:54 PM

Chris Gammell12:54 PM
that's great, @Will Patton

Will Patton12:54 PM
Chris, you asked:

Here is an image from Stack Exchange (SE).

Chris Gammell12:55 PM
and is this for low level AC measurement?

Paul Stoffregen12:55 PM
especially if the "signal" is measuring AC power. Even tiny fluctuations in the AC waveform wreck havoc on the quality of the cal if the timing isn't very closely aligned between the device under test (like that AVR chip) and the reference

Will Patton12:57 PM
Precision Rectifier: Yes, I would say "small signal" - a range from 5mV to 1.4Vp-p. The trick is AC and DC coupled versions of the circuit.

Chris Gammell12:59 PM
so we're winding down here I think?

Chris Gammell12:59 PM
I'll put a few resources in the chat

Will Patton12:59 PM
Excellent Chris - you're the best!

Chris Gammell12:59 PM
I usually refer people to the EEVblog videos on op amps, I htink Dave did a good job with that stuff

Chris Gammell12:59 PM
vintage EEVblog, that is

Chris Gammell12:59 PM
haha

Chris Gammell12:59 PM

https://www.youtube.com/watch?v=Y0jkPLuFdnM

YOUTUBE EEVBLOG

Chris Gammell1:00 PM

https://www.youtube.com/watch?v=7FYHt5XviKc

YOUTUBE EEVBLOG

Chris Gammell1:00 PM
as for books, Art of Electronics is ok

Chris Gammell1:00 PM
but it's dense

Nicolas Tremblay1:00 PM
Thanks Chris for your time

Dave Blundell1:00 PM
flourless chocolate torte of electronics books

OK, that was a neck-snappingly fast hour with Chris. Great stuff! I want to give Chris the opportunity to bow out if he needs to, but feel free to stick around and keep answering questions if you want to - don't think we'll run out any time soon. I'll just say an official thanks to Chris for a lively discussion and for spending time with us here on the Hack Chat.

Don't forget that next week we'll be talking to Josh Lifton from Crowd Supply and crowdfunding your projects - https://hackaday.io/event/165483-crowd-supply-hack-chat-with-josh-lifton

Chris Gammell1:00 PM
once you're past art of electronics, I Like "Design with Operational Amplifiers and Analog Integrated Circuits" by Sergio Franco

Chris Gammell1:01 PM

https://www.amazon.com/Design-Operational-Amplifiers-Integrated-Circuits/dp/0072320842

AMAZON

Design with Operational Amplifiers and Analog Integrated Circuits

Franco's "Design with Operational Amplifiers and Analog Integrated Circuits, 3e" is intended for a design-oriented course in applications with operational amplifiers and analog ICs. It also serves as a comprehensive reference for practicing engineers. This new edition includes enhanced pedagogy (...

Read this on Amazon


And I'' be posting a transcript in case anyone missed anything. I know I did...

Will Patton1:01 PM
Watch YouTube! Better than a book! ;-)

Chris Gammell1:02 PM
Also shout out to the folks that taught me a lot of this stuff

Keithley (now Tek) have a good book on measurements and signals called the Low Level Measurement Handbook (now in its 7th edition) https://download.tek.com/document/LowLevelHandbook_7Ed.pdf

Chris Gammell1:03 PM
past that, read app notes and datasheets like it's your job

Chris Gammell1:03 PM
There was an old blogspot blog that followed along as the author read Jim Williams: http://readingjimwilliams.blogspot.com/p/best-app-notes.html

monk1:04 PM
One book rec I'd love to add to the list: The Circuit Designer’s Companion

Chris Gammell1:04 PM
that's Kent Lundberg (@doctoranalog on twitter)

Chris Gammell1:04 PM
yeah, that one is ok as well. I recommend not getting the kindle verison

Chris Gammell1:05 PM
Oh the stuff by Hank Zumbahlen is also great, the Linear Circuit handbook

Chris Gammell1:05 PM

https://www.analog.com/en/education/education-library/linear-circuit-design-handbook.html

ANALOG

Linear Circuit Design Handbook, 2008 | Education | Analog Devices

Linear Circuit Design Handbook, Edited by Hank Zumbahlen, Published by Newnes/Elsevier, 2008, ISBN-978-0-7506-8703-4 (Also published as Basic Linear Design, Analog Devices, 2007, ISBN-0-916550-28-1).Fundamentals and applications of data acquisition components. Contains much of the material covered in Data Conversion Handbook and Op Amp Applications

Read this on Analog

Chris Gammell1:05 PM
I remember I found those PDFs bit by bit

Chris Gammell1:05 PM
thinking I was finding illegal copie

Chris Gammell1:05 PM
s

Chris Gammell1:05 PM
nope, free book by ADI

Chris Gammell1:05 PM
haha

Chris Gammell1:06 PM
I also interviewed Hank on The Amp Hour (my podcast with Dave Jones), he was great: https://theamphour.com/185-an-interview-with-hank-zumbahlen-zoppa-zumbahlen-zateticism/

Chris Gammell1:06 PM
Other analog folks I've interviewed:

electrocontinuo1:08 PM
if there's still time for a quick question - when you're designing analog stuff like this, do you jump straight into hardcore math or are you throwing up something that's like "this should more or less work" and then refining from there?

Nicolas Tremblay left  the room.1:08 PM

Link to transcript: https://hackaday.io/event/165370-low-level-analog-measurement-hack-chat/log/165830-hack-chat-transcript-part-1

electrocontinuo1:08 PM
and if it's math, do you have a recommendation of how to get better at that?

Chris Gammell1:09 PM
https://theamphour.com/the-amp-hour-119-luculent-linear-legacy/

https://theamphour.com/the-amp-hour-77-winsome-waveform-wizardry/

https://theamphour.com/the-amp-hour-109-hexagram-hardware-holism/

https://theamphour.com/196-an-interview-with-mike-engelhardt-spice-simulator-synteresis/

https://theamphour.com/340-an-interview-with-jason-cerundolo/

https://theamphour.com/348-an-interview-with-art-kay/

https://theamphour.com/392-an-interview-with-matt-duff/

Chris Gammell1:10 PM
> if there's still time for a quick question - when you're designing analog stuff like this, do you jump straight into hardcore math or are you throwing up something that's like "this should more or less work" and then refining from there?

Honestly I'm normally copying an app note at the beginning. Borrowing knowledge from others at first and then really udnerstanding it when I'm hands on at the bench (or when things go wrong)

Chris Gammell1:10 PM
starting from first principles and math is a good way to not get any circuits out into the world

Chris Gammell1:10 PM
but it's important to understand over time, IMO

Chris Gammell1:10 PM
as for how to get better at it, I've done it by putting myself into a situation where i need to understand it, that's the best motivator

Chris Gammell1:10 PM
which I realize isn't that helpful of an answer

electrocontinuo1:11 PM
nope it's very helpful. thank you!

Chris Gammell1:11 PM
OK, that's all from me, off to troubleshoot a circuit!

Chris Gammell1:11 PM
thanks for stopping by to see my rambling!

Discussions