Go Down

Topic: Potentiometer reading value never reach 0 or 1023 (Read 315 times) previous topic - next topic

tamtam215

Hi everyone, I'm trying to use a potentiometer to control Adafruit Neopixel light. But I can't get a stabilize
value from the pot reading. I'm ok if the value change +/- 1 or 2 but the change was by maximum of 30. I also notice the pot value never reach 0 or 1023. So I tried to create a simple circuit to read the pot value to test the pot and the value is stable. The pot value always change, only when I connect Neopixel light into my circuit. Now, I'm thinking my circuit have a problem. Could someone help me figure this out please? I'm a newbie and have no idea if I could use any other component to help the circuit.

UKHeliBob

Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

detown

You cannot power the neopixel from the 5V pin on the Arduino. Use a separate power supply for the neopixel and don't forget to connect the grounds.

gilshultz

That is a typical indication that your power supply's are unstable and probably do not have a solid ground. You may also have electrical noise coming from the power source, I am guessing it is your computer.
This response is to help you get started in solving your problem, not solve it for you.
Good Luck & Have Fun!
Gil

tamtam215

detown Thanks for helping me out. I will definitely try implementing this.

tamtam215

gilshultz
What do you mean by a solid ground? I'm sorry I'm very new to circuit and have very little knowledge on this. I don't have electrical noise from my computer. Is there anything I could add to the circuit to stabilize the power supply? Thank you!!!

MarkT

The power and ground to the pot need to be run on separate wires to those to the neopixels, otherwise the
voltage drops on the wires due to the heavy currents will affect the pot.  Those thin hook-up wires for breadboards are only for small currents and have a lot of resistance compared to stouter wiring.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

gilshultz

That is another way of saying are all the grounds good. Single point grounding at the power supply is best. As far as noise, the only computers I have seen without electrical noise are turned off and even then not are all noise free. You probably have a switching supply supplying 5 volts to the USB connection. Put a scope on it and you will see what I am talking about. Remember each piece of wire is a resistor, capacitor and inductor all in one.  Granted small in value but there. You are feeding the LEDs with the same wire the pots are connected to.  I would suggest you go on line and get some background in basic electronics. 
This response is to help you get started in solving your problem, not solve it for you.
Good Luck & Have Fun!
Gil

MarkT

Single point grounding should be at the Arduino since the ADC is ratiometric to the Vcc at the Arduino
and thus the pot wires must run direct from the Arduino, not the power supply.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Go Up