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