Nano Encoder

← Documentation

Front and rear views of the melonbotics Nano Encoder
Component side (left) and rear side (right).

The melonbotics Nano Encoder is a compact magnetic encoder for measuring the absolute angle of a rotating mechanism. It provides a 0°–360° analog position signal through a 3-pin JST-PH connector, so the mechanism's position is available immediately after power-up without first counting from a home position.

Product Overview

  • Absolute 0°–360° position sensing
  • 12-bit ratiometric analog output on a 3-pin JST-PH connector
  • Contactless sensing using a diametrically magnetized magnet
  • Green power indicator LED
  • Compact PCB with three mounting holes

The green LED only indicates that the Nano Encoder is receiving power. It is a useful first check if the encoder is not responding, but it does not indicate that a magnet has been detected or that the analog signal is valid.

What's Included

A Nano Encoder 2-Pack includes:

  • 2x Nano Encoder
  • 2x 6 mm x 2.5 mm diametrically magnetized neodymium magnets
  • 2x 3-pin JST-PH cable
  • 1x 4-pin JST-PH cable
  • 1x Analog JST Joiner Board

Quick Start

  1. Secure the Nano Encoder so that its sensing centre is aligned with the rotating shaft.
  2. Attach one of the included magnets to the rotating part, with the flat face of the magnet parallel to the PCB.
  3. Centre the magnet's rotation axis over the sensor. On the rear of the REV4 board shown above, the white dot marks the sensing centre.
  4. Connect the Nano Encoder to an Analog JST Joiner Board with a 3-pin cable, then connect the Joiner Board to a Control Hub or Expansion Hub analog port with the 4-pin cable.
  5. Power the robot and confirm that the green LED illuminates.
  6. Configure the corresponding channel as an Analog Input, then rotate the magnet through one complete revolution and verify that the reported voltage changes smoothly and wraps once.

See How to use analog output for FTC wiring, configuration, and Java examples.

Magnet Selection and Mounting

The Nano Encoder requires a diametrically magnetized cylindrical magnet. An axially magnetized magnet will not produce the rotating magnetic field required for angle sensing.

The included 6 mm diameter x 2.5 mm thick magnet matches the recommendation in the MT6701 sensor datasheet.

Alignment

For the best accuracy:

  • Keep the magnet face parallel to the PCB.
  • Align the magnet's rotation axis with the sensor's sensing centre.
  • Keep off-axis misalignment to 0.3 mm or less.
  • Confirm that the reading changes smoothly through the full 360° rotation before permanently fixing the magnet in place.

Sensing from the component side

When the magnet faces the sensor package directly, the MT6701 datasheet specifies a distance of 0.5–2.0 mm between the magnet and the surface of the sensor IC, with 1.0 mm typical.

The datasheet spacing is measured to the surface of the sensor IC, not to the surface of the PCB.

Sensing through the PCB

The Nano Encoder can also sense a magnet from the rear of the board. The PCB thickness becomes part of the total distance between the magnet and sensor, so place the magnet as close to the rear surface as practical. A rear-surface gap of 0.5 mm or less is recommended for reliable operation.

Backside sensing is more sensitive to magnet strength, alignment, and the exact mechanical stack-up. Test the complete mechanism through a full revolution before final assembly.

Connector and Wiring

The connector and rear test pads are labelled:

Label Function
GND Ground
VCC Sensor power
A_OUT Absolute analog position output

Use the supplied cables and Analog JST Joiner Board when connecting to a REV Control Hub or Expansion Hub. Each physical Hub analog connector contains two independent analog channels; make sure the channel selected in the Robot Configuration matches the Joiner Board socket used by the Nano Encoder.

Technical Specifications

Specification Value
Sensing range 0°–360° absolute
Output Ratiometric analog
Analog resolution 12-bit DAC
Sensor supply range 3.0–5.5 V
Integral non-linearity ±1.0° typical, ±1.5° maximum
Propagation delay 5 µs typical
Recommended magnet 6 mm diameter x 2.5 mm, diametrically magnetized
Component-side magnet gap 0.5–2.0 mm to the sensor IC surface; 1.0 mm typical
Maximum off-axis misalignment 0.3 mm

The magnetic and sensor figures above are taken from the MT6701 datasheet. Actual system accuracy also depends on magnet strength, alignment, spacing, mounting rigidity, and analog calibration.

Troubleshooting

Symptom Checks
Green LED is off Check that the cable is fully seated, the Joiner Board is connected to the Hub, and the robot is powered.
Green LED is on, but the voltage does not change Confirm that the correct analog channel is configured, the magnet is diametrically magnetized, and it is centred close enough to the sensor.
Reading jumps or has a dead region Reduce the magnet gap, improve axial alignment, and check that the magnet cannot move or tilt.
Angle moves in the opposite direction Invert the angle in software to match the mechanism's coordinate convention.
Zero position does not match the mechanism Apply a software offset after installing the encoder and magnet.

CAD Download

Nano Encoder.step

Sensor Reference

MT6701 datasheet, Rev. 1.8 (PDF)