element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • More
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • More
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • More
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • More
  • 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
Intel
  • Products
  • Manufacturers
  • Intel
  • More
  • Cancel
Intel
Forum ADC For Compound Eye on Edison
  • Blog
  • Forum
  • Documents
  • Events
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Intel requires membership for participation - click to join
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 13 replies
  • Subscribers 7 subscribers
  • Views 349 views
  • Users 0 members are here
  • python
  • atmega
  • gpio
  • ir sensor
  • arduino
  • intel edison
Related

ADC For Compound Eye on Edison

vandia
vandia over 4 years ago

Hi, this question is possibly specific to a couple of different requirements, partially because *spoiler* I have no clue what I'm doing! XD

Seriously though, I'm going to want to connect my Compound Eye (IR Sensor) at some point to my Edison on an Arduino Breakout Board.

 

I'm programming in Python, and while I'm familiar with how they work/what they do, I don't really know:
-how to communicate with one via GPIO

-how to connect the compound eye: Can 1 ADC read multiple inputs, and relay it digital to a single GPIO?

-If so, what should I look for when comparing? I'm actually going to need at least 5 extra inputs.
-if so, how would I relay that information in Python?
I only recall experience turning GPIO on/off, reading if it's powered, and with writing I2C.

 

I'm already using 1 I2C device (screen), if that's how they communicate, and am considering using a second. As such, I also know you can't always choose the address of the buses, and may get a conflict.

 

I'm limited to using only 4 Analog Inputs on the Edison, with all 4 already used reserved now, without starting with the Compound Eye yet, before someone asks why I need this.
The Atmega chip conflicts A4/5 with SCL/SDA, so using I2C, I have to find another communication.

 

 

I'm sorry, as I know parts of this may belong somewhere, or has been asked somewhere.... but it would also likely be difficult for me to piece that information together. I know things are largely undocumented still with the Edison, and even though it works similar to the RPi, that it's GPIO handler and the Edison's (MRAA) work a bit differently in coding; I did not want to be confused by this either. Again, please forgive me my ignorance on this. If it's included in the microcontrollers class, I plan to take that, but it would still unlikely answer how to program it in python with MRAA.

 

Thanks for your time!

  • Reply
  • Cancel
  • Cancel

Top Replies

  • rachaelp
    rachaelp over 4 years ago in reply to vandia +3

    vandia wrote:

     

    Didn't he reference both, nanoseconds and uS? I thought both were 1/1000th though then? *confused*

    ms = millisecond = 1/1000th of a second

    us = microsecond = 1/1000000th of a second

    ns =…

  • mcb1
    mcb1 over 4 years ago in reply to vandia +2

    Edison and ADC throw some extra issues.

    It is a multiplexed arrangement, where an extra chip is involved, as opposed to many of the other uP's.

     

    This may have the effect of slowing it down.

     

    You may have…

  • mcb1
    mcb1 over 4 years ago in reply to vandia +2

    Do you happen to have an estimate on the actual delays between the onboard, GPIO connected, and I2C ADCs?

    Sorry no I don't.

     

    This one suggests a conversion time of 3.2uS but there are some other figures…

Parents
  • rachaelp
    rachaelp over 4 years ago

    I can't answer your Edison related questions as I haven't used one but for your ADC question about how to read multiple inputs, then the answer is yes you can depending upon a few factors. You need to consider the maximum sample rate of the ADC and think how fast you need to sample each of the inputs. You also need to factor in an time it takes to "switch" different inputs to the one ADC and allow settling time. So when you factor all this in, if you have enough time to sample at the rate you need then you can do it. Is the ADC you are referring to one built into the Edison or is it an external ADC you are planning to use? If it's external then you can get ADC's with a built in multiplexor to take multiple inputs to a single ADC channel. The problem will be controlling it if you are short on GPIO. Maybe if you put up a quick sketch of how you think your system should fit together it might help us give you more ideas on how to proceed.

     

    With regards to the Edison, there are a few on here who have done quite a bit recently, hopefully one of them will see this thread and jump in.

     

    Best Regards,


    Rachael

    • Cancel
    • Up +1 Down
    • Reply
    • Cancel
Reply
  • rachaelp
    rachaelp over 4 years ago

    I can't answer your Edison related questions as I haven't used one but for your ADC question about how to read multiple inputs, then the answer is yes you can depending upon a few factors. You need to consider the maximum sample rate of the ADC and think how fast you need to sample each of the inputs. You also need to factor in an time it takes to "switch" different inputs to the one ADC and allow settling time. So when you factor all this in, if you have enough time to sample at the rate you need then you can do it. Is the ADC you are referring to one built into the Edison or is it an external ADC you are planning to use? If it's external then you can get ADC's with a built in multiplexor to take multiple inputs to a single ADC channel. The problem will be controlling it if you are short on GPIO. Maybe if you put up a quick sketch of how you think your system should fit together it might help us give you more ideas on how to proceed.

     

    With regards to the Edison, there are a few on here who have done quite a bit recently, hopefully one of them will see this thread and jump in.

     

    Best Regards,


    Rachael

    • Cancel
    • Up +1 Down
    • Reply
    • Cancel
Children
  • vandia
    vandia over 4 years ago in reply to rachaelp

    For sampling, in case you don't know, the Compound Eye is used to basically triangulate objects with IR sensors. I pass the sensor value to the processor, and it's usually used to triangulate the closest or furthest object.

     

    So, I'd need to read all at about the same time, if that would be possible?

     

    I'm still free a few GPIOs, with my GPIO listings here, for what I plan to use this on:
    Intel-Powered Mech (DW Juggernaut)

     

    In short, I have a number of GPIOs still free, but for analog, I need:
    -To read 4 analog for the Compound Eye
    -To read a rheostat

    -To possibly switch my Sonic sensors to mid-range SHARPs.

     

    Thanks for the help so far!

    • Cancel
    • Up +1 Down
    • Reply
    • Cancel
  • rachaelp
    rachaelp over 4 years ago in reply to vandia

    vandia wrote:

     

    So, I'd need to read all at about the same time, if that would be possible?

    I don't know what sample rate you need for the Compound Eye but lets for arguments sake say you need to sample it at 1KHz. Lets assume you have an ADC which has multiple inputs and can switch inputs and sample at a rate of 1MHz, that would mean you'd be able to take the four samples for the Compound Eye, each sample being 1us apart in time and then the Compound Eye's overall sample groups would be at an interval of 1ms. So substitute the above for the actual values you need for the system and the ADC you plan to use and if you get values which give you the "about the same time" that you need then you should be ok.

     

    I've got to do some actual work this morning so I will take a look at your blog post in more detail later. I did have a quick look earlier, it looks interesting

     

    Best Regards,

     

    Rachael

    • Cancel
    • Up +1 Down
    • Reply
    • Cancel
  • vandia
    vandia over 4 years ago in reply to rachaelp

    I'm sorry, I'm still catching up on some terminology.
    Either that, or because I wasn't to bed yet (4:30am), I thought by "frequency" you meant how quickly it can check/carry, not like baudrate. XD

     

     

    Maybe.... do ADCs usually read and transfer pretty quickly? If not, for what I plan to use the screen for, I may move my directional sensors to the ADC (only checked once/sec), and plug the eye for it when I'm ready directly into the board (needs to update a little more in realtime, let's say 1/5 a sec. I'd have to change some code, but is the speed to read an ADC much slower externally?

     

    Thanks so much for your input!

    • Cancel
    • Up 0 Down
    • Reply
    • Cancel
  • mcb1
    mcb1 over 4 years ago in reply to vandia

    Edison and ADC throw some extra issues.

    It is a multiplexed arrangement, where an extra chip is involved, as opposed to many of the other uP's.

     

    This may have the effect of slowing it down.

     

    You may have more luck with I2C ADC chips and deal with it that way.

     

    Mark

    • Cancel
    • Up +2 Down
    • Reply
    • Cancel
  • vandia
    vandia over 4 years ago in reply to mcb1

    Thanks! Do you happen to have an estimate on the actual delays between the onboard, GPIO connected, and I2C ADCs?
    Or, at the very least, be able to tell me what "stat" I'm looking for that's important between these (besides price, lol).

    • Cancel
    • Up 0 Down
    • Reply
    • Cancel
  • mcb1
    mcb1 over 4 years ago in reply to vandia

    Do you happen to have an estimate on the actual delays between the onboard, GPIO connected, and I2C ADCs?

    Sorry no I don't.

     

    This one suggests a conversion time of 3.2uS but there are some other figures that may override that,

    http://www.analog.com/media/en/technical-documentation/data-sheets/AD7291.pdf

     

    TI have one that talks about 1uS

    http://www.ti.com/lit/ds/symlink/adc121c021.pdf

     

    The Edison Arduino board uses the ADS7951 converter.

    http://www.ti.com/lit/ds/symlink/ads7951-q1.pdf

    The sheet suggest 800nS.

     

    Since it is multiplexed, you could assume the data is there, but the Edison then polls for it, so in reality 'live' updating is going to be slower.

     

     

     

    balearicdynamics is embarking on an I2C series, and this might be a great topic.

     

     

    Mark

    • Cancel
    • Up +2 Down
    • Reply
    • Cancel
  • vandia
    vandia over 4 years ago in reply to mcb1

    And.... I probably should know.... but uS means....?

    • Cancel
    • Up +1 Down
    • Reply
    • Cancel
  • balearicdynamics
    balearicdynamics over 4 years ago in reply to vandia

    Usally it stay for micro seconds as the micro character from Greek character is not available while writing on the US keyboards.

     

    Enrico

    • Cancel
    • Up +1 Down
    • Reply
    • Cancel
  • vandia
    vandia over 4 years ago in reply to balearicdynamics

    Didn't he reference both, nanoseconds and uS? I thought both were 1/1000th though then? *confused*

    • Cancel
    • Up 0 Down
    • Reply
    • Cancel
  • rachaelp
    rachaelp over 4 years ago in reply to vandia

    vandia wrote:

     

    Didn't he reference both, nanoseconds and uS? I thought both were 1/1000th though then? *confused*

    ms = millisecond = 1/1000th of a second

    us = microsecond = 1/1000000th of a second

    ns = nanosecond = 1/1000000000th of a second

    ps = picosecond = 1/1000000000000th of a second

     

    The list goes further but its unlikely you'll need to worry about ps (and not even ns or us for this) let alone those beyond....

     

    Best Regards,

     

    Rachael

    • Cancel
    • Up +3 Down
    • Reply
    • Cancel
Element14

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 © 2022 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

  • Facebook
  • Twitter
  • linkedin
  • YouTube