GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - monolithicpower/MagAlpha-Arduino-Library: Arduino library for the MPS MagAlpha magnetic angle sensor.

BranchesTags
Open more actions menu

Latest commit

 

History

35 Commits
35 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
examples
examples
 
 
src
src
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
keywords.txt
keywords.txt
 
 
library.properties
library.properties
 
 

Repository files navigation

MagAlpha library

Compile Examples

Arduino library for the MPS MagAlpha magnetic angle sensor.

About

MagAlpha sensor detects the absolute angular position of a permanent magnet, typically a diametrically magnetized cylinder on the rotating shaft.

For more information on the MagAlpha sensor family:

  • MagAlpha Product Overview
  • MagAlpha Support Materials

Supported sensors

Supports all 3rd, 4th, 6th, 7th, 8th generation MagAlpha magnetic angle sensors from Monolithic Power Systems.

Applications Part Numbers
Turning knob applications (potentiometer replacement) MA800, MA820, MA850
Rotary encoders (optical encoder replacement, Servo motors, ...) MA702, MA704, MA710, MA730
Position controlled motor drivers (FOC, ...) MA302, MA310, MA600
Motor commutation (hall switches replacement) MA102

License

Written by Mathieu Kaelin for Monolithic Power Systems. MIT license, all text above must be included in any redistribution.

Connections

Power supply

Arduino MagAlpha
GND GND
+3.3V (Not 5V) VDD
Warning
Unlike most Arduino & Genuino boards, the MagAlpha runs at 3.3V. Even if the I/O can tolerate 5V, check that the voltage applied to VDD is at 3.3V. Applying a voltages higher than 3.3V to the VDD pin could damage the sensor.

Serial communication

All MagAlpha have a SPI communication interface. Some sensors like the MA702 also have an additional SSI (2-wire) interface. MagAlpha gen8 possess an I2C interface.

SPI (4-wire interface)

Arduino MagAlpha
MOSI MOSI
MISO MISO
SCK SCLK
any available digital pin (default: pin 0) CS

SSI (2-wire interface)

Arduino MagAlpha
MISO SSD
SCK SSCK

I2C (2-wire interface)

Arduino MagAlpha
SCL SCL
SDA SDA

Arduino SPI pin mapping

Arduino / Genuino Board MOSI MISO SCK CS Voltage Level
Zero ICSP-4 ICSP-1 ICSP-3 defined by the user, any digital pin (default: pin 0) +3.3V
MKRZero 8 10 9 defined by the user, any digital pin (default: pin 0) +3.3V
MKR1000 8 10 9 defined by the user, any digital pin (default: pin 0) +3.3V
101 11 or ICSP-4 12 or ICSP-1 13 or ICSP-3 defined by the user, any digital pin (default: pin 0) +3.3V
Due ICSP-4 ICSP-1 ICSP-3 defined by the user, any digital pin (default: pin 0) +3.3V
Uno or Duemilanove 11 or ICSP-4 12 or ICSP-1 13 or ICSP-3 defined by the user, any digital pin. Default pin must be changed because pin 0 is also used by the Serial port. (use pin 7 for example) +5V
Mega1280 or Mega2560 51 or ICSP-4 50 or ICSP-1 52 or ICSP-3 defined by the user, any digital pin (default: pin 0) +5V
Leonardo ICSP-4 ICSP-1 ICSP-3 defined by the user, any digital pin (default: pin 0) +5V

Check Arduino SPI library reference page for more information on the SPI signal connections.

Setup

Install the library directly from within the Arduino IDE by using the Library Manager (Sketch => Include Library => Manage Libraries...).

It is also possible to import the library Zip file (check release tab) from the Arduino IDE (Sketch => Include Library => Add .ZIP Library...).

The library can also be manually installed by copying the MagAlpha library folder in your arduinosketchfolder/libraries/ folder. You may need to create the libraries subfolder if its your first library. Restart the IDE to see the library.

Check this tutorial on Arduino library installation for more information:

  • All About Arduino Libraries

About

Arduino library for the MPS MagAlpha magnetic angle sensor.

Topics

angleangle-sensorarduinoarduino-librarymagalphampssensors

Resources

Readme
MIT license
Activity
Custom properties

Stars

24 stars

Watchers

4 watching

Forks

8 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.