Programing Arduino UNO with h bridge stepper motor nema 17 and potentiometer

Hello everybody!
first of all, SORY for my spelling, english is not my mother language, i understand it perfectly but im not good in spelling and grammar!
well, im building a timelapse slider for a DSRL camera, tipical project, but iv havent found any programing about a potentiometers.
heres what i would like to achive.
since i canot program the Arduino every time i do a shot (im out in the field) and i have to have a speed control on the motor. so i got potentiometer, iv talked to some frinends who helped my but it was limmited, well, now what do i do to make this work VERRY slow and be able to speed it up? verry slow is moving 1.5mts in 2 or more hours, and fast, the same distance in 1 min.
i was thinking on adding a LCD display to show me that equation since is important information for me.
LAST THING, since i have to supply energy to all this, how can i do that? 12v bateries?!

cheers and thnx for the help! =)!

Do you want to achieve continuous steady movement, or have the slider stop while each image is captured?

well, i think the most easy for now would be a steady movement...
if not i would have to sinc the camera to the slider...
since most of the time the slider will be stopped (1.5mts in hours) i do see a problem!

Read from the potentiometer using analogRead() which should give a value from 0 - 1023.

Use the size of that value to set the duration between stepper motor steps.

Get the stepper motor working as you want before you introduce the complication of the LCD display.

Stepper motors are very power-hungry. If the one you have has sufficient internal resistance when unpowered to hold the camera in position then you can get the Arduino to switch off power while the camera is stationary. Be aware, though, that if someone accidentally moves the camera the Arduino won't know and you will have to move the camera back to the home position to re-establish the step positioning.

You might be able to use a servo to apply a brake to the stepper motor before you switch off the motor power.

...R

Have you picked the motors yet?

How accurately do you need to be able to control the speed? (Are you considering options such as running a geared DC motor with the power controlled via a pot which you could adjust until the speed seemed about right, or is it important that you achieve exactly X mm per minute?)

PeterH, i have a Stepper motor NEMA 17. well, the more accurate the better.
but its a must to be able to be really slow and be able to speed it up.

in regard to robins comment, i couldn't understand the part of turning off the Arduino during the timelapse.... the motor might be needing some strength wile its stopped, so i think its going to be all the time on!
if i connect the potentiometer to the analog read, i should connect the h bridge ass well, right?

THNX!

connanschilling:
if i connect the potentiometer to the analog read, i should connect the h bridge ass well, right?

Yes. The h-bridge and the analog input are completely separate and would need to be connected on separate pins.

connanschilling:
in regard to robins comment, i couldn't understand the part of turning off the Arduino during the timelapse.... the motor might be needing some strength wile its stopped, so i think its going to be all the time on!

If the motor's internal friction is not enough to hold position and if it is essential to keep power on the stepper motor to prevent the camera moving then you will need a large power source. The motor will be drawing a lot of power all the time. I don't think you have told us what motor you have. Nema 17 just defines the size of the face plate and fixing holes.

Have you considered my suggestion for a brake?

If you need a low power option then I think you will need to use a DC motor with a worm-gear reduction. The worm-gear prevents the load from moving the motor. The problem is that you will have to find some other method for speed and position monitoring.

...R