element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • 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
Open Arduino
  • Challenges & Projects
  • Project14
  • Open Arduino
  • More
  • Cancel
Open Arduino
Blog Sensortile - programming with Arduino !
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Open Arduino to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: armour999
  • Date Created: 11 May 2018 8:12 PM Date Created
  • Views 2643 views
  • Likes 7 likes
  • Comments 2 comments
  • ardbeginner
  • openarduinoch
Related
Recommended

Sensortile - programming with Arduino !

armour999
armour999
11 May 2018

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

I am using a STEVAL-STLKT01V1 development kit. The sensor tile is the smallest IOT module I have seen. The sensors I am going to focus on are:

 

1. LSM6DSM - inErtial module, 3D accelerometer and 3D gyroscope

 

2. LSM303AGR - eCompass module with a 3D accelerometer and a 3D magnetometer

 

When Element 14 sent me the Arduino Uno I had no idea that I could program the sensortile using Arduino sketches. That simplifies the programming process and certainly makes it easier. The Arduino Uno has a connector layout and it was just a matter of attaching the sensortile cradle expansion board on top of it and then attaching the sensortile.

 

image

 

image

 

I have a draft sketch prepared and still have some work to finalize and test the sketch.

 

Draft Sketch

The goal is to program the sensortile to use a inertial navigation model in which accelerometers and gyroscopes are used to track the position of a object relative to a known starting point. Below is a draft sketch to be developed to achieve this goal. 

 

//Radius of Earth

R = 6378.1

//Calculation of Bearing

brng = Math.atan(magY/magX)

//Calculating distance

d = Step has been taken * stride
//Starting latitude converted to radians

lat1 = 52.20472 * (math.pi * 180)

//Starting longitude converted to radians

lon1 = 0.14056 * (math.pi * 180)

//Calculate next latitude

lat2 = math.asin( math.sin(lat1)*math.cos(d/R) +

math.cos(lat1)*math.sin(d/R) *math.cos(brng))

//Calculate next longitude

lon2 = lon1 + math.atan2(math.sin(brng)*math.sin(d/R)*math.cos(lat1),
  math.cos(d/R)-math.sin(lat1)*math.sin(lat2))

//Convert latitude to degrees

lat2 = math.degrees(lat2)

//convert longitude to degrees

lon2 = math.degrees(lon2)

//print results

print(lat2)

print(lon2)

 

Distance will be calculated by whether a step has been taken The project is designed for a person or animal. If a step has been taken than the stride will be the distance.

length = sqrt(x * x + y * y + z * z);
if(length>=2){
  stepcount+=1;
}

 

 

 

Once the Sensortile has been programed than I will solder the tile to a smaller cradle. The cradle will be powered by a tiny battery and be placed in a plastic case.

 

 

image

 

 

 

 

 

 


 

  • Sign in to reply
  • balearicdynamics
    balearicdynamics over 7 years ago

    Hi Brenda,

     

    this is a very nice project. Do you consider short or long distances based on your algorithm?

     

    Enrico.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • 14rhb
    14rhb over 7 years ago

    Hi Brenda,

     

    I look forward to reading more about your project and especially the sensor integration. I tried to use the MM7150 sensor unit from Microchip for my Open Arduino Project and had huge issues interfacing to it (it uses the HID protocol across I2C).

     

    Rod

    • 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