[Swansea Hackspace] Arduino Uno interface to a 3D printer stepper motor.
Tim Moore
timmoore47 at gmail.com
Sun Apr 19 11:21:14 BST 2015
Update:-
It may not be very riveting but the change to 6400 (and the deletion of */
at the top of the code worked fine !
the count for
90 deg was 500 and time 52.5 secs
180 deg was 1000 105
270 deg was 1500 157.5
360 deg was 2000 210 secs ( 3m 30 secs) approx
(I hope !)
Now this might be very boring, but it also might help a Newbie to stepper
motors test their new purchase out too !
Anyone know if the controller board can make it go in reverse ?
: )))
Tim_1
On 19 April 2015 at 10:23, Tim Moore <timmoore47 at gmail.com> wrote:
> I've been trying to get this working on a 28BYJ-48 with ULN2003 cheapest
> stepper motor set up.
>
> Created 30 Nov. 2009
> by Tom Igoe
>
> */
>
> #include <Stepper.h>
>
> const int stepsPerRevolution = 1440; // 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(100);
> }
>
>
> Spec:-
>
>
>
> -
> - Voltage : 5V
> - Diameter : 28mm
> - Step angle : 5.625 x 1 / 64
> - Reduction ratio : 1 / 64
> - 5 Line 4 phase
> - Current draw : 92mA
> - Operating Frequency : 100pps
> - Dimensions : 35mm x 28mm
> - 4 mounting holes
> - ULN2003 chip
> - A, B, C, D four-phase status LED
>
> ___
>
>
> Now the divide by 64 seems to be a stumbling block ?
>
> What I'm trying to do is use the 1.8 degree characteristic to get 100
> pulses to achieve a total rotation of 180 degrees to the shaft.
>
> A period of anything up to two minutes is fine for the 180 degree rotation.
>
> So far it twitches a bit but not much else e.g. not very exciting.
>
> Should the stepsPerRevolution = 1440 be changed to stepsPerRevolution =
> 6400 ?
>
> Maybe I've got the Arduino pins a tad wrong ?
>
> : )
>
>
> Tim_1
>
>
>
> On 18 April 2015 at 19:58, Justin Mitchell <
> justin at swansea.hackspace.org.uk> wrote:
>
>> Yes, one motor one step-stick.
>>
>> Control it from an arduino, or any other micro, just needs two GPIO
>> lines.
>>
>>
>> On Sat, 2015-04-18 at 16:04 +0100, Tim Moore wrote:
>> > So a single 'step-stick' would do it ?
>> >
>> >
>> > Many thanks for responding !
>> >
>> > : )))
>> >
>> >
>> > Tim_1
>> >
>> >
>> > On 18 April 2015 at 15:09, Justin Mitchell <justin at discordia.org.uk>
>> > wrote:
>> > It's an interface for all the stuff you need to drive a 3d
>> > printer, takes 5 step-sticks for stepper driving, has power
>> > MOSFETs to pwm the hotends and heated bed, and a bunch of
>> > inputs for end stops and thermistors. You plug it into an
>> > Arduino mega board, install some software like Marlin and it
>> > can run your printer, or mixed to control a CNC mill or laser
>> > cutter.
>> >
>> > Way over kill for driving one motor :)
>> >
>> > On 18 Apr 2015 2:51 pm, Tim Moore <timmoore47 at gmail.com>
>> > wrote:
>> > >
>> > > Wow ! Loads of interesting links and ideas !
>> > >
>> > > Its a very slow rotation, so inertia is not a problem.
>> > >
>> > > Is a 'RAMPS 1.4' useful ? what does it do ?
>> > >
>> > > Many thanks to all who have responded !
>> > >
>> > > : )))
>> > >
>> > > Tim_1
>> > >
>> > > On 18 April 2015 at 13:57, oliver Oliver
>> > <oliver at oliverjenkins.com> wrote:
>> > >>
>> > >> Think about pulleys or gears. I don't know if you want the
>> > pole to stop at a particular point or not. Inertia in 1m pole
>> > will be higher than braking force of a stepper motor. So it
>> > will continue to spin after you stop the motor. Giving you an
>> > unpredictable 180 plus rotation.
>> > >>
>> > >> For a pulley arrangement look at t5 timing belts. you can
>> > easily print the pulleys using a reprap. There are libraries
>> > on thingiverse.
>> > >>
>> > >> A worm gear would be better, but you can't print those.
>> > >>
>> > >> Oli
>> > >>
>> > >> On 18 Apr 2015 12:33, "Tim Moore" <timmoore47 at gmail.com>
>> > wrote:
>> > >>>
>> > >>> I'm trying to carefully rorate a metre long light weight
>> > pole through 180 degrees.
>> > >>>
>> > >>> I've got a Stepper Motor type 28BYJ-48 working fine, but
>> > I'm sure I need one that is a bit more chunky !
>> > >>>
>> > >>> I've got a 17HS16-2004S NEMA 17 (42 x 42 mm) high torque
>> > 1.8 degree stepper motor on the way with a controller card
>> > >>>
>> > >>> But I've not got a very clear vision yet what else I might
>> > need and if there is any Arduino example software listing that
>> > would be good to use to get it to work ?
>> > >>>
>> > >>> I don't want to reinvent the wheel ! *LOL*
>> > >>>
>> > >>> Any thoughts anyone ?
>> > >>>
>> > >>> : )))
>> > >>>
>> > >>> Tim_1
>> > >>>
>> > >>> _______________________________________________
>> > >>> Hackspace mailing list
>> > >>> Hackspace at swansea.hackspace.org.uk
>> > >>> http://swansea.hackspace.org.uk/mailman/listinfo/hackspace
>> > >>>
>> > >>
>> > >> _______________________________________________
>> > >> Hackspace mailing list
>> > >> Hackspace at swansea.hackspace.org.uk
>> > >> http://swansea.hackspace.org.uk/mailman/listinfo/hackspace
>> > >>
>> > >
>> > _______________________________________________
>> > Hackspace mailing list
>> > Hackspace at swansea.hackspace.org.uk
>> > http://swansea.hackspace.org.uk/mailman/listinfo/hackspace
>> >
>> >
>> >
>> > _______________________________________________
>> > Hackspace mailing list
>> > Hackspace at swansea.hackspace.org.uk
>> > http://swansea.hackspace.org.uk/mailman/listinfo/hackspace
>>
>>
>> _______________________________________________
>> Hackspace mailing list
>> Hackspace at swansea.hackspace.org.uk
>> http://swansea.hackspace.org.uk/mailman/listinfo/hackspace
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://swansea.hackspace.org.uk/pipermail/hackspace/attachments/20150419/85acc160/attachment.html>
More information about the Hackspace
mailing list