Hi!

I'm finally sitting to test my Bela Pepper. I'm having a ball with SuperCollider and my modular but I'm surprised by the behaviour of my analog inputs.

With no inputs connected, none of my pots quite return values from 0 -> 1. The first pot is close, all of the others are a little over 10% too low.

The maximum values for each pot is as follows:
Pot 0: 0.99985...
Pot 1: 0.898...
Pot 2: 0.897...
Pot 3: 0.883...
Pot 4: 0.924...
Pot 5: 0.898...
Pot 6: 0.911...
Pot 7: 0.877...

When a CV input is provided they're all scaled by those amounts.

What is the likely cause of the scaling? Is it possible to get ranges of values closer to 0-1?

Thanks!

Are those values constant over time or do they float a lot? Does changing one of the pots affect the reading on neighbouring ones, too? I suspect you may have a faulty connection between the analog inputs sockets on Bela and those on Pepper. Did you use the extra-long headers for the analog pin headers on Pepper? Try squeezing the two boards (Bela cape and Pepper) closer together making sure the headers in the middle make good contact.

    Thankyou. Sadly I'm still experiencing the problem:

    giuliomoro Are those values constant over time or do they float a lot?

    They are pretty much constant. Only a tiny amount of noise (less than 1 pixel) is visible on the scope.

    giuliomoro Does changing one of the pots affect the reading on neighbouring ones, too?

    No. They are all independent.

    giuliomoro Did you use the extra-long headers for the analog pin headers on Pepper?

    Yes. I'm using longer pins.

    giuliomoro Try squeezing the two boards (Bela cape and Pepper) closer together making sure the headers in the middle make good contact.

    This hasn't fixed anything sadly... I may try resoldering the headers tomorrow. Are there other bits of the PCB I should pay particular attention to?

      Tristan They are pretty much constant. Only a tiny amount of noise (less than 1 pixel) is visible on the scope.

      giuliomoro Does changing one of the pots affect the reading on neighbouring ones, too?

      No. They are all independent.

      Okay all this indicates that they are connected properly. No need to resolder the headers.

      The variation across channels may be due to tolerance in the value of the potentiometers and so you may need to calibrate it manually if you need more accurate values. Let me check on one of the units we have.

        giuliomoro So when we say "calibrate" do we mean swap resistors/pots in and out such that we get 4.096V from 10V on each channel?

        Should I try to measure the resistance across both of them whilst they're still on the board using a multimeter first?

        The resistors on the schematic give 4V in an ideal world, don't they? So I'm looking for pots and resistors with slightly more or less resistance to substitute?

        eg. when the value of the pot is accurate at 100k I need to find a resistor at 144.141k?
        or when the resistor value is accurately 150k I need a pot that goes between 0 and 104.065k?

        Is trial and error the only way to resolve this?

        I'll confirm that the ratio is correct/different to the others for the first channel which gives the full range of values before desoldering anything

        I've also noticed another issue! My analog outputs all clip at approximately 0.94V!

          Tristan eg. when the value of the pot is accurate at 100k I need to find a resistor at 144.141k?

          In theory yes, though in practice that's impratactical to achieve.

          Tristan So when we say "calibrate" do we mean swap resistors/pots in and out such that we get 4.096V from 10V on each channel?

          Actually I meant a software calibration, where for each input you record the full scale value and later rescale it so that each channel's input range is as close as possible to 0 to 1.

          Tristan I've also noticed another issue! My analog outputs all clip at approximately 0.94V!

          What does this mean? That you reach the 5V clipping value when you are sending out 0.94? Or that you are actually achieving a maximum of 0.94V? In the former case, see what I responded to you in an earlier post:

          giuliomoro Now, these values may not be mV accurate, so some calibration may be needed. That could be done by adding per-channel scaling and offset.
          See here for a complete approach: https://forum.bela.io/d/3859-volt-per-octave-out-for-pepper