can this be done

Need help. Hardware is sorted, all sounds do-able but as a noob to programming I can’t seem to be able to get any working code for a personal project.

The project is to accurately read how many Frames per second a camera actually achieves.

My thinking is to read an input which I will take from the camera hot-shoe (have working hardware) and record lapsed time until the next input, then the next and the next etc. save these into an array until either the shutter button is no longer depressed (I have separate hardware connected as a remote release and there is an output that can also be read on a pin) or a timed period is reached (10sec).

What I will do then and have managed this bit on a test sketch with manually inputted data is to calculate how many FPS are achieved until buffers are full on the camera and then what FPS are achieved with a full buffer, writing the results to an LCD.

Is what I am trying to do achievable and if so any help to lessen my learning curve would be appreciated.

IanSweetman:
What I will do then and have managed this bit on a test sketch with manually inputted data is to calculate how many

What sketch ?

the sketch just read from an array and gave me an output, i didnt write it just modified it from one i found on plotting graphs using an array to feed the data instead of a realtime event (very messy at the moment but is working of sorts) but its getting the data into the array that i cant seam to fathom at all

What sort of camera?

If a digital one the frame rate will be crystal-based and you can look it up in the datasheet.

If a film camera, how do you intend to get a frame-rate signal?

regards

Allan

Start by learning how to time events. You can connect a button to an input and measure the period between button presses. There are examples in the Arduino IDE for reading a button, and measuring time intervals (see Blink without Delay).

Then learn how to read the output of the camera and modify your program accordingly.

DSLR camera's as you are probably aware they all boast 4.5 / 7 /10 FPS, but this is in ideal conditions and the reality is that you rarely achieve the stated FPS unless your on the lowest resolution and you dont fill up the buffer .

the buffers play a huge part , one of my camera will significantly slow down after only a few shots where my pro camera will accept about 15 shots on its best quality settings before it too starts to slow down.

the web has not yielded much beyond the manufacturers stated FPS and i wanted to test under different conditions what the reality is of different settings and cameras.

i think there are too many variables even if i can uncover processor speeds /write speeds buffer sizes so attacking problem from the output is in my mind a good option.

OK - but how do you get the frame rate signal from the camera..?

If you can't there's no external trick can help....

A

jremington:
Start by learning how to time events. You can connect a button to an input and measure the period between button presses. There are examples in the Arduino IDE for reading a button, and measuring time intervals (see Blink without Delay).

Then learn how to read the output of the camera and modify your program accordingly.

have looked at millis and know that is the way to go but i need to write this data into the array, i have no idea how many events i will have, could be 10 or 100, so the first problem is how to declare the array size, then there the question of best practice, just save this data or calculate elapsed time and store.
i have a uno that has a max array size of 1600 bytes i believe, could i start running into issues there as well?

allanhurst:
OK - but how do you get the frame rate signal from the camera..?

If you can't there's no external trick can help....

A

thats easy and already done, hot shoe will only trigger on shutter actuation (more complicated with TTL and flash attached) center pin and casing effectively short on shutter i've used an opto-isolater for safety of the sensitive electronics, so in effect i have a pin input every time the shutter actuates.

i need to write this data into the array,

  unsigned long array[10]; //declare unsigned long integer array to hold 10 event times
  int index = 0;
...
  if (event) {
  array[index++] = millis(); //store the time and point to next array slot
  }
...