Analog Sensors and Reference Voltage correction. How to make useful measurements with an MCU/ADC?

Поділитися
Вставка
  • Опубліковано 3 жов 2024

КОМЕНТАРІ • 4

  • @codertao
    @codertao 6 місяців тому

    There may be one other effect worth considering, though I'm not sure how relevant it is here- the Arduino is using a multiplexer to switch between analog pins, and it needs to charge a sampling capacitor to do the sample/hold reading- so the first reading on a pin _can_ have a so-called "ghost voltage"- influence from the last reading. It's really only relevant when measuring high impedance sources, but I'm not sure what the boundary is for high impedance here.
    The advice for dealing with this is to measure on the pin to switch the mux to pointing at it, and then sample it again (equivalently 100uS later, if I remember right / due to ADC sampling rates), and only use the second sample. SImplified: read twice, use the second reading.
    (and then after that you get into weirder "read 5 times, take the median" and other attempts to filter out noise/outliers) (and averaging multiple medians to try and get slightly higher resolution/stability)
    Also, I have a dumb request: in the opening monologues can you focus a bit more on either looking at the project or the camera? going back and forth is weirdly distracting (more so at 2x speed). I'm fine with not looking at the camera- you've got a project you want to show off, and you have the lapel mic so there isn't a sound quality concern.

    • @RolandW_DIYEnergyandMore
      @RolandW_DIYEnergyandMore  6 місяців тому

      Yes, great input.
      Usually when you use a different ADC then that one you might have on the MCU directly (exc. ADS1115), you will use sensor libraries where there will be a lot of different settings/commands available.
      One such setting might be how many readings/samples the ADC will take per each read request and output an average. So that should help clearing up noise and capacitive effects.
      The ADC of the Nano here is of course only very basic. 10bit is by far not enough resolution too.
      Thanks!

    • @codertao
      @codertao 6 місяців тому +1

      @@RolandW_DIYEnergyandMoreYeah, at 10 bits you're only going to get 5mV resolution- which isn't awful, but depending on the specific ACS chip you're using, you would only get a half amp resolution (the bidi 200A chips look to be 10mV/A; though the 50A version offers 40mV/A). It's still shocking to me that the IC connections can handle 200A, I'd have expected them to fuse long before then.

    • @RolandW_DIYEnergyandMore
      @RolandW_DIYEnergyandMore  6 місяців тому

      @@codertao in my powerwall I do have a 16bit ADC of course. After I have now installed the final shielded cable the sensor is working very well. Yeah, 200A is really a big stretch :)