multi-sensor network

Discussion in 'Digital Circuit Design' started by Man Noula, Mar 1, 2017.

  1. Man Noula

    Thread Starter New Member

    Jan 31, 2017
    25
    0
    hii

    i have a project that consists on connecting 20 same type sensors with arduino mega but i'm confused and i don't know which sensor to use

    the criteria are: rgb + light intensity sensig ,that i can use in multi-sensor network (i2c,uart,spi...) with a different independent adress for each sensor

    thank you
     
  2. MrChips

    Moderator

    Oct 2, 2009
    16,735
    5,132
    The problem is not in choosing the sensor. Practically any sensor will work.
    Your challenge is to design the multi-node addressable network.

    What is the maximum distance between sensors and master controller?

    For industrial applications over distances of many metres, you need to look at RS-485 networks.
    Hence you will need a microcontroller and an RS-485 transceiver at each node (sensor).

    For short distances you can look at 1-Wire, SPI and I2C networks.
     
  3. Man Noula

    Thread Starter New Member

    Jan 31, 2017
    25
    0

    actually i didn't find a suitable sensor for this project , if you have any suggestions please tell me
    then i will think about how to wire them
     
  4. MrChips

    Moderator

    Oct 2, 2009
    16,735
    5,132
    You will have to tell us more about what you are trying to measure.
    For a single RGB reflection measurement it is easier to use a single broad-band photo detector and illuminate the object with red, green and blue LEDs, one at a time.
     
  5. Man Noula

    Thread Starter New Member

    Jan 31, 2017
    25
    0
    no,no i'm trying to meassure the rgb and intensity of existing LEDS
     
  6. bertus

    Administrator

    Apr 5, 2008
    18,351
    3,516
    Hello,

    The attached PDF's contain information on RGB sensors.
    These sensors convert the inensity to frequency.
    Perhaps you can use a MCU at the sensor to measure the frequency(intensity) and send it to the master using a to be choosen protocol.

    Bertus
     
  7. Man Noula

    Thread Starter New Member

    Jan 31, 2017
    25
    0
    The device address on this chip is fixed. There are no address pins or commands to change the device address
     
  8. bertus

    Administrator

    Apr 5, 2008
    18,351
    3,516
    Hello,

    The chip has no address, that is why I said to use a MCU to read the chip and send the information to the master.

    Bertus
     
  9. Man Noula

    Thread Starter New Member

    Jan 31, 2017
    25
    0
    I thinked about that but the problem here is that i need to know which responce is from which sensor thats why i need sensors with different adresses
     
  10. JWHassler

    Member

    Sep 25, 2013
    253
    45
    Those light-sensors are, in a sense, addressable: just disable those you are not reading.
    Also: the outputs are a frequency, which would be read most easily with an Input Capture. You can thus read as many of them simultaneously as you have Input Captures
     
  11. Man Noula

    Thread Starter New Member

    Jan 31, 2017
    25
    0
    how can i adress them? else if i'm going to poll the sensors in sequence. how could i know which responce is from which sensor?
     
  12. ericgibbs

    Moderator

    Jan 29, 2010
    5,472
    1,023
    hi MN,
    Could I ask what level of financial budget you have available for this project.?
    Eric
     
  13. ericgibbs

    Moderator

    Jan 29, 2010
    5,472
    1,023
    hi,
    You said you require to read ALL 20 LED states at the same instant.?
    This means you will have to have 2o sample and hold devices.
    A brute force method would be say 20 small PIC's say 16F88 or equivalent, set to use an internal counter/time & routine.
    A master PIC say 18F4620 would have dedicated output pin select/enable line for each 16F88 also a common reset/start for all the 16F88's.

    The 18F would start/stop all the 16F88 counting then select each 16F88 in turn to read their 'readings'
    The 16F88 and the 18F4620 have the SPI function.

    I appreciate this is a very rough proposal, but could be an option.

    E
     
  14. Man Noula

    Thread Starter New Member

    Jan 31, 2017
    25
    0
    i don't think that's a good solution because when having 20 sensors , its enugh to have 1 microcontroller , and to read the results
    Sequentially from a sensor to another I just have to find sensors with unique adresses to know which result is coming from which sensor
     
  15. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    3,502
    1,266
    Since you said you were using a Mega, it has sufficient IO pins to read all 20 sensors. That is if they are connected in parallel to the Arduino.

    If you are going to use a bus, one could add addressability with additional circuitry or you could go the suggested route and have a microcontroller at each node. Designing and testing the circuitry and implementing a reliable protocol may not be worth it.

    If you are not experienced in other microcontrollers at this time, there are very small Arduino-compatible controllers available that you could use at each node. The Adafruit Trinket is one example.
     
  16. LesJones

    Well-Known Member

    Jan 8, 2017
    1,404
    334
    If you have a microcontroller for each sensor you can program in it's address. You have not given much information on your project so this suggestion may not be suitable If you use an HC-12 ( 433 mhz serial link module.) with each sensor and one for the base station then the base station can send out the address of a sensor. All of the sensor microcontrollers will receive that address but only the one that recognises that address will transmit the data which will be received by the master. (All of the other slaves will see that data but providing care is taken to make sure that this data does not contain the address of a slave then they will not do anything.) I have used this method for reading temperature and humidity (Using DH-22 sensors). I use a very simple addressing system. The first character of the address is the "#" character (which will never be sent as part of the responce from a slave) This is followed by a letter of the alphabet (Which gives 26 addresses. Or 52 addresses if upper and lower case is used) In my system the response from a slave is just a text message like "Temperature 20.3 C Humidity 55%" Each sensor uses a PIC12F1840 microcontroller. (These cost about £1.20 each including VAT.)

    Les.
     
    Man Noula and djsfantasi like this.
  17. Man Noula

    Thread Starter New Member

    Jan 31, 2017
    25
    0
    why you people are suggesting other solutions while i mentionned that i'm going to use arduino mega wiith 20 sensors which is mentioned in the project's specification: I have to use oone microcontroller to read all the informations

    the project consist on reading leds on a pcb to detect the intensity of the light and rgb of the leds (its a functional test for the pcb)

    the main problem here is finding the right sensor
     
  18. bertus

    Administrator

    Apr 5, 2008
    18,351
    3,516
    Hello,

    How large is the PCB?
    Would a calibrated camera with some image processing software work?

    Bertus
     
  19. Man Noula

    Thread Starter New Member

    Jan 31, 2017
    25
    0
    ther is multiple pcbs with multiple sizes in the company where I work now they are using a tester called "feasa led analyser" to test them.
    and unfortunately i can't use a camera to test the pcb
     
  20. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    3,502
    1,266
    Then, IMHO, you cannot do it.
     
    Man Noula likes this.
Loading...