I am working on a project of designing a system for leak detection in pipelines. I want to monitor pressure/flow in both endings of a 5km long pipe and acoustic emissions onto some crucial points of the pipe.

For that reason I am intending to prototype some data-loggers. These will be consist from a ADC, a micro-controller and a SD card.

The real problem now, is the synchronous monitoring of many signals along 5km range. I want to trigger the data-loggers exactly at the same time, in order to keep synchronized different measurements from different locations.

My question is: what is the most appropriate method to achieve this?

  1. use a cellphone and two GSM modules to trigger the data-loggers at the same time?
  2. use some LoRa modules to transmit the measured data into a PC/laptop? (obviously the SD card is no needed any more).
  3. use two cellphones to transmit data via internet?
  4. anything else?

Thank you in advance.


closed as too broad by PeterJ, Bence Kaulics, Daniel Grillo, Autistic, uint128_t Jun 14 '16 at 16:08

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    \$\begingroup\$ I would say the cellular network is the most most developed infrastructure for this. But you should think of a reliable protocol if you need an exact timing. \$\endgroup\$ – Eugene Sh. Jun 9 '16 at 17:18
  • 5
    \$\begingroup\$ "I want to trigger the data-loggers exactly at the same time". Same time can mean a lot of different things. +/-1 sec? +/- 1ms? +/-1 us? +/- 1ns? \$\endgroup\$ – bigjosh Jun 9 '16 at 17:25
  • 3
    \$\begingroup\$ If you don't need the data in realtime, you can just timestamp it. No need for online synchronization. \$\endgroup\$ – Eugene Sh. Jun 9 '16 at 17:38
  • 4
    \$\begingroup\$ Yes, but to buy a loaf of bread, I'd need a maximum of 1 Million Dollars, too. Engineering is about knowing what your application realistically demands, not setting an arbitrarily high demand. What is the maximum bandwidth of the signal you're observing? I mean, pressure and acoustics definitely will never change at 0.5MHz -- that sounds mechanically impossible, and also, the 1MHz wide microphone has yet to be introduced to me. So: put down realistic requirements first. Otherwise, you'll just get useless answers and waste everyone's time. \$\endgroup\$ – Marcus Müller Jun 9 '16 at 17:58
  • 1
    \$\begingroup\$ @jojosthegreat Specifying a maximum sampling rate without minimum is pretty useless. You should have exact specifications. \$\endgroup\$ – Eugene Sh. Jun 9 '16 at 17:58

There might be bad receiption for GSM cell phones at some points of a long pipeline. I would suggest using GPS receivers for exact timing. GPS allows sub microseconds precision of synchronization. In remote areas with no cell phone receiption there will be still GPS receiption, you only need a non obstructed view to the sky.

  • \$\begingroup\$ There are plenty of integrated GSM+GPS ICs and products available for sending the location of your lost dog/what have you. Just make sure you can get time stamp from the GPS part since it may not be available as a parameter on all circuits. \$\endgroup\$ – winny Jun 14 '16 at 8:58

The most accurate way I can think of synchronizing sensor reads is to synchronize the microcontrollers with a GPRS module using AT commands. You can use AT commands to get the current network time. The specific AT command for that is


GPRS AT Commands - See Page 69. You may want to store the value received from that and the current internal time since startup of your microcontroller, and use an offset from that to determine a more precise time. Now that you would have your controllers' times synchronized to a possibly accurate value, you could set them to log at very specific times, or just short intervals. You should be able to do this as you wanted with an SD card, since no outside means of triggering a sensor read would be required now.

EDIT: This was my original solution, but as Marcus Mueller pointed out, it would be highly inaccurate. Don't use it.

The way that I would go about approaching this is to have all sensors/microcontrollers synced with an internet time server. Then, simply set up each controller to log values at precise times. This should be able to be done easily as long as you have ways of connecting your microcontrollers to the internet. I'm not sure of your environment, but as an example, this article about Connecting an Arduino to an Internet Time Server may possibly be of use to you. However, that example will only work with Ethernet or WiFi connectivity. If you're not in an obscure place, that would be fine.

  • 1
    \$\begingroup\$ OP demands +/- 1S accuracy with at a sampling rate of 1MS/s. That means +/- 1µs. That accuracy is physically impossible with high layer network protocols such as NTP. Especially over high & high variance latency data channels such as GPRS. Really, NTP over GPRS is a really bad idea. You will be off by >> 0.1s!!! \$\endgroup\$ – Marcus Müller Jun 9 '16 at 17:47
  • 3
    \$\begingroup\$ Why did this get marked as solution? It solves none of the problems of your question. \$\endgroup\$ – Marcus Müller Jun 9 '16 at 17:49
  • \$\begingroup\$ This method would be accurate to +/- one sample because of the constant time syncs. If, say, you update the time every second, one microcontroller isn't going to immediately desyncronize by 500ms. Even if they aren't syncronized to the precise internet time, they will be syncronized to eachother due to them (hopefully) using the same technologies. \$\endgroup\$ – Arix Zajicek Jun 9 '16 at 17:53
  • 1
    \$\begingroup\$ You're not reading closely, no matter what you do, a somehow configured Linux computer that gets time from somewhere else through a network protocol can mathematically not suffice to estimate the current time with enough precision – that's the Cramer-Rao bound for estimators, basically. \$\endgroup\$ – Marcus Müller Jun 9 '16 at 18:00
  • 1
    \$\begingroup\$ I want to second that – your answer is worth a lot to others reading this later! \$\endgroup\$ – Marcus Müller Jun 9 '16 at 20:30

Not the answer you're looking for? Browse other questions tagged or ask your own question.