Skip to the content
PCBKitNew board
2 layersTle5012b encoder breakout, the printed circuit board in 3D

Tle5012b encoder breakout

Teslafly/TLE5012-Hall-Encoder-Module7

Breakout/mounting board for the TLE5012 hall encoder for vesc

Copper layers
2
Thickness
1.6 mm
Parts
12
Nets
11
Pads
42
Tracks, vias
65, 9
Pours
4
Routed
Yes
KiCad
KiCad 6 (file 20211014)
Created
20 Jan 2022
Updated
15 Dec 2022

Overview

Tle5012b encoder breakout is an open-source printed circuit board by Teslafly, from the Teslafly/TLE5012-Hall-Encoder-Module repository on GitHub. It is a 2-layer board with 12 parts on 11 nets, routed with 65 tracks and 9 vias.

It is built around the TLE5012 and SD05-01FTG. Its parts include 3 connectors, 2 capacitors, 2 resistors, 2 diodes and 1 IC. It belongs with the interfaces and adapters boards of this library.

Main components

2

README

README.md

TLE5012-Hall-Encoder-Module

Breakout/mounting board for the TLE5012 hall encoder to use with the vesc motor controller project.

(Pictures are from my nearly identical as5047 encoder board at https://github.com/Teslafly/AS5047-Hall-Encoder-Module)

encoder boards with both connector orentations top and bottom example cables kitting hardware schematic

Mounting:

  • The mounting holes fit an m3 screw and are 16mm apart center to center.
  • If the pcb cannot recess into the motor, a 3d printed shim (file link) can raise the encoder and provide clearance. If the motor gets too hot, the shim may be laser cut or milled out of a more resistant material.
  • This encoder works with a diametric magnet fixed to the motor shaft.
    • The magnet must be centered on the shaft. The encoder must be centered over the center of the magnet.
    • I find good results with a 6x2mm or 6x3mm neodymium magnet placed 1-5mm away from the face of the encoder.
    • Magnet example: https://www.aliexpress.us/item/3256801356246959.html

Building:

  • This pcb can be hand soldered easially.
  • You can use either horizontal or vertical jst gh connectors for each connector placement. The vertical data connector should be placed with pins outwards to maintain the same pinout between the horizontal/vertical data connector options.
  • As the temperature sensor connector is unpolarised, either horizontal or vertical connector can be placed on the same footprint. see pictures.

JST GH mating connectors and making cables:

  • If you do not have a crimper for JST GH crimps, they are fiddley and are hard to crimp properly. I recommend either getting a male to male JST GH cable and cutting it to splice into a longer encoder cable, or doing the same with a precrimped silicone wire kit like this:

  • The jst gh data connector has the same pinout as the JST PH vesc hall sensor connector. however, note that some vesc hardwares that have swapped to JST GH connectors have reversed pinouts. aka the cable must connect pins 1<->6, 2<->5, etc so that the locking clips are reversed from each other.

    • THIS IS NOT THE CASE ON ALL HARDWARES. CHECK YOUR PINOUT BEFORE POWERING. A REVERSED PINOUT WILL DESTROY THE ENCODER AS 5V AND GND ARE SWAPPED.
    • (The sensor should get lukewarm during operation. If it gets really hot then it's dead or a wire is shorted)
  • Also, your vesc hardware must not have filters placed on the hall port pins. these filters must be removed for this encoder to work if present. They are present on all vesc hw 4.2, and nearly all flipsky boards. Trampa hw 6.0+ do not have these filters and will work as is.

Wire:

I recommend using sheilded wire. usb cable will work in a pinch if you omot the temp wire and use the sheild for gnd. but ~28awg 6 core sheilded cable is ideal. the sheild should be connected to the gnd pin on the vesc side, and unconnected on the sensor side. you must keep all wires close to each other to get good signal integrity when splicing /crimping the end connectors. If you cannot source sheilded wire, you will get acceptable results by keeping the wires close, and routing the cable away from the phase wires of the motor. It is recommended that the data cable is kept under 0.5 meters. If that is not possible then sheilded wire must be used and attention to detail excercised in cable construction.

Testing:

  • This sensor runs best at 5V input power. 3.3V operation is not gaurenteed but will not cause damage.

  • The led on the pcb should glow somewhat dimly. It is not blindingly bright.

  • The sensor IC should get lukewarm during operation. If it gets really hot then it's dead or a wire is shorted

  • You can troubleshoot/test the signal integrity of your cable and encoder functionality with the "encoder" command in the vesc terminal.

    • The error rate should be very close to zero.
    • If it is above 0.5% then you should troubleshoot your setup and improve signal integrity.
    • 99+% generally means that all communication with the encoder has failed. The wiring may be wrong, the sensor dead, or your vesc has hall port filters that need to be removed and shorted.
  • when viewing the encoder angle in the vest-tool realtime view, the encoder value should change smoothly through the entire 360 degrees. If it is jumpy you probably have a signal integrity issue

  • If the sensor cable is poorly routed/sheilded, high motor currents can cause noise that increases the encoder error rate. If you experience encoder faults during acceleration, check for intermittent opens in all signals and try rerouting the sensor cable away from motor phase wires and battery cables.

  • a 3d printable test jig using a 608 bearing and 6mm magnet is included in the "608 bearing test holder" folder.

Parts

12
QtyValueFootprintReferences
2MountingHoleMountingHole:MountingHole_3.2mm_M3H1, H2
110kpkl_dipol:R_0603R1
11ufpkl_dipol:C_0603C1
14.7ufpkl_dipol:C_0603C2
1470Rpkl_dipol:R_0603R2
1Conn_01x02Connector_JST:JST_GH_SM02B-GHS-TB_1x02-1MP_P1.25mm_HorizontalJ1
1GREEN LEDpkl_dipol:D_0603D1
1SD05-01FTGDiode_SMD:D_SOD-323D2
1TLE5012Package_SO:SO-8_3.9x4.9mm_P1.27mmU1
1data-HConnector_JST:JST_GH_SM06B-GHS-TB_1x06-1MP_P1.25mm_HorizontalJ3
1data-VConnector_JST:JST_GH_BM06B-GHS-TBT_1x06-1MP_P1.25mm_VerticalJ2

Questions

What parts does the Tle5012b encoder breakout use?

12 parts, built around the TLE5012 and SD05-01FTG. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Tle5012b encoder breakout KiCad files?

From the Teslafly/TLE5012-Hall-Encoder-Module repository on GitHub, at the commit this page was made from: the board is tle5012b encoder breakout.kicad_pcb and its schematic tle5012b encoder breakout.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Tle5012b encoder breakout design in my own project?

Its repository states no licence, so its author keeps all rights: ask Teslafly before reusing the design.

Similar boards

  • 4 layers42 × 42 mmStmsp, the printed circuit board in 3D

    Stmsp

    rene-dev/stmbl

    AC Servo Driver for STM32F4

    134 parts990GPL-3.0
  • 2 layers170.6 × 121.1 mmEIM, the printed circuit board in 3D

    EIM

    bhorst519/bluecar

    232 parts3
  • 2 layers89.5 × 50 mmBSC finish punches transmitter, the printed circuit board in 3D

    BSC finish punches transmitter

    ut-ims-robotics/eensaar-thesis-2026-wireless-finish-punch-transmission

    This repository hosts the source code, electrical schematics and layout, as well as documentation developed by Emil Eensaar for his Bachelor of Science thesis.

    63 parts1Apache-2.0
  • 2 layers20 × 38.5 mmArm tiny pcb, the printed circuit board in 3D

    Arm tiny pcb

    Chicken-Fried/STM32-NanoCortex

    Ultra-compact USB-C development board powered by STM32F042 (ARM Cortex-M0) with native DFU, ceramic-only LDO power stage & CaveRover branding.

    29 partsCERN-OHL-S-2.0
  • 2 layersNrf bga, the printed circuit board in 3D

    Nrf bga

    github-linguist/linguist

    Language Savant. If your repository's language is being reported incorrectly, send us a pull request!

    12 parts14kMIT
  • 2 layers66.9 × 74.5 mmDeskHop, the printed circuit board in 3D

    DeskHop

    hrvach/deskhop

    Fast Desktop Switching Device

    12 parts7.9kGPL-3.0
  • 2 layers40 × 15 mmSensors, the printed circuit board in 3D

    Sensors

    google/mozc-devices

    Circuit diagrams and firmware source code for Gboard DIY keyboards

    12 parts3kApache-2.0