Top Banner
PWM Stepper Motor Driver PART NO. 2183816 Control a stepper motor using this circuit and a servo PWM signal from an R/C controller, arduino, or microcontroller. Onboard circuitry limits winding current, allowing you to use any bipolar stepper motor and any supply voltage from 6-36V. The circuit will operate the stepper motor analogous to a standard or continuous rotation servo depending on the mode. Half and Full step modes are also supported. Warning: Stepper Motor must not be driven in excess of 2A per winding. Input PWM signal must be 5V. If voltage input through servo PWM cable is greater than 5V, the red pin should not be connected to the board and 5V should be supplied through X1. See more information and updates at: https://sites.google.com/site/theelectronbazaar/home/projects/pwm-stepper-motor-controller Time Required: 30min depending on experience Experience Level: Intermediate Required tools and parts: Soldering Iron and Solder Tweezers or hemostat or small pliers Helping hand Tape Flat head screwdriver R1-R2 Power resistor: PWR163S-25-R500J Bill of Materials: Qty Jameco SKU Component Name 1 288067 IC1 Stepper Driver 1 245403 IC2 Stepper H-bridge 1 -- IC3 ATtiny24A-PU Microcontroller (NOT included, must be purchased elsewhere) 10 36265 D1-D8 Diodes 10 36038 D9 Small Signal Diode 10 2081932 D10-D11 LED 10 36097 D12-D13 Zener Diode 50 691180 R3 22k resistor 2 241146 R4, R12 10k potentiometer 10 2157167 R5, R8-R9, R11, R13 10k resistor 10 2158910 R6-R7, R10 10 544905 C1 3.3nF capacitor 10 609545 C2 0.1uF capacitor 10 330431 C3-C4 2 149948 S1-S2 tact switches 2 117560 JP1-JP4 4p headers 3 2144884 JP2, JP5-JP6 2p headers
11

PWM Stepper Motor Driver PART NO. 2183816 · PDF filePWM Stepper Motor Driver PART NO. 2183816 Control a stepper motor using this circuit and a servo PWM signal from an R/C controller,

Feb 13, 2018

Download

Documents

truongdat
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: PWM Stepper Motor Driver PART NO. 2183816 · PDF filePWM Stepper Motor Driver PART NO. 2183816 Control a stepper motor using this circuit and a servo PWM signal from an R/C controller,

PWM Stepper Motor Driver

PART NO. 2183816

Control a stepper motor using this circuit and a servo PWM signal from an R/C controller, arduino, or microcontroller. Onboardcircuitry limits winding current, allowing you to use any bipolar stepper motor and any supply voltage from 6-36V. The circuit willoperate the stepper motor analogous to a standard or continuous rotation servo depending on the mode. Half and Full step modesare also supported.

Warning: Stepper Motor must not be driven in excess of 2A per winding. Input PWM signal must be 5V. If voltage input through servoPWM cable is greater than 5V, the red pin should not be connected to the board and 5V should be supplied through X1.

See more information and updates at: https://sites.google.com/site/theelectronbazaar/home/projects/pwm-stepper-motor-controller

Time Required: 30min depending on experience

Experience Level: Intermediate

Required tools and parts:

Soldering Iron and SolderTweezers or hemostat or small pliersHelping handTapeFlat head screwdriverR1-R2 Power resistor: PWR163S-25-R500J

Bill of Materials:

Qty Jameco SKU Component Name

1 288067 IC1 Stepper Driver1 245403 IC2 Stepper H-bridge

1 -- IC3 ATtiny24A-PU Microcontroller (NOT included, must be purchased elsewhere)10 36265 D1-D8 Diodes10 36038 D9 Small Signal Diode10 2081932 D10-D11 LED10 36097 D12-D13 Zener Diode50 691180 R3 22k resistor2 241146 R4, R12 10k potentiometer10 2157167 R5, R8-R9, R11, R13 10k resistor10 2158910 R6-R7, R1010 544905 C1 3.3nF capacitor10 609545 C2 0.1uF capacitor10 330431 C3-C42 149948 S1-S2 tact switches2 117560 JP1-JP4 4p headers3 2144884 JP2, JP5-JP6 2p headers

Page 2: PWM Stepper Motor Driver PART NO. 2183816 · PDF filePWM Stepper Motor Driver PART NO. 2183816 Control a stepper motor using this circuit and a servo PWM signal from an R/C controller,

1 109576 JP3 3p header10 15747 JP7 2x3 header1 189668 X1 terminal block10 37162 IC3 socket10 38607 IC1 socket

1 129242 Heat Sink1 34121 Heat Sink mounting kit10 112432 Shorting Block1 PCB

Step 1 - Layout parts

Make sure the kit includes all the parts listed in the instructions. Notice the polarity of certain parts, particularly the diodes andcapacitors.

Step 2 - Install R1, R2

First, melt a small amount of solder onto the two small pads of the D2PAK footprint, as shown in the image. Second, hold the resistoron the board with pins on top of the solder using tweezers. Third, hold the soldering iron on the pin and solder to melt the solderaround the pin. The pin may not be completely flush with the pad. Finally, hold the soldering iron on the heat sink tab and heat sinkpad simultaneously and add solder once it flows onto the tab and pad. One resistor is on the top side of the board and the other is onthe bottom.

Step 3 - Install X1 and JP1

Insert one component at a time on the top side of the board in the locations marked with the part identifiers X1 and JP1. Use tape tosecure the part, flip the board over, and solder the leads to the pad. Due to the large pad size, it will take time for solder to flow overthe leads of X1.

Page 3: PWM Stepper Motor Driver PART NO. 2183816 · PDF filePWM Stepper Motor Driver PART NO. 2183816 Control a stepper motor using this circuit and a servo PWM signal from an R/C controller,

Step 4 - Install D1-8

First, using small pliers (preferably one with round tips as shown), bend the leads to form a U shape. Second, insert the diode intothe corresponding holes on the top side and solder on the bottom side. Watch the polarity. The white stripe on the diode should matchthe white stripe on the board.

Step 5 - Install D9, 12, 13

Insert D9 (1N4148, smaller package), and D12 and D13 (1N7433, slightly larger package) into the corresponding footprints on the topof the board. Make sure to follow the polarity indications by lining up the black band on the diode with the white stripe on the board.Tape and solder the leads on the bottom of the board. Clip the leads once the solder cools.

Page 4: PWM Stepper Motor Driver PART NO. 2183816 · PDF filePWM Stepper Motor Driver PART NO. 2183816 Control a stepper motor using this circuit and a servo PWM signal from an R/C controller,

Step 6 - Install all standard resistors

First, find R3 a 22k ohm resistor (red-red-orange) and insert it into its footprint on the top of the board. Next, find R6 R7 and R10 all330 ohm resistors (orange-orange-brown) and insert them into the corresponding footprints. Then find R5 R8 R9 R11 and R13 all 10kresistors (brown-black-orange) and insert them into their footprints. You do not need to worry about orientation. Tape to secure, thenflip the board and solder the resistor leads on the bottom of the board.

Step 7 - Install LEDs D10 and D11

Insert one LED into the D10 footprint with the long lead closest to neighboring R7 (longer lead towards the top of the board if readingD10 right-side-up). Insert the other LED into the D11 footprint with the long lead closest to the D11 text (towards the left side of theboard when reading D11 right-side-up). Tape secure and solder the leads on the bottom of the board. The LEDs should be concentricwith the white arcs on the board as shown.

Page 5: PWM Stepper Motor Driver PART NO. 2183816 · PDF filePWM Stepper Motor Driver PART NO. 2183816 Control a stepper motor using this circuit and a servo PWM signal from an R/C controller,

Step 8 - Install capacitors

Insert the small yellow capacitor into the C1 footprint. It is nonpolar, so you do not need to worry about orientation. Next, insert C2 a0.1uF capacitor into its footprint and ensure that the pin closest to the negative stripe on the capacitor body enters the pad marked "-".This pin is also the shorter of the two. Do the same for C3 and C4, except with 1uF capacitors. Tape secure and solder the leads onthe bottom of the board.

Step 9 - Install remaining headers

Insert a 2x3 pin header into JP7, a 1x4 pin header into JP4, a 1x3 pin header into JP3, and a 1x2 pin header into JP2, JP5, and JP6. Tape secure and solder the stubs onto the bottom pads. Neighboring headers may be difficult to tape in place when loose, so youmay solder a few headers at a time.

Page 6: PWM Stepper Motor Driver PART NO. 2183816 · PDF filePWM Stepper Motor Driver PART NO. 2183816 Control a stepper motor using this circuit and a servo PWM signal from an R/C controller,

Step 10 - Install pushbuttons

Insert the pushbuttons S1 and S2 into their respective footprints. They will snap into place and therefore do not need to be securedwhile soldering. Finally, solder the leads to the bottom side pads.

Step 11 - Install potentiometers R4 and R12

Insert the potentiometers into the R4 and R12 footprints. Orientation does not matter, although you may want to place them such thatthe non-marked face aligns with the outside of the boards.

Page 7: PWM Stepper Motor Driver PART NO. 2183816 · PDF filePWM Stepper Motor Driver PART NO. 2183816 Control a stepper motor using this circuit and a servo PWM signal from an R/C controller,

Step 12 - Install IC2

Find IC2 labeled L298N. Insert it into the IC2 footprint. You may have to bend the leads slightly for it to fit. If the IC is loose, tape tosecure. Finally solder the IC. Fix any bridging between pads.

Step 13 - Install sockets for IC1 and IC3

Insert the 20 pin socket into the footprint for IC1 and the 14 pin socket into the footprint for IC3. Align the notch in the socket with thebox or semicircle on the white outline of the IC. Tape to secure and solder the bottom pads. Insert the IC labeled L297 into thesocket for IC1, again aligning the notches. Do the same for IC3.

Page 8: PWM Stepper Motor Driver PART NO. 2183816 · PDF filePWM Stepper Motor Driver PART NO. 2183816 Control a stepper motor using this circuit and a servo PWM signal from an R/C controller,

Step 14 - Install heatsink

Place the heatsink next to the L298 tab with fins facing the right of the board. Insert the parts in the mounting kit as follows: left of board screw head - heatsink - insulator - L298 tab - white washer - metal spring washer - nut right of board.

Note: Large motors will draw large amounts of current, some of which the driver dissipates as heat through the heatsink. Thereforeyou may need to replace the heatsink and/or use fans to cool the driver and possibly sense resistors R1 and R2. If the heatsink stillbecomes excessively hot or the driver shuts down, you may be using a stepper motor with too high current rating.

Step 15 - Connect Power and Input

Look at the board horizontally with the text right side up. X1 should be on the right side. Connect the stepper motor power supply tothe middle (V+) and top (GND) terminals of X1. If the input PWM signal (both V (red wire) and S (white wire)) has maximum 5V, leave the bottom terminal of X1 empty (this is thecase for most microcontrollers, including Arduino). If you are in doubt about the voltage on the V line of the PWM cable, use amultimeter to measure its voltage reference to the black cable (ground). Connect the PWM cable according to the G V S marks onthe three pin connector on the right side of the board. Alternatively, if the V (red wire) of the input PWM signal is greater than 5V, supply 5V to the bottom terminal of X1 and connect theground to the top terminal along with stepper motor power ground (this is the case for most R/C controllers and the VEX system). Connect the PWM cable according to the G V S marks on the three pin connector on the right side of the board, but do not connectthe V (red) wire. You may disconnect it by pulling the pin out of the housing, cut the red wire, or not supply any voltage on the redwire from the source device.

Page 9: PWM Stepper Motor Driver PART NO. 2183816 · PDF filePWM Stepper Motor Driver PART NO. 2183816 Control a stepper motor using this circuit and a servo PWM signal from an R/C controller,

Step 16 - Connect stepper motor

Connect the stepper motor wires to the 4 pin header just below X1. Positions 1 and 2 are for one winding and positions 3 and 4 arefor the other winding. See your stepper motor datasheet for wire colors and winding information.

Step 17 - Calibrate Chopper (R4)

Calculate the sense voltage: 1.5*Winding current. With 5V and 12V power (either 12V through X1 and all pins of PWM cable pluggedin or 12V and 5V supplied through X1 and power (red V wire) of PWM cable disconnected) and stepper motor attached, measure thevoltage across the leads of R1 and R2. Adjust R4 as necessary until the voltage is below the calculated sense voltage. If the voltageis always above the sense voltage, you are using a stepper motor with current requirements greater than the board can handle (2Aper winding).

Page 10: PWM Stepper Motor Driver PART NO. 2183816 · PDF filePWM Stepper Motor Driver PART NO. 2183816 Control a stepper motor using this circuit and a servo PWM signal from an R/C controller,

Step 18 - Install jumpers

Step Size:JP2: Half step mode when no jumper installed, full step mode when jumper installed.

L297 chopper controlJP5: chopper acts on individual windings when no jumper installed, all windings when jumper installed. See L297 datasheet for moredetails.

Velocity/Position mode:JP6: Velocity control (continuous rotation) when no jumper installed, Position control (standard servo) when jumper installed.

For beginners, the recommended setup is:JP2: no jumperJP5: install jumperJP6: depends on application

Note for advanced users: to program the ATtiny via ISP, you must disconnect all jumpers since some I/O pins are shared. Also, thejumpers may be dynamically controlled but absolute limits in position mode may change. See schematic for more details.

Page 11: PWM Stepper Motor Driver PART NO. 2183816 · PDF filePWM Stepper Motor Driver PART NO. 2183816 Control a stepper motor using this circuit and a servo PWM signal from an R/C controller,

JP7 is provided in case the user wants to program the microcontroller using the AVR ISP interface. Pin 1 of the ISP header is markedon the board.D10 will indicate if 5V power is supplied to the board. If it does not turn on when 5V is supplied, check the power supply and ensurethat a logic supply of greater than 5V was not supplied. D11 will indicate if the L297 counter is at the home position. The two pushbuttons will reset the microcontroller and L297 respectively.

Step 19 - Adjust Speed and run

Adjust R12 to set the speed of the motor (in position mode) or the maximum speed of the motor (in velocity mode).

Other notes:JP4 is provided in case direct access to the Enable, Direction, and Step lines are required, bypassing the PWM translation in themicrocontroller (e.g. in a CNC where the PC gives such outputs). It is recommended that the microcontroller not be installed if suchoperation is desired.