Blueprint

Magnetic Encoder

Magnetic Encoder made for FRC, using a buckled PWM cable to make it strong.

Created by Lingfeng Wang Lingfeng Wang

Tier 4

3 views

0 followers

Iamalive Iamalive 🚀 approved Magnetic Encoder ago

Tier approved: 4

Grant approved: $43.00

Nice project! Thanks for explaining :)

Lingfeng Wang Lingfeng Wang submitted Magnetic Encoder for review ago

Iamalive Iamalive 🚀 requested changes for Magnetic Encoder ago

Nice project! Just one thing - is there a particular reason why you need enough parts to make 5 of these?

Lingfeng Wang Lingfeng Wang submitted Magnetic Encoder for review ago

Lingfeng Wang Lingfeng Wang added to the journal ago

Bottom Case CAD

image

I wanted the case to have the two mounting holes same as the cancoder, the pcb will be latched in with clips, and the distance from the magnet should be accurate.

Looking at the cancoder, it seems that the sensor is pressed into the bottom of the case, with a cutout. I will also use these dimensions.
image

The reason why I copied so many dimensions is not because I'm lazy, but so we can use this as a drop in replacement without thinking about changing around the design when switching encoders.

image
image
image
This way, it should be fairly easy to assemble the pcb into the case.

Originally, I wanted to make a top for this case too. However, after looking around I could not figure a good way to make one fit, and I decided that this would be good enough.

Lingfeng Wang Lingfeng Wang added to the journal ago

PCB Routing and Design

First, I wanted to use these dupont connectors with a buckle, because we found them very useful for dupont connectors last year.

image

For the pcb shape, I used the same mounting holes as the cancoder case, but the actual shape will be different from theirs.
image
As long as the pcb fits in between these holes, it will be fine.

Once I found the files for the molex-sl, I imported it and figured out how it looked in the 3d viewer.
image
image
image

While this does look a bit weird, I think I will stick with the second version for the final product.

I also wanted mounting holes on the pcb itself, but after looking at the size of the molex-SL, I think i will just make the case hold it in, because the pcb would be much larger with the mounting holes, since they need to stick out.
image
Hopefully, there is enough on the sides to clip the pcb in with the case.

The pcb also was routed, pretty simple. The top layer was a ground plane, with all the components on the bottom layer.

image

Lingfeng Wang Lingfeng Wang added to the journal ago

PCB Routing and Design

First, I wanted to use these dupont connectors with a buckle, because we found them very useful for dupont connectors last year.

image

For the pcb shape, I used the same mounting holes as the cancoder case, but the actual shape will be different from theirs.
image
As long as the pcb fits in between these holes, it will be fine.

Once I found the files for the molex-sl, I imported it and figured out how it looked in the 3d viewer.
image
image
image

While this does look a bit weird, I think I will stick with the second version for the final product.

I also wanted mounting holes on the pcb itself, but after looking at the size of the molex-SL, I think i will just make the case hold it in, because the pcb would be much larger with the mounting holes, since they need to stick out.
image
Hopefully, there is enough on the sides to clip the pcb in with the case.

The pcb also was routed, pretty simple. The top layer was a ground plane, with all the components on the bottom layer.

image

Lingfeng Wang Lingfeng Wang added to the journal ago

Finished Schematic

Using the datasheet, I was able to pretty quickly finish the schematic.
image
image
Honestly this was a lot easier than I thought.

I also added a connector in the schematic too.
image

Lingfeng Wang Lingfeng Wang added to the journal ago

Chose Components

This encoder will be pretty simple, being comprised of mainly a magnetic encoder IC and case.

image
This is my inspiration (Made by CTRE), and my encoder will be used as a drop in replacement.

AS5048A will be used for rotation.
I initially wanted it to have CAN capabilities, but that means I must also write the code to control the sensor for the robot, so PWM will be much easier to deal with.
The AS5048A also has built in PWM, so that means I will not need to do that that much. I wanted to use SPI, but the roboRIO only has one SPI port, and long SPI wires are not as great, so PWM will suffice.
image

Lingfeng Wang Lingfeng Wang started Magnetic Encoder ago

1/3/2026 11:18 PM - Chose Components

This encoder will be pretty simple, being comprised of mainly a magnetic encoder IC and case.

image
This is my inspiration (Made by CTRE), and my encoder will be used as a drop in replacement.

AS5048A will be used for rotation.
I initially wanted it to have CAN capabilities, but that means I must also write the code to control the sensor for the robot, so PWM will be much easier to deal with.
The AS5048A also has built in PWM, so that means I will not need to do that that much. I wanted to use SPI, but the roboRIO only has one SPI port, and long SPI wires are not as great, so PWM will suffice.
image

1/3/2026 11:26 PM - Finished Schematic

Using the datasheet, I was able to pretty quickly finish the schematic.
image
image
Honestly this was a lot easier than I thought.

I also added a connector in the schematic too.
image

1/4/2026 11 AM - PCB Routing and Design

First, I wanted to use these dupont connectors with a buckle, because we found them very useful for dupont connectors last year.

image

For the pcb shape, I used the same mounting holes as the cancoder case, but the actual shape will be different from theirs.
image
As long as the pcb fits in between these holes, it will be fine.

Once I found the files for the molex-sl, I imported it and figured out how it looked in the 3d viewer.
image
image
image

While this does look a bit weird, I think I will stick with the second version for the final product.

I also wanted mounting holes on the pcb itself, but after looking at the size of the molex-SL, I think i will just make the case hold it in, because the pcb would be much larger with the mounting holes, since they need to stick out.
image
Hopefully, there is enough on the sides to clip the pcb in with the case.

The pcb also was routed, pretty simple. The top layer was a ground plane, with all the components on the bottom layer.

image

1/4/2026 12:00 PM - PCB Routing and Design

First, I wanted to use these dupont connectors with a buckle, because we found them very useful for dupont connectors last year.

image

For the pcb shape, I used the same mounting holes as the cancoder case, but the actual shape will be different from theirs.
image
As long as the pcb fits in between these holes, it will be fine.

Once I found the files for the molex-sl, I imported it and figured out how it looked in the 3d viewer.
image
image
image

While this does look a bit weird, I think I will stick with the second version for the final product.

I also wanted mounting holes on the pcb itself, but after looking at the size of the molex-SL, I think i will just make the case hold it in, because the pcb would be much larger with the mounting holes, since they need to stick out.
image
Hopefully, there is enough on the sides to clip the pcb in with the case.

The pcb also was routed, pretty simple. The top layer was a ground plane, with all the components on the bottom layer.

image

1/4/2026 12:54 PM - Bottom Case CAD

image

I wanted the case to have the two mounting holes same as the cancoder, the pcb will be latched in with clips, and the distance from the magnet should be accurate.

Looking at the cancoder, it seems that the sensor is pressed into the bottom of the case, with a cutout. I will also use these dimensions.
image

The reason why I copied so many dimensions is not because I'm lazy, but so we can use this as a drop in replacement without thinking about changing around the design when switching encoders.

image
image
image
This way, it should be fairly easy to assemble the pcb into the case.

Originally, I wanted to make a top for this case too. However, after looking around I could not figure a good way to make one fit, and I decided that this would be good enough.