#Volume does not go to 100% how can i fix that?

10 messages · Page 1 of 1 (latest)

charred crag
rain musk
#

Hey! I know this is a pretty late reply. But I had the same issue because one of my pots didn't go up to the expected value.

You can use map to set the range for it. Just identify the top and bottom ranges for it by watching the output log and change the numbers accordingly in this code. AND!! The analog port that's giving you the issue.

void updateSliderValues() {
  for (int i = 0; i < NUM_SLIDERS; i++) {
    int value = analogRead(analogInputs[i]);
    
    // Apply mapping only if the analog input is A0
    if (analogInputs[i] == A0) {
      analogSliderValues[i] = map(analogRead(analogInputs[i]), 360, 1000, 0, 1020);
      if (analogSliderValues[i] < 0) {
        analogSliderValues[i] = 0;
      }
        
    } else {
      analogSliderValues[i] = analogRead(analogInputs[i]);
    }
  }
}```
cobalt plank
#

I had the same issue when I used the Arduino Vin port as + for the potis. When I used 5V from arduino it worked perfect

dense pecan
#

if it is only one input that is having trouble then it is likely a bad potentiometer.

rain musk
#

A capacitor in line also helps too!

My issue was a mixed bit of a usb port that didn't have enough juice. And a bit of a bad pot. I used 3 kinds of pots for mine. 2 knobs. 3 sliders. With 1 slider that had an LED for master volume. The LED one was the issue for me.

The capacitor helped the LED and kept all the other pots from changing values when I changed master. But it still didn't quite make it all the way up and down for what it was expecting so I just mapped the range. Worked for me. I didn't feel like buys more pots. lol

dense pecan
#

How do you have the led wired?

#

It sounds like you just have the led on the same input as the slider

rain musk
#

I do. But that was the point. It's actually built into the pot. It brightens and dims based on the pot. Don't stress it though. The capacitor fixed it. And I think the missing range at the top and bottom is due to mechanical interference from it being made cheap in china. So the range mapping fixed it for me.

Before I threw in the capacitor it made the other pots change values a bit whenever I changed the master volume pot with the LED.

dense pecan
#

the range issue is actually the fact that you are not actually current limiting the LED, when you move to the top of the range, the LED is limiting the voltage as you move up, as it cannot go higher than the Diode Voltage, eventually if you get to the far end of the POT you have the chance of overloading the LED

there is an easy fix however, just remove the LED from that signal pin, and use an unused pin, in the software make this statement

analogWrite(newPin, analogSliderValues[SliderForThis]/4); then that LED will be properly driven... and you should have your full POT range.

rain musk