SD card continuous overwrite

fred_b

Member
I am using an 18x to control a digital camera and take timelapse photos. I have been searching to see if there is some way to program an SD card to begin overwriting the oldest file once the storage capacity has been reached.

Does anyone know if this is possible?

Thank you.
 

hippy

Ex-Staff (retired)
Such behaviour is down to the digital camera firmware. Some sort of menu access probably allows earlier / earliest photographs to be deleted, so rather than 'take a shot' it should just be a case of emulating 'delete first photo, take another'.
 

Dippy

Moderator
An SD card is dumb(ish) storage, subject to control by the File System.
You can't set it to do anything unless the 'host' (e.g. your camera) tells it to do something.
i.e. it will do what your camera tells it to do.
If you can get your camera to auto-overwrite then fine.

Trying to get your PICAXE to twiddle image data on an SD will be a no-hoper.

Is that what you are asking?
 

fred_b

Member
Thanks Hippy. My controller only triggers the shutter by shorting the button.

Eventually I hope to have it control a camera through serial comm, so until then looks like it may not be do-able.
 

fred_b

Member
Dippy,

I did some searching and got the impression that an SD card might be programmed. The site was pretty vague.

I was hoping that there were some internal settings that could be adjusted.
 

slimplynth

Senior Member
A picaxe to take over the pressing of the relevant buttons, hacking the camera?

program the picaxe to go through the motions of taking the pictures in a loop...

main:
for b0=1 to 20

High but1 ' take picture

next b0

gosub del_pics

goto main

del_pics:

high but2 ' menu button
high but3 ' confirm button
return

That kind of thing...
 

Dippy

Moderator
I've never heard of being able to programme an SD card.
Maybe there are 'specials' on the market? I really don't know.


All I DO know is that comms to an SD card is NOT a piece of cake.
I'm doing some right now, but as I have a bad of waffling I won't bore you with the details.
(I'll leave others to do that :) )

Hacking your camera buttons should be quite a laugh.
Has your camera got any appropriate control functions to do what you want?
Are there any specialist control devices on the market?
Otherwise you'll have to do some serious external controlling and data transfer.

All this is well beyond most people unless there is something 'out there' that can help. I'll leave the Googling to you (and Eclectic).
 

slimplynth

Senior Member
I've got a rubbish olympus digital camera, once considered for the hack but the storage capacity put me off. No point if there are only 20 pics and then still unable to get them off remotely/automatically.

There's a post somewhere, Dr_Ac explains why it's so difficult - i think.
 

Dippy

Moderator
"but the storage capacity put me off"
- I thought you mentioned SD cards? Get a big one.

"then still unable to get them off remotely/automatically"
- you'de have to be a USB Host to contrl the camera. Not impossible, but well beyond most.

"Dr_Ac explains why it's so difficult"
- why what is so difficult?

I'll leave this to the experts.
 

slimplynth

Senior Member
I wouldn't buy an SD card (not mentioned by me ;)) for a rubbish camera that I still couldn't get the images off remotely/wirelessly.

anyway as far as difficulty goes...

http://www.picaxeforum.co.uk/showthread.php?t=10088

I followed Doctor's advice and concentrated on realistic ambitions... one step at a time (blimp is making zero progress still - 11 days off in September though yay!!! - can't wait :) my tippy tappy fingers feel 103 years old)
 

moxhamj

New Member
A new solution has suddenly presented itself! Check out http://www.4dsystems.com.au/products.php and scroll down to the 3rd and 4th products. Cameras with RS232 connections. 4dsystems have already given us the uDrive which can give you gigabytes of storage for an 08M. Their interface commands are simple to understand too. So - take a picture with an RS232 camera and transfer it over with either RS232 or TTL serial. This only came out a few weeks ago and I've got one in the shed but haven't tested it yet. There is a catch though - slowest baud rate is 14400. I'm not sure what the fastest picaxes can go to - maybe others can help there. I'll probably drop in a CP/M board to do the interfacing http://smarthome.viviti.com/build but I think there could be an all picaxe solution too. And 4dsystems are very receptive to feedback - if someone really wants it at 2400 baud they will probably do it.

I'd prefer this to pulling apart a camera.

Alternatively you could drop in a 4gig sd card into the camera and set the picture size to something smaller eg 640x480 and you get an awful lot of shots. How many shots are needed per 24h and how often do you need to download them?
 

fred_b

Member
Lots of replys. Thank you.

Yes, currently I am controlling the camera through a hack. Power on/off and shutter.
-----------

The idea was to make this work as a security camera and just keep taking pictures as long there was a power supply.
-----------

Not a bad suggestion, to emulate the button sequence to delete one photo.
------------------------

Figuring out the serial comms has lots of advantages though. I know it can be done and I have read many of the posts on this forum about that. It is done by emulating a remote shutter control.

These guys have it figured out:
https://www.harbortronics.com/Products/Cables/
---------------------

As far as baud rate, wouldn't the new X2 chips be able to handle it?

--------
I have looked at the 4dsystems cameras but the CMOS resolution just isn't good enough yet.
 
Last edited:

fred_b

Member
So according to that info, all that is needed is to produce the following sequence of pulses from a 38.4 mHz infrared LED:
 

hippy

Ex-Staff (retired)
Don't forget that, like eeprom, SD Cards have an endurance rating and that can be quite a lot lower than eeprom. In normal photographic use it's not much of a problem as it's format, use, download images, re-format ( delete all ) and the occasional delete image doesn't have much affect on longevity in the scheme of things.

With an 'industry standard' file system on the card to allow for inter-operability it may also be that deleting an image requires an update to the File Allocation Table (FAT) and this may require read-erase-write updates on the sector where that is held. Internal wear-levelling mechanisms should help there but with a full card, there's only limited options on what the card can do. The more used on a card, the greater the chance of hammering on particular sectors.

Assuming no FAT thrashing, one shot per second, 500 shots per card, endurance of 100,000 erase cycles; that's 50,000,000 shots or seconds of lifetime, 580 days. Some cards I have seen rated at 10,000 erase cycles, 27 years used each day, but just 58 days at one per second.
 

slimplynth

Senior Member
A new solution has suddenly presented itself! Check out http://www.4dsystems.com.au/products.php and scroll down to the 3rd and 4th products. Cameras with RS232 connections. 4dsystems have already given us the uDrive which can give you gigabytes of storage for an 08M. Their interface commands are simple to understand too. So - take a picture with an RS232 camera and transfer it over with either RS232 or TTL serial. This only came out a few weeks ago and I've got one in the shed but haven't tested it yet. There is a catch though - slowest baud rate is 14400. I'm not sure what the fastest picaxes can go to - maybe others can help there. I'll probably drop in a CP/M board to do the interfacing http://smarthome.viviti.com/build but I think there could be an all picaxe solution too. And 4dsystems are very receptive to feedback - if someone really wants it at 2400 baud they will probably do it.

I'd prefer this to pulling apart a camera.

Alternatively you could drop in a 4gig sd card into the camera and set the picture size to something smaller eg 640x480 and you get an awful lot of shots. How many shots are needed per 24h and how often do you need to download them?

would this offering from sparkfun help..
http://www.sparkfun.com/commerce/product_info.php?products_id=151
negate the issue of baud rate, from the product description you fill up the buffer until a transmit bit is set then it fires all the buffer data out at 1,000,000 bits per second?
 
Top