3-Axis Bipolar Micro-Stepping Motor Driver With Integrated Joystick Control
3-Axis Bipolar Micro-Stepping Motor Driver With Integrated Joystick Control
3-Axis Bipolar Micro-Stepping Motor Driver With Integrated Joystick Control
1
Index
____________________________________________________________________________________________________
2
Technical Description and Specifications
____________________________________________________________________________________________________
Thank you for purchasing the Arcsin! This board was designed by two hobby-level CNC guys with a
broad range of experience in electronic engineering, software engineering, CNC, and garage tinkering!
Our passion to build a product that addresses specific hobby-level CNC needs resulted in a unique
product with a unique name: Arcsin!
The Arcsin is a full-featured 3-axis Bipolar Micro-stepping stepper motor driver with Integrated Joystick
control. Arcsin is designed around the LMD18245 dual H-Bridge IC by National Semiconductor and
takes full advantage of this component. The core logic is handled by a dedicated PIC micro-controller on
each axis running custom firmware written in both C and assembly language. The Integrated Joystick
functionality on the Arcsin board is a first in hobby-level stepper-motor drivers. This feature is
especially useful for reducing CNC setup time by giving the operator the ability to position the cutting
head exactly where needed before running a CNC program. The Arcsin can also be used without a PC
for manual machining or motor spinning!
Arcsin features:
• Buildyouridea.com has made every effort to provide you with a top-quality stepper motor driver
board that is simple to set up and safe to use. Close attention should be paid to warnings and safety
advisories to avoid damage to the Arcsin board and damage to yourself! Look for the STOP signs in
the documentation and make sure you read the associated text!
• Hazardous voltages and current levels exist on the Arcsin board. Disconnect all power to the
Arcsin board before touching the board! Disconnect all power before configuring jumpers, DIP
switches or resistor values!
• The voltages applied to Arcsin power connections must not exceed ratings or Arcsin may be
damaged.
• Motor power must be turned off when connecting or disconnecting stepper motors or Arcsin
may be damaged
• Pay attention to the Polarity Matters Icon! When you see this, double check to make sure that
you are using the correct polarity on the connection! The polarity of power connections must
be observed or Arcsin will be damaged.
• The owners and designers of the Arcsin controller do not accept any responsibility regarding
content, errors, omissions or the correctness of the information contained in this manual. Use the
information contained herein at your own risk. The owners and designers are not responsible for any
loss or accident to you or to third-parties including loss of business, loss of sale, equipment or
property damage, injury or death resulting from or to you or other third-parties using the information
contained herein.
• CNC machines are dangerous and can cause injury or even death. The owners and designers of
the Arcsin controller cannot be held responsible for any injuries or damage (to people or property)
caused through the use or misuse of the Arcsin controller.
4
Unpacking and Setting up the Arcsin
____________________________________________________________________________________________________
Unpack your Arcsin board and briefly familiarize yourself with it. (Refer to the Arcsin Parts Layout
drawing on page 25 to help you do this.) Don’t try to understand everything on the drawing at this
point; just give yourself an overview. Note that there were some extra resistors included with your
Arcsin. These are for setting different current and/or current-reduction settings. See pages 9 and 10 for
information on configuring these settings.
Package Contents
1. Qty (1) Arcsin 3 axis stepper motor driver board in sealed ESD bag. Note: The Arcsin drive
current is factory set to 3 amps with the 6.8k resistors (blue/grey/red). The Arcsin idle current
reduction is factory set to ~40% of full current with the 680 ohm (blue/grey/brown) resistors.
2. Qty (3) 3.9k resistors for setting an idle current reduction to ~20% (~80% of full current)
3. Qty (6) 20k resistors for setting drive current to 1 amp.
4. Qty (6) 10k resistors for setting drive current to 2 amps.
5. Qty (1) Arcsin setup and operators manual.
5
Additional Items needed to get the Arcsin Running
____________________________________________________________________________________________________
• Logic Power Supply: A 9 to 20 volt at 100 milliamp or more DC power supply. A plug-in
supply (wallwort) will work fine here. For this power supply a 9 volt supply is preferable to a 20
volt one. NOTE: If you connect a 12 volt fan to the Fan Power connector on Arcsin, the Logic
Power Supply voltage should not exceed 15 volts. If a fan is installed, the current rating of the
power supply must be increased to include the current requirement of the fan.
• Motor Power Supply: A 12 to 48 volt DC power supply with adequate current capacity to
power the motors you intend to use. For this power supply a 48 volt supply is preferable to a 12
volt one. See the Motor Power supply discussion on page 18 for further information.
• Optoisolator Power Supply (optional): A 5.0 volt at 50 milliamp power supply. This power
supply must be isolated (have a separate ground) from the Logic and Motor power supplies. See
the Optoisolator Power supply discussion on page 20 for further information.
• Cooling Fan (optional): A small 12 volt cooling fan. Virtually any P.C. type cooling fan will do
the trick. NOTE: If you connect the fan to the Fan Power connector on Arcsin, the Logic Power
Supply voltage should not exceed 15 volts.
• P.C. Parallel Port Cable: A DB25 Male to DB25 Female straight-through cable with a
maximum length of 25 feet (shorter is better.)
• Joystick (optional): A joystick or switch arrangement that provides individual contact closures
(switches) for X+,X-,Y+,Y-,Z+,Z- movement. See the Joystick discussion on page 15 for further
information.
• Stepper Motor(s): Up to 3 each 4, 6, or 8 wire stepper motors (5 wire steppers will not work)
suited to your application. See the Stepper Motor discussion on page 23 for further information.
• Computer and Software: A computer with a P.C. compatible parallel (printer) port and CNC
software that is capable of using the parallel port to drive Step/Direction motor drives. See page
14 for more information on configuring your CNC software to run the Arcsin.
6
Arcsin Start-Up Guide
____________________________________________________________________________________________________
(Refer to Arcsin Parts Layout and Interconnection drawings on pages 25 and 26 as you proceed.)
1. Position or mount the Arcsin p.c. board so the back of the board cannot short out to anything. A
piece of plastic or any non-conductive material will work for this.
2. (Factory Default Setting) Plug in the appropriate current setting resistors for each axis (2 per
axis). If you don’t know what value to use, just leave the factory default setting of 6.8K ohm
resistors (blue/grey/red) (full 3 amps per phase) for now.
3. (Factory Default Setting) Plug in the appropriate idle-current setting resistor for each axis. If
you don’t know what value to use, just leave the factory default setting of 680 ohm
(blue/grey/brown) resistors for now.
4. Connect one of the outside leads of the joystick potentiometer to the +5v screw terminal on the
joystick terminal block. Connect the other outside lead of the potentiometer to the GND terminal
block. Connect the center lead of the potentiometer to the Xpot screw terminal.
5. (Factory Default Setting) Place a shorting block over terminals a and b of jumpers J1 and J2
to connect Opto Power Supply to Logic Power Supply for now.
6. (Factory Default Setting) Place shorting blocks horizontally across the Y and Z portions of the
J3 jumper field to gang the joystick speed control for the Y and Z axes to the X axis for now.
7. Set the microstep-resolution DIP Switches to the appropriate settings. If you don’t know what
settings to use, leave the switches in the default full step position.
8. Connect your stepper motors to the motor terminal blocks. Be sure to connect one winding of a
motor to the first two terminals on a block, and the other winding to the second two terminals. If
you are not sure about the wiring of your motors, refer to the Stepper Motor discussion on page
23 of this manual.
9. Connect your Logic Power Supply to its terminal block. Remember: Polarity Matters!
10. Connect your Motor Power Supply to its terminal block. Be sure to observe polarity. NOTE: If
you are using a 12 volt supply for the motors (this can be done, but is only recommended for
testing), you can use the same power source for your logic supply. Just wire the motor supply
and logic supply terminals together.
11. Connect a cooling fan to the Fan Power header. Be sure to observe polarity. Orient the fan so it
blows toward the heat sink. (The fan is optional, but recommended.)
7
12. Connect one end of a 6 inch piece of jumper wire to one of the GND terminals on the Joystick
terminal block. Strip 1/8” of insulation off the other end of the jumper. This will be used to test
operation from joystick input.
13. Recheck all the connections and settings made thus far.
Before powering on the Logic and Motor Power Supplies, double check your
power connections to make sure that the correct polarity is being used!
14. Power on the Logic Power Supply only (unless you are using a single supply). The Logic
Power LED should light and the fan should start running.
15. Power on the Motor Power Supply. At this point the stepper motor rotors should lock. This is
absolutely normal and is a requirement for stepper motor drivers. If the motors did not lock when
idle, the axes on the CNC machine would not remain fixed.
16. Tap the joystick jumper wire on the X+,X-,Y+,Y-,Z+,Z- terminals of the joystick terminal
block. The appropriate stepper motor should respond by jogging one direction for a tap on the
(+) terminal for that axis, and the other direction for a tap on the (–) terminal.
18. Configure your CNC software to work with Arcsin. See the Arcsin Configuration on page 14
for the required settings.
19. Connect Arcsin to the parallel (printer) port of your P.C. Use a DB25Male-DB25Female
interconnecting cable.
Before powering on the Logic and Motor Power Supplies, double check your
power connections to make sure that the correct polarity is being used!
21. Start your CNC software on the computer and test stepper operation with the software. (The
means of testing will depend on your software, but it is likely that there will be some type of
‘Jog’ functionality that will allow you to rotate the steppers for each axis.)
8
Arcsin Configuration and Operation
Arcsin Hardware Configuration:
(Configuration of the items in this section will be done on the Arcsin board.)
• Setting motor drive current setting – plug-in resistors R3, R5, R8, R10; R13, R15. (Several
example values are listed on the layout drawing. See below for calculation formula.)
Figure 1
9
• Stepper motor Idle-Current-Reduction setting – plug-in resistors R17, R18, R19. (See below
for an example of how to calculate the resistor values for idle-current reduction). Idle current
reduction occurs after approximately 3 seconds of inactivity on the parallel port step/dir input
pins. On the following step or direction input from the parallel port, the Arcsin will return to full
current drive mode with no missed steps.
Figure 2
10
• Micro-step-resolution setting – DIP switches X, Y, and Z. Refer to Arcsin board or Figure
below for DIP Switch Settings.
Figure 3
11
• Optoisolator power supply source selection – jumper blocks at J1 and J2
Figure 4
• There are plans to have the Opto Supply power come from an Arcsin expansion card that is
currently under development. Leaving both jumpers off will enable this feature when the
expansion card is installed.
12
• Joystick Speed Control pot ganging selection – jumper blocks at J3
Figure 5
13
Configuring your CNC software to run Arcsin
Arcsin connects to your computer’s parallel (printer or LPT) port and accepts step and direction
pulses from your computer. CNC software running on your computer sends these step and direction
signals to the Arcsin board. (Configuration of the items in this section will be done in your CNC
software.)
Arcsin has been thoroughly tested with TurboCNC, a popular CNC software package available from
http://www.dakeng.com and is a recommended CNC software package for use with the Arcsin.
Configuration related discussion of TurboCNC is outside of the scope of this manual and will not be
included. Please see TurboCNC documentation for details on how to set-up TurboCNC with your
Arcsin. Arcsin will work with many popular CNC software packages using step and direction signals
through the parallel port. Your CNC software must be able to configure the parallel port pins as
follows:
14
Joystick Setup and Control
Joystick Potentiometers
Begin by selecting appropriate pots to control the jog-speed of the motors. You may use any
resistance value from 1K to 10K ohms. The pots do not need to have a high power rating since
only a few milliamps of current flows through them. You should, however, use pots that are
fairly sturdy and knobs that are easy to grip i.e. ‘trimpots’ are not desirable. I use surplus 10k
pots with nice heavy-duty leads so I can easily solder wires to them.
Now you must determine whether you want a single pot to control the speed of each axis, individual
pots controlling each axis, or if you want some combination of the two. Jumper J3 is used to gang
two or more axes together to support different configurations. I find that using one pot to control the
X and Y axes and a separate pot for the Z axis works great. If you decide to follow this
recommendation, connect your pots to the Arcsin as shown below:
Remember: you must set the J3 jumpers as shown below for this configuration to work
correctly:
Figure 6
The jog-speed of each axis can be changed while the stepper motor is moving i.e. jog speed
dynamically follows the setting of the associated speed control pot.
15
Ramping
Another important Arcsin feature that allows for higher maximum stepper motor speed is ramping.
Without motor ramping, the motor would essentially be trying to go from a standstill to a maximum
speed instantaneously, resulting in a motor stall. Ramping works by taking the motor from a
standstill to a maximum speed along a ramped profile. The motor starts off slow and then gradually
increases in speed until it reaches some maximum.
It turns out that a parabolic ramping profile is the ideal shape for obtaining high step rates with a
stepper motor. This parabolic profile is implemented in the Arcsin firmware and is tuned to provide
optimal performance over a variety of different stepper motor types. Since ramping is only useful at
the higher step rates, the Arcsin is designed so that ramping does not take effect until the joystick pot
is within 30% of its maximum. Ramping may also be disabled by setting DIPSW position 1 to off
(Figure 8).
Figure 7
16
Joystick Switches
Almost any type of normally open, momentary switch will work. The current through the
switch contacts is only a few milliamps so there is no need for switches with a high current
rating. For the X and Y axes, a standard arcade-type micro-switch joystick works well.
Joysticks can be purchased separately from Buildyouridea.com if you do not have one. If you
do opt to use a joystick, remember that the micro-switches on some joysticks have both
normally open and normally closed contacts. Be sure to use the normally open contacts.
For the Z axis, a pair of momentary pushbutton switches works well. I’ve found that two
pushbutton switches enable me to accurately set the Z height of the cutter or bit before I start
the cut. Momentary single-pole-double-throw-center-off (SPDT spring-return center-off)
toggle switches will also work well. If you don’t have (or don’t want to use) a joystick, 6
pushbutton switches or 3 toggle switches (or even a mix of the two) will do the job.
Figure 8
Joystick Operation/Functionality
The joystick inputs of Arcsin are used to jog (move) the X, Y, and Z axes under the control of
external switches such as a joystick. This movement is independent of any computer commands.
The joystick can be used without a computer being connected to the Arcsin. If a computer is
connected, the joystick commands override any commands being sent by the computer. This is
especially handy if you have to adjust the Z depth of a cut while the CNC machine is in motion.
17
Motor Power Supply Discussion
The bottom line:
The higher the voltage output of the motor power supply, (up to the absolute maximum rating of 48
volts for the Arcsin) the better.
The simplest and most reliable power supply is a linear, unregulated supply i.e. a transformer,
rectifier, and filter capacitor.
Calculating Motor Power Supply Current Requirements:
• The wattage requirement for the motor power supply will be approximately the total motor
wattage divided by 70% (system efficiency).
• The current rating requirement for the motor power supply will be the (Wattage
Requirement)/(Power Supply Voltage Under Load).
• Here are calculations for a hypothetical system using the following motors:
• X axis stepper rating per winding: 5 volts at 3 amps.
• Y axis stepper rating per winding: 5 volts at 3 amps.
• Z axis stepper rating per winding: 2 volts at 2 amps.
• Motor wattages:
• X = 5 volts x 3 amps x 2 windings = 30 watts
• Y= 5 volts x 3 amps x 2 windings = 30 watts
• Z= 2 volts x 2 amps x 2 windings = 8 watts
• Total motor wattage = 68 watts
• System wattage requirement:
• Motor Wattage / System Efficiency = 68 watts / 70% = 97 watts
• Motor Power Supply Current Requirement:
• For a 40 volt (under load) power supply: 97 watts / 40 volts = 2.4 amps.
• For a 12 volt (under load) power supply: 97 watts / 12 volts = 8.1 amps.
21
Stepper Motor Discussion
The bottom line:
Unfortunately, there is no simple bottom line on the subject of stepper motors unless it might be that
new is better than used, bigger is better than smaller(but not always), and try to get the best price on
them that you can. Not much help. Let’s just start with a bunch of things we know, and work from
there.
Stepper Motor Facts
(Arcsin is a Bipolar PWM stepper drive system. The facts below apply to a system incorporating
Arcsin or essentially any system utilizing modern Bipolar PWM drives.)
• Arcsin works with 4, 6, or 8 wire stepper motors (see the figure below).
• Arcsin works with 2 phase (and not with 5 phase) stepper motors.
• Stepper motors with low voltage ratings (i.e. low winding resistances) will generally perform
better at higher speeds than motors with higher voltage ratings, assuming equal torque ratings for
the motors.
• You can use a stepper motor with practically any voltage rating. The motor voltage rating does
not dictate the motor power supply voltage. You can use a 2 volt stepper and a 24 volt power
supply (and the motor will actually perform very well). You can use a 24 volt stepper and a 12
volt power supply and nothing will be damaged (the torque/speed performance of the motor will
be awful, however).
• It is fine to use a stepper motor with a higher current rating than the drive (3 amps for Arcsin).
You just won’t get the full rated torque from the motor. You may, however, get a considerably
higher percentage of full torque than the current percentage would indicate, depending on the
motor. For example, running a 5 amp motor at 3 amps (60% of rating) might deliver 80% of
rated torque in some cases.
• It is usually fine to use a slightly higher drive current (say 20 or 30 percent) than the rating of the
stepper motor in order to try to get a bit of extra torque from the motor. This may or may not
help. If you do this you must set the idle current well below the motor’s current rating to
reduce heating.
• Two phase stepper motors come in many different sizes and shapes and in many different step
increments (degrees per step, or steps per revolution). For CNC applications where Arcsin (or
other similar drive systems for that matter) is used it is generally recommended to use 1.8 degree
per step (200 steps per revolution) motors in either NEMA 23 or NEMA 34 frame sizes. For a
given general motor design, voltage and torque rating, a NEMA 23 size motor will generally
perform better at high step rates than a NEMA 34 motor.
23
Stepping motors and drive systems can exhibit any number of weird behaviors that are difficult to
neatly categorize. We have discussed some of the more easily identifiable behavior and performance
issues, but many more questions may come up.
• If a stepping motor is wired or connected to the drive incorrectly, it may fail to do anything;
the rotor of the motor may just turn freely by hand. The rotor may only stutter in one place when
steps are applied. It may seem to want to turn one direction for awhile and then the other, even
when the direction signal to the drive remains constant. It may turn in only one direction
regardless of the direction signal sent to the drive. It may rotate only when stepped at a certain
rate and not at higher or lower rates. It may rotate correctly, but have very poor torque
performance.
• All stepping motors have electromechanical resonances. These resonances may cause the
motor to vibrate excessively at certain step rates. Motor output torque may drop to zero at
resonance, causing motor lockup to occur. Increasing microstep resolution (e.g. going from half-
step to quarter or eighth step) will reduce (but not eliminate) resonance effects. System step
rates for cutting and rapid traverse must not be near resonances. System step rate ramping must
be rapid enough to avoid resonance rates for any sustained period of time. Resonance rates are
different for an unloaded motor (i.e. on the bench) than for one integrated into a mechanical
system.
• A stepping motor in a system may randomly step, seemingly of its own accord. This probably
has nothing at all to do with the motor itself, but rather is caused by electrical noise getting
into the control system (generally between the computer and the drive) and being interpreted as
step pulses. (To check for this, be sure to turn on all your noise-producing machinery such as
spindle motor/router, air compressor, etc.) This has been discussed to some degree previously in
the Optical Isolation discussion.
• Repeatability of the system motor is poor (i.e. when a series of moves is sent to the system, the
resultant move is a slightly different distance from one time to the next.) Mechanical issues can
come into play here: There may be ‘give’ or ‘play’ in the mechanics of the system. If accuracy
is good when the system is run at slow speeds, but moves seem to shorten or become less
repeatable as speed increases, then you may be expecting too much speed/torque performance
from your motor, or you may have mechanical binding in the system that is not evident at lower
speeds (check lead screws especially). (Make certain that you have drive current set properly for
the motor in use.) If the system locks up immediately when a relatively high rate of speed is
attempted, check the step-rate ramping rate in your software: it may be ramping too rapidly. If
repeatability is poor at low step rates and moves tend to be longer than they should be, check the
system for electrical noise (see above). If repeatability is poor and moves tend to be short, check
for mechanical binding and check computer configuration for proper pulse polarity and timing.
24
X Axis Stepper Motor Y Axis Stepper Motor Power Z Axis Stepper
Motor Output Power Motor Output Supply Input Motor Output
Indicator 12 - 48 VDC
LED
Microstep-Resolution Setting
DIP Switch (See setting
chart printed on board.)
Fan Power Connector
(voltage follows Logic _
Power input voltage)
Logic Power Supply Input + Joystick
Input
9 - 20 VDC @ ~100 mA+
fan current.
Logic Power Indicator LED
Joystick
Assembly
switch common
XYZ pot bottoms
Z pot center
Y pot center
Logic
pos neg
X pot center
Power Z+ switch
Z- switch
Supply Y+ switch
9 to 20vdc Y- switch
X+ switch
@100mA+ X- switch
Fan current XYZ pot tops
neg pos
Optical Isolator
Power Supply
(Printer)
Parallel
(Optional -
see manual)
$" % #
$ # #
#
- # . /
# # #)
$' % " "
$ # #
% * &+ ,
# ! # !
# %
$" % # &
#
# # $+ # %
2 # # %% #
% " "
#
#
$" %
! %% %, ! " # &
, ! #
# # ! #
*'13' 3 # # # $' %
(! %
# +"
( % ' # % % &'
#) & #)
( %#)
!
$" % # # %
% *
0 #
$+ # # % %
# # !#
* ,% % ! % #%#
!# %
!# #)
# # $1 ! %
# #
+
$' # # #)
#
#
$" %# # #)
,
1 # # #
$' # ( # ! # % % +
#
% 1 ! #
# #
$" % #
$ ! %
# #
$' #
$' % #
' # (
#)
# ! # % % +
$" # % %
$1 # #
% # # 1 ! #
!
% # % #) &
$' # #! # % +
1 ! #
45
$ ! ##
% " " #
% *
# # # 1
" " #
## % # & 6* $' %
%%
1 # #7 &+
, # !
# !
" " #
! %% % # " " #
% # #
%&
1 $" %%
# $+ # %
# # #
# %%
## %
! #
,
#
! " #
8 %# , $"
&
% $' # % # ! # (
( %#) ! %
*'13' 3 # # # # +"
$' % $ ! ## % &'
( % % " " #)
#) & # #
# 1 ## !
$" % # # % % # & 6* 1
# #7
% *
$+ # # % % 0 #
* ,% % ! % #%# # # !#
!# %
!# #)
# # $" #) # % # %
" " # & # # # #%#
" " #
# #
$' # # " " # + ! ,
%
$' # # #) &+
) ! ,
$" %# # #) # # # !# ##
1 #!
$' # ( # ! # % % +
# # % 1 ! #
$ ! ## % " "
# # # 1 ##
% # & 6* 1 # #7
$' % # #) $ # #) #
" " #
$' % # #) #
8 %# ## &+ ! , ' # (
$' # #
# ! # ! #) & + # ! # % % +
" " #
! , ## #! , # # %
# ! & & # 1 ! #
$' ! %% % #) # #
#! # # #! % % #
#! 49