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 & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • 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
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • 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
Sci Fi Your Pi
  • Challenges & Projects
  • Design Challenges
  • Sci Fi Your Pi
  • More
  • Cancel
Sci Fi Your Pi
Blog QuadCOP: The Sensor Array
  • Blog
  • Forum
  • Documents
  • Files
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: screamingtiger
  • Date Created: 27 Aug 2015 5:23 AM Date Created
  • Views 757 views
  • Likes 3 likes
  • Comments 0 comments
  • quadcop_project
  • design_challenge
  • sensors
  • ping
  • sci_fi_your_pi
Related
Recommended

QuadCOP: The Sensor Array

screamingtiger
screamingtiger
27 Aug 2015

Previous Posts Here:

http://www.element14.com/community/community/design-challenges/sci-fi-your-pi/blog/authors/screamingtiger?ICID=DCH-SciFiPi-challengers

 

I am going to catch up a few blog posts and post my code in the AM.

 

The QuadCOP has a variety of sensors onboard to help it avoid collisions and detect events.

 

From left to right, top to bottom:

4X Sonic sensors, 4 pin version.

1X PIR motion detector

1X IR flame detector (http://www.amazon.com/gp/product/B00AFSEC2Y?psc=1&redirect=true&ref_=oh_aui_detailpage_o06_s00)

1X mechanical relay

1X Luxeon LED

1X Arduino Nano with header pins.

 

image

 

 

All of these sensors are digital in that they have a trigger, and then a "Delay".  If the delay it too long, it is assumed the sensor did not detect anything.  If it does pull the "Echo" pin high, then you time from the point you pulled the trigger pin high to the time the echo pin went high.  Then there is a conversion factor of some sort for each sensor to tell you what you need to know.

 

There are two ping sensors on the bottom for ground detection, and two on the forward nose to detect obstacles.

The IR flame sensor is inside rotating head.  This allows flame to be"Scanned" for.

The PIR sensor is for when the QadCOP is docked at its base station, if it detects motion it will fly into action!

The Luxoen LED is for night flying, and is triggered by the mechanical relay.

The Nano is connected to the I2C bus as a slave.

 

The Nano runs a loop and triggers all sensors in a certain order.  If anything is detected, it stores the event in a small queue of 100 items for each Queue.  It is a FIFO (First In First Out) Que and will stop recording at 100 items.  The RPFS will send a register read to the SensorArray, each register will represent a sensor.  When an event is read, a read pointer (stack pointer) is incremented.  So each queue has two pointers, a write and read pointer.  The data is returned for processing to the RPFS.  The data returned is always 2 bytes of data using the I2C block algorithm I created, which will be explained in a later post.

 

The SensorArray also accepts commands, via another register.  The only two commands at this time are "clear all queues" and "Turn on/Off the LED".  Each command consist of a register byte, a command code, and the parameter code ( 0 or 1 for on/off).  The parameter code only applies to the LED but is still sent for the clear queues command to be consistent.

 

This is a picture of the I2C bus "splitter" or multiplexer.  In the upper middle of the pic is how I am connecting the various I2C items together with the RPFS always the master.

 

image

 

I will post a picture soon of the sensors installed.

 

Here is the software flow for the code that runs in the Arduino Nano.

 

image

  • Sign in to reply
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