element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
MEMS Sensors Evaluation Board
  • Products
  • Dev Tools
  • MEMS Sensors Evaluation Board
  • More
  • Cancel
MEMS Sensors Evaluation Board
Blog Using the Xtrinsic Sensor Board with Raspberry Pi
  • Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
MEMS Sensors Evaluation Board requires membership for participation - click to join
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Former Member
  • Date Created: 30 Jan 2014 12:54 PM Date Created
  • Views 2799 views
  • Likes 0 likes
  • Comments 12 comments
  • raspberry
  • pi
  • sensors
  • mems
  • xtrinsic
  • kl25z
  • freedom
Related
Recommended

Using the Xtrinsic Sensor Board with Raspberry Pi

Former Member
Former Member
30 Jan 2014

I was able to get a hold of a sample of the new sensor board for the Raspberry Pi and play around with it a bit. It’s a small board that plugs into the IO expansion header on the Raspberry Pi. It has three different sensor chips on it which are connected to the Pi via I2C:

  • Accelerometer (MMA8491)
  • Magnetometer (MAG3110)
  • Altimeter/Temperature (MPL3115)

 

It’s essentially the same board that can be found on the MEMS Sensors Board Evaluation Kit that came paired with a FRDM-KL25Z (a Cortex M0+ device). The difference is that now the board is now being sold stand-alone and has a new connector for the Raspberry Pi.

 

This means that the board can not only be used by the Raspberry Pi and FRDM-KL25Z, but also the Arduino Due. And because all the Freedom boards have an Arduino compatible footprint, it will also work with any of the Freedom boards with just a few software tweaks which I’ll attempt later.

 

Setup:

I have a slightly embarrassing confession to make: Even though I consider myself a huge nerd (I’d been running Linux on my home computer since high school in the late 90’s), I hadn’t actually played with a Raspberry Pi yet. Sure I’d read all about the board on Slashdot and the like, but it was just one of those things I never quite got around to using. So I was starting out as a newbie with a new Raspberry Pi 2.0 board and this sensors board, but it was actually really straight forward to use.

 

Following the user guide, I popped in a 4GB SD card into my laptop, and used ‘dd’ in Linux to copy the out-of-the-box image file (.img) to it.

sudo dd bs=4M if=sensor_board_1128.img of=/dev/sdd

Make sure the device (/dev/sdd) is correct for your SD card, and you run this command in the same directory as the .img file is located. It takes a while to do the copy, just be patient. Once it's done, plug the SD card into the Raspberry Pi.


You could also use Windows to do the copy if you don't have access to a Linux computer.

 

It’s at this point I realized my monitor doesn’t have an HDMI input, so I needed to find a DVI->HDMI cable. Luckily I already had one laying around, but just keep that requirement in mind. Otherwise I could have used my TV which uses HDMI. Then I plugged in a keyboard into the USB port, and connected the RPi to power via dual-headed USB, and suddenly there were colors and Linux bootup text scrolling by on the monitor. Success! At the prompt the username is “pi” and the password is “raspberry”

 

Trying it out:

Then came trying out the demo programs. There are three available to test out each of the three sensors. After changing to the sensor demo directory ("cd ~/rpi_sensor_board”), there's several Python scripts to run.

(Tip: you can hit the Tab key to complete a file name, so for instance you just have to type “sudo python mag” and then hit Tab, and Linux will fill in the rest for mag3110.py)

 

First up, the magnetometer:

“sudo python mag3110.py”

You can see the magnetic values change as you rotate the board. I will say it’s a bit difficult to spin it around the whole 360 degrees due to all the cables attached, but it conveys the idea even if only twisting it slightly.

Ctrl+C gets you back to the prompt

 

Then the altimeter and temperature sensor:

“sudo python mpl3115a2.py”

Try touching the sensor to see the temperature rise

 

And finally the accelerometer:

"sudo python mma8491q.py"

Tilt and shake the board around

 

All straight forward. In the much longer and more detailed user manual there’s some steps to run a web server and instructions on how to add support for the board in the default Raspbian OS, so I’ll explore those later. I also want to try getting it to work with my FRDM-KL26Z board. 

 

All in all it’s a fun little board with a lot of possibilities, particularly since it's hardware compatible with a lot of different boards, and opens up a lot of possibilities for the Pi.

  • Sign in to reply

Top Comments

  • tony1tf
    tony1tf over 11 years ago in reply to Former Member +1
    Hi Guys I can confirm the same problems with the Raspberry Pi version 1. On version 2, the software works fine, and the instructions to get the libraries, the webserver etc all work brilliantly. Unfortunately…
  • Former Member
    Former Member over 10 years ago +1
    This board works perfectly with Raspberry V1.0, but the binary-only driver does not. I've reverse engineered it so it can be compiled for V1.0 (depends on the bcm2835 library). Get the source here: https…
  • Former Member
    Former Member over 10 years ago

    Hi all

    I've got the same problem here

    Unable to boot with the furnsihed .img file and a raspberry b+!

    Any ideas

    thx in advance

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Former Member
    Former Member over 10 years ago

    Hi,

     

    does the Xtrinsic-Board work with the Raspberry B+? the first 26 GPIO's are the same as the Raspberry B.From my Universitiy, i've got a Raspberry B+ and the sensor board, but with the provided OS from www.element14.com/rpimems_sense, the RaspberryPi B+ does not boot, and with a manual installation of the sensorboard with raspbian wheezy, i can't get a connection to the sensors.

    Any ideas?

     

    Thanks for help..

     

    Max

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • tony1tf
    tony1tf over 10 years ago in reply to Former Member

    Hi Lars

     

    Congratulations on doing this. I'll try the code on my version 1 Pi as well as my version 2, and make sure it works for me.

    This is a bit of a poke in the eye for Element14 who have not replied in over 6 months to the original comments on this thread about their Xtrinsic sensor board not working with the version 1 Pi.

    Does anyone from Element14 monitor these posts? If they dont, is there a better way to get in touch with them, apart from waiting for the community to do the work?

    I even raised it in a phone call to them some months ago, but nothing happened.

    Anyway, rant over, thank you again Lars.

     

    Tony

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Former Member
    Former Member over 10 years ago

    This board works perfectly with Raspberry V1.0, but the binary-only driver does not. I've reverse engineered it so it can be compiled for V1.0 (depends on the bcm2835 library).

     

    Get the source here: https://github.com/larsch/rpi-mems-sensor

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • tony1tf
    tony1tf over 10 years ago in reply to tony1tf

    I was just reminded of this post because Harry Smit posted below. Can anyone confirm whether Element14 or their suppliers has created a new sensor.so file for the version 1 Raspberry Pi? As I said in my post above, it needs the I2C interface changing.

     

    Tony

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube