Arduino Serial Communication based on GPS PPS Signal

Hi Everyone!

I am sending data from Arduino Mega to another serially using Ebyte E-62 transceiver. For this purpose I need to synchronize them. Although I am using GPS NEO-8 modules for the PPS signal and both the Arduino’s have synchronized clocks but how i will start the serial data transmission at the same time? for the data transmission synchronization?
I have tried external interrupt for the GPS PPS signal for initialization of serial communication.

Thanks

Reciever.ino (2.08 KB)

Transmitter.ino (2.09 KB)

Why do you need to start anything at the same time ?
If Arduino A has the time, from whatever source, then it could be sent to Arduino B in order to synchronise them. If the transmission time is significant to whatever you are doing then you can compensate for that on Arduino B when the time is received

Alternatively, as you are using GPS NEO-8 modules on both Arduinos, just get the time from the GPS data on each and the Arduinos will be in synch

There is the possibility that the time from the GPSs can be out by a second or so, the 'leap seconds' issue.

However regardless of the time being sent out by the GPS, the 1PPS signal on the seperate GPSs should be within a few tens of nS of each other, assuming the GPS has a lock.

@UKHeliBob
I am using separate GPS modules and the clocks are synchronized but I want to start sending and receiving the data at the same time???How it will be possible?

I want to start sending and receiving the data at the same time

Why the need for synchronisation when serial communication is asynchronous ?

You say that you are sending data from one Arduino to another. Why the need to synchronise the time on both ?

Perhaps if you explained exactly what you are doing it would help. Is there a 2 way flow of data perhaps ?

@UKHeliBob
I want to synchronize both the modules bcoz i want to introduce TDMA using switch case... The node one is sending while the 2 nodes are listening, after 10 packets the 2nd node will send the packets while other 2 nodes listening as so in the third time frame the node 3 will send data...
For this purpose I need to synchronize the serial communication of all the 3 nodes..
THANKS

arxl:
@UKHeliBob

I am using separate GPS modules and the clocks are synchronized but I want to start sending and receiving the data at the same time???How it will be possible?

So your basing your TDMA setup on a one second send\receive cycle and using the GPS 1PPS signal for the timing ?

For this purpose I need to synchronize the serial communication of all the 3 nodes..

Sorry, but I don't see why

A1 starts in transmit mode, A2 and A3 in receive mode

start of loop
A1 sends 10 messages to A2 and A3 then switches to receive
When A2 has received 10 messages it is set to transmit

A2 sends 10 messages to A1 and A3 then switches to receive
When A3 has received 10 messages it is set to transmit

A3 sends 10 messages to A1 and A2 then switches to receive
When A1 has received 10 messages it is set to transmit
end of loop

srnet
Yeah I want to establish a TDMA based communication...for that I need Serial synchronization

for that I need Serial synchronization

How close does the synchronisation need to be and over what period, bearing in mind the speed differences between different Arduinos even when they are the same type and specification ?

Will all of the Arduinos be required to send and receive at the same time ?

arxl:
srnet

Yeah I want to establish a TDMA based communication...for that I need Serial synchronization

If the time cycle is one second then you can use the GPS 1PPS signal for sync.

If the time cycle is more than one second then it gets difficult to use GPS displayed time (in the NMEA sentences) because the GPSs might be displaying different times with maybe one, two or more seconds difference.