multi-sensor network

Thread Starter

Man Noula

Joined Jan 31, 2017
25
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
 

MrChips

Joined Oct 2, 2009
30,715
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.
 

Thread Starter

Man Noula

Joined Jan 31, 2017
25
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.

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
 

MrChips

Joined Oct 2, 2009
30,715
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
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.
 

Thread Starter

Man Noula

Joined Jan 31, 2017
25
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.
no,no i'm trying to meassure the rgb and intensity of existing LEDS
 

bertus

Joined Apr 5, 2008
22,270
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
 

Attachments

Thread Starter

Man Noula

Joined Jan 31, 2017
25
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
The device address on this chip is fixed. There are no address pins or commands to change the device address
 

bertus

Joined Apr 5, 2008
22,270
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
 

Thread Starter

Man Noula

Joined Jan 31, 2017
25
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
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
 

JWHassler

Joined Sep 25, 2013
306
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
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
 

ericgibbs

Joined Jan 29, 2010
18,766
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
 

Thread Starter

Man Noula

Joined Jan 31, 2017
25
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
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
 

djsfantasi

Joined Apr 11, 2010
9,156
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.
 

LesJones

Joined Jan 8, 2017
4,174
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.
 

Thread Starter

Man Noula

Joined Jan 31, 2017
25
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
 

Thread Starter

Man Noula

Joined Jan 31, 2017
25
Hello,

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

Bertus
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
 

djsfantasi

Joined Apr 11, 2010
9,156
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
Then, IMHO, you cannot do it.
 
Top