Author Topic: Arduino shutter tester  (Read 14680 times)

cs1

  • Self-Coat
  • *****
  • Posts: 857
Re: Arduino shutter tester
« Reply #50 on: October 12, 2018, 05:53:26 AM »
I guess that you could improve results by measuring through a focused lens. But I haven't tried that yet. And in my case (I'm using IR diodes) I would need to adjust focus for IR. When I get around to putting the whole contraption into a case, I'll have a closer look at these options.

BTW: Have you seen the photoplug: http://www.photoplug.de/ ? It works together with the "Shutter Speed" app. The app is originally based on checking the shutter speed by sound (which probably isn't that precise) but it also works with the photoplug (an optical sensor which is attached to a smartphone's microphone jack) which should improve the precision. In any case, it looks like an interesting option,

Francois

  • Self-Coat
  • *****
  • Posts: 15,760
Re: Arduino shutter tester
« Reply #51 on: October 12, 2018, 03:21:32 PM »
Yeah, the old sound card trick... I heard that it has quite a variable level of precision...
Francois

Film is the vinyl record of photography.

cs1

  • Self-Coat
  • *****
  • Posts: 857
Re: Arduino shutter tester
« Reply #52 on: October 12, 2018, 04:39:32 PM »
Yes, but the Photoplug, though it's plugged into the mic input, actually is a photo sensor that simply uses the mic input as an interface to get the data into the smartphone. So you actually use a strong light on one side of the shutter and the Photoplug on the other end, plugged into the smartphone which uses the Shutter Speed app. This way they basically do the same as we do with our Arduinos.

Francois

  • Self-Coat
  • *****
  • Posts: 15,760
Re: Arduino shutter tester
« Reply #53 on: October 12, 2018, 09:22:40 PM »
I know...
Using a phototransistor to capture the voltage variation using an audio program is the base of a lot of the older ways of getting shutter speeds.
But even older than that was capturing the image from an old CRT television and counting the number of lines recorded on the film. And for the slower speeds, it was actually photographing a rotating vinyl record on which you put a white mark. Measure the angle of the mark on the film and you can find the speed...
Francois

Film is the vinyl record of photography.

Bryan

  • Self-Coat
  • *****
  • Posts: 3,334
    • Flickr
Re: Arduino shutter tester
« Reply #54 on: October 13, 2018, 04:04:52 AM »
I use a photo tachometer to test the shutter on my movie cameras.  I put a test roll in the camera, take the lens off and point the tachometer at the shutter.  That gives me an RPM that I convert to Frames per second.  It works great, I mostly shoot at 18 FPS so I just adjust the speed and leave it there.  I also use it to check the speed of my turntables. I put a few pieces of foil on the platter and get a direct reading from it. 

Francois, I'm going to try that turntable method you mentioned, it sounds so simple.  First I'll make sure the table is accurate with my photo tachometer.  I would think setting the turntable to 78 rpm would give me more accurate results.  I'll just put a note card next to the turntable with the shutter speed I'm using. 

Francois

  • Self-Coat
  • *****
  • Posts: 15,760
Re: Arduino shutter tester
« Reply #55 on: October 13, 2018, 03:01:13 PM »
That's about it. The only thing is I don't remember the formula that is used to convert to shutter speed.
All I know is that it works up to about 1/30.
Francois

Film is the vinyl record of photography.

Francois

  • Self-Coat
  • *****
  • Posts: 15,760
Re: Arduino shutter tester
« Reply #56 on: October 16, 2018, 01:53:15 PM »
Yesterday I spent a few hours rewiring the tester and fixing the old sensor so that it works again with the new setup.
Now I have to wire the new sensor and make a dark housing for it, I don't want light to hit the sensor from behind...
Francois

Film is the vinyl record of photography.

cs1

  • Self-Coat
  • *****
  • Posts: 857
Re: Arduino shutter tester
« Reply #57 on: October 16, 2018, 08:22:05 PM »
You got digital light sensors now, right (the three pin version with a variable resistor on the little circuit board)? If so, then you don't need to worry about the housing or scattered light. You can simply adjust the threshold of the sensor so high using the variable resistor so that it will only detect a direct light source. I've never had a problem with incident light even with a sensor for visible light.

Francois

  • Self-Coat
  • *****
  • Posts: 15,760
Re: Arduino shutter tester
« Reply #58 on: October 16, 2018, 09:23:53 PM »
Mine's a 4 pin sensor with the potentiometer. It's got Analog/Digital/GND/+5VDC.
I'll just use the Digital output....
Francois

Film is the vinyl record of photography.

cs1

  • Self-Coat
  • *****
  • Posts: 857
Re: Arduino shutter tester
« Reply #59 on: October 17, 2018, 05:58:37 AM »
I'll just use the Digital output....
That's a good idea. This way you can use the potentiometer to adjust the sensor's threshold and you can use interrupt based detection on the Arduino.

Francois

  • Self-Coat
  • *****
  • Posts: 15,760
Re: Arduino shutter tester
« Reply #60 on: October 17, 2018, 02:03:36 PM »
On your sensor, do you block light that comes from behind?
I was thinking about this last night and it might be part of the high shutter speed test failures.
Thing is that at speeds over 1/500 there isn't much light hitting the sensor. You might be hitting the lower threshold of the component. And having even the slightest bit of light entering the back might be a problem.
Francois

Film is the vinyl record of photography.

cs1

  • Self-Coat
  • *****
  • Posts: 857
Re: Arduino shutter tester
« Reply #61 on: October 17, 2018, 09:26:30 PM »
I use an IR diode and sensor and can lower the threshold quite considerably but I still have the same issues at speeds faster than 1/500s. I guess that incident light or too little light isn't the issue. Also, in my understanding dialing in a higher threshold shouldn't influence the speed of the detection, just the amount of energy that is needed to trigger the detection. But that's just a guess. I lack the skills to pinpoint the exact reason for the imprecise measurements at higher speeds, so this is all guessing, to be honest.

Francois

  • Self-Coat
  • *****
  • Posts: 15,760
Re: Arduino shutter tester
« Reply #62 on: October 17, 2018, 10:19:16 PM »
Don't forget that ambient light does contain IR rays... that's why we have High Speed Infrared film :)
On those sensor chips, I believe they have an amplifier and a comparator. So the potentiometer should be the gain of the amp part of the circuit.
When the gain gets to be too high, you just increase the noise on the system making reading unreliable.

I was looking at the sensor on mine and it looks a lot like an LED used in reverse. When not powered, LEDs produce a very weak amount of electricity when light is shining on them. It's a trick used in many toys that have a motion detector. I believe it may be the same thing here.
Francois

Film is the vinyl record of photography.

Francois

  • Self-Coat
  • *****
  • Posts: 15,760
Re: Arduino shutter tester
« Reply #63 on: October 18, 2018, 02:18:28 PM »
I made a new cable for the new sensor and tried it like that just to see if it works. And boy is the new sensor sensitive!
I'll have to make a good holder for it, it's way too sensitive to use handheld!
Francois

Film is the vinyl record of photography.

Francois

  • Self-Coat
  • *****
  • Posts: 15,760
Re: Arduino shutter tester
« Reply #64 on: October 20, 2018, 10:23:25 PM »
Worked all afternoon on a housing for the sensor. Didn't turn out as I had expected but it should be fine.
I'll have to test it out tonight...
Francois

Film is the vinyl record of photography.

Francois

  • Self-Coat
  • *****
  • Posts: 15,760
Re: Arduino shutter tester
« Reply #65 on: October 22, 2018, 02:14:11 PM »
I ran some tests last night and I think I have figured out why I keep getting strange values from the sensor.
It turns out that the whole circuit seems to have a lot of lag once it's been triggered. Even with an adjustment of the trim pot it still outputs strangeness. I'm hoping it's related to the small led on the board. If that's the case just adding some baffling will fix it. If not, it's going to be back to the original sensor.
Francois

Film is the vinyl record of photography.

Francois

  • Self-Coat
  • *****
  • Posts: 15,760
Re: Arduino shutter tester
« Reply #66 on: October 22, 2018, 05:21:15 PM »
OK, I just found the problem!
The issue was that while the phototransistor I was using sets the detection pin to HIGH when it detects light, the new sensor board actually sets it to LOW in the same conditions. The strange values I was getting were the actual time between shutter activations.

Now, I'm at the point where I need to improve the high speed detections...
Francois

Film is the vinyl record of photography.

cs1

  • Self-Coat
  • *****
  • Posts: 857
Re: Arduino shutter tester
« Reply #67 on: October 23, 2018, 08:33:11 PM »
Yes, you're completely right. That's the way most sensors with digital outputs work. Sorry for not mentioning it, it simply didn't occur to me that this was causing your problem because my code on Github is already designed for digital sensors and I completely forgot that your first design used a diode.

Francois

  • Self-Coat
  • *****
  • Posts: 15,760
Re: Arduino shutter tester
« Reply #68 on: October 23, 2018, 10:10:11 PM »
I've begun modifying the code a bit to make it more universal. So far I haven't tested it but it should work.
I made a boolean called sensorboard. In the setup phase, I check if the pin is high or low. I know that if it's high, it's a sensor board and if it's low it's a phototransistor. Then in the interrupt section, I use a more complex logic statement
  if (sensorboard == true && digitalRead(interruptPin) == LOW || sensorboard == false && digitalRead(interruptPin) == HIGH)

That should make it work no matter what is plugged-in at system start.

Also, last night I was playing with some tape and figured out how to make the sensor detect faster speeds!
It all depends on the type of shutter that is measured as they all require a different technique.
For central shutters, the best deal is just to use the sensor as-is.
For focal plane shutters, you need a slit aperture that is 90° to the direction of travel.
I tried using a pinhole but then I run into the problem of not having enough light entering the sensor...
So I'm thinking of adding a set of removable sensor masks that would be held possibly with magnets on the front of the sensor... but I'll have to put the magnets on the top to avoid creating eddy currents in the shutter, something that could definitely slow it down.
Francois

Film is the vinyl record of photography.

cs1

  • Self-Coat
  • *****
  • Posts: 857
Re: Arduino shutter tester
« Reply #69 on: October 24, 2018, 06:00:57 PM »
That sounds very cool. Especially the explanation how to up the precision. Would you be willing to submit a patch to my original code on Github to include the enhancement that you made? Or would you mind if I worked your modification into the code?

Pete_R

  • Self-Coat
  • *****
  • Posts: 2,149
    • Contax 139 Resource
Re: Arduino shutter tester
« Reply #70 on: October 24, 2018, 09:02:26 PM »
Also, last night I was playing with some tape and figured out how to make the sensor detect faster speeds!
It all depends on the type of shutter that is measured as they all require a different technique.
For central shutters, the best deal is just to use the sensor as-is.
For focal plane shutters, you need a slit aperture that is 90° to the direction of travel.
I tried using a pinhole but then I run into the problem of not having enough light entering the sensor...

We sort of had this conversation a few years back here http://www.filmwasters.com/forum/index.php?topic=8323.msg111096#msg111096

I use a pinhole and a laser which gives plenty of light.
"I've been loading films into spirals for so many years I can almost do it with my eyes shut."

Francois

  • Self-Coat
  • *****
  • Posts: 15,760
Re: Arduino shutter tester
« Reply #71 on: October 24, 2018, 09:27:26 PM »
A laser would be ideal, but then I'd need to make a special rig to endure everything is perfectly aligned...
Then again, it's probably easier in a sense. But it does take more space than my current setup...
Francois

Film is the vinyl record of photography.

Francois

  • Self-Coat
  • *****
  • Posts: 15,760
Re: Arduino shutter tester
« Reply #72 on: October 25, 2018, 09:27:30 PM »
Hey Peter,
I was wondering if you use the laser to test cameras with fixed lenses?
And when you test SLR's, do you leave the lens attached?
Francois

Film is the vinyl record of photography.

Pete_R

  • Self-Coat
  • *****
  • Posts: 2,149
    • Contax 139 Resource
Re: Arduino shutter tester
« Reply #73 on: October 25, 2018, 10:10:00 PM »
Hey Peter,
I was wondering if you use the laser to test cameras with fixed lenses?
And when you test SLR's, do you leave the lens attached?

That'll be no to both questions.

Long time since I did anything with fixed lens cameras and no reason to leave the lens on with an SLR.
"I've been loading films into spirals for so many years I can almost do it with my eyes shut."

Francois

  • Self-Coat
  • *****
  • Posts: 15,760
Re: Arduino shutter tester
« Reply #74 on: October 25, 2018, 11:06:35 PM »
Good to know.
That means that when I get to a future iteration of the project, I'll have to take a few things into consideration.

When I get enough space in my cupboards, I'll have to make some sort of mounting jig to keep everything aligned...
I also have to future proof this thing... I know that white light works wonders with a central shutter. If I ever have to test something old just to get the proper shutter time, I want it to be easy.
Francois

Film is the vinyl record of photography.

Pete_R

  • Self-Coat
  • *****
  • Posts: 2,149
    • Contax 139 Resource
Re: Arduino shutter tester
« Reply #75 on: October 27, 2018, 04:45:05 PM »
If I ever have to test something old just to get the proper shutter time, I want it to be easy.

I'm not so sure it can be easy, especially the faster speeds.

Between lens (or leaf) shutters open like an iris, starting in the middle of the lens then opening out to the edge of the lens. Once fully open and after a delay, the blades start to close with the centre of the lens being the last part to be covered. The time taken for the blades to travel from fully closed to fully open and from fully open to fully closed is finite and, at fast shutter speeds, can represent a significant part of the exposure time. So the question is, at what point do we measure the shutter speed from and to?

What we need is a measurement that would give us the same degree of exposure if the shutter was perfect with instantaneous opening and closing. So, ignoring things like acceleration and assuming a constant rate of opening and closing of the shutter, we would need to measure the time between when the shutter is 50% open and 50% closed.



In the diagram, the solid line is a theoretical representation of the light measured at the film plane as the shutter opens and closes. The light ramps up as the shutter opens, stays at 100% for a set time, then ramps back down to 0% as the shutter closes. The total exposure is the integration of the area under this line. The green dotted line represents the time measured between the 50% open and 50% closed points. If a perfect shutter were to open for this amount of time (red dotted line) the total exposure would be the same as that of the real shutter.

Now this is all hunky-dory, assuming we can find a way of measuring the shutter speed at the 50% open points, until we introduce apertures. If we assume the above refers to a shutter with the aperture set to maximum, then when the aperture is closed down the light reaching the film plane stops ramping up at the point the shutter opening equals the aperture opening. To measure a meaningful shutter speed now, we need to lower the points at which we start and stop the measurement to 50% of the new maximum.



So this means our point of measurement needs to be variable and linked to the size of the aperture used. Not quite so simple. I think the only way would be to record, or store, the output from the sensor then retrospectively measure the minimum and maximum values, calculate the 50% points then measure between them.

There is another factor to consider and that is the effective shutter speed varies with aperture - in the diagrams above, the green line is longer in the second example than the first but the shutter speed selected is the same. So what aperture should we be measuring the shutter speed at? There probably isn't an answer to that but what we perhaps should be doing is measuring at several apertures to see what the variation is. A shutter which opens very quickly will have less variation than one that opens more slowly. This can also be expressed as the shutter efficiency (a measure of the total light passed by a shutter during an exposure, compared with the light that could be passed by a perfect, infinitely fast, shutter fully open for the same extreme time). A worst case would be a shutter at its top speed with the aperture set to maximum where the efficiency could be as low as 50% equating to 1 stop under exposure. Something the user probably needs to know about.

An alternative view...

It's arguable that shutter speed is mostly unimportant, unless you are doing something scientific where a precise shutter speed is required. For general photography, if a shutter is 50% out, it probably won't make much difference to the end result except in exposure and so maybe it's exposure, not shutter speed, we should be measuring.

It would need a method of integrating the output from a light sensor placed at the film plane and a method of calibrating the system to the light source, which could, I guess, be done by gating the output from the sensor for a fixed period while holding the shutter open. Once calibrated it would be possible to measure the amount of under or over exposure for each shutter speed setting which, ultimately, is what matters (who really needs to know their 1/125th shutter speed is actually 1/135th?). It would also work with all types of shutter.

As it happens, for a long time now, I've been expressing shutter speed test results in terms of under and over exposure. It seems more useful to me and people seem to understand it.

Discuss...
« Last Edit: October 27, 2018, 04:50:52 PM by PeterR »
"I've been loading films into spirals for so many years I can almost do it with my eyes shut."

Francois

  • Self-Coat
  • *****
  • Posts: 15,760
Re: Arduino shutter tester
« Reply #76 on: October 27, 2018, 09:12:06 PM »
I do get where you're going with that. The best way to get a very precise shutter speed measurement with a central shutter would be to make multiple samples at different apertures, average those by aperture and then average the apertures together.
When you look at the shutter's motion, it tends to produce a type of half bell shaped exposure. There is a period of acceleration at the start of each motion, followed by a fairly constant speed and a sudden stop. Then it's back the other way. I know the acceleration is not linear since there is some friction in the system. The only way I know of making very precise measurements would be using a high speed video camera to record the motion. But somehow I think this would be overkill.

And exposure wise, I believe in the close enough principle. If I were to try and calculate the real exposure in a super precise way, I would first need to start with a T/stop measurement of the lens. F/stops are just a mathematical representation, not tested in the real world. Then I'd need to factor in the focus distance since it makes the lens to film distance change. It might not be big but I read that on some lenses it can be surprisingly significative. And then there is the shutter speed...
And once you factor all this and input it in a sort of calculator, the decisive moment is definitely gone, has taken a plane and landed in Timbuktu. ;)

But on the up side, since the shutter is located at the same place as the aperture, it just changes the way the light comes in in a similar fashion.
The good thing for us is that film has a lot of sensitivity latitude. So those minute variations are not much of a problem.
The other good thing is that central shutters don't go to very high speeds. I know Kodak made one that went to a supposed 1/1000... but the fastest one I have climbs maybe to 1/500. And that's if I'm lucky. So finding the speed at which I need to set my exposure meter isn't much of a problem.

And leaf shutters are even slower... I now know that my Diana F+ has an average shutter speed of 1/84th :) doesn't change much when compared to the suggested 1/60 but in a way it makes me feel geekier 8)

I was just thinking... if you use your laser checker, do you get the same values close to the edge of the barrel and through the sensor when measuring a central shutter with the aperture wide open? I'll have to see with mine...
Francois

Film is the vinyl record of photography.

Pete_R

  • Self-Coat
  • *****
  • Posts: 2,149
    • Contax 139 Resource
Re: Arduino shutter tester
« Reply #77 on: October 27, 2018, 09:58:14 PM »
And exposure wise, I believe in the close enough principle. If I were to try and calculate the real exposure in a super precise way, I would first need to start with a T/stop measurement ......
......the decisive moment is definitely gone, has taken a plane and landed in Timbuktu.

I think you miss the point. I'm suggesting measuring the actual exposure given by the shutter in lab conditions as an alternate way of checking shutter speed accuracy. If the shutter is slow you get over exposure. If it's fast you get under exposure. If it's correct you get the expected exposure. And you don't have to worry about the problems of accurately measuring the the time the shutter is open for or the variations due to the way leaf shutters open and close.

Quote
I was just thinking... if you use your laser checker, do you get the same values close to the edge of the barrel and through the sensor when measuring a central shutter with the aperture wide open? I'll have to see with mine...

You mean do I get a different values if I measure at the centre and the edge? Yes, absolutely. That's one of the main problems of measuring a leaf shutter. That's like (referring back to my diagrams) measuring the duration at the top and bottom of the curves. Clearly it will be different. If you're using a non-focused light then the position isn't likely to have much effect but it then comes down to at what light level the sensor triggers. At a low level it's the same as measuring at the bottom of the curve and at a high level it's the same as measuring at the top of the curve. So adjusting the sensitivity of the sensor will give you different results.
"I've been loading films into spirals for so many years I can almost do it with my eyes shut."

Francois

  • Self-Coat
  • *****
  • Posts: 15,760
Re: Arduino shutter tester
« Reply #78 on: October 27, 2018, 10:39:55 PM »
You're right, it would be possible to measure shutter speed by using the amount of light that is transmitted.
Once the real lens transmission on B is calculated, it should be fairly easy to calculate....
I need to think of a way to make a measuring device that would work........

It could actually be more precise than using a regular tester that relies on what is basically a laser trap..... but by how much, I really have no idea.
Francois

Film is the vinyl record of photography.

cs1

  • Self-Coat
  • *****
  • Posts: 857
Re: Arduino shutter tester
« Reply #79 on: October 28, 2018, 05:52:45 AM »
I'm wondering how to hack this plus of precision into an affordable Arduino shutter tester. I'm wondering if using two different sensors connected to interrupt lines would work. For example you could place one where the diagonals of the image plane's edges (36x24mm) intersect and one right at one of the corners. You could then look at the times that the sensors registers a change in light exposure and use the time differences for calculations. On the other hand it could well be that I completely miss the point of this discussion. ;)

Anyhow, one thing that I need to patch into the shutter tester's software is what Peter mentions about the times on the speed dial not being the *exact* times but just an approximation. I think it'd be helpful to tell the user that 1/30s on the dial is actually 1/31.25s.

Pete_R

  • Self-Coat
  • *****
  • Posts: 2,149
    • Contax 139 Resource
Re: Arduino shutter tester
« Reply #80 on: October 28, 2018, 07:50:33 AM »
Anyhow, one thing that I need to patch into the shutter tester's software is what Peter mentions about the times on the speed dial not being the *exact* times but just an approximation. I think it'd be helpful to tell the user that 1/30s on the dial is actually 1/31.25s.

Sorry, I'm obviously not good at explaining myself. I was actually suggesting the complete opposite. A user really isn't interested (usually) in the precise speed of their shutter. All they are really interested in is the accuracy. So giving the result as a + or - exposure error is more practical and useful. Here's an example of how I present shutter speed test results.



The upper and lower limits are taken from the camera service manual and are there so the camera owner can immediately see whether the shutter is within specification or not. The numbers are errors as fractions of a stop exposure (EVs).

What I'm suggesting is, given that the results are probably more meaningful if presented as exposure errors, then maybe measuring exposure directly, rather than converting speed errors into exposure errors as I do now, would make sense. It also eliminates all the issues of accurately trying to capture the shutter movement.
"I've been loading films into spirals for so many years I can almost do it with my eyes shut."

Francois

  • Self-Coat
  • *****
  • Posts: 15,760
Re: Arduino shutter tester
« Reply #81 on: October 28, 2018, 01:37:33 PM »
What I think Peter is thinking about is using the analog output part of the sensor instead of the digital one.
You have a constant light source in front of the camera. The first test would be done on bulb to get the amount of light that goes through the lens without any blocking. This is the baseline. Then on each actuation of the shutter, you record the sensor output to measure not the shutter speed itself but the total amount of light that it lets through in one cycle.
This can then be translated into a value that represents the whole cycle.
It's a bit like on uv exposure units where they use a sensor to calculate exposure as units instead of time...
Francois

Film is the vinyl record of photography.

cs1

  • Self-Coat
  • *****
  • Posts: 857
Re: Arduino shutter tester
« Reply #82 on: October 28, 2018, 01:52:59 PM »
I'm wondering how precise this can be done. The Arduino has 16 MHz. The success of this would heavily depend on optimising the code so that it won't use too many CPU cycles. Other than that, the EV boundaries in Peter's last post could easily be implemented with a digital sensor. You could hint at too slow, too fast or optimal shutter speeds with "+", "-" and "=". I'm wondering how hard it would be to make an interface to allow to adjust EV boundaries. You could basically use the Contax tolerances in the chart and make those adjustable.

Pete_R

  • Self-Coat
  • *****
  • Posts: 2,149
    • Contax 139 Resource
Re: Arduino shutter tester
« Reply #83 on: October 28, 2018, 03:15:21 PM »
What I think Peter is thinking about is using the analog output part of the sensor instead of the digital one.
You have a constant light source in front of the camera. The first test would be done on bulb to get the amount of light that goes through the lens without any blocking. This is the baseline. Then on each actuation of the shutter, you record the sensor output to measure not the shutter speed itself but the total amount of light that it lets through in one cycle.
This can then be translated into a value that represents the whole cycle.
It's a bit like on uv exposure units where they use a sensor to calculate exposure as units instead of time...

That's basically it, yes.

If only I could speak Ardweeno I'm sure I could have explained it better  ;)
"I've been loading films into spirals for so many years I can almost do it with my eyes shut."

Francois

  • Self-Coat
  • *****
  • Posts: 15,760
Re: Arduino shutter tester
« Reply #84 on: October 28, 2018, 08:02:42 PM »
No need to stick a babblefish in your ear, we can translate. :)

Now what I'm wondering about is how to convert an amount of light for a period without using seconds in the system...
I could count photons, but that would be a tad too much...
Francois

Film is the vinyl record of photography.

Pete_R

  • Self-Coat
  • *****
  • Posts: 2,149
    • Contax 139 Resource
Re: Arduino shutter tester
« Reply #85 on: October 28, 2018, 09:47:15 PM »
No need to stick a babblefish in your ear, we can translate. :)

Now what I'm wondering about is how to convert an amount of light for a period without using seconds in the system...
I could count photons, but that would be a tad too much...

What's the problem with seconds?

I was thinking the sensor would be the input to a A to D converter and the output would be sampled at some rate fast enough to give the required resolution. The output values would be summed to give a value representing the overall exposure. As long as you know the sample rate and the A to D output value that represents a fully open shutter you can convert the result to an equivalent shutter speed.

Shutter speed =  the measured values summed together / ( the value that represents a fully open shutter * the number of samples per second)
"I've been loading films into spirals for so many years I can almost do it with my eyes shut."

Francois

  • Self-Coat
  • *****
  • Posts: 15,760
Re: Arduino shutter tester
« Reply #86 on: October 29, 2018, 01:19:41 PM »
The Arduino currently has both digital and analog inputs and can work with both of them without any need for conversion. The analog pins record resistance while the digital pins are used for switch inputs. Currently the switch inputs are much faster than the analog pins, especially on two pins which can be assigned directly to an interrupt call. This is what we're using right now.

Francois

Film is the vinyl record of photography.

cs1

  • Self-Coat
  • *****
  • Posts: 857
Re: Arduino shutter tester
« Reply #87 on: October 29, 2018, 07:44:18 PM »
I see several problems with sampling continuously from an analogue pin. The main problem that I see is the accuracy of the analogue inputs. The input can read anything from 0 to 5V. Within this span, it can detect 1024 different voltages (which basically gives you an integer value of 0 to 1023 when reading a voltage). While this sounds accurate enough, this is only theoretical in my eyes because you'd have to calibrate a light sensor so meticulously that it would output 0 V for "shutter closed" and 5 V for "shutter fully open". It's very unlikely that this is easy to do (especially since you'd need circuitry to actually do this sort of calibration). But even if you did, the biggest remaining accuracy problem has to do with CPU cycles and detection cycles. The Arduino needs 1 microsecond to read from the analogue input. Neglecting the amount of CPU cycles that you'd need to read and to actually store the read value this means that you get about 5 samples for 1/2000s and 10 samples for 1/1000s under more than ideal circumstances. Factoring in CPU cycles for storing stuff etc. in I'm sure it's even worse. I doubt that this is accurate enough (and -- as François already pointed out -- this is the reason why reading from a digital input which can send an interrupt within a single CPU cycle (1/16,000,000 s) would be a better solution if you could rig it in a way that it'd work with all shutter types). You could use up to two sensors with an Arduino Uno which you could place at strategically chosen positions on the film plane to e. g. measure the travel times of curtains. But I don't know how useful that would be.

Sorry for all the techno babble.

Pete_R

  • Self-Coat
  • *****
  • Posts: 2,149
    • Contax 139 Resource
Re: Arduino shutter tester
« Reply #88 on: October 29, 2018, 08:24:41 PM »

Sorry for all the techno babble.

Strangely, as I don't speak Ardweeno, I understood every word. Seems it's probably not the correct device to do what I was thinking. Maybe, if I ever get the time, I'll look into an implementation.
"I've been loading films into spirals for so many years I can almost do it with my eyes shut."

cs1

  • Self-Coat
  • *****
  • Posts: 857
Re: Arduino shutter tester
« Reply #89 on: October 29, 2018, 08:52:48 PM »
I'm glad that what I wrote made sense to you. :)

I'm pretty sure that you could use a Raspberry Pi to do exactly the same and you could produce sophisticated output since you could attach it via HDMI to real screens. I think that you could easily use the pins on the RasPi to build a very similar setup as with the Arduino. Furthermore, you could code all of the program in Python which is a lovely language to do useful stuff with. The RasPi should have sufficient power and memory to do sampling. However, I currently have the same problem as you do: a lack of time. :)

Francois

  • Self-Coat
  • *****
  • Posts: 15,760
Re: Arduino shutter tester
« Reply #90 on: October 29, 2018, 09:17:11 PM »
The RasPi is definitely a better option when high speeds and processing is involved. Lets not forget that the Arduino's heart beats at a whopping 20MHz at best...
We're talking 1 million instructions per second at the processor level. To put that in perspective, that's twice the speed of the original 128K Mac that came out in 1984!
Francois

Film is the vinyl record of photography.

Francois

  • Self-Coat
  • *****
  • Posts: 15,760
Re: Arduino shutter tester
« Reply #91 on: October 31, 2018, 08:29:00 PM »
Been thinking about your exposure curve thing Peter... and I'm beginning to think that for most shutters it would simply be unnecessary.
On both sides of the curve is the shutter's acceleration/deceleration slope. While it does let light through, on a healthy sounding shutter it might be a negligible part of the exposure which most people would never see. A snappy shutter means that the slope is very steep.
On the other hand when a shutter sounds like a slouch, the acceleration is not there and the exposure will be affected by the flatter curve. It also means that the shutter definitely needs a good CLA...
Francois

Film is the vinyl record of photography.

Pete_R

  • Self-Coat
  • *****
  • Posts: 2,149
    • Contax 139 Resource
Re: Arduino shutter tester
« Reply #92 on: November 01, 2018, 02:36:15 PM »
Been thinking about your exposure curve thing Peter... and I'm beginning to think that for most shutters it would simply be unnecessary.
On both sides of the curve is the shutter's acceleration/deceleration slope. While it does let light through, on a healthy sounding shutter it might be a negligible part of the exposure which most people would never see. A snappy shutter means that the slope is very steep.
On the other hand when a shutter sounds like a slouch, the acceleration is not there and the exposure will be affected by the flatter curve. It also means that the shutter definitely needs a good CLA...
By "most" I assume you mean most leaf shutters as it was only leaf shutters I was referring to. But this is applicable to ALL leaf shutters. And I did say "ignoring things like acceleration" as that's not what I was talking about. It's the time it takes for a leaf shutter to go from fully closed to fully open then again back to fully closed. At fast shutter speeds this takes up a significant part of the exposure and, in fact, at the top speed the whole exposure is likely to be taken up with the shutter opening and closing. Which is why leaf shutters don't have such high top speeds as other types. If the problem only applied to a few shutters which are a bit sluggish and need of a CLA then I'm sure the shutter manufacturers would have built leaf shutters with much higher top speeds - but they didn't.

Tell me this, how are you planning on measuring the shutter speed of leaf shutters using the Arduino?

« Last Edit: November 01, 2018, 02:37:49 PM by PeterR »
"I've been loading films into spirals for so many years I can almost do it with my eyes shut."

Francois

  • Self-Coat
  • *****
  • Posts: 15,760
Re: Arduino shutter tester
« Reply #93 on: November 01, 2018, 07:45:04 PM »
You're right about the top speeds. They are really hard to do on focal plane shutters. I might be mistaken but I think only Kodak made some which used rotating blades to avoid this problem.

So far, I've been just sticking the sensor on the back of the lens, pointing it at my desk lamp and pressing the button. I figure that leaving the lens on will reduce the need for a very precise sensor location... But I'm also running into the problem that the sensor is not precise at anything above about 1/100. I just tested it with a lens that goes up to 1/400 and uses a massive spring to reach that speed. But it tells me it's at 1/125... very improbable.

I know the sensor is also very sensitive to ambient light. Just testing in the wrong conditions can ruin the entire test, especially at high speeds.

When I use it to test a focal plane shutter, I top-off at a very low speed too...

I'm starting to think that I'll need two sensors for different tests, or something like that...
Right now, I'm really puzzled by this problem... it's going to definitely need some very good engineering to overcome this.
Francois

Film is the vinyl record of photography.

cs1

  • Self-Coat
  • *****
  • Posts: 857
Re: Arduino shutter tester
« Reply #94 on: November 01, 2018, 08:37:17 PM »
With an IR sensor and emitter I have consistent measurements down to 1/250s. Have you considered trying IR? Apart from that, even when using a visible light sensor, I can trim it so that it's only triggered by a really bright head torch. Have you tried using a brighter light source and no lens on the camera and trimming the sensor to a higher threshold? Still, I share your frustration with speeds quicker than 1/250s. I have no idea what's going on.

I've got a RasPi here which I can use for testing the sensor. Maybe I can quickly write some code in Python this weekend so that I can compare my mileage on the Pi with the Arduino. It's really hard to understand why the accuracy is so bad beyond ~1/250s. When using an interrupt driven program with a digital sensor on the Arduino the precision should be completely sufficient. It's a mystery.

Pete_R

  • Self-Coat
  • *****
  • Posts: 2,149
    • Contax 139 Resource
Re: Arduino shutter tester
« Reply #95 on: November 01, 2018, 08:53:54 PM »
So far, I've been just sticking the sensor on the back of the lens, pointing it at my desk lamp and pressing the button. I figure that leaving the lens on will reduce the need for a very precise sensor location... But I'm also running into the problem that the sensor is not precise at anything above about 1/100. I just tested it with a lens that goes up to 1/400 and uses a massive spring to reach that speed. But it tells me it's at 1/125... very improbable.

So the light hitting the sensor (ignoring any positional variations) increases from zero to some maximum then decreases back to zero. At what point does the measurement start and finish? If it's starting almost immediately and stops just before the shutter closes then I can understand it giving you 1/125th. If you decreased the sensitivity so that it didn't start until the light reaches near maximum then it would probably give you a speed much faster than 1/400th. That's the issue. Defining and then controlling the point at which timing starts can make such a big difference to the result.

Quote
I know the sensor is also very sensitive to ambient light. Just testing in the wrong conditions can ruin the entire test, especially at high speeds.

Ambient light will add to the light transmitted through the shutter so effectively it increases the sensitivity which will alter the point at which the measurement starts.

Quote
Right now, I'm really puzzled by this problem... it's going to definitely need some very good engineering to overcome this.

For FP shutters, I think (I know) the problems are surmountable but I came to the conclusion there isn't a practical one for leaf shutters which is why I started thinking about alternative methods.
"I've been loading films into spirals for so many years I can almost do it with my eyes shut."