> **Source:** Core Electronics is an Australian maker-electronics retailer and manufacturer based in Newcastle, NSW, run by a team of makers and educators. We design and manufacture our own product lines (PiicoDev, CE originals) and are official retailers for iconic maker and industrial brands including Raspberry Pi, Arduino, Adafruit, SparkFun and DFRobot. Orders ship Australia-wide from our Newcastle warehouse. Prices are in AUD and include GST. Pricing, stock and dispatch on this page are generated from the store's live catalog. Full machine-readable index: https://core-electronics.com.au/llms.txt

# Magnetic Encoder Pair Kit with Side-Entry Connector for 20D mm Metal Gearmotors, 20 CPR, 2.7-18V

**Type:** Product page · **SKU:** POLOLU-5661 · **Brand:** [Pololu](https://core-electronics.com.au/brands/pololu-australia)
**Page:** https://core-electronics.com.au/pololu-20d-metal-gearmotor-magnetic-encoder-kit-side-entry-20cpr.html ([markdown](https://core-electronics.com.au/pololu-20d-metal-gearmotor-magnetic-encoder-kit-side-entry-20cpr.html.md))

Add quadrature encoders to your 20D mm metal gearmotors (extended back shaft version required) with this kit that uses a magnetic disc and Hall effect...

## Pricing

- **Price:** $14.80 (inc GST) — $13.45 AUD, exc GST
- **Quantity discounts:** 10+ $12.92 (exc GST) · 25+ $12.51 (exc GST)

## Availability & dispatch

- In stock, ships same business day if ordered before 2PM (Australia/Sydney).
- We can dispatch 2 today, and up to 50 more in 4–7 days.

## How to buy

- **Build a cart:** compose `https://core-electronics.com.au/cart/link?items=POLOLU-5661:1` (comma-separated SKU:qty pairs) and share the link. Opening it shows a confirmation page with live pricing and stock before anything is added to the cart.
- **Verify the cart first:** fetch `https://core-electronics.com.au/cart/link/POLOLU-5661:1.md` for live line prices (inc & exc GST, quantity discounts applied), stock and dispatch estimates, and totals. Append `/to/{AU-postcode}` (or `/to/{country-code}:{postcode}`) before `.md` for delivery options and prices to that destination. Unknown, retired, or out-of-stock SKUs are flagged. (Query form `cart/link.md?items=...` also works but some robots parsers refuse query strings here.)
- **Checkout** is completed on-site and includes a captcha at the payment step. Share the cart link; checkout takes it from there.
- **Search the catalogue:** `https://core-electronics.com.au/search/{query}.md` (URL-encode the query; pages 2-3 at `search/{query}/{page}.md`; `search.md?q=` also works)
- **Payment methods, purchase orders, policies and contact details:** https://core-electronics.com.au/llms.txt
## Description

Pololu's 20D encoder kits include two dual-channel Hall effect sensor boards and two [10-pole magnetic discs](https://core-electronics.com.au/magnetic-encoder-disc-for-20d-mm-metal-gearmotors-od-9-7-mm-id-2-0-mm-20-cpr-bulk.html) that can be used to add quadrature encoding to two [20D mm metal gearmotors](https://core-electronics.com.au/components/motors/metal-gearmotors.html)**with extended back shafts** (motors are not included with this kit). The encoder board senses the rotation of the magnetic disc and provides a resolution of 20 counts per revolution of the motor shaft when counting both edges of both channels. To compute the counts per revolution of the gearbox output shaft, multiply the gear ratio by 20. (We also have a [6-pole magnetic disc](https://core-electronics.com.au/magnetic-encoder-disc-for-20d-mm-metal-gearmotors-od-9-7-mm-id-2-0-mm-12-cpr-bulk.html) available separately that can work with this encoder to provide 12 counts per revolution of the motor shaft.)

This version has a **side-entry**, 6-pin male JST PH-type connector, which allow [compatible cables](https://core-electronics.com.au/category/361/6-pin-jst-ph-style-cables) to be plugged in perpendicular to the motor case and output shaft:

| [![](https://a.pololu-files.com/picture/0J13805.300.jpg?67806d84acf337e5adb5e49cb2104dfc)](https://a.pololu-files.com/picture/0J13805.1200.jpg?67806d84acf337e5adb5e49cb2104dfc) |
|---|

| [![](https://a.pololu-files.com/picture/0J13806.300.jpg?31f24f175b84b6daa3b2331a184cf5f1)](https://a.pololu-files.com/picture/0J13806.1200.jpg?31f24f175b84b6daa3b2331a184cf5f1) |
|---|

| [![](https://a.pololu-files.com/picture/0J13807.380.jpg?c8627bad15f3e67cc297481952aa1057)](https://a.pololu-files.com/picture/0J13807.1200.jpg?c8627bad15f3e67cc297481952aa1057) |
|---|

| [![](https://a.pololu-files.com/picture/0J13808.210.jpg?8002b4f4b912898b583e0096cbe1c3c4)](https://a.pololu-files.com/picture/0J13808.1200.jpg?8002b4f4b912898b583e0096cbe1c3c4) |
|---|

Pololu also carry a version of this encoder [**with a top-entry connector**](https://core-electronics.com.au/pololu-20d-metal-gearmotor-magnetic-encoder-pair-kit-top-entry-20cpr.html); the following pictures show comparisons of the side-entry and top-entry versions:

| \| [![](https://core-electronics.com.au/attachments/localcontent/0J13810_14404aa381e.jpg)](https://core-electronics.com.au/attachments/localcontent/0J13810_16166cf0e7e.jpg) \| \|---\| | \| [![](https://core-electronics.com.au/attachments/localcontent/0J13798_1071998574a.jpg)](https://a.pololu-files.com/picture/0J13798.1200.jpg?04e13fb0cbce366738ded81b21d6feb7) \| \|---\|---\| |
|---|
| \| [![](https://core-electronics.com.au/attachments/localcontent/0J13811_152614a90c1.jpg)](https://core-electronics.com.au/attachments/localcontent/0J13811_2800766e982.jpg) \| \| Magnetic Encoder with Side-Entry Connector assembled on a 20D mm Metal Gearmotor with Extended Motor Shaft (JST PH cable not included). \| | \| [![](https://core-electronics.com.au/attachments/localcontent/0J13799_157060e6870.jpg)](https://core-electronics.com.au/attachments/localcontent/0J13799_288388648e8.jpg) \| \|---\|---\| \| Magnetic Encoder with Top-Entry Connector assembled on a 20D mm Metal Gearmotor with Extended Motor Shaft (JST PH cable not included). \| |
|---|

**Note:** This sensor system is intended for users comfortable with the physical encoder installation. It only works with 20D mm metal gearmotors that have extended motor shafts.

**Compatible cables**

Pololu have various cables that work with the 2mm-pitch JST PH-style connector these encoders, available in double-sided or single-sided versions of varying lengths. The double-sided versions have twisted wires and female JST PH-type connectors on both ends, and single-sided versions have a female connector on one end [female crimp pins for 0.1" housings](https://core-electronics.com.au/female-crimp-pins-for-0-1-housings-100-pack.html) on the other:

| \| [![](https://core-electronics.com.au/attachments/localcontent/0J13639_19073316feb.jpg)](https://core-electronics.com.au/attachments/localcontent/0J13639_1826882dcb1.jpg) \| \|---\| \| JST PH-Style Cable, 6-Pin, Female-Female, 16cm. \| | \| [![](https://core-electronics.com.au/attachments/localcontent/0J13635_15731c9f6fa.jpg)](https://core-electronics.com.au/attachments/localcontent/0J13635_11653d4cab5.jpg) \| \|---\|---\| \| JST PH-Style Cable with Female Pins for 0.1" Housings, 6-Pin, 12cm. \| |
|---|

|  | JST PH-Style 6-Pin Cables |
|---|---|
|  | Pins | Terminations | Length | Item # |
|  |
|  |
| [![](https://core-electronics.com.au/attachments/localcontent/0J13647_6652124e4b.jpg)](https://core-electronics.com.au/category/361/6-pin-jst-ph-style-cables) | 6 | double-sided (JST PH to JST PH) | 10 cm (4") | [\#5643](https://core-electronics.com.au/jst-ph-cable-6-pin-female-female-10cm-pololu.html) |
| 16 cm (6.3") | [\#5644](https://core-electronics.com.au/catalog/product/view/sku/POLOLU-5644) |
| 25 cm (10") | [\#5645](https://core-electronics.com.au/catalog/product/view/sku/POLOLU-5645) |
| 40 cm (16") | [\#5646](https://core-electronics.com.au/catalog/product/view/sku/POLOLU-5646) |
| 63 cm (25") | [\#5647](https://core-electronics.com.au/catalog/product/view/sku/POLOLU-5647) |
| single-sided (JST PH to 0.1" crimp pins) | 12 cm (4.5") | [\#5640](https://core-electronics.com.au/catalog/product/view/sku/POLOLU-5640) |
| 30 cm (12") | [\#5641](https://core-electronics.com.au/catalog/product/view/sku/POLOLU-5641) |
| 75 cm (30") | [\#5642](https://core-electronics.com.au/pololu-jst-ph-6pin-female-to-dupont-cable-75cm.html) |

The double-ended cables can be used with Pololu's JST PH-style connector breakout boards, which are also available in [top-entry](https://core-electronics.com.au/pololu-jst-ph-6-pin-male-top-entry-breakout-adapter-board-with-sh.html) and [side-entry](https://core-electronics.com.au/catalog/product/view/sku/POLOLU-5659) versions.

| \| [![](https://core-electronics.com.au/attachments/localcontent/0J13739_17155322a2d.jpg)](https://core-electronics.com.au/attachments/localcontent/0J13739_37252da0a86.jpg) \| \|---\| \| Breakout for JST PH-Style Connector, 6-Pin Male Top-Entry, with SH. \| | \| [![](https://a.pololu-files.com/picture/0J13742.270.jpg?9a82abfea4f59d9051e4207fe4680ef6)](https://core-electronics.com.au/attachments/localcontent/0J13742_3509880a682.jpg) \| \|---\|---\| \| Breakout for JST PH-Style Connector, 6-Pin Male Side-Entry, with SH. \| |
|---|

**Pinout and installation**

The encoder board is designed to be soldered directly to the back of the motor, with the back shaft of the motor protruding through the hole in the circuit board. One way to achieve good alignment between the board and the motor is to tack down the board to one motor pin and to solder the other pin only when the board is flat and well aligned. Be careful to avoid prolonged heating of the motor pins, which could damage the brushes. Once the board is soldered down to the two terminals, the motor leads are connected to the M1 and M2 connector pins as labeled below, and they can be accessed via the red and black wires when used with Pololu's 6-pin JST PH-style cables. The remaining four connector pins are used to power the sensors and access the two quadrature outputs:

| \| [![](https://a.pololu-files.com/picture/0J13812.471.jpg?29d1863977a5f69fe0c04f9f1a54ae83)](https://a.pololu-files.com/picture/0J13812.1200.jpg?29d1863977a5f69fe0c04f9f1a54ae83) \| \|---\| | \| [![](https://a.pololu-files.com/picture/0J13804.431.jpg?e9c7532599e81777e0abf601b7c6d3ef)](https://a.pololu-files.com/picture/0J13804.1200.jpg?e9c7532599e81777e0abf601b7c6d3ef) \| \|---\|---\| |
|---|

The sensors are powered through the VCC (blue wire) and GND (green wire) pins. VCC can be 2.7 V to 18 V, and the quadrature outputs A and B (yellow and white wires) are digital signals that are either driven low (0 V) by the sensors or pulled to VCC through 10 kO pull-up resistors, depending on the applied magnetic field. The sensors’ comparators have built-in hysteresis, which prevents spurious signals in cases where the motor stops near a transition point.

| [![](https://core-electronics.com.au/attachments/localcontent/0J7470_720761f23e9.jpg)](https://core-electronics.com.au/attachments/localcontent/0J7470_2810984a3a5.png) |
|---|
| Encoder A and B outputs of a magnetic encoder on a 6V 20D mm metal gearmotor running at 6V. |

Once the board is soldered to the motor, the magnetic encoder disc can be pushed onto the motor shaft. To help ensure a strong signal, the disc should be positioned close to the sensors, but not so close that the magnet makes contact with them. The exact position does not matter, but a good target is having the shaft protrude approximately 1 mm past the outer face of the disc.

| [![](https://a.pololu-files.com/picture/0J13815.400.jpg?f16c0e06a8d966f3041d5edc08455727)](https://core-electronics.com.au/attachments/localcontent/0J13815_18141c84bed.jpg) |
|---|
| Push the magnetic disc onto the motor shaft so the shaft protrudes approximately 1 mm past the disc. |

**Schematic diagram**

| [![](https://a.pololu-files.com/picture/0J13814.900.jpg?c44ab7b3f16d1508af9c371979ebf8a9)](https://core-electronics.com.au/attachments/localcontent/0J13814_576725374c3.png) |
|---|

**Comparison to previous version**

This encoder module is a modification of the [previous version](https://core-electronics.com.au/magnetic-encoder-pair-kit-for-20d-mm-metal-gearmotors-20-cpr-2-7-18v.html) that adds a connector to enable the use of removable cables. The basic schematic is unchanged, and the electrical performance is identical. The following picture shows the two new encoders with JST PH-type connectors next to the previous (green) one:

| [![](https://a.pololu-files.com/picture/0J13813.800.jpg?2c7fd864f0098589dad275899887c838)](https://a.pololu-files.com/picture/0J13813.1200.jpg?2c7fd864f0098589dad275899887c838) |
|---|
| Comparison of Magnetic Encoder for 20D mm Metal Gearmotors with Top-Entry Connector (left), Side-Entry Connector (center), and 0.1"-pitch through-holes (right). |

**Dimensions**

| Size: | 17.6 mm × 19.4 mm |
|---|---|
| Weight: | 3.8 g[1](https://core-electronics.com.au/#note1) |

**General specifications**

| Minimum operating voltage: | 2.7 V |
|---|---|
| Maximum operating voltage: | 18 V |
| Connector: | side-entry, 6-pin JST PH-type (2mm pitch) |
| Encoder resolution: | 20 CPR[2](https://core-electronics.com.au/#note2) |

**Identifying markings**

| PCB dev codes: | enc04b |
|---|---|
| Other PCB markings: | 0J15679 |

**Notes:**

1Weight of full set. Each encoder board weighs ~1.3 g and each magnet disc weighs ~0.6 g.2When counting both edges of both channels.**File downloads**

- **Dimension diagrams of the Magnetic Encoder Pair Kit with JST PH-Style Connector (Top-Entry or Side-Entry) for 20D mm Metal Gearmotors (463k pdf)**
    
    This file contains dimension diagrams for the [Magnetic Encoder Pair Kit with Top-Entry Connector](https://core-electronics.com.au/pololu-20d-metal-gearmotor-magnetic-encoder-pair-kit-top-entry-20cpr.html) and the [Magnetic Encoder Pair Kit with Side-Entry Connector](https://core-electronics.com.au/pololu-20d-metal-gearmotor-magnetic-encoder-kit-side-entry-20cpr.html).
- **3D models of the Magnetic Encoder Pair Kit with JST PH-Style Connector (Top-Entry or Side-Entry) for 20D mm Metal Gearmotors (1MB zip)**
    
    This file contains 3D models (in the step file format) of the components for the [Magnetic Encoder Pair Kit with Top-Entry Connector](https://core-electronics.com.au/pololu-20d-metal-gearmotor-magnetic-encoder-pair-kit-top-entry-20cpr.html) and the [Magnetic Encoder Pair Kit with Side-Entry Connector](https://core-electronics.com.au/pololu-20d-metal-gearmotor-magnetic-encoder-kit-side-entry-20cpr.html).
- **Drill guides for the Magnetic Encoder Pair Kit with JST PH-Style Connector (Top-Entry or Side-Entry) for 20D mm Metal Gearmotors (12k zip)**
    
    These DXF drawings show the locations of all of the holes on the [Magnetic Encoder Pair Kit with Top-Entry Connector (enc04c)](https://core-electronics.com.au/pololu-20d-metal-gearmotor-magnetic-encoder-pair-kit-top-entry-20cpr.html) and the [Magnetic Encoder Pair Kit with Side-Entry Connector (enc04b)](https://core-electronics.com.au/pololu-20d-metal-gearmotor-magnetic-encoder-kit-side-entry-20cpr.html).

**Recommended links**

- **[Texas Instruments DRV5013 Hall effect sensor datasheet](https://core-electronics.com.au/attachments/localcontent/drv5013_1629927677f.pdf)**

## Images

- [Product image 1](https://core-electronics.com.au/media/catalog/product/P/O/POLOLU-5661-1.jpg)
