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
Personal Blogs
  • Community Hub
  • More
Personal Blogs
Andy Clark's Blog Azure Sphere Secure IOT - Project Overview
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Workshopshed
  • Date Created: 12 Nov 2018 11:34 AM Date Created
  • Views 1635 views
  • Likes 4 likes
  • Comments 7 comments
  • azure sphere
  • iot
Related
Recommended

Azure Sphere Secure IOT - Project Overview

Workshopshed
Workshopshed
12 Nov 2018

As hinted at in some of the previous posts I'm going to be using the board to complete a small project. Because the SDK only supported UART and GPIO at the time I started the project I was looking for something that could be run with that. My first thought was some sort of guage using a stepper motor. Then a chance discussion with my boss about the flakey GPS collar he has on his dog got me thinking if there were GPS modules that use serial comms. I found a suitable module whcih was designed for drones. I was thinking about something a bit like the South Facing Chariot. However given that I was also thinking you could program where you wanted to go, perhaps this is a bit more like Jack Sparrow's compass, so I suspect my results will end up more like that.

imageimage

So the key coding challenges will be:

 

  • Decoding the serial comms from the u-blox reciever
  • Driving the stepper motor
  • Getting the destination
  • Calculating the direction

 

Decoding the comms

There's a 400 page data sheet to read on the GPS reciever. I've soldered some headers onto the device and hopefully will be able to do some experiments using the Azure Sphere as a terminal. I also found a couple of examples of Arduino libraries for these devices although I'll need to port any C++ constructs back to C as the Azure Sphere does not support C++ at this time.

 

Driving the steper motor

I did some work on stepper motors for the Topsy Turvy Clock so I'm pretty happy with how I'm going to attack this. For homing the motors I think I'll just get the user to do this manually using the buttons (or some external buttons) on the board. Although it may end up being easier to go for the slotted disk approach again.

 

Getting the destination

Although the Azure Sphere does not need to use the Azure IOT hub to work, I'll like take advantage of the "Device Twin" functionality to pass the co-ordinates from a web UI back to the device.

 

Calculating the direction

I did some searching and found a suitable algorithm for this, I've ported that the C# and will be using an Azure function to get the data. There should be a post on that later in the week.

 

References

https://github.com/1oginov/UbxGps

https://github.com/bolderflight/UBLOX

https://github.com/cristiansteib/GPS-neo-6m

 

https://www.u-blox.com/sites/default/files/products/documents/u-blox8-M8_ReceiverDescrProtSpec_%28UBX-13003221%29_Public…
https://www.movable-type.co.uk/scripts/latlong.html
https://docs.microsoft.com/en-us/azure/iot-hub/tutorial-device-twins

 

Code

As always I'll be putting the code onto GitHub.

 

https://github.com/Workshopshed/IOTCompass

  • Sign in to reply

Top Comments

  • Jan Cumps
    Jan Cumps over 6 years ago +2
    Ah, porting C++ to C, it always breaks my object oriented heart. It's more exciting to turn a procedural API into good objects. Good luck.
  • Jan Cumps
    Jan Cumps over 6 years ago in reply to Workshopshed +2
    Workshopshed wrote: It will likely be reverse engineer and then reproduce the minimum functionality. Yes. I usually just flatten everything out - losing the context. if context is important, I create a…
  • Workshopshed
    Workshopshed over 6 years ago in reply to Jan Cumps +1
    It will likely be reverse engineer and then reproduce the minimum functionality.
  • bwilless
    bwilless over 6 years ago

    Hi Andy,

     

    I think that the Smart Fan is just a demo application from Seeed showcasing using the Sphere devices with their Grove connected devices.

     

    I also reference Kevin Saye's blog posts.  I've attended Azure Sphere a training where he was the instructor, he's knows a lot about the Sphere device.

     

    Brian

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Workshopshed
    Workshopshed over 6 years ago

    Azure Sphere to RS485 and storing the data to the cloud

     

    https://kevinsaye.wordpress.com/2018/08/17/using-azure-sphere-to-talk-to-rs485/

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Workshopshed
    Workshopshed over 6 years ago

    Found another Sphere Project that should make my life quite easier. Standing on the shoulders of giants as they say.

     

    https://kevinsaye.wordpress.com/?s=Sphere

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 6 years ago in reply to Workshopshed

    Workshopshed  wrote:

     

    It will likely be reverse engineer and then reproduce the minimum functionality.

    Yes. I usually just flatten everything out - losing the context.

    if context is important, I create a structure with the fields that need to keep the state, and pass that as an updatable reference parameter to all functions that need it. (Like fake OO without polimorphy image ).

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Workshopshed
    Workshopshed over 6 years ago

    Spotted someone else using this board, although it's not quite clear what they are doing.

     

    https://github.com/Seeed-Studio/Azure_Sphere_Sample_Smart_Fan

    • Cancel
    • Vote Up +1 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