30 sensors hookup guide with arduino

Greetings,

I have a mechanical engineering background and have been working with microcontrollers for a couple years.

Not sure what the best hardware configuration will be for my specific application.

I will have 14 sets of sensors. Each set consists of two sensors: a Gravity: I2C Non-contact IR Temperature Sensor (MLX90614-DCI), and a Infrared Laser Distance Sensor. Attached are pictures of the wiring diagrams for each sensor.

Each set will be mounted evenly along a 28 foot span.

My question is what is the best configuration for handling all these sensors?

My initial plan is to use the Arduino Mega because I will need 28 digital I/O pins(14 sensors each requiring 2 I/O's) to read the Infrared Laser Distance Sensors. That seems simple enough.

I will then need to use I2C communication for the IR temperature sensors. I have read that I2C does not work well with wire lengths over a couple of meters so I may need to use and I2C bus extender. This bus will have to span the entire length of the test bed (28 ft) and will also need to extend to the arduino (another 10 ft.). I have to hope this bus extender will work. Are there any other better configurations that could work better with Arduino hardware(maybe wireless dongles connected to each temperature sensor)? I've done research on the Arduino hardware but I cannot come up with a better solution.

Thanks in advance

distance_measure_pin_layout.PNG

distance_measure_pin_layout.PNG

I2C and long distances often works well. beyond the specs. Choose "good cables", as noice safe cabeling. as low bitrate, as possible etc.
Make some tests using the maximum lengths and see what it looks like.

Both sensor you mentioned uses I2C, and considering that each IR sensor and each Distance sensor have the same address, you can't put all of them into a single I2C line easily. I don't supposed you are going to bit-bang 14 I2C interface in the MEGA so that's out of the question.

Maybe you can cascade a 4 channel I2C multiplexer to give you 14 I2C lines out of a single I2C hardware from the Mega

4 ch I2C multiplexe

I'd consider to use one controller for each sensor set. This allows for short lines to the local controllers and a choice of longer distance communication transceivers to the master controller.

Every 28 feet have a sensor connected to a ESP8266 or ESP32. The ESP's could send their sensor data to the 'brain'. The brain could be another ESP or, an RPi that process the sensor data.

I went with the RPi. The RPi can run a MQTT Broker that can send to and receive messages from the ESP's. On the RPi NODE-Red can be used as a traffic manager. Me I wrote a Python program to manage traffic. Options.

DrDiettrich:
I'd consider to use one controller for each sensor set. This allows for short lines to the local controllers and a choice of longer distance communication transceivers to the master controller.

+1

Perhaps a Pro Mini for each controller set and rs485 modules for comms with a central node?

hzrnbgy:
Both sensor you mentioned uses I2C

Do we know that? The OP seems certain that the distance sensor is not, and one of the images posted, which may represent the distance sensor, has labels "TX", " RX", implying UART interface. Frustratingly, the OP gave a model number for the temp sensor but not for the distance sensor.

Idahowalker:
Every 28 feet have a sensor connected to a ESP8266 or ESP32. The ESP's could send their sensor data to the 'brain'. The brain could be another ESP or, an RPi that process the sensor data.

I went with the RPi. The RPi can run a MQTT Broker that can send to and receive messages from the ESP's. On the RPi NODE-Red can be used as a traffic manager. Me I wrote a Python program to manage traffic. Option

Use an ESP8266 with the arduino uno. This way I would have 14 arduino unos each with a ESP8266. I would then connect one temperature sensor and and one distance sensor to each arduino.
I would then have a master arduino with a ESP8266 connected which would be the "brain". Do I have the right idea?
Assuming I have this correct how would this look while connected to the master arduino? Do I write to each arduino node individually to read the data from each node?

So the Uno a 8 bit machine will be hooked to an ESP8266, a 32 bit machine and the only thing the ESP8266 will be doing is the WiFi thing. Sure if you want to do it that way, got for it.

PaulRB:
+1

Perhaps a Pro Mini for each controller set and rs485 modules for comms with a central node?
Do we know that? The OP seems certain that the distance sensor is not, and one of the images posted, which may represent the distance sensor, has labels "TX", " RX", implying UART interface. Frustratingly, the OP gave a model number for the temp sensor but not for the distance sensor.

Apologies. Stupid mistake not to put the part number. The distance sensor part number is: SEN0366. And the manufacturer is DF Robot

Idahowalker:
So the Uno a 8 bit machine will be hooked to an ESP8266, a 32 bit machine and the only thing the ESP8266 will be doing is the WiFi thing. Sure if you want to do it that way, got for it.

So in case you - the OP - missed the sarcasm, using a UNO when you are going to use the vastly more capable ESP8266, makes no sense at all. Total waste and only making things hard for yourself as you then have to fudge up some serial communications between the two.

So, it does have UART interface. And an impressive 80m range. What's the project?

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.