Skip to content

Latest commit

 

History

History

Encoder_SPI_SC60228

SC60228 magnetic angle sensor

Small (21x17mm) board for the SC60228 magnetic absolute angle sensor.

For use in motor control or robotics applications, the sensor measures the orientation (angle in the plane) of a nearby diametrically magnetized magnet.

That sounds more complicated than using it really is, so lets describe it another way:

  • attach the magnet to the axis of something that rotates
  • put the sensor near it
  • read angles with your Arduino
Back of board Front of board
with SH 1.0 connector with sensor

Features

  • 3V to 5V operation
  • 12 bit accuracy, 4096 positions per revolution
  • SPI interface up to 10MHz
  • power indication LED (green, dim)

Datasheet of the sensor: http://www.semiment.com/download?filePath=product/fuCDPH4YG3usSN69gqmqQ3rSuHEqBBjj6cn1mMuu.pdf&fileName=SC60228_EN-VA1.0.pdf

Getting one

You may be able to buy some here:

I sell on Tindie

Or you could make one - it is open source, you will find gerber files and BOM in the repo, and design files for KiCad 6.

Usage

The sensor has to be precisely positioned near the magnet. The magnet should be precisely on-axis and in-plane (no wobble!). The sensor should be mounted with an air-gap of about 0.5mm to the magnet.

Taking the time to mount the magnet and sensor board carefully will improve the accuracy and smoothness of your readings.

The sensor has an SPI interface:

The SPI interface is available on a JST-SH 6-pin socket. Pre-made cables are available cheaply on AliExpress and other sources.

You may connect VCC to either 3.3V or 5V.

Connect the other lines (MOSI, MISO, CLK and CS) to the respective counterparts on your MCU board.

Note: The sensor board does not pull the CS line up.

Communications

SPI interface:

  • SPI Mode 1
  • MSB first
  • max 10MHz SPI clock

See datasheet for details, or use an existing software driver.

⚠️ Note: cable length, shielding (or lack thereof) and environmental noise may limit performance to significantly less than the 10MHz maximum.

Software

The sensor can be used with any appropriate SPI driver.

The author uses it with Arduino-compatible MCU boards and the SimpleFOC library.

A driver for the sensor for Arduino and SimpleFOC can be found here: SimpleFOC drivers library

Physical dimensions

v1.0: 21 x 17 x 4mm (1.6mm PCB)

Cables

Pre-made JST SH 1.0 cables are available. When buying cables with two plugs, choose the type that is called "reverse connection" - where the pins on both ends of the cable have the same order.

Some links to compatible cables / breakout boards: