All things Raspberry Pi and Time Lapse

The Raspberry Pi does not have a battery to keep time when it is powered off. This means that every time the Raspberry Pi starts up, it has to get the time from a network server or from the user at boot time. Here is a Raspberry Pi forum confirming that there is no System Clock and how to set the time using NTP (Network Time Protocol). Unfortunately this is a major problem for my time lapse project and using NTP will not work because I will not be connected to the network/Internet. If you have internet a good tutorial on how to use NTP for RedHat/Fedora based systems is here, and a good tutorial for Debian/Ubuntu based systems is here. Over the course of a year there is a very good chance that the power will be off or flicker enough cause the Raspberry Pi to reboot at least once or multiple times. Since it is very important that the pictures be taken at the right time each day, if this is messed up it could cause major problems.

One option would be to connect the Raspberry Pi to a battery of some sort to provide power while the main source of power is down. I do not want to go that route because that adds expense and complexity. The other problem with a battery is what if the power is off long enough to drain the battery? If this happens then the Raspberry Pi would power down and time would be lost.

After some searching online, I think I have found a solution. And that solution is to set the Canon Powershot A510 time and then when the Raspberry Pi starts it will get the time from the camera to set the system time. The camera has a small battery to keep the system time, and it should last for several days without power.

So why did they build the Raspberry Pi without a System Clock? The reason is because that added cost and complexity and they were trying to keep the design cheap and simple. And most people are going to be using their Raspberry Pi’s where there is a network easily available, or  where time is not critical.

After I receive the camera I will post my script on how to get the system time from the camera and set the system clock using that time. However, all cameras function a little different so it may not work for all cameras.

About these ads

Comments on: "Raspberry Pi System Clock" (3)

  1. Hello
    I have scripts to set system time from camera time, if you need it feel free to write me. I’m not a good programmer but those scripts works fine
    best regards

    • Hello Inco,
      I tried to send you an email but it failed. I have started working on the scripts but I would like to see your solution. If you have another email address you would like me to send to let me know.

  2. […] set the time on the Raspberry Pi using my Canon Powershot A510. This is a follow up of my previous post. This is tested and works with a Canon Powershot A510 but it may work with other Canon Cameras, […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Tag Cloud

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: