Extension board · Spindle

ANALOG SPINDLE CONTROL BREAKOUT (bouni)

Turns a PWM signal from the controller into an isolated analog speed command for a variable-frequency drive, with a separate run contact.

Top view of the ANALOG SPINDLE CONTROL BREAKOUT (bouni) board
Top view drawn from the original board file. This is a drawing, not a photograph.
0–10 Vspeed command
10 bitconversion
30 Hz–25 kHzPWM input
isolatedPWM and run
60 × 52 mmboard size
5drive terminals
A PWM input stuck high commands full speed, and RUN does not force the speed command to zero. Keep an independent way of stopping the spindle, and keep mains and motor wiring away from this board. For drives that take serial commands, see RS485/SPINDLE CONTROL BREAKOUT (bouni).

Tech specs

FunctionIsolated PWM to analog speed command, plus run contact
Drive terminalsJ3: 10V, AOUT, GND, RUN, DCM
Host connectorJ1 (Gadgeteer), chain on J2
IsolatorISO7710F for PWM
ConverterLTC2644, 2.5 V full scale
AmplifierTS912, nominal gain 4
Run pathILD217T optocoupler between RUN and DCM
Field supplyThe drive’s 10 V; TPS70930 makes 3 V
Size60 × 52 mm

Board tour

  1. 1
    Host connector J1 — PWM, run enable and 3.3 V.
  2. 2
    Chain connector J2 — Next board.
  3. 3
    Isolator U3 — ISO7710F, carries PWM across the barrier.
  4. 4
    Converter U4 — LTC2644, duty cycle to voltage.
  5. 5
    Amplifier U2 — TS912, gain of 4.
  6. 6
    Optocoupler U1 — Run contact.
  7. 7
    Regulator U5 — TPS70930, field 3 V.
  8. 8
    Drive terminals — 10V, AOUT, GND, RUN, DCM.
Point at a number, or tap it, to read what the part is; the same text is in the list. On a small screen, scroll the drawing sideways.

Pinout

Host connector J1

J1 contactConnected to
1+3V3
2+5V
3GAD_P3
4GAD_P4
5GAD_P5
6RUN_EN
7PWM_IN
8GAD_P8
9GAD_P9
10GND

Drive terminals J3

J3 contactConnected to
1VFD_10V
2VFD_AOUT
3GND_VFD
4VFD_RUN
5VFD_DCM

Chain connector J2

J2 contactConnected to
1+3V3
2+5V
3CHAIN_P3
4CHAIN_P4
5CHAIN_P5
6CHAIN_P6
7CHAIN_P7
8CHAIN_P8
9CHAIN_P9
10GND

What you need

Analog boardBuilt from the design files
Drive or voltmeterA meter for the first test
10 V field supplyFrom the drive, or a current-limited bench supply

Get started

A bench test with a voltmeter and no drive, motor or mains connected.

Bench test wiring: Smoothieboard V2 Prime header J34 contacts 1, 7 and 10 to J1 contacts 1, 7 and 10; a 10 volt supply to J3 contacts 1 and 3; a voltmeter between J3 contacts 2 and 3.Smoothieboard V2 Primeheader J3410: ground7: PI6 PWM1: 3.3 V1: 10V +2: AOUT3: GND10 V bench supply, current limitedvoltmeter, DC volts
Bench test: three wires from the controller, a 10 V supply and a voltmeter. No drive, motor or mains. The supply and meter are typical units, not specific models; check cable orientation by meter.
  1. Wire the host side

    With power off, connect Prime J34 contact 1 (3.3 V) to J1 contact 1, J34 contact 7 (PI6) to J1 contact 7 and J34 contact 10 to J1 contact 10. Leave the other J1 contacts open.

  2. Wire the field side

    Connect a current-limited 10 V supply to J3 contact 1 (positive) and contact 3 (return), and a DC voltmeter to contact 2 (positive) and contact 3. Never join the field return to the controller ground.

  3. Configure

    Add the entries from Configuration, restart, then power the field side.

  4. Measure

    Send M43.21, then M42.21 S25, then M42.21 S50, and finish with M43.21. Remove field power before disconnecting.

    Near 0 V, then about 2.5 V, then about 5 V.

Configuration

A switch driving hardware PWM; S is percent duty, not RPM. Syntax checked against firmware commit 2a21c0108b1d095ecd8b2b9358e94055f053c003.

[pwm2]
frequency = 1000

[switch]
spindle_request.enable = true
spindle_request.output_type = hwpwm
spindle_request.output_pin = PWM2_2
spindle_request.input_on_command = M42
spindle_request.input_off_command = M43
spindle_request.subcode = 21
spindle_request.startup_value = 0
spindle_request.halt_set_to = 0
spindle_request.ignore_on_halt = false

A drive installation also needs run control, speed-to-RPM mapping and a fault and stop policy suited to your machine.

Good to know:

  • Merge these entries into your existing configuration; do not duplicate sections. Reserve PI6 and the timer it shares (TIM8).
  • With a 1 kHz signal, 25 % duty gives about 2.5 V and 50 % about 5 V. These are nominal values, not a stated accuracy, and a 10 V full-scale output is not guaranteed.
  • A signal stuck high can command full scale: losing the PWM signal is not a safe stop.
  • Never feed the 10 V field terminal from a controller pin, and do not join controller and field grounds through a meter or USB lead.

How it works

The ISO7710F carries PWM across the isolation barrier. The LTC2644 measures its duty cycle and outputs a voltage, which the TS912 multiplies by 4: 25 % duty gives about 2.5 V and 50 % about 5 V (nominal values). A separate optocoupler closes RUN to DCM. The field side is powered by the drive’s 10 V terminal; field and host returns stay separate.

PWM on J1 contact 7 passes the isolator, the duty cycle converter and an amplifier to J3 contact 2.PWM inputJ1 contact 7Isolator U3ISO7710FConverter U4LTC2644Amplifier U2gain of 4AOUTJ3 contact 2
Speed command path: duty cycle becomes a voltage on the field side.

Chaining

J2 passes the Gadgeteer socket on to a further board. The PWM and run contacts are used by this board. A solder link on each contact sets whether it is passed through: check the link labels against Pinout before stacking boards.

The controller's ribbon cable goes to the connector IN of the Analog board. Inside the board each of the ten pins runs through a solder link to the connector CHAIN, where a second ribbon cable continues to the next board. A closed link passes its pin on, an open link stops it. Controller one ten-pin port Analog board IN CHAIN pin 5 passed on pin 6, run enable stops here pin 7, PWM stops here one solder link per pin Next board sees what is passed on
Chaining: one port of the controller serves two boards. Pin 1 of IN leads to pin 1 of CHAIN, pin 2 to pin 2, and so on, each through its own solder link. The three lines stand for the ten pins and show the links as delivered. Two boards must never drive the same pin, and a pin that one board uses for a signal is not free for the next. Contacts 6 and 7 stop at this board.
ContactsLink as designedOn CHAIN
1, 2, 10none, wired through3.3 V, 5 V, ground
3, 4, 5, 8, 9closedpassed on
6 (run enable), 7 (PWM)openstop here

Troubleshooting

SymptomCheck
No output voltageCheck 10 V between J3 contacts 1 and 3, and that PWM arrives on J1 contact 7.
Output at full scaleThe PWM input is high or held high. Send a low duty.
Drive does not runCheck the RUN and DCM wiring and the run signal.

Still stuck? Read how to ask for help or see the general troubleshooting guide.

Downloads

FileWhat it is
M3/M5 handlersDesign source
auxiliary UART shell outputDesign source

Appendix: mounting dimensions

Outline and holes from the original board file. Millimetres, seen from the component side.

Mounting drawing of the analog-spindle-control-breakout, component side: outline 60 by 52 millimetres with 2 mounting holes. Hole positions are listed in the table below. COMPONENT SIDE · millimetres 60 52 0, 0 X Y 1 10.00, 21.00 2 30.00, 21.00 Numbered rings are mounting holes. Positions are hole centres, X then Y, from the marked corner.
Board outline 60 × 52 mm, square corners, board thickness 1.6 mm. Drawn from the design files, component side up, in the same orientation as the board tour.
HoleX (mm)Y (mm)DiameterUse
110.0021.003.2 mm, not platedMounting, M3 screw
230.0021.003.2 mm, not platedMounting, M3 screw

Appendix: electrical specifications

Only what the design source states or the circuit fixes. Blank cells are not specified.

ParameterApplies toLowerNominalUpperBasis and conditions
PWM frequencyJ1 contact 730 Hz—25 kHzLTC2644 datasheet
Field supplyJ3 contacts 1 and 3—10 V—Design value
Speed commandJ3 contact 20 V—10 VNominal gain 4; swing near the rail not specified

Design source

The design files for this board are not published for download. See all boards on the extension boards page.

See the spindle control breakout family to compare connections for analog, RS-232 and RS-485 drives.

This is a wiki! If you'd like to improve this page, you can edit it on GitHub.