position control

:o
Hey everyone,i'm working on a dc motor position control,i'm doing a closed loop control system with a potentiometer and a rotary encoder feedback system ,i'm using an uno and it's my first system to build

In pin8 of L293NE H-bridge we have this motor battery pin and i'm connecting it to +12 V,My question is

Do i need to tie up my potentiometer Vcc to the same voltage +12V ,because the potentiometer centre is connected to an A0 analog input in i'm reading it to help control my position ; Help if you can and do not hesitate to share any helpful sources or subjects please !

younes_hamza:
Do i need to tie up my potentiometer Vcc to the same voltage +12V

No. The potentiometer doesn't control the motor directly. You're just using it as an input for the Arduino. You should tie the pot's Vcc to 5V.

You'll blow up your Arduino if you connect the pot to 12V

Any Arduino pin is limited to 0V to 5V (if its a 5V Arduino).