Dimmer Circuit Acts Erratic

I'm building a UNO R4 based LED Christmas tree controller that simply adjusts brightness as a pot is twisted. But, the LEDs do not smoothly transition from OFF to full bright. Instead they jump from OFF, to about 1/3 brightness, to full bright - Here's a video showing me turning pot from full OFF to full ON over a 5 sec interval:
Video

I'm not sure if I have a circuit problem, coding problem, or what. Here's my schematic:

Here's my code:

const byte ledDriverPin = 11;
const byte potPin = A0;

void setup() {
  pinMode(ledDriverPin, OUTPUT);
}

void loop() {
  int pot = analogRead(potPin);
  int brightness = map(pot, 0, 1023, 0, 255);
  analogWrite(ledDriverPin, brightness);
  delay(50);
}

Any ideas on a fix?

Thanks!

image

Are you sure about those connections? I'd expect the pot's wiper to be on the middle pin, not one of the ends.

According to https://docs.arduino.cc/hardware/uno-r4-wifi/#tech-specs the minimum input voltage on the Vin pin is 6V. You're feeding 5V in there.

Remember to choose the correct profile fr the pot m, then also LEDs are non linear. they’ll be brighter at the lower end of drive pwm, than further up rpthe curve, One solution is a lookup array of 255 uints to adjust the curve profile,

In addition to the other errors already cited:
You have 29VDC connected to the Uno A0 via the dimmer pot. Any voltage over 5V will damage the Uno.
You need to supply the pot with 5V if the Uno is still OK

Thanks! I switched 2 & 3 on the pot, and now it dims as expected. I should have thought of that.

Thanks! I switched 2 & 3 on the pot, and now it dims as expected. I should have thought of that.

Thanks. I increase VIN to 7.5 VDC.

Thanks. With the 10K pot I am measuring 6 VDC max at A0. I was worried about that too, so I made sure before hookup.

Even 6V is too much.
If you have 29V connected then something is wrong. You probably damaged the UNO

You will burn the analog input and/or the ADC, the signal cannot exceed 5V.

Thanks @jim-p and @MaximoEsfuerzo!

I changed the circuit to use 3.3 V out of the board to the pot, as shown below. Fortunately, I did not appear to have damaged the UNO, or its replacement (Redbear Blend Micro I had sitting around). I'm glad you guys pointed out that major mistake. I need to be more careful.

The circuit now dims the 1000 LEDs smoothly, and the max temp I'm seeing on any component is 75F after 30 minutes at various brightness levels.

BTW: Is there a good test I can run on the UNO to make sure it's not damaged?
Basic | AnalogSerialRead on A0 appears normal.