Man 10V EN
Man 10V EN
Users' manual
3 Physical Description
3.1.2 -12V
Green LED. Lit when the OpAmp -12V supply is present.
3.1.3 5V
Green LED. Lit when the dsPIC +5V is present
3.1.4 ERR
This LED is dark under normal operation.
3.1.4.1 Power up
During power up, ERR LED is lit during he power-up procedure. If the ERR led is stuck and the
amplifier is disabled, connect the Prog. Key and open a serial terminal. Cycle the power OFF
and ON. You should read the initialization status and see where the process blocks.
3.1.4.2 FAULT
Depending on the error trap the firmware felt into, the blinking can be different (ex: ON-OFF-
OFF-OFF). Look at the source code to learn more about it.
3.2.1 K1
K1 is the logic power supply input.
Logic +5V supply. You can connect it directly to a 5V power source, or use the regulated voltage
from 10 to 16V input to supply 5V to other logic/boards. The board's power consumption is
maximum 300mA plus encoder consumption (generally ~10-20mA)
3.2.1.2 M
Common ground
3.2.1.3 10/16V
Input to the LM7805 voltage regulator. 10 to 16V, max 300mA + encoder consumption
3.2.2 K2
K2 is the OpAmp supply voltage input.
3.2.2.1 +12V
3.2.2.2 -12V
4.1 Outputs
4.1.2.1 Enable/Reset
Under running conditions (i.e motor is powered and YAPSC taking STEP/DIR commands), OUT is
forced low.
If YAPSC is disabled (see section 5.2.1), the OUT output is floating.
If a FAULT condition is detected (look in section 4.2.1), then OUT will be floating and the ERROR
led will blink.
4.2 Inputs
There are two Schmitt-trigger (digital) inputs which can be configured.
By changing the values of (R17,R20) and (R18/R21) the two inputs can work with 5V, 12V or
24V logic:
The FLT input is pulled down, so when not connected FLT is low. If the amp does not have an
output to be linked to FLT, K3 should be placed 1-2 and FLT left unconnected.
5.1 HE10
The RS232 pins are NOT optoisolated! For maximum security, please use the
optoisolated USB prog. key.
5.1.2 ICSP
The dsPIC30F4012 can be programmed via an ICD2, pickit2 or other programming tool. The
program can also be debugged under operation with Microchip's ICD2/3 (or other compatible
tools).
Pin 2 : MCLR Master Clear
MCLR, PGC and PGD are NOT optoisolated! Please be aware that any power
failure could be fatal to the programmer and your computer!
5.1.3 STEP/DIR/ENABLE
The control signals are available on P3 to link directly with a control card which is already
protected (optoisolated, …); or you can monitor the input signals to test the optocouplers, etc.
These 3 inputs are pulled-up with a 4K7 resistor to +5V, and are reversed polarity compared to
the optoisolated inputs.
5.1.4 Power
Ground (pin 4) and +5V (pin 3) are available to power the prog. Key's optoisolators, and for the
ICD to monitor +5V voltage.
5.2 STEP/DIR/ENABLE
The command input are optoisolated and provide minimum 600V insulation. The diodes
requires at least 2mA to work properly.
Below is the STEP input schematic, which is the same for DIR and ENABLE inputs.
Note: The + mark on the silk screen represents the cathode connection (ex: pin2 of P1)
PHTRANS is a 6N137 fast rate (10Mbps) optocoupler. Il can be replaced by the 6N136 but with a
reduced maximum stepping rate of 300KHz.
5.2.1 ENABLE
When the ENABLE input is powered state, the YAPSC:10V performs the PID calculation, takes
the STEP commands and outputs the command to the servo amp, unless a FAULT condition
occurs (s. 4.2.1).
If ENABLE is left open (or lead shorted), the board won't read the STEP commands, won't
perform PID calculation and CMD output will be at 0V : the board is disabled.
5.2.3 DIR
The DIR command sets the direction of the pulse:
If DIR is powered, each pulse on STEP decreases the position command; Otherwise, the position
command is increased on each pulse on STEP.
6 Encoder connection
The encoder input has 3 inputs for a quadrature encoder : A, B and index pulse (called I, C or Z
depending on the manufacturer).
It can be configured either for differential link or single-end (TTL) signals, depending on the
encoder's link type. A male 9 pins sub-D connector can be plugged on the board's connector
X2, whose pinout is represented below.
• Place P7, P8 et P9
• Link A+ th the A output of the encoder, B+ to the B output of the encoder. A- and B-
are not linked
• Link I+ to the index output of the encoder (Called C, I or Z) if present on the encoder. I-
is not linked
• Link the ground (or negative supply) of the encoder to the sub-D9's pin number 6
• Depending on the supply voltage required by the encoder, link the +5V or +12V (sub-
D9's pins 1 or 9) to the positive supply of the encoder
• Once the encoder cord is fully linked, you can plug the connector onto YAPSC:10V's X2
Do NEVER link a differential link encoder while P7, P8 or P9 are in position! The
encoder could be damaged if that was the case!
Note:
• You may have to place capacitors (100uF+1uF electro +100nF ceramic) between the
encoder's ground and positive supply if the cables between the encoder and YAPSC:10V
is long, and more generally if the encoder is sensitive to electrical noise.
• If the encoder needs a very precise +5V regulated power supply, do not use the 5V
output (pin 1) but rather use a LM7805 type regulator and its capacitors as close to the
encoder as possible. This regulator will be powered by the +12V (pin9).
P0,001
I0,0001
D0
L1024
Sets the max. error to 1024 pulses (=256 lines)
NOTE: following command disables the max error monitoring. Please do not use this mode
unless you are absolutely sure of what you are doing!
L0
NOTE: When the maximum error is reached, the ERROR led blinks and the error is reported on
the serial port. To reset the board, you have to cycle power OFF and ON or to reset the board
(short MCLR and GND pins, see section 5.1.2)
M50
Will set the output swing to +5,25/-5,25V
M95
Sets the output swing to +10V/-10V
X2
Multiply the STEP inputs by 2. Each pulse on STEP will move the motor's position of 2 pulses (½
line)
EXEMPLE:
X-1
Inverts the direction. It is equivalent to invert the DIR input.
8 Annex
8.2 YAPSC
The first version of YAPSC is a DC servomotor controller equipped with a power stage.
Links:
• Original tread on the French forum usinages.com : www.usinages.com/carte-servos-a-
dspic-t648.html
• YAPSC-related stuff on my web page (French) : http://max-mod-shop.com/index.php?
option=com_content&view=category&id=17:-yapsc&Itemid=4&layout=default
• dspic-servo tread on cnczone.com : http://www.cnczone.com/forums/showthread.php?
t=40940
8.3 dspic-servo
This is the original work from Lawrence Glaister I based YAPSC on. It is located at
http://www.members.shaw.ca/swstuff/dspic-servo.html
8.4 Licence
Unless specified, the project files are released under GPL3. Read the included file gpl-3.0-
standalone.html
8.5 Contact
Maximilien MOUSSET
[email protected]
PM “MaX-MoD” on cnczone,com
PM “MaX-MoD” on usinages.com
Date Description
04/04/09 Corrected board silkscreen on power input connector