Potentiometer to activate stepper at certain angle

Hi there, I'm new to the arduino scene and looking for some help :) I currently have a 10 turn (3600 degree) potentiometer and i'm using 1800 degrees as my zero reference point and after it rotates 3 turns anticlockwise it will be at 720 degrees. When the pot reaches 720 degrees i want it to activate the stepper motor to rotate my application, in turn rotating the pot back to 1800 degrees via a small pulley system. When it reaches 1800 again i want the stepper to stop. Is there a program code that exists out there that will allow me to do this? Thanks in advance :)

Here’s an example sketch that comes with the IDE. It will step your motor one step at a time.

/*
 Stepper Motor Control - one step at a time

 This program drives a unipolar or bipolar stepper motor.
 The motor is attached to digital pins 8 - 11 of the Arduino.

 The motor will step one step at a time, very slowly.  You can use this to
 test that you've got the four wires of your stepper wired to the correct
 pins. If wired correctly, all steps should be in the same direction.

 Use this also to count the number of steps per revolution of your motor,
 if you don't know it.  Then plug that number into the oneRevolution
 example to see if you got it right.

 Created 30 Nov. 2009
 by Tom Igoe

 */

#include <Stepper.h>

const int stepsPerRevolution = 200;  // change this to fit the number of steps per revolution
// for your motor

// initialize the stepper library on pins 8 through 11:
Stepper myStepper(stepsPerRevolution, 8, 9, 10, 11);

int stepCount = 0;         // number of steps the motor has taken

void setup() {
  // initialize the serial port:
  Serial.begin(9600);
}

void loop() {
  // step one step:
  myStepper.step(1);
  Serial.print("steps:" );
  Serial.println(stepCount);
  stepCount++;
  delay(500);
}

The next thing you’ll want to get to grips with is analogRead This will allow you to read the position of your potentiometer.

Using the information here, it should be quite simple to write a sketch that does exactly as you describe.

I currently have a 10 turn (3600 degree) potentiometer

Post a link for the pot.

The Thread stepper motor basics may be useful.

Have you tested the potentiometer with a multimeter to satisfy yourself that it always give the same resistance at the same position - including when the position is reached clockwise or counter clockwise.

Tell us what the project is intended to achieve, and not just how you are thinking of implementing it.

...R

raschemmel: Post a link for the pot.

http://ie.rs-online.com/web/p/potentiometers/4607510/ There it is, Its an Irish company as far as I know so i'm not sure how far or wide they deliver , but hope that helps.

The project is for college, is a model of a wind turbine that will contain circuitry to control the Yaw of the nacelle (turn the turbine blades towards the wind) Basically turbines have a cable twist control system so that as the nacelle rotates the internal cables don't twist to much and get damaged. The nacelle will rotate back to its Zero point after a certain amount of turns in one direction. That is what i want to mimic with my project, when the potentiometer counts 3 revolutions i want it to reset the nacelle of my model back to zero via a stepper motor.

sketch ? (drawing ) (post a photo of a handdrawn sketch of "the device")

Where is the pot in relation to the arduino ? Is it connected or is it on some other circuit elsewhere (not connected to arduino) ?