Stepper movement based on voltage read (1-5V)

hello there,

I want to code an Adriano to move a stepper motor based of the number of voltages I send it through an analog pin connected to a voltage calibrator where I can adjust the number of volts between 1 and 5.

For example, if i send it 1 volts I would like the ardunio to move 200 steps. It doesn't have to be exactly that, I want it to be flexible.

I'm new to arduino and this has been my first task assigned to me. please help

Yes you can do this.
What hardware did you get (links)?
What have you done in electronics and the Arduino platform.
Master all the examples that come with the IDE.
Do some research into driving stepping motors with the Arduino.

These links may help to get you started.
Stepper Motor Basics
Simple Stepper Code

Use analogRead() to get a value between 0 and 1023 that is proportional to your voltage and store the number in a variable.

Write your stepper code to move a certain number of steps depending on the value in that variable.

...R
Planning and Implementing a Program

Follow Robin2’s advice and use analogRead() and after that use map() to map 0 … 1023 to “min step” … “max steps”, depending on your requirements

Hi,
We need a bit more about your project.

If you set the input to 1V and the stepper goes 100steps CW,
when you then apply 0V what do you want the stepper to do?
when you apply 2V what do you want the stepper to do?

Do you want the stepper to track your input voltage?
That is;
0V = Zero (Home) Position
1V = 100steps from home.
2V = 200steps from home.
3V = 300steps from home.
4V = 400steps from home.
5V = 500steps from home.

So as your input voltage goes up and down, your stepper goes CW and CCW to keep in the correct position?

Tom.... :slight_smile:

Did you already write some code and could you show it to us?