Open generator for PCB inductive encoder coils (KiCad), looking for testers

Hi everyone,

Over the last three months I have been building a tool for something I kept wanting in my own robots: a high-resolution, absolute angle sensor that does not cost hundreds of dollars. The result is the Sinusoidal Coil Generator, a Python program that writes complete KiCad boards for the stator and the rotor of a rotary inductive encoder.

GitHub: GitHub - RolandThsive/Inductive-Encoder-Sinusoidal-Coil-Generator: Open coil generator for rotary inductive encoders: KiCad stator and rotor PCBs from a few parameter files. · GitHub

How the sensor works
A transmitter coil on the stator PCB is driven at a few MHz by a receiver IC such as the Renesas IPS2200 or IPS2550. A rotor PCB with copper lobes turns in front of it. Two sinusoidal receiver coils pick up a SIN and a COS signal that follow the rotor angle, and the angle is atan2(SIN, COS). There is no magnet and no optics, and the whole sensor is two PCBs.

What the generator does

  • 1 to 16 electrical periods per turn. One loop gives a true absolute 0–360° sensor. More loops give finer resolution, and matching the loop count to the motor’s pole pairs lines the sensor up with commutation.
  • Builds the receiver coils (three profiles, optional sub-coils), the transmitter coil (series or parallel, stepped or spiral) and the matching rotor.
  • 2- or 4-layer boards with through vias only, so any low-cost PCB fab can make them. The smallest 1-loop board that passes every check has a 12 mm outer radius.
  • Checks every parameter and the finished geometry, and estimates TX inductance, tank capacitors, oscillator frequency and RX voltage against the IC limits.
  • An optional analyser and optimizer model the copper in 3D and report the angle error over a range of air gap, eccentricity and tilt.
  • Output opens in KiCad 7, 8, 9 and 10. No libraries or footprints needed.

Where SimpleFOC comes in
The IPS2200 gives analog SIN and COS outputs, so it should work with the LinearHall class in the drivers repo, or with GenericSensor and your own atan2. I have not tried this yet. If you have run an analog SIN/COS sensor with SimpleFOC, I would really like to hear how it went.

My hope is that SimpleFOC systems will be able to use high-resolution inductive encoders on the go: generate the coils for your motor, order two PCBs, and connect them like any other sensor.

Honest status

  • No hardware has been measured yet. The first test boards are ordered, and every number in the repository is a model estimate until they are measured.
  • The code is free to use, study and change for personal, educational, research and hobby use (PolyForm Noncommercial 1.0.0). Commercial use needs written permission.

What would help

  • Measurements, if you build a board: inductance, oscillator frequency, signal amplitude, angle error.
  • Feedback on the coil geometry from anyone who has designed inductive sensors before.
  • Advice on reading the SIN/COS signals cleanly on an STM32 or ESP32 alongside SimpleFOC.

Thanks for reading. I am happy to answer questions here.

Have a nice day,

Roland

Interesting project! Especially nice that the center of the coil is hollow, so it doesn’t need access to the end of the shaft like a magnetic encoder.

LinearHall will indeed work for it, although you may want to override _atan2 with a higher precision function instead of the fast approximate we use

STM32 has the best ADC. You can see one of my custom setups for it here (functions initADC, setChannelEnabled, getResult)

Injected channels on both ADCs are used for current sense, ADC1 regular mode reads the internal temperature sensor, and ADC2 is used for general purpose including linear halls. It’s set up for 4x hardware oversampling, but actual oversampling is higher (up to 128x). It reads into a circular DMA buffer (dynamically sized so the oldest entries are <47µs old), and then the getResult function sums up all the entries for the requested channel.

But for low-cost resolution, MT6835 is hard to beat. Under $6/pc on amazon including the magnet, and can be configured to give a stable 18-bit reading at low speed. For higher speed, it’s 15 or 16 bits stable. You need to run it through CalibratedSensor for nonlinearity, but these inductive sensors may need that too. We’ll have to wait and see your testing results. You could use the calibrated MT6835 reading as a reference to compare yours against. It will be most accurate with a stepper motor, which has a large number of precise positions it can move to for calibration.

Hi deku,

Thanks for the reply. I am currently planning on going with Renesas IPS2550. Plan is to make around 16 maybe 32 boards of different settings and get real world data on 16 bit resolution, 18 bit resolution and 21 bit resolution. The accuracy is what intrigues me with these chips.

For the MCU I will go with stm32g4 series since I have quite a lot of them lying around.

For the motor I will go with the T - Motor GB series(Already have a bunch lying around) or CubeMars Gimbal series. Depends on whatever is left of my budget by the time the electronics arrive. And now I have included some steppers(Most likely some NEMA23s as I may use them to make a table lifter later) after your comment above.

For the test bench bearings I am going with NTN Japanese bearings 6800 series since I already know the jitter and have their exact preload data configured somewhere in my projects folder.

Thanks for the pointer. I will most certainly do this. I want to make a fully industrial solution for everyone. As my budget rises i will invest in some cobot motors as well.

Yes I wanted to make the inductive sensors for humanoids and apparantly Renesas didnt want to give me permission to use their tool so I made their industrial tool from scratch to replicate what some of the very popular german encoding companies do.

Yes at first I will test with the STM32 ADC and then switch to a 21 bit ADC. I am currently making the generator produce coils for low RPM extremely high percision usage. My later prioroty would be to focus on the higher speed stable percision applications.+ I will be uploading all the super optimized boards on the GitHub which will be rigorously tested over the next 6 months.

If you have any more pointers I am all ears.

What you described is a bit over my head, I must admit.
But common sense with inductive proximity sensors is, that they are quite temperature sensitive.
And they should be mounted with no metal nearby.
I hope those restrictions don’t apply to your setup.

Hello, The temperature is not at all a factor in consideration. Rotary inductive sensors are quite immune to them. The problem however is the stray metal and poorly planned all metal setups. With a two pcb setup and around 1mm air gap, the problem ceases to exist if the surrondings are planned to have either plastic housing or accurately placed thick pcbs.

I will elaborate on this in some super optimized examples that i come up with in the future.

Just updating it with a WebUI I made for making it easier for engineers to make inductive encoders.

Tool Tips explain everything meticulously.

Link to the webpage -

I want to use MT6901 in this encoder, how to connect the MT6901 pin to this encoder ?

Hi,

Thanks for taking interest in this. Here’s the wiki. Home · RolandThsive/Sinusoidal-Inductive-Encoders-Coil-Generator Wiki · GitHub

I made this Wiki for this repo exactly for this kinds of requests. You can see if this style of inductive coils fits your chips.

Thanks for your response. I read that Wiki before, and tried to generate the encoder coil, but I don’t know which wire connect to which pin of MT6901. Here is the symbol for MT6901, The RX1/2/3/5/6/7 are used for connecting to the coil wire, but I don’t know how to connect the generated coil wire to those pins.

Thanks for the images.

For this, Look at IPS2550 - https://www.renesas.com/en/products/ips2550?srsltid=AYCX9vIWy6vxPnqaweRgtwKMs4OxMYorpOCgQPpYkEd3Msf1DdICzwaN

In simplified terms,
These coils use 4 RX and 2 TX connections (Sin + Sin - Cos + Cos - along with TX high and TX Low)

See if MT6901 chips suits this kind of coils. Otherwise Tell me whats needed(Also give me the Documentation for your chip) and I may design vernier style coils later if your chip supports that.

The silkscreen is telling you to cut the traces here(Encircled in blue) and break them out to your pins. I can tell you exactly where to connect what if you can give me the doc and if that chip suits dual RX TX SINCOS inductive style encoders.

I designed the dual coils for dual chip designs but MT6901 seems to have 8 RX pins which could be perhaps used for a single chip maybe. We will know when I get the doc. The official website isnt working for me to get the chip doc.

“As on a single board, the last step of the run draws a suggestion for these cuts on the silkscreen” in Silkscreen Dual Coil Set Generator · RolandThsive/Sinusoidal-Inductive-Encoders-Coil-Generator Wiki · GitHub

Thank you very much, but I have only the Chinese version of that chip, and can’t be uploaded here. I copy some pages here, can you read it?

And how to activate the linear mode?

Hi I havent made the linear and arc mode yet. They are going to be made soon. I am right now concentrating on testing 30 - 60 boards of single and dual boards by ordering them via JLCPCB or someone similar.

Please wait while I make them.

I will try to read your pages later and try to translate them.

It seems the coil your tool generated can be used for TM6901, here is the answer from AI,

Here is an English summary focused specifically on the coil design differences between the two chips.


Coil Design Comparison: IPS2550 vs. MT6901

The fundamental divergence is architectural: IPS2550 uses a single-track differential coil system, while MT6901 uses a dual-track vernier coil system. This difference cascades into every aspect of the coil design—topology, pin count, PCB stack-up, and signal processing.

1. Coil Topology & Count

Aspect IPS2550 (Renesas) MT6901 (NOVOSENSE / MagnTek)
Coil architecture Single-track differential. Dual-track vernier.
Transmitter (TX) coil One transmitter coil. One excitation coil drives the system; the exact TX count is not explicitly specified in available sources, but the architecture implies at least one primary excitation structure serving both tracks.
Receiver (RX) coils Two receiver coils: one Sine coil and one Cosine coil, physically shifted by 90° in space. Two independent receiver coil sets (a “fine” track and a “coarse” track), each with its own Sine/Cosine signals. The chip exposes 8 RX pins (RX1–RX8) to accommodate these two tracks.
RX pin count 4 (RX1/RX2 for one differential pair, RX3/RX4 for the other, or 2 pins in single-ended mode). 8 (RX1–RX8), split across the two vernier tracks.

Key implication: The IPS2550’s two receiver coils produce one pair of Sin/Cos signals. The MT6901’s two track-specific coil sets produce two independent pairs of Sin/Cos signals, which the internal DSP combines using the vernier algorithm to compute an absolute angle with high resolution.

2. Coil Shape & Signal Characteristics

Aspect IPS2550 MT6901
Coil shape The two receiver coils have a sinusoidal shape and are arranged with a 90° spatial phase shift, producing ratiometric Sine and Cosine outputs after synchronous demodulation. The receiver coils are designed to support the vernier principle—the fine track has a high spatial frequency, while the coarse track has a lower spatial frequency. The exact geometric implementation is defined by the chip’s coil design guidelines.
Output signal type Analog Sine/Cosine voltages (differential or single-ended). External ADC and arctangent computation are required. Digital angle output. The chip internally performs ADC, demodulation, and vernier angle calculation.
Signal processing location External (host MCU). On-chip DSP.

3. PCB Implementation & Stack-Up

Aspect IPS2550 MT6901
Recommended PCB Typically a 4-layer PCB with a copper ground plane under the exposed pad. The coils are printed as copper traces. Three-layer PCB layout enabling dual-sided signal acquisition (“stereo vision”–like sensing). Some sources indicate a practical requirement of 4–6 layers for the coil stack-up.
Coil placement All three coils (1 TX + 2 RX) are on the same sensing side, facing the metal target. The coil system spans multiple layers and can involve both sides of the stator PCB to capture the modulated field from the rotor, supporting the dual-track architecture.
RX coil configuration options Supports interleaved or straight RX pin connections. The interleaved configuration is the default and recommended for ASIL functional safety designs. No equivalent interleaved/straight option is documented; the coil routing is dictated by the dual-track vernier algorithm.

4. Why the Coils Are Not Interchangeable

A coil designed for the IPS2550 cannot be used with the MT6901, and vice versa, for three physical reasons:

  1. Information content mismatch. The IPS2550 coil set encodes one position-dependent Sin/Cos pair. The MT6901 requires two independent Sin/Cos pairs at different spatial frequencies to run the vernier algorithm. A single-track coil simply does not contain the second track’s information.
  2. Pin-count and routing incompatibility. The IPS2550’s 4 RX pins map to two differential receiver coils. The MT6901’s 8 RX pins map to four differential receiver coils (two per track). Re-mapping pins without redesigning the coil geometry will not produce valid signals.
  3. Stack-up and sensing-side differences. The IPS2550 is designed around a planar, single-sided coil arrangement. The MT6901’s dual-track architecture relies on a multi-layer, potentially double-sided coil stack-up to achieve its stated accuracy and environmental robustness.

Summary Statement (for quick reference)

IPS2550: One TX + two 90°-shifted sinusoidal RX coils → analog Sin/Cos → external angle computation. Coil design is planar and single-track.

MT6901: One excitation structure + two independent vernier RX coil sets (8 RX pins) → on-chip digital angle output via vernier algorithm. Coil design is multi-layer and dual-track.

The two coil systems are topologically and functionally incompatible; neither can be substituted for the other by pin remapping alone.

If you need this broken down further—for example, a pin-by-pin RX mapping table or a checklist for a fresh coil design targeting one of these chips—let me know.

This is great. Looks like MT6901 is a chip I may need to buy as well!

I am going to connect this chip to one of the coils and send you the wiki page I make for it for a complete guide in the coming days.

Thank you very much! And how can I activate the Linear mode of your tool?

Will make the linear and Arc mode when i finish testing IPS2550 and MT6901 chips. Since Linear and Arc will take time for me to understand.

Please send me the chinese doc at rolandthsive@yahoo.com
I will study it.

Ok, Please tell me when you finish those feature. I have sent you that document.

Hi Zhang,

Thanks for sending the MT6901 documents. I went through them carefully, and the honest answer is that the MT6901 is not compatible with my generator as it is today.

Why

My generator draws 2-phase receiver coils (SIN and COS, 90° apart), which is what chips like the IPS2550 expect.

Every MT6901 coil in the NOVOSENSE material is 3-phase: three coils 120° apart on each track, star-connected, with the three phase ends and a neutral brought out. That is true for both the fine and the coarse track.

*Nothing in the documents shows this chip working with 2-phase coils. If you connected my SIN/COS coils to it, I could not tell you what angle you would get. It would be very unpredictable.

*Except on Page 10, IDK WHY???

What I will do

3-phase coils are now on the future upgrade path. It is not a small change: six interleaved curves per track instead of four, a neutral connection, and new via placement and clearance checks. I also want to test it on real boards before I release it, so realistically it will take me a few weeks or 2 months, and it comes after the boards I am testing now.

If you want to use the generator right now

You will need a 2-phase (SIN/COS) chip. The IPS2550 is the one the generator is set up for by default.

Two questions for NOVOSENSE, if you can ask them

  1. Can the MT6901 work with 2-phase (SIN/COS) receiver coils at all, or is 3-phase required? The chip has 8 RX pins, 4 per track, so there are enough pins for two differential pairs, but I can’t find this documented anywhere.
  2. What are RX4 and RX8 for? In the application schematic below, RX1 to RX3 and RX5 to RX7 go to the coils, while RX4 and RX8 look unconnected. Should the coil neutral go there, or should they be left open?

If they confirm that 2-phase works, you can try my coils with this chip straight away, and I would be very interested in the result and make you the reference board right away for it. Either way, I will post here when 3-phase support is ready.

Again, The presence of RX4 and RX8 strongly suggests that two phase RX coils could be used. If you would be kind enough to ask novosense the questions above it would be great.

Have a nice day

Roland Thisve