Sunday, July 5, 2015

07. Plug my stepper motor and test it

Now it's time to plug my stepper motor onthe CNC shield.

I read this tip: "Do NOT connect or disconnect a motor while the driver is energized. This will cause permanent damage."  -- Sparkfun

As per the specification of my 42BYGH47401A stepper motor, the wiring of the 4 leads are ordered as:
  • RED Phase: A
  • BLUE Phase: A Return
  • GREEN Phase: B
  • BLACK Phase: B Return
Not fully explicit to me as my CNC shield shows A1, A2, B1 and B2 for each


As per http://www.selene.co/Articles/WiringConfigurations.aspx, "Bipolar motors are the simplest of the configurations presented here. Bipolar motors have 4 leads and two windings. Only one configuration is possible with a bipolar motor, as shown to the right. What is important for a bipolar motor configuration is the polarity of each winding. The windings must be symmetric (A+ and B+ winding leads must be connected to the same end of the winding."

So I decided to wire it as
  • B2: black wire
  • B1: green wire
  • A1: red wire
  • A2: blue wire
This is how it looks:

So I am now ready for my first test:

  1. Switch on the main alim
  2. Plug in the USB cable into the Arduino
Here is my stepup:

In the Arduino IDE, I open a serial monitor (under Tools / Serial monitor):

  1. I type in $$ + send, to check that I am properly connected: I get my default parameter setup
  2. Now I can type in my first G-Code command:


It means "move x-axis by 4 mm at a feed rate of 25 mm per minute". And it works !!

Now the same in video: yeah !! :-)




As a recap, this video is also a pretty good introduction by John to getting started with Arduino CNC Shield.

No comments:

Post a Comment