Close
0%
0%

Low-Level Analog Measurement Hack Chat

Chris Gammell measures his Analog Life

Wednesday, July 17, 2019 12:00 pm PDT Local time zone:
Hack Chat
Similar projects worth following

Chris Gammell will host the Hack Chat on Wednesday, July 17, 2019 at noon Pacific time.

Time zones got you down? Here's a handy time converter!

Join Hack Chat

A lot of electronics enthusiasts gravitate to the digital side of the hobby, at least at first. It's understandable - an Arduino, a few jumpers, and a bit of code can accomplish a lot. But in the final analysis, digital circuits are just analog circuits with the mystery abstracted away, and understanding the analog world opens up a fascinating window on the world of electronics.

Chris Gammell is well-known around hacker circles thanks to his Amp Hour Podcast with Dave Jones, his KiCad tutorials, and his general hacker chops. He's also got a thing for the analog world, and wants to share some of the tips and tricks he's developed over his two decades as an electrical engineer. 

In the next Hack Chat, we'll be joining Chris down in the weeds to learn the ins and outs of low-level analog measurements. Join us with your questions and insights, or just come along to peel back some of the mysteries of the analog world.

  • Hack Chat Transcript, Part 3

    Lutetium07/17/2019 at 20:05 0 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...

    Read more »

  • Hack Chat Transcript, Part 2

    Lutetium07/17/2019 at 20:03 0 comments

    Chris Gammell12:19 PM
    you need to have a good resistor and a good op amp

    Chris Gammell12:19 PM
    and there are a broad range of parts you can buy

    Will Patton12:19 PM
    ...and a bypass cap across Rf.

    Chris Gammell12:19 PM
    so understanding the critical things will allow you to buy better components that allow more accurate readings

    Chris Gammell12:20 PM
    any questions about that circuit?

    Chris Gammell12:20 PM
    in the case of that circuit, the resistor is super critical

    Chris Gammell12:21 PM
    if you imagine you have a resistor that is a different value than you think it is (say 1.2M instead of 1M), you can calibrate for it

    Seth12:21 PM
    In the event you would want to measure the current through the photodiode with a scope, are you looking at a 1% tolerance resistor or better?

    Chris Gammell12:21 PM
    but say you have a resistor that isn't perfectly linear

    Chris Gammell12:21 PM
    then you can't really calibrate for that

    Dustin Sackett12:21 PM
    @Chris Gammell last question from me: In your experience, how much does good/bad PCB design/layout contribute to the performance of the circuits we are talking about, qualitatively speaking of course.

    Miguel joined  the room.12:21 PM

    Chris Gammell12:22 PM
    > In the event you would want to measure the current through the photodiode with a scope, are you looking at a 1% tolerance resistor or better?

    So you wouldn't be able to measure that current directly, a scope measures voltage

    guido.giunchi12:22 PM
    Can you just use any high gain opamp? Is it critical?

    Chris Gammell12:22 PM
    but that circuit actually is a current-to-voltage converter

    Kelly Heaton12:22 PM
    @Dustin Sackett you can solve a lot of analog problems with the right capacitors between power and ground, as well as a very large ground plane.

    Seth12:22 PM
    I meant a series resistor you place in for test purposes only.

    Chris Gammell12:22 PM
    so if you have a good resistor, you can say with confidence that you're looking at what the current is, represented by the voltage output from the op amp

    Chris Gammell12:23 PM
    > Can you just use any high gain opamp? Is it critical?

    No, the other specs matter quite a bit

    Chris Gammell12:23 PM
    if you have a high offset voltage between the inputs, that can impact things

    Chris Gammell12:23 PM
    the input bias current will have a large impact in this case as well

    Chris Gammell12:23 PM
    > In your experience, how much does good/bad PCB design/layout contribute to the performance of the circuits we are talking about, qualitatively speaking of course.

    Using that example above again, it can be quite a bit

    Chris Gammell12:24 PM
    if you have a poorly laid out circuit, it can really impact analog things

    Chris Gammell12:24 PM
    much more than say an i2c bus

    Chris Gammell12:24 PM
    but I'd say if you're in the microvolt range or below, then it'll be a bigger concern

    Chris Gammell12:24 PM
    as a general rule

    Chris Gammell12:24 PM
    similarly if you're in the nA of current measurement range, it'll have a big impact

    Chris Gammell12:25 PM
    but that also extends to cleanliness of the board as well

    Kelly Heaton12:25 PM
    In my experience, if I can make an analog circuit robust enough in a breadboard, then getting it to work on a PCB is relatively easy.

    Chris Gammell12:25 PM
    any leakage path in an analog circuit is a potential place your circuit accuracy can get worse

    Chris Gammell12:25 PM
    > In my experience, if I can make an analog circuit robust enough in a breadboard, then getting it to work on a PCB is relatively easy.

    Yeah, agree with that

    Chris Gammell12:25 PM
    there are definitely spots where a breadboard will start to breakdown

    Chris Gammell12:25 PM
    usually 10MHz+ on the frequency side of things

    Kelly Heaton12:26 PM
    Yes, parasitic capacitance

    Chris Gammell12:26 PM
    and those same values above for voltage, current

    Dustin Sackett...

    Read more »

  • Hack Chat Transcript, Part 1

    Lutetium07/17/2019 at 20:02 0 comments

    Chris Gammell11:54 AM
    Hello Hack Chat!

    Hi Chris - welcome!

    Chris Gammell11:55 AM
    thanks!

    morgan11:55 AM
    oh heeeey

    Chris Gammell11:55 AM
    Hey Morgan

    guido.giunchi12:00 PM
    Hi!

    Looks like we've got a good turnout, so let's kick it off. Welcome to the Hack Chat everyone, thanks for coming, and thanks to Chris Gammell for hosting. When Chris suggested low-level analog measurement as a topic, I jumped at it - figured we'd all love to hear about that.

    Take it away, Chris!

    Chris Gammell12:01 PM
    OK!

    Chris Gammell12:01 PM
    so uh

    Chris Gammell12:01 PM
    Analog signals

    Chris Gammell12:01 PM
    are everywhere!

    Michael Welling12:01 PM
    how low level are we talking here?

    Chris Gammell12:01 PM
    obviously you all knew that

    Chris Gammell12:01 PM
    so maybe I'll step back

    Chris Gammell12:01 PM
    and mention a bit about my background

    Chris Gammell12:01 PM
    and why I thought this might be a good topic

    Chris Gammell12:01 PM
    I went to school for electronics and struggled with it

    Chris Gammell12:02 PM
    still do, some days

    xinort joined  the room.12:02 PM

    Chris Gammell12:02 PM
    but then I had the opportunity to work at Keithley Instruments in Cleveland OH

    Chris Gammell12:02 PM
    and that's where I really got an education in electronics

    Chris Gammell12:02 PM
    that was working on supporting things like the 2400 source meter, 6517B electrometer, 6485 current source, etc

    Chris Gammell12:03 PM
    of course, that's been a while now since I was ther

    Chris Gammell12:03 PM
    but the low level measurement stuff sticks with you

    Chris Gammell12:03 PM
    namely working with signal processing in the analog domain

    Chris Gammell12:03 PM
    working with op amps, resistors, capacitors, etc

    Kelly Heaton12:03 PM
    What signal to noise ratio?

    Chris Gammell12:03 PM
    and there are a lot of things to consider

    Chris Gammell12:03 PM
    like power cleanliness and such

    Chris Gammell12:04 PM
    and very in depth topics for test and measurement

    Chris Gammell12:04 PM
    but that was the genesis of thinking it'd make a good hack chat topic

    Chris Gammell12:04 PM
    since then, I mostly work on systems that are sensing something in the real world

    Chris Gammell12:04 PM
    but usually are piping back data over an i2c or SPI bus

    Chris Gammell12:04 PM
    so there's less direct interaction with analog signals

    Chris Gammell12:05 PM
    but most people still need to think about things in terms of analog signals and how they look to the chips they're interacting with

    Chris Gammell12:05 PM
    so I guess there are some general tips and tricks, but not sure if that's what people are interested in

    Chris Gammell12:05 PM
    or if they have specific questions they'd like me to answer

    Chris Gammell12:06 PM
    but I'm happy to do either

    Chris Gammell12:06 PM
    and can fill in as necessary

    Chris Gammell12:06 PM
    from a day-to-day basis, I think about troubleshooting and how the interaction with the analog side of things impacted me

    Dustin Sackett12:06 PM
    If you had a "Top X tips and tricks" to recommend, that pertain to this subject, that might be cool!

    Kelly Heaton12:06 PM
    why don't you give us an example description of a circuit you have used to buffer a signal?

    Chris Gammell12:07 PM
    so on the tips and tricks side of things

    Chris Gammell12:07 PM
    I'm always pulling out a scope first and foremost

    Chris Gammell12:07 PM
    and checking the rails

    Chris Gammell12:07 PM
    obviously the voltage levels

    Chris Gammell12:07 PM
    but also how consisten, or "clean", the power supply looks

    Chris Gammell12:07 PM
    this also usually allows me to check if I've turned the device in question on

    Chris Gammell12:07 PM
    which is a pretty common problem as well

    Chris Gammell12:07 PM
    :-D

    Dustin Sackett12:08 PM
    also, if you had some solid book or other resource recommendations on the subject, maybe both historically,...

    Read more »

View all 3 event logs

Enjoy this event?

Share

Discussions

Interested in attending?

Become a member to follow this event or host your own