4 Replies Latest reply on Feb 24, 2014 2:04 PM by kernelsandoz

    Arduino Motor Shield R3 stepper motor


      I am trying to drive a 4 wire stepper motor from the Galileo via an Arduino Motor Shield R3.


      I have used the same motor with the Arduino Motor Shield installed onto an Arduino Uno R3.


      I noted that sometimes I saw a "trace error 9" message on the console when the sketch loads.


      With the Arduino/Arduino setup I can observe a square wave on pins 12 and 13 of the shield using a logic analyzer.

      With the Galileo/Arduino combo there is no output on these pins. I was able to confirm pin 13 is able to change by running the blink example

      and looking at that with the logic analyzer.


      The example code I am using is identical, but run in the appropriate version of the Arduino IDE.


      I notice the same shield was used for the on line course by

      Nicolas Vailliet but not with stepper motors.


      Any suggestions appreciated




      Nigel Smith

        • 1. Re: Arduino Motor Shield R3 stepper motor

          Is the shield listed in Galileo compatible list Intel® Galileo Shields List

          • 2. Re: Arduino Motor Shield R3 stepper motor

            Hi Rod_H,


            Unfortunately not. I had read the compatibility list before I purchased the shield, but did not have access to the list at time of ordering. Given the use of this shield in the Intel DIY challenge I implied comparability.


            However I have also connected the logic analyzer to the pins in question without the shield in place.


            I believe this is a software problem. My next step ( no pun intended) is to simulate the square wave using digital write commands in the sketch and not to use stepper.h.


            thanks for your input.


            Nigel Smith

            • 3. Re: Arduino Motor Shield R3 stepper motor
              Clayton Hofrock

              I have also played with a motor shield and found similar results. The motor shield I was using is a SEEED shield.

              Motor Shield V1.0 - Wiki I think it uses the same hardware.


              What I found is that the motor controller worked just fine with a DC motor, but when I tried the stepper motor it did not work. I did not look into why. I also found that the controller worked just fine for both stepper and DC motor if I used an Arduino Uno.


              One question, the square wave on pins 12 and 13, what frequency where they toggling at? The Galileo has a much slower I/O than other Arduino devices, and it could be that the pins are being switched at a frequency that Galileo cannot keep up with. (Galileo can realistically handle about 100 Hz).

              • 4. Re: Arduino Motor Shield R3 stepper motor

                Hi Clay,


                My first attempt was also with the SEEED Motor Shield V1.0.


                From memory the frequency of the square waves on pins 12 and 13 with the Arduino motor shield R3 was approx 50Hz.

                This corresponds to 200 steps at 1.8 degrees and 60 rpm. Each cycle has 2 transitions and there are 2 square waves 180 dgrees out of phase.


                I had also tried at 30 rpm which would have been half the frequency.


                I would attach logic analyzer screen shot but I am away from my PC.


                If this worked first go I would have learned far less about stepper motors. I also now have a logic analyzer, 2 arduinos and 2 motor shields.


                I am tempted to try the Arduino Yun which is a hybrid Linux/Arduino board. Ther is also the Arduino Tre real soon now.


                thanks for your reply. I hope when I finally crack this that it helps you also.


                Nigel Smith