pu2clr / RDA5807

Arduino Library for SINGLE-CHIP BROADCAST FM RADIO TUNER RDA5807
MIT License
94 stars 16 forks source link

showRDSTime far from real time #10

Closed GlebDen closed 1 year ago

GlebDen commented 1 year ago

Hello again :)

This function gives new values each time: 24:10 -12:00 08:02 -00:00 00:02 -11:30 31:11 -02:30 24:46 -11:00 15:04 -00:00

All this is very far from real time. Is it because of 'Under Test and construction' status?

applecuckoo commented 1 year ago

@GlebDen It could be that one of the stations in your area might be broadcasting faulty time codes. There are a few stations like that where I live.

GlebDen commented 1 year ago

@applecuckoo Each FM station with RDS in my region either does not show time at all, or shows such an incorrect time. Pretty strange, don't you think?

pu2clr commented 1 year ago

I have just modify the RDS time function. But I have difficult to test it in my location. Few stations provide this service here. Well... let us check it now.

GlebDen commented 1 year ago

Unfortunately, same messages: 16:33 -00:00 08:34 -12:00 24:10 +10:30 02:04 -07:00 26:17 -09:30 19:27 -13:00 27:51 +11:00 24:33 -02:30 20:09 -09:00 05:35 -12:30 04:18 +04:30

What should the correct values look like?

pu2clr commented 1 year ago

I have just checked it. It seems work here. My local time is 9:45 and the rds time shown is 12:45 +03:00. It is UTC time and it is 3:00 ahead of my location. Are you testing it from current version of this library (from this repository). Right? It was not released to the Arduino Library.

GlebDen commented 1 year ago

Are you testing it from current version of this library (from this repository). Right?

Yes, sure.

pu2clr commented 1 year ago

I have just implemented the RDA5807_01_RDS_TEST_SERIAL_MONITOR sketch (see example). I have checked 11 stations in my locations. Just two have the right time service.
It is 11:25 now here. So, the UTC time should be 14:25.

Result: You are tuned on 8990 MHz | RSSI: 075 dbUv | Vol: 06 | Stereo: Yes 14:26 +03:00

pu2clr commented 1 year ago

I also have noticed here that some stations send spurious time information. Like you have shown. Examples: You are tuned on 9910 MHz | RSSI: 054 dbUv | Vol: 09 | Stereo: Yes 20:02 -06:30 04:15 +08:30 You are tuned on 9910 MHz | RSSI: 054 dbUv | Vol: 09 | Stereo: Yes 02:00 +00:00 08:02 -00:00

applecuckoo commented 1 year ago

@applecuckoo Each FM station with RDS in my region either does not show time at all, or shows such an incorrect time. Pretty strange, don't you think?

That's right, some stations just broadcast time signals without using a reliable time source.

pu2clr commented 1 year ago

Yes! Same here. Just two stations work well here. The most of them don't show anything and some stations show the wrong time. I'll check it with a commercial receiver soon.

pu2clr commented 1 year ago

I have improved it in recent days. Now this library has two methods to get the RDS time: getRdsTime and getRdsLocalTime. I have tested them in my location. I have noticed that some stations really broadcast wrong time information. There is nothing to do in this case. However, you can check in your location what station broadcasts the right information time. Try also a good antenna. Check if the RSSI is greater than 55. Values below 55 increase the errors during RDS decode. Thanks for testing this library.