Extension board · Controls and displays

Handwheel encoder interface

A receiver board for jogging handwheels and other 5 V encoders. It accepts differential, push-pull or open-collector outputs on screw terminals, powers the encoder, and gives the controller clean 3.3 V A, B and Z signals.

Top view of the handwheel interface: an eight-way screw terminal, a receiver chip, rows of solder links and a socket on the left and right edges.
Top view, drawn from the board’s design files. This is a drawing, not a photograph.
A, B, Zthree receiver channels
3 wiring stylesdifferential, push-pull, open collector
±200 mVdifferential sensitivity
5 V, 0.5 Afused encoder supply
Contacts 3, 4, 5outputs to the controller
70 × 55millimetres, four M3 holes
A handwheel is not an emergency stop. Never connect a 12 V or 24 V powered encoder to this board. Turn the wheel only while the machine is idle.

Tech specs

PurposeConditioning a manual pulse generator or incremental encoder. Axis and step selectors and stop buttons of a pendant are not handled
InputsAM26LV32E receiver on A+/A−, B+/B−, Z+/Z−; absolute maximum −14 to +14 V
Outputs3.3 V push-pull through 100 Ω to contacts 3 (A), 4 (B) and 5 (Z)
Encoder supply5 V from the socket through a 0.5 A resettable fuse, with a transient suppressor
IsolationNone
ConnectorsEight-way 3.5 mm screw terminal; two Gadgeteer type Y sockets (Samtec SHF-105, 1.27 mm)
Size70 × 55 mm, four M3 holes on a 60 × 40 mm pattern
Works withSmoothieboard V2 Prime header GF with the mpg module
LicenceOpen hardware, CERN-OHL-S-2.0

Every figure with its basis is in the electrical specifications appendix; hole positions are in the mounting dimensions appendix.

Board tour

The numbers on the drawing match the list below it. The board is shown from the component side.

  1. 1
    Handwheel terminal (J3) — 5V, 0V, A+, A−, B+, B−, Z+, Z−.
  2. 2
    Input socket Y IN (J1) — A, B and Z on contacts 3, 4 and 5.
  3. 3
    Chain socket CHAIN (J2) — Contacts 6 to 9 pass through.
  4. 4
    Receiver (U1) — AM26LV32E, powered from 3.3 V.
  5. 5
    Termination links (JP10 to JP12) — Add 120 Ω across a differential pair.
  6. 6
    Pull-up links (JP13 to JP15) — Add 2.2 kΩ to 5 V for open-collector outputs.
  7. 7
    Single-ended links (JP16 to JP18) — Tie the minus input to about 1.5 V.
  8. 8
    Supply protection (F1, D1) — Resettable fuse and clamp on the encoder 5 V.
  9. 9
    Threshold divider (R10, R11) — Makes the single-ended reference.
  10. 10
    Chain links (JP3 to JP5) — Open as delivered.
  11. 11
    Mounting hole — One of four M3 holes.
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

Check the handwheel’s own label: pinouts and wire colours differ between makers.

J3: handwheel terminal

TerminalUse
5VEncoder supply, 0.5 A maximum
0VEncoder ground
A+, A−Channel A
B+, B−Channel B
Z+, Z−Index channel, if present

J1: input socket (Y IN)

ContactSignalUsePrime header GF
13.3 VReceiver supply3.3 V
25 VEncoder supply5 V
3ENC_AA outputPB1
4ENC_BB outputPJ4
5ENC_ZZ outputPA4
6 to 9Passed throughNot usedPG0, PJ3, PG1, PJ2
10GNDGroundGND

Set the solder links per channel to suit the encoder output:

Encoder output Wire to TERM link PULLUP link SINGLE link
Differential (line driver) + and − closed for long cables open open
Push-pull or voltage + only open open closed
Open collector + only open closed closed
Channel not wired (Z) nothing open open open

Never close the TERM and SINGLE links of the same channel.

What you need

A 5 V handwheel or encoderUsing less than 0.5 A.
A socket with free interrupt pinsPrime header GF.
A ten-way cable1.27 mm Gadgeteer ribbon cable.
A soldering ironFor the solder links.

Get started

Minimum wiring: +5 V to 5V, supply; 0 V to 0V, ground; A and /A to A+, A-, channel A; B and /B to B+, B-, channel B. Handwheel Terminal J3 +5 V5Vsupply 0 V0Vground A and /AA+, A-channel A B and /BB+, B-channel B
A differential handwheel. For single-ended types wire only the + terminals.
  1. Identify the handwheel

    Read its label: supply voltage and output type. Use it only if it runs from 5 V.

  2. Set the links

    Follow the table in the pinout section, with the power off.

  3. Wire the terminal

    Then connect J1 to header GF.

  4. Check the signals

    Power up and turn the wheel slowly while measuring test points ENC_A and ENC_B.

    By design each test point switches between about 0 V and 3.3 V.

  5. Configure jogging

    Add the entry below, restart, and turn the wheel with the machine idle.

Configuration

You wantModuleExample
Jog one axis from the wheelMPGThe entry below
Select axis or step sizeNoneNot provided by this module

Add this to config.ini to move the X axis from the wheel:

[mpg]
wheel.enable = true
wheel.enca_pin = PB1
wheel.encb_pin = PJ4
wheel.axis = 0

axis is 0 for X, 1 for Y, 2 for Z, up to 5. Both pins must be able to raise interrupts on line numbers that nothing else uses (here 1 and 4); the startup messages report a failure. Each full quadrature cycle moves the motor by one step, so the movement is fine, and there is no step-size selector. Turn the wheel only while no job is running or queued: as published, the module stops handling the wheel after a movement arrives while the machine is busy. If the direction is wrong, exchange the two pin names. See the mpg module.

How it works

Each channel is compared by a receiver and sent to the controller at 3.3 V. J3 pairencoder Linksterm, pull-up, ref U1 receivercompare J13.3 V output J1 5 Vsocket F1fuse D1, C3clamp, store J3 5Vencoder
Signal path above, encoder supply below.

A differential receiver outputs high when the plus input is more than 200 mV above the minus input. That suits line-driver encoders directly. For single-ended encoders the minus input is tied to a reference of about 1.5 V, and an optional pull-up serves open-collector outputs. An unwired input reads high.

Solder links

All links ship open, which suits a differential encoder on a short cable.

Solder links as delivered: JP3 open; JP4 open; JP5 open; JP10 open; JP11 open; JP12 open; JP13 open; JP14 open; JP15 open; JP16 open; JP17 open; JP18 open. JP3 · openchain contact 3 JP4 · openchain contact 4 JP5 · openchain contact 5 JP10 · openterminate A JP11 · openterminate B JP12 · openterminate Z JP13 · openpull-up A JP14 · openpull-up B JP15 · openpull-up Z JP16 · opensingle-ended A JP17 · opensingle-ended B JP18 · opensingle-ended Z
The links as delivered. Close one with a small blob of solder across both pads; open it by removing the solder or cutting the copper between the pads.
LinkWhat it doesAs delivered
JP3Joins contact 3 to the chain socketOpen
JP4Joins contact 4 to the chain socketOpen
JP5Joins contact 5 to the chain socketOpen
JP10120 ohm across AOpen
JP11120 ohm across BOpen
JP12120 ohm across ZOpen
JP132.2 k from A+ to 5 VOpen
JP142.2 k from B+ to 5 VOpen
JP152.2 k from Z+ to 5 VOpen
JP16Reference on A minusOpen
JP17Reference on B minusOpen
JP18Reference on Z minusOpen

Chaining

Contacts 6 to 9 are free for a further board.

The controller's ribbon cable goes to the connector Y IN of the handwheel interface. 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 handwheel interface Y IN CHAIN pin 3, A stops here pin 4, B stops here pin 6, free passed on one solder link per pin Next board sees what is passed on
Chaining: one port of the controller serves two boards. Pin 1 of Y 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. Encoder signals stop here; pin 6 is wired straight through.
ContactSignalOn CHAIN
1, 2, 10Power and groundPassed on
3 to 5A, B, ZStopped by open links
6 to 9FreePassed on

Troubleshooting

SymptomLikely causeWhat to check
No signal on a test pointEncoder unpowered or wrong link settingTest point +5V_ENC; link table
Test point stays highInput not wired, or single-ended link missingWiring and SINGLE link
Wheel moves nothingConfiguration not loaded or pins refusedStartup messages
Wheel stopped workingIt was turned while the machine was busyReset the controller
Counts erraticallyNoise on a long cableUse differential wiring and close TERM links
5 V disappearsFuse tripped by overload or shortRemove power, find the fault, let it cool

The board has no indicator lights; use the test points.

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

Downloads

FileWhat it is
Schematic (PDF)The circuit diagram
Parts list (CSV)Every component with its value, footprint and part number where one is chosen
Board drawing (PNG)The top view used on this page
3D view, top (PNG)Rendered from the design files
3D view, angled (PNG)Rendered from the design files

Appendix: mounting dimensions

For drilling a mounting plate or designing an enclosure. Positions are hole centres, in millimetres, measured from the top-left corner with the board seen from the component side.

Mounting drawing of the handwheel interface, component side: outline 70 by 55 millimetres with 4 mounting holes. Hole positions are listed in the table below. COMPONENT SIDE · millimetres 70 55 0, 0 X Y 1 5.00, 5.00 2 65.00, 5.00 3 5.00, 45.00 4 65.00, 45.00 Numbered rings are mounting holes. Positions are hole centres, X then Y, from the marked corner.
Board outline 70 × 55 mm, corners rounded to a 1 mm radius, 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
15.005.003.2 mm, not platedMounting, M3 screw
265.005.003.2 mm, not platedMounting, M3 screw
35.0045.003.2 mm, not platedMounting, M3 screw
465.0045.003.2 mm, not platedMounting, M3 screw

Appendix: electrical specifications

Every figure is a design value, a calculated or simulated value, or a manufacturer’s data sheet value, as the last column says. A dash means no figure is given.

ParameterApplies toLowerNominalUpperBasis
Logic supply current3.3 V—11 mA20 mAData sheet and calculation
Encoder supply current5 V——0.5 AFuse rating
Signal inputJ3−14 V—+14 VTI absolute maximum
Differential thresholdU1−200 mV—+200 mVTI data sheet
Receiver delayU1—16 ns26 nsTI data sheet
Single-ended thresholdReference0.8 V1.26 V1.6 VSimulated, loaded case; limits used for the check
Open-collector high levelPull-up fitted1.7 V3.76 V5 VSimulated
Rise with 1 nF cablePull-up fitted—0.88 µs10 µsSimulated

Component stress limits

PartLimitUse on this board
Encoder supply0.5 A holdKeep the handwheel below it
Signal inputs±14 V absolute maximumNever connect 24 V
Termination resistors0.25 WAbout 0.1 W at 3.5 V differential

Appendix: simulation

The single-ended and open-collector input cases were simulated with ngspice.

Each simulated value (yellow mark) against its allowed range (green band). Input low level with open-collector output52.2 mV Input high level, pull-up fitted3.76 V Rise to the 1.7 V threshold with 1 nF cable875 ns Single-ended threshold, pessimistic loading to gr...1.26 V
Simulated value (yellow) against the limit used for it (green). Each bar has its own scale.
ResultSimulated valueLimitOutcome
Input low level with open-collector output52.2 mVat most 1.3 VWithin
Input high level, pull-up fitted3.76 V1.7 V to 5 VWithin
Rise to the 1.7 V threshold with 1 nF cable875 nsat most 10 µsWithin
Single-ended threshold, pessimistic loading to ground1.26 V800 mV to 1.6 VWithin

Not simulated: the receiver itself, cable noise and the protection parts.

Appendix: datasheet

The first page of the receiver data sheet. Click the page to open the PDF.

First page of the AM26LV32E quadruple differential line receiver datasheet
AM26LV32E quadruple differential line receiver — Texas Instruments, 28 pages.

See all boards on the extension boards page.

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