Tutorial.MotorKnob History

Hide minor edits - Show changes to markup

March 29, 2013, at 02:12 PM by Scott Fitzgerald -
Changed line 40 from:
to:
Changed line 57 from:
to:
March 29, 2013, at 02:11 PM by Scott Fitzgerald -
Changed lines 37-39 from:
to:
Changed lines 50-51 from:
to:
Changed lines 54-56 from:
to:
Changed lines 67-68 from:
to:
Changed line 88 from:
  • Knob - control the position of a servo with a potentiometer.
to:
  • Knob - control the position of a servo with a potentiometer.
March 29, 2013, at 01:29 PM by Scott Fitzgerald -
Changed line 62 from:
to:
March 29, 2013, at 12:48 PM by Scott Fitzgerald -
Changed line 69 from:
to:

For both unipolar and bipolar steppers

Changed lines 71-72 from:

(for both circuits)

to:
March 29, 2013, at 12:47 PM by Scott Fitzgerald -
Changed line 54 from:
to:
March 29, 2013, at 12:46 PM by Scott Fitzgerald -
Added line 37:
Added line 52:
Added line 64:
Deleted lines 67-68:
March 29, 2013, at 12:35 PM by Scott Fitzgerald -
Changed line 37 from:
to:
Changed line 51 from:
to:
March 29, 2013, at 12:34 PM by Scott Fitzgerald -
Changed line 37 from:
to:
Changed line 51 from:
to:
March 29, 2013, at 12:31 PM by Scott Fitzgerald -
Changed lines 36-38 from:

Unipolar Stepper Circuit

to:
Changed lines 44-51 from:

Unipolar Circuit Schematic

Bipolar Stepper Circuit

to:
Changed lines 58-63 from:

Bipolar Stepper Schematic

to:

Bipolar Motor Knob Schematic

Attach:biipolarKnob_schms.png Δ

Deleted lines 84-86:

March 28, 2013, at 09:23 AM by Scott Fitzgerald -
Changed lines 7-10 from:

There are two types of steppers, Unipolars and Bipolars, and it is very important to know which type you are working with. For more information about the differences of the two types, and about the circuits that must be built to control a stepper, please take a look at Tom Igoe's page on stepper motors.

In this example, the turns of a potentiometer (or other sensor) on analog input 0 are used to control the movement of a stepper motor while using the Arduino Stepper Library. The unipolar or bipolar stepper is controlled by using digital pins 8, 9, 10, and 11 in conjunction with either a U2004 Darlington Array (for unipolar steppers) or a SN754410NE H-Bridge (for bipolars).

to:

There are two types of steppers, Unipolars and Bipolars, and it is very important to know which type you are working with. For each of the motors, there is a different circuit. The example code will control both kinds of motors. See the unipolar and bipolar motor schematics for information on how to wire up your motor.

In this example, a potentiometer (or other sensor) on analog input 0 is used to control the movement of a stepper motor using the Arduino Stepper Library. The stepper is controlled by with digital pins 8, 9, 10, and 11 for either unipolar or bipolar motors.

The Arduino will connect to a U2004 Darlington Array if you're using a unipolar stepper or a SN754410NE H-Bridge if you have a bipolar motor.

For more information about the differences of the two types, please take a look at Tom Igoe's page on stepper motors.

Deleted line 82:
November 16, 2011, at 04:40 AM by Scott Fitzgerald -
Changed lines 63-64 from:
to:
September 23, 2010, at 10:55 PM by Christian Cerrito -
Changed lines 3-4 from:

Motor Knob

to:

Stepper Motor Knob

September 23, 2010, at 12:45 PM by Tom Igoe -
Changed lines 63-64 from:
to:
September 23, 2010, at 12:44 PM by Tom Igoe -
Changed lines 63-95 from:
to:
September 23, 2010, at 08:00 AM by Christian Cerrito -
Added lines 105-110:
  • Sweep - sweep the shaft of a servo motor back and forth.
  • Knob - control the position of a servo with a potentiometer.

September 23, 2010, at 07:59 AM by Christian Cerrito -
Changed lines 61-62 from:

(for both circuits)

to:

(for both circuits)

Changed lines 100-101 from:
to:
September 23, 2010, at 07:54 AM by Christian Cerrito -
September 23, 2010, at 07:52 AM by Christian Cerrito -
Added line 60:
Changed lines 96-97 from:
to:
September 23, 2010, at 07:50 AM by Christian Cerrito -
Changed lines 48-49 from:

'"Bipolar Stepper Schematic'''

to:

Bipolar Stepper Schematic

September 23, 2010, at 07:48 AM by Christian Cerrito -
Changed lines 50-52 from:
to:

September 23, 2010, at 07:47 AM by Christian Cerrito -
Changed lines 32-33 from:

Unipolar Stepper

to:

Unipolar Stepper Circuit

Changed lines 37-38 from:

Unipolar Schematic

to:

Unipolar Circuit Schematic

Changed lines 42-43 from:

Bipolar Stepper

to:

Bipolar Stepper Circuit

Changed lines 48-52 from:
to:

'"Bipolar Stepper Schematic'''

Attach:bipolar_bb.jpeg Δ Δ

Added lines 60-61:

(for both circuits)

September 23, 2010, at 07:43 AM by Christian Cerrito -
Changed line 34 from:
to:
Added lines 40-44:

Bipolar Stepper

September 23, 2010, at 07:41 AM by Christian Cerrito -
Added lines 37-43:

Unipolar Schematic

image developed using Fritzing. For more circuit examples, see the Fritzing project page

September 23, 2010, at 07:38 AM by Christian Cerrito -
Added lines 28-29:

In both circuits, connect a 10k pot to power and ground, with it's wiper outputting to analog pin 0.

September 23, 2010, at 07:36 AM by Christian Cerrito -
Changed line 32 from:
to:
September 23, 2010, at 07:12 AM by Christian Cerrito -
Changed lines 10-12 from:

'

Code

to:
September 23, 2010, at 07:01 AM by Christian Cerrito -
Changed lines 5-6 from:

Stepper motors are motors that, due to their design, can be controlled to a high degree of accuracy without any feedback mechanisms. The shaft of a stepper, mounted with a series of magnets, is controlled by a series of electromagnetic coils that are charged positively and negatively in a specific sequence, precisely moving it forward or backward in small "steps".

to:

Stepper motors, due to their unique design, can be controlled to a high degree of accuracy without any feedback mechanisms. The shaft of a stepper, mounted with a series of magnets, is controlled by a series of electromagnetic coils that are charged positively and negatively in a specific sequence, precisely moving it forward or backward in small "steps".

September 23, 2010, at 07:00 AM by Christian Cerrito -
Changed lines 7-10 from:

There are two types of steppers, Unipolars and Bipolars, and it is very important to know which type you are working with. For more information about the differences of the two types, and about the circuits that must be built to control a stepper, please take a look at Tom Igoe's page on stepper motors.

In this example, the turns of a potentiometer (or other sensor) on analog input 0 are used to control the movement of a stepper motor while using the Arduino Stepper Library. The unipolar or bipolar stepper is controlled by using digital pins 8, 9, 10, and 11 in conjunction with either a U2004 Darlington Array (for unipolar steppers) or a SN754410NE H-Bridge (for bipolars) Add a link to tom's stepper pages

to:

There are two types of steppers, Unipolars and Bipolars, and it is very important to know which type you are working with. For more information about the differences of the two types, and about the circuits that must be built to control a stepper, please take a look at Tom Igoe's page on stepper motors.

In this example, the turns of a potentiometer (or other sensor) on analog input 0 are used to control the movement of a stepper motor while using the Arduino Stepper Library. The unipolar or bipolar stepper is controlled by using digital pins 8, 9, 10, and 11 in conjunction with either a U2004 Darlington Array (for unipolar steppers) or a SN754410NE H-Bridge (for bipolars). '

September 23, 2010, at 06:57 AM by Christian Cerrito -
Changed lines 5-6 from:

Stepper motors are motors that, due to their design, can be controlled to a high degree of accuracy without any feedback mechanisms. The shaft of a stepper, mounted with a series of magnets, is controlled by a series of electromagnetic coils that are charged positively and negatively in a specific sequence, precisely turning it in small "steps".

to:

Stepper motors are motors that, due to their design, can be controlled to a high degree of accuracy without any feedback mechanisms. The shaft of a stepper, mounted with a series of magnets, is controlled by a series of electromagnetic coils that are charged positively and negatively in a specific sequence, precisely moving it forward or backward in small "steps".

Changed line 9 from:

In this example, the turns of a potentiometer (or other sensor) on analog input 0 are used to control the movement of a stepper motor using the Arduino Stepper Library. The unipolar or bipolar stepper is controlled by using digital pins 8, 9, 10, and 11 in conjunction with either a U2004 Darlington Array (for unipolar steppers) or a SN754410NE H-Bridge (for bipolars)

to:

In this example, the turns of a potentiometer (or other sensor) on analog input 0 are used to control the movement of a stepper motor while using the Arduino Stepper Library. The unipolar or bipolar stepper is controlled by using digital pins 8, 9, 10, and 11 in conjunction with either a U2004 Darlington Array (for unipolar steppers) or a SN754410NE H-Bridge (for bipolars)

September 23, 2010, at 06:55 AM by Christian Cerrito -
Changed lines 7-8 from:

There are two types of steppers, Unipolars and Bipolars, and it is very important to know which type you are working with. For more information about the differences of the two types, and about the circuits that must be built to control a stepper, please take a look at Tom Igoe's 'page on stepper motors.

to:

There are two types of steppers, Unipolars and Bipolars, and it is very important to know which type you are working with. For more information about the differences of the two types, and about the circuits that must be built to control a stepper, please take a look at Tom Igoe's page on stepper motors.

September 23, 2010, at 06:55 AM by Christian Cerrito -
Changed lines 5-8 from:

Stepper motors are motors that, due to their design, can be controlled to a high degree of accuracy without any feedback mechanisms. The shaft of a stepper, mounted with a series of magnets, is controlled by a series of electromagnetic coils that are charged positively and negatively in a specific sequence, precisely turning it in small "steps".

In this example, the turns of a potentiometer (or other sensor) on analog input 0 are used to control the movement of a stepper motor using the Arduino Stepper Library. The unipolar or bipolar stepper is controlled with pins 8, 9, 10, and 11, using one of the circuits on the linked pages.

to:

Stepper motors are motors that, due to their design, can be controlled to a high degree of accuracy without any feedback mechanisms. The shaft of a stepper, mounted with a series of magnets, is controlled by a series of electromagnetic coils that are charged positively and negatively in a specific sequence, precisely turning it in small "steps".

There are two types of steppers, Unipolars and Bipolars, and it is very important to know which type you are working with. For more information about the differences of the two types, and about the circuits that must be built to control a stepper, please take a look at Tom Igoe's 'page on stepper motors.

In this example, the turns of a potentiometer (or other sensor) on analog input 0 are used to control the movement of a stepper motor using the Arduino Stepper Library. The unipolar or bipolar stepper is controlled by using digital pins 8, 9, 10, and 11 in conjunction with either a U2004 Darlington Array (for unipolar steppers) or a SN754410NE H-Bridge (for bipolars)

September 23, 2010, at 06:44 AM by Christian Cerrito -
Changed lines 5-8 from:

Description

A stepper motor follows the turns of a potentiometer (or other sensor) on analog input 0. The unipolar or bipolar stepper is controlled with pins 8, 9, 10, and 11, using one of the circuits on the linked pages.

to:

Stepper motors are motors that, due to their design, can be controlled to a high degree of accuracy without any feedback mechanisms. The shaft of a stepper, mounted with a series of magnets, is controlled by a series of electromagnetic coils that are charged positively and negatively in a specific sequence, precisely turning it in small "steps".

In this example, the turns of a potentiometer (or other sensor) on analog input 0 are used to control the movement of a stepper motor using the Arduino Stepper Library. The unipolar or bipolar stepper is controlled with pins 8, 9, 10, and 11, using one of the circuits on the linked pages.

September 20, 2010, at 05:19 PM by Tom Igoe -
Added line 9:

Add a link to tom's stepper pages

September 17, 2010, at 12:01 AM by Tom Igoe -
Changed lines 34-35 from:
  int val = analogRead(0);
to:
  int val = analogRead(A0);
September 16, 2010, at 11:29 PM by Tom Igoe -
Changed line 11 from:

[@

to:
Changed lines 43-44 from:

@]

to:
May 22, 2008, at 04:40 AM by David A. Mellis -
Changed lines 45-46 from:

See Also

to:

See also

May 22, 2008, at 04:40 AM by David A. Mellis -
Changed lines 43-47 from:

@]

to:
May 22, 2008, at 04:37 AM by David A. Mellis -
Changed lines 7-8 from:

A stepper motor follows the turns of a potentiometer (or other sensor) on analog input 0. The unipolar? or bipolar? stepper is controlled with pins 8, 9, 10, and 11, using one of the circuits on the linked pages.

to:

A stepper motor follows the turns of a potentiometer (or other sensor) on analog input 0. The unipolar or bipolar stepper is controlled with pins 8, 9, 10, and 11, using one of the circuits on the linked pages.

May 22, 2008, at 04:36 AM by David A. Mellis -
Added lines 1-43:

Examples > Stepper Library

Motor Knob

Description

A stepper motor follows the turns of a potentiometer (or other sensor) on analog input 0. The unipolar? or bipolar? stepper is controlled with pins 8, 9, 10, and 11, using one of the circuits on the linked pages.

Code

#include <Stepper.h>

// change this to the number of steps on your motor
#define STEPS 100

// create an instance of the stepper class, specifying
// the number of steps of the motor and the pins it's
// attached to
Stepper stepper(STEPS, 8, 9, 10, 11);

// the previous reading from the analog input
int previous = 0;

void setup()
{
  // set the speed of the motor to 30 RPMs
  stepper.setSpeed(30);
}

void loop()
{
  // get the sensor value
  int val = analogRead(0);

  // move a number of steps equal to the change in the
  // sensor reading
  stepper.step(val - previous);

  // remember the previous value of the sensor
  previous = val;
}

Share