Arduino stepper

I am creating a system with an Arduino Uno , a power shield ( REf to model ) and a bipolar stepper motor.

I cannot initiate the engine using the stepper library from Arduino. I create my pedometer with

Stepper myStepper(motorSteps, motorPin1,motorPin2m motorPin3,motorPin4); 

And continue with the example code supplied with Arduino.

When I run the code on the Arduino, the engine emits some sounds, but it does not rotate.

How to determine the correct motor leads to use? On the power screens, which mode should be used, PWM or PLL ?

+6
source share
7 answers

Do you think the adafruit engine shield should fit the arduino stepper library as it uses the L293D to control the engine. It can control 2 steppers with a current of 0.6 A (good for most small staplers that you can find in printers, on a floppy / CD / DVD reader ...).

Be careful, they seem to use their own library for this shield, you can find it here:

http://www.ladyada.net/make/mshield/download.html

And to find out how to connect your pedometer, look here:

http://www.ladyada.net/make/mshield/use.html

Sorry to respond to your comments in this way, but I don't have enough reputation to comment ... so please +1 my answer if you think this is a good answer :)

+5
source

It is normal that the arduino sketch is not working. It controls the engine as follows:

  • PIN1: coil 1, forward current
  • PIN2: coil 1, reverse current
  • PIN3: coil 2, forward current
  • PIN4: coil 2, reverse current

Your shield controls the stapler as follows:

  • PIN1: current forward / backward
  • PIN2: current intensity using PWM
  • PIN3: current intensity with PWM
  • PIN4: current forward / backward

It is not recommended to turn on the stepper motor, as you do not even need PWM to control the stepper motor. This is for driving a DC motor. You can write your own sketch to control the stepper device with this shield, but you must find a shield that fits the arduino to control the stepper motor. Look at something like the UL2003 step module , it costs a few dollars.

Edit: I have one of these modules and it works like a charm. Be careful with the required power. You might need something like the L298N module . I also have few of them, and they work great.

+3
source

How many wires do you have in a stepper motor? 4 or 6.

Your connection is faulty. That's why he makes such a sound.

Test with a multimeter. You will find that two wires give high resistance. the other two give half of it. Connect the first two to engine 1 and the second second to out2.

You did not indicate which engine you are using. Try using the engine guard L298.

0
source

I think the problem you are facing is related to the type of shield you are trying to use. The power connection board you plugged in is for DC motors and you are trying to use a stepper motor (see this site for an explanation of the difference),

I would recommend trying a different screen (e.g. Sparkfun EasyDriver ) that supports the use of a stepper motor.

0
source

The problem seems to be due to incorrectly connected motor contacts. Are you sure that you are connecting real windings to the motor? Measure the motor leads with an ohmmeter. There must be two windings that have contacts A1-A2 and B1-B2. Between these contacts you should see some resistance. Then make sure you connect to the screen in the correct order.

0
source

If the engine makes a sound, this is good news. At least you have contact with him. Since this is just sound, but not movement, there may be three things underlying this behavior;

  • Incorrect motor plug contacts
  • Inadequate current supply from the motor driver.
  • The number of steps determined by the code using PWM may be too small or too high how the motor can operate.

I can offer this URL link to define the circuit pins;

How can I detect the wiring of a stepper motor without turning off the stepper motor

0
source

In mi projects, I use a bipolar motor (nema17), and you can easily control it with the AOL-A4988 (or drv8825, more powerful and more expensive). These drivers inside have a H bridge and allow you to control the engine simple:

 while(1){ digitalWrite(PIN_STEP, HIGH); delay(1000); digitalWrite(PIN_STEP, LOW); delay(1000); //1RPM = 100 microsecond delay for a 1.8 degree angle motor (200 steps per turn) } 
0
source

Source: https://habr.com/ru/post/916869/


All Articles