One of the most important feature is the availability of “automatic back up switching circuitry” which will simplify battery maintenance. There are a few points to keep in mind while trying to find a suitable RTC. So I started to investigate which real time clock would be suitable for my purposes. Because these clever little devices also have a battery back up, the time reference could be trusted with no external programming for 3 to 5 years. The solution was to bring in a real time clock (RTC) in hardware which would become the single point of time reference for my system. Even after registering to the mobile network, this time would never get updated.Īfter doing some investigation on why this was the case, I found out that because the mobile tariff I was on only supported data communication and not voice, the operator would not allow me to access the network time, which meant that I would have to use the factory default time setting of my poor little GPRS modem unless I came up with an alternative solution. However, upon start up, the modem would always give the factory default time stamp which is 03/01/01, 00:00:00. I would only be using the “read” command since the modem would automatically get the network time on start up and write it into its memory. There was indeed a command called AT+CCLK which could be used as follows:ĪT+CCLK? (to read the current time stamp in the required format)ĪT+CCLK=yyddmmhhmmss (to write the current time stamp) ![]() ![]() Once the plan was in place, I reviewed the full AT command list of the modem. Once the microcontroller was in a position to request the time stamp as and when needed, I could then deliver this information across the system to all the sub-system components including the data logger. Once the GPRS module started up and retrieved the correct time, I could then invoke a simple AT command to read the time stamp into the microcontroller. My initial thought was because there was already a GPRS modem in the system, I could simply configure it to use the network time delivered by the base station when it fired up. I've ordered a couple of these modules to try it out.In one of my projects, data captured from various sensors had to be time stamped in the YearYear/DayDay/MonthMonth, HoursHours:MinutesMinutes:SecondsSeconds format. And it's quite cheap in reasonable quantities. I'd prefer if my sender could skip sending for 30+ minutes if it has nothing to alert. It runs the batteries down (rechargables) Sleeping for 10 minutes before waking up and listening for a minute again. I'm trying to design my own PCB so I wanted to check out better solutions while I can.Īt the moment, if my receiver misses 10 successive signals then it listens for a full minute before giving up. I was a bit shocked by how different the timings were and I'm not sure how temperature changes will affect things. I think the time difference is consistent but I'm not sure. But even with a 60 second transmit frequency I see time differences of around 1.5 seconds. I do something like this already, I adjust my receivers wake up time to try to track the senders timeframe. Then the crystal drifting variable of the nodes is eliminated. This way you can orchestrate a large network of devices with extremely good precision in terms of when they wake up to send a message. The base can tell a node if it's too far off from its time slot, where that is required. Let the base synchronize all the nodes as they come online. It has been demonstrated in practice and it works very well. I propose a different approach which requires no extra components. I can see some situations where an RTC per node is absolutely necessary but IMO in most cases it's not. ![]() I get this question a LOT actually, people think that each node needs an RTC to keep accurate timing for some reason. You will need resync with the base station. But you will find that even at 1ppm it will drift eventually. It's perfectly fine for approximate interval reporting. Indeed the TPL timing is only approximate and requires external resistors. There's also the BQ32002 from TI.com but it appears to require an external oscillator Super accurate RTC.Īnother one that has interesting features was the MCP79412, for which I also found a library for on github Costs between €1.50 and €3 on mouser depending on quantities. It's 45nA, in a tiny 3mm x 1.5mm package. One device will transmit and the other will receive. I want a timer to keep 2 devices with synchronised wake times. I think this says the time is approximate. Thank you, I finally found time to read the data sheet for the TPL5110 But it seems the time intervals are only approximate based on the accuracy of the resistors.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |