Suggestions on how to acquire data from 12 sensors

Hi to all,

I would like to use Arduino MEGA to acquire data coming from 12 sensors.
Each sensor is a strain gauge (probably I'll use the BF350-3AA) and so I will have to use 12 analog inputs in total.

I would like to acquire at 45 Hz from each sensor (45 readings in a second): is Arduino MEGA capable to work fine by reading each sensor at 45 Hz?

I will also have to use a ZigBee to transmit the data of each sensor.

try 1 sensor 12 times in between 1/45 sec to scan and send over Zigbee

1 Like

That's 540 readings per second. The MEGA cn do just under 10,000 readings per second so 540 should be no problem.

Use a millis() timer to do readings every 22 milliseconds (45.4545... per second).

1 Like

Thank you a lot, guys!

... assuming one is only doing the analog readings!

In a real world sketch handling reading 8 analog / averaging / gathering 2 thermocouples on SPI and displaying everything on OLED while streaming the results over serial for remote logging ... the loop{} repeats every 750mS.

Just calling the two MAX31855K consumes 70mS (each).

Of course, because the sketch runs on an 8-bit Arduino Mega @16MHz, there are serious limitations in hardware and software, but my point was just to state one must take a 'system' approach for cycle-time and not just looking at the analog peripheral capability.
:wink:

1 Like

This is what I was suspecting: I need not only to cycle on all the sensors at 45Hz, but also create a string with all the measurements and then send it out with XBee (I do not have to use a LCD to display the results, fortunately).

These additional operations will increase the hardware capacity needed by the controller, so I'm worried if everything can work smoothly on MEGA.

Likely the Mega2560 is not fast enough. Personally, I would look for a 32-bit board running 72 MHz or faster. There are a good number of possibilities these days. Teensy comes to mind but there are others.

1 Like

Are you suggesting to use this one, for example?
https://www.pjrc.com/store/teensy31.html

Can I program it with the Arduino IDE?

Teensy can be programmed with the IDE but Paul provides a free utility that must be used after compile to upload the binary file. Fortunately it is easy.

The chip shortage has impacted Paul's inventory.

Currently in stock
Teensy® 4.0 (pjrc.com)

It is perfect! Thank you for the tip!

Well it certainly is a powerhouse...

Good luck.

Ray

1 Like

You should consider the signal you would get from a strain sensor. A typical sensor "outputs" a signal in mv/Volt. And the signal is the difference between two legs of the sensor.
You will need to use a differential amplifier or a board similar to the HX-711 converter.

Also, you must be careful of the adhesive you use as the movements are very small. I suggest you look at Omega Engineering site to get a feel of what they recommend.

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