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
Sensors
  • Technologies
  • More
Sensors
Sensor Forum Digitally Addressable Sensors?
  • Blog
  • Sensor Forum
  • Documents
  • Events
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Sensors requires membership for participation - click to join
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 9 replies
  • Answers 2 answers
  • Subscribers 193 subscribers
  • Views 368 views
  • Users 0 members are here
  • sensors
  • sensor
Related

Digitally Addressable Sensors?

amillen
amillen over 9 years ago

I need to come up with a way to daisy chain a number of sensors together and uniquely read the high/low pin from them individually. Think Digital RGB LED http://www.adafruit.com/products/306 or I2C. I like how when you power the LED strip up, it assigns a unique id. Is there already a module that will do this?

  • Reply
  • Cancel
  • Cancel

Top Replies

  • Former Member
    Former Member over 9 years ago +1

    Hi Alex,

     

    With I2C you can chain only upto 128 devices/sensors. This is the caveat. If you have more than 128 devices/sensor you need to use I2C chips like wherein you can theorotically connect

    NXP/Phillips…

  • amillen
    amillen over 8 years ago +1 verified

    Thanks to all that replied, many of you came up with different solutions, but I was looking for something a little more off the shelf.

     

    Looks like someone finally packaged up exactly what I was looking for…

  • Former Member
    0 Former Member over 9 years ago

    Hi Alex,

     

    With I2C you can chain only upto 128 devices/sensors. This is the caveat. If you have more than 128 devices/sensor you need to use I2C chips like wherein you can theorotically connect

    NXP/Phillips PCF8574 (8 bit i/o) = 128 x 8 sensors

    Microchip MCP23016 (16 bit i/o lines) = 128 x 16 sensors

    TI TCA9535 (16 bit i/o lines) = 128 x 16 sensors

     

    Using I2C you can set individual address locations for various sensors..

     

    If you are looking for not more than 100 devices/sensors you can opt for 8:1 demux on 8 lines, but this can consume lot of unnecessary io.

     

    Doubt if there is any off the shelf module fitting your requirement.

     

    Cheers

    sid

    • Cancel
    • Up +1 Down
    • Reply
    • Verify Answer
    • Cancel
  • vsluiter
    0 vsluiter over 9 years ago

    Hello Alex,

    To accomplish what you want, you'd need something that is daisychained, or at least have a chain of devices where the first in the chain can 'disable' all others. I2C , without modifications or other circuitry, won't be able to do what you want. As it is a bus-topology, all devices are being 'talked to' at the same time, and all devices with the same address will respond simultaneously, thus causing bus collisions.

    You'd either need a device with an 'ingoing' and 'outgoing' bus, or something that disables all other devices until it is being addressed. In both cases you could do this with a simple microcontroller. Which is of course the kind of work you're not waiting for

    • Cancel
    • Up 0 Down
    • Reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 9 years ago

    Alex,

     

    SPI can be daisy chained, although the specific slave device has to support it, and its not always immediately obvious if it does or not.

     

    What sort of sensor are you considering?  you mention a high/low pin, so that's digital inputs then?  something like the MCP23S17 possibly?

     

    You should give this a read : http://www.maximintegrated.com/app-notes/index.mvp/id/3947

     

    Best regards,

    Charlie.

    • Cancel
    • Up 0 Down
    • Reply
    • Verify Answer
    • Cancel
  • vsluiter
    0 vsluiter over 9 years ago in reply to Former Member

    Charlie,

    The example you gave is interesting, but (at least the examples) only apply to output devices, not inputs. The MCP23S17 does not mention daisy chaining in its datasheet.

    If Alex is still alive (haven't seen any reaction since the original post), he might do this: read through the datasheet of the WS2811 to understand how to do daisy chain addressing[pdf], and get a free LPC800 board to implement the same protocol

    • Cancel
    • Up 0 Down
    • Reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 9 years ago in reply to vsluiter

    Victor,

     

    The OP mentioned "uniquely read the high/low pin from them individually" which I interpret as an input. I agree that the MCP23S17 datasheet doesn't specifically mention daisychaining, and quite possibly its not possible with that particular chip, but I was attempting to discover what sort of sensors he means, whether digital input, analogue (ADC/temperature/pressure etc) or whatever.

    I've personally used 40 MCP23S17 chips in a single solution, although there I used 5 CS signals for each group of 8 addressed chips, with a common CLK/SI/SO across all 40, for a total of 8 lines. 40 chips at 16 I/O per chip=640 I/O channels

     

    It occurs to me that maybe a topology like that would be sufficient for Alex?  I know that doesn't specifically answer his daisychaining question, but sometimes its easy to accidentally make assumptions in an original question.

     

    I hope Alex IS still alive....

     

    Best regards,

    Charlie.

     

    p.s. I just looked again at the MCP23S17 datasheet. I think that the SPI input timing diagram (Figure 2-5 on page 32) shows that this particular device is not suitable for daisychaining, because the data coming into SI is not copied to SO. I've used other SPI devices which do exhibit that behaviour though.

     

    p.p.s. I may look into the free LPC800 board you mentioned. As ever its finding the time...

     

     

    p.p.p.s Here's an example of an IO expander using SPI which can be daisychained : http://datasheets.maximintegrated.com/en/ds/MAX7317.pdf   Mind you, the datasheet gives a limit of 10 on a single chain because of propagation delays of SI/SO versus CLK. Hmmm... Maybe SPI daisychaining isn't the way to go....

    • Cancel
    • Up 0 Down
    • Reply
    • Verify Answer
    • Cancel
  • amillen
    0 amillen over 9 years ago

    Yes, Alex is still alive, sorry for the delay in my response. I'm still digesting all of the information I have received and would like to respond to some of your questions.

     

    I'm reading (input), anywhere from 1 to 20 snap or magnetic switches.

     

    The same project but different application, I have 1 to 20 analog sensors http://www.parallax.com/tabid/768/ProductID/100/Default.aspx

     

    I will never be daisychaining both sensors on the same chain, either one or the other, and am willing to have two different solutions.

     

    The desire to daisychain instead of running separate lines, is that the user will be adding and subtracting sensors often.

     

    I hope that answers some questions, let me know if you have anymore and I will answer them while I read over all this info

     

    Alex

    • Cancel
    • Up 0 Down
    • Reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 9 years ago in reply to amillen

    Alex,

     

    I think I'm starting to see what you're getting at. with the discrete inputs (the switches), will there be (say) 20 sockets into which a switch may or may not be connected or should I think more like an ethernet arrangement where each switch is completely self-contained, and if there's no switch then there's not even a socket for the switch?

     

    For the QTI sensor (looks interesting BTW), same question I suppose. Also, what sort of analogue resolution would you need? (just thinking about ADC method)

     

    You may consider one or more PIC devices, some of which have multiple analogue inputs. If the sensor nodes are to be self-contained, then each node could contain a PIC (they're relatively cheap) which themselves provide/support SPI/I2C (or maybe a UART chain?) to connect the chain. There'd be a little programming needed for the PICs, but each node would only require fairly simple logic. If you're not familiar with PICs, start by looking at the PIC16F886. I'm not saying that's the one to use, just a stating point. In reality you'd probably want a smaller (less pins) PIC. THere are plenty of examples of programming PICs available.

     

    Best regards,

    Charlie.

    • Cancel
    • Up 0 Down
    • Reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • danteo
    0 danteo over 9 years ago in reply to amillen

    Hi Alex,

     

    Take a look at this 1-wire network guidelines too:

    http://www.maximintegrated.com/app-notes/index.mvp/id/148

     

    Here is a reference schematic:

    http://www.maximintegrated.com/app-notes/index.mvp/id/244

     

    Hope it helps,

    Dan

    • Cancel
    • Up 0 Down
    • Reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • amillen
    0 amillen over 8 years ago

    Thanks to all that replied, many of you came up with different solutions, but I was looking for something a little more off the shelf.

     

    Looks like someone finally packaged up exactly what I was looking for!

     

    1-Wire Two GPIO Controller Breakout

    http://www.adafruit.com/products/1551

    • Cancel
    • Up +1 Down
    • Reply
    • Reject Answer
    • 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