Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Volume stop at about 80% and wrong Arduino voltage. #16

Closed
Ano10 opened this issue Oct 15, 2020 · 5 comments
Closed

Volume stop at about 80% and wrong Arduino voltage. #16

Ano10 opened this issue Oct 15, 2020 · 5 comments

Comments

@Ano10
Copy link

Ano10 commented Oct 15, 2020

Hi and thanks for this software. I really like it.
Here is what happened
I'm using an Arduino Nano and plug slider to Arduino's 5V.
With this setup volume won't go up to 100%, it stops at about 80%.
Checking voltage Arduino's 5V give me around 4.6V. I've found many source on internet saying this is normal when USB powered. So calculation of voltage from potentiometer is wrong.
I check 3.3v and voltage is 3.6V (yes that's not very calibrated) and will make false calculations.

So my solution is to use AREF pin which supports 0 to 5V. Not knowing if arduino's 5V won't exceed 5V (depending of input 5V from USB), I choose to connect Arduino's 3.3v to sliders and to AREF.
I've also add "analogReference(EXTERNAL)" to setup.

void setup() {
analogReference(EXTERNAL); // set the analog reference to the AREF pin
for (int i = 0; i < NUM_SLIDERS; i++) {
pinMode(analogInputs[i], INPUT);
}

Now whatever is real value of 3v3, measurement are correct.

I don't know if code and documentation should be modified or if I'm the onlyone having this issue but I wanted to report it.

@omriharel
Copy link
Owner

Hi @Ano10, thanks for writing (and thanks for the kind words).

The initial issue that you've reported usually happens to users who have incorrectly wired their sliders (most commonly due to wrong assumptions about their slider's pin layout). I'm not completely clear on what the solution you found is, and whether it works completely (or just accidentally circumvents some of the problems you've been having).

Due to the nature of these hardware-related circumstances (whether it's faulty hardware or bad wiring), troubleshooting them in a GitHub issue could be quite tricky. I'd like to take this opportunity and invite you to join our community Discord server. It's full of people who are always happy to help with debugging and solving hardware issues like this one - please feel free to reach out!

@Ano10
Copy link
Author

Ano10 commented Oct 16, 2020

In fact I haven't received my sliders yet, so I'm using a potentiometer.
One outer pin goes to GND, other outer goes to 3.3v and middle pin to analogic input A0.
Arduino can't produce good 5V when connected to USB, but 3.3V may be correct on good quality board.
Arduino is not very accurate at reading voltage, specialy if not using outside reference. Measure can be correct on good quality board with rock solid 3.3V. Mine is not ... 😊
Some interesting intel http://www.skillbank.co.uk/arduino/measure.htm

@omriharel
Copy link
Owner

Thanks for the info. Sliders and regular potentiometers are electrically identical, so I use the two interchangeably :)

We've never seen this kind of issue even on cheap clone boards. Potentiometers that were wired correctly would always produce the full 5 volts, perhaps the board you're using is the problem. You should be able to wire your pots to 5v, run the original Arduino sketch and not worry about voltage read accuracy too much (deej has an adjustable built-in noise reduction system to help with the inevitable noise originating in hardware).

@Ano10
Copy link
Author

Ano10 commented Oct 16, 2020

That's weird !
With deej, we're not making a voltmeter, we don't need reference voltage to calculate precise voltage.
We only mesure variation of whatever voltage and no need for this voltage to be accurate.
So I uploaded original project code and rewired my hardware... and it works flowlessly ! 😮
I maybe had bad connection or damage wire... 😠
Thanks @omriharel for helping me and your quick answers, sorry 🙏 to have waste your time.

@Ano10 Ano10 closed this as completed Oct 16, 2020
@omriharel
Copy link
Owner

Hey @Ano10, no worries at all! Glad you ended up figuring it out and solving the kinks. I hope you enjoy deej, and let me know if you run into any problems in the future!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants