I'm designing an automated camera system. A time-lapse camera for very slow-moving objects. I'm interested in glaciers.

The system has very small standby power (~160 uA), and in medium size battery pack, it can last for over a year by keeping the camera (DSLR or mirrorless) off all the time but when taking a picture. Therefore, I want to keep the camera on for as little as possible. I'm controlling the focus and shutter and detecting the signal of the hot-shoe (flash) adapter.

I'm currently waiting 3 seconds for the camera to write the picture to the SD card before shutting it off. But 3 seconds sometimes is more than enough and, on some occasions, is way too short. The actual time used by the camera varies between 2 and 8 seconds, and for other cameras I expect it to be different.

Therefore, I want to detect when the camera stops writing data to the SD card, but I'm not sure which pin to sniff and what signal is associated with data traffic. Below you can see a picture of a prototype, and how I've used an SD card extender to gain access to all the SD card pins.

enter image description here

  • \$\begingroup\$ Do you have access to an oscilloscope or a digital logic analyzer? You could probe the pins one at a time while taking pictures, and decide which one to use. \$\endgroup\$ Jun 14, 2023 at 14:23
  • \$\begingroup\$ @VladimirCravero I do have a very small one. But I understand there are multiple ways to transfer data to an SD card, so I'm not sure if any test I do with this camera could be generalized to other cameras. But I guess someone with a better hold of how SD cards work could guide me to where exactly to look. \$\endgroup\$ Jun 14, 2023 at 14:31
  • \$\begingroup\$ yep I was suggesting the heuristic approach precisely because there are multiple ways. If you need to support arbitrary cameras it gets trickier, as you fully understand - as a non expert, the only suggestion I can give is to just monitor all the pins and turn the whole thing off after no activity is detected for a certain amount of time. This "solution" would probably be your worst case scenario, but someone knowledgeable can suggest a subset to make things work better. \$\endgroup\$ Jun 14, 2023 at 15:02
  • \$\begingroup\$ I wonder if that is even the right approach. Plus, you can't determine from the SD card traffic anything else than when the camera is finished communicating with the card. The card may still spend seconds flushing the write buffer into flash, handlind the bulk storage with wear-leveling algorithms, etc. Why not get a camera you have control over and can shut down safely? The card is likely also not intended to dangle through many tens of centimeters of wiring, as it is a relatively high speed bus and you may get signal integrity issues. \$\endgroup\$
    – Justme
    Jun 14, 2023 at 16:22
  • 1
    \$\begingroup\$ If the camera manufacturer has taken battery life seriously, they should be asking the SD card when it is done writing and then shutting down the clock rather than continually keeping the card active forever. I would probe the clock pin and see if the camera is turning off the card. If it is, then it is safe to cut power. \$\endgroup\$ Jun 14, 2023 at 16:26

2 Answers 2


Rather than measure the pins of the SD card, you might try to detect the blinking SD symbol in the viewfinder.

You also might consider adding a small solar panel to top off the batteries, at some expense in complexity. Even a few mA should be sufficient, at that low drain, and allow for a longer window for exposures to complete, even if you cannot detect end of write to card.

  • \$\begingroup\$ Thanks for the suggestion. While I can definitely see the spike in consumption when the shutter gets activated (100+ mA), it quickly drops very close to base levels, and I can't really notice any significant drop associated to the finish of the SD writing. In the camera I'm trying, an SD card symbol blinks while the data is being written, so I can see when it finishes. And there is no significant drop in power consumption. \$\endgroup\$ Jun 14, 2023 at 22:46
  • \$\begingroup\$ @CamiloRada, sorry the current draw was not a good indicator... I've update the answer for another suggestion. \$\endgroup\$ Jun 15, 2023 at 0:04

Thanks for the insightful comments posted. I can now answer my own question: Monitoring the Clock/CLK pin of the SD card gives a clear idea of when data is being written to the SD card. The figure below shows the main events of the picture capture and storage cycle using a logic analyzer (on the setup shown in the picture posted in the question). The camera used is an Olympus Mirrorless OMD E-M5, and the picture taken used an exposure of 1/60 seconds (~17 ms). enter image description here

Errata: Where it say "Hotshow" it should say "Hotshoe", pretty different things.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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