![]() (More generally, rewiring anything while it is powered is asking for trouble.) Warning: Connecting or disconnecting a stepper motor while the driver is powered can destroy the driver. Always unplug the motor power first, then the Arduino power before disconnecting the motor If not, unplug the Motor power and recheck all the connections with a multimeter. Hopefully your motor will start running ! Once that is done, you can connect the Motor power supply (12V). I start with the trim pot turned anti-clockwise, and measure the voltage with my multimeter between the logic Gnd pin and the centre of the trimpot itself, slowly turning it up until I get just under 1.12V To calculate VREF required for a target current: VREF = A * 0.8Īs my stepper motors are 2.0A, I can't get maximum current from this driver, however,if I drive them at 70% (2.0A x 70% = 1.4A) I want to a VREF of 1.4A x 0.8 = 1.12V, plus driving them at 70% will reduce the temperature of the stepper. To calculate amps from measured VREF: A = VREF / 0.8 The trimpot should be 10kOhmĪccording to the A4998 datasheet, and substituting those values, gives These correspond to 0.1Ohm for S1 and S2 and 30kOhm for R1. As different drivers may have different components (especially generic Chinese imports) its best to check these values before continuing.įor my stepsticks S1 and S2 are marked 'R10' and R1 is marked '303' (in very small writing !). This is set via the adjustable resistor on the board, in co-operation with some of the other components, the sense resistors (S1 and S2) and the resistor (R1). To prevent damage to the driver chip, it uses circuitry to limit the maximum current that can be used. Next is loading an Arduino sketch and Setting the Current limit on the StepStick This needs to be a high voltage/current supply to run the motor. ![]() To use the board I tied these together which allows the board to run normally Sleep and Reset control the board, either sending it to sleep or resetting it.I connected this to Pin 6 on the Arduino When set high the board is disabled and the motor is de-energised. When this pin is pulled low the board is enabled and the motor energised. I connected this to Pin 5 on the Arduino Step will make the stepper step each time this pin goes form Low to High.I connected this to Pin 4 on the Arduino Dir sets the direction the stepper will move.Logic Power and GND, Connect this to the GND and +5V of the Arduino.Connect the first coil to 1A and 1B and the second coil to 2A and 2B. 4 connections to the stepper motor, marked 1A, 1B and 2A, 2B.To use it it needs the following connections The stepstick is an A4988 chip mounted on a small PCB with headers on either side. I also used a couple of LEDs and some 220Ohm resistors Some hookup wire, I used solid Cat5 strands. Other MaterialsĪn Arduino Uno, but any Arduino compatible should doĪ Stepstick, or compatible stepper driver using a A4988 or DRV8825 So, I got some stepsticks and decided to wire them up to my Arduino. The Adafruit stepper motor shield cant supply 2A,and has trouble with voltages below about 5V, so couldn't properly run my motors (they jittered but didn't smoothly move). The Rated current is the MAXIMUM current the motor will take before bad things happen, and the voltage is the calculated voltage that will give a constant current at the rated current, for the motors resistance (V = I x R, V = 2.0A x 1.4Ohm = 2.8V). So, for Stepper motors, the resistance per phase is a constant. Looking at the specs the problem here was the resistance/current/voltage rating I had acquired some Stepper Motors from Ebay, that didn't work well with the Adafruit Motor Shield. 7 to 12v power supply plugged the the jack.There's lots of great resources out there about Stepper Motors, how they work and what kinds are available, I'd recommend Instead, solder your power input to the holes on the motor plugs side labeled "Mot-vcc" and "Mot-GND". If you want to power the motors with a higher voltage, don't use this plug and jumper because it goes to the "Vin" of the arduino which is connected to an LM1117 rated for 7 to 12v. and no jumpers are included with the board, so you will need an extra one. (actually, I removed the plug and it's written "Max-In 12V" so it's a hidden warning)īut doing this will in fact only power the arduino, because you need to place a jumper on "Mot-VOT-Sel" to propagate the power input to the drivers. ![]() yes most of the label is hidden under the plug, but It's probably written "Motor 12v". When you first try this board, your reflex is to just plug a 12v power supply to the power jack, as you can see the label under it say "M.
0 Comments
Leave a Reply. |