Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 14:31 26 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Measuring shutter speeds

Author Message
rea23
Newbie

Joined: 16/09/2022
Location: Switzerland
Posts: 26
Posted: 03:59pm 26 Jan 2024
Copy link to clipboard 
Print this post

Hi all

I would like to measure the shutter speed of old analog cameras. For this I use a laser and a phototransistor to measure through the camera shutter.

The post "A PicoMite CSUB to timestamp pin changes" describes how to measure microseconds. When I use the program, I get an error message after starting it. The CSUB at the end of the post is used. I can't find the reason.

Does anyone have a better idea for measuring shutter speeds?

Many thanks for any help

 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4233
Posted: 04:21pm 26 Jan 2024
Copy link to clipboard 
Print this post

There are updates to this csub, to make it work agan with 5.08.00.
See 10 posts down

Volhout
Edited 2024-01-27 02:22 by Volhout
PicomiteVGA PETSCII ROBOTS
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2135
Posted: 09:57pm 26 Jan 2024
Copy link to clipboard 
Print this post

As Volhout says, the latest re-compile by Disco4now works well with V5.08.00 firmware.

I got the same error when using the previous re-compile on V5.08.00 firmware so I imagine the same would happen if using the latest Log with older firmware.

The only issue I have had is being unable to get out of the Timeout Sub that it calls when done, so I don't use that Sub.
Instead test for the last element of the array to fill or a shorter timeout than the Log Timeout.
Eg.
Dim a%(101) 'array to receive the timestamps
Dim b%(100) 'Array for DEVICE BITSTREAM output
Dim n.t% = 100 'maximum number of transitions to receive
Dim t.o% = 2000000 'timeout of the CSUB in microseconds
Dim t.o2% = (t.o% / 1000 - 50) 'shorter timeout - ms
Dim integer i, n 'counters

SetPin  gp6,cin,3 'set pin 9 (GP6) to cause a H/W interrupt on both edges
'
'
'
'
Math set 0, a%() :i=0 :n=0

Timer =0
LOG a%(), n.t%, t.o% 'initialise the logging
Print "waiting for LOG to fill a%()"
Do While (a%(99) = 0) And (Timer < t.o2%) :Loop  'loop until enough transitions recorded or timeout
If Timer >=  t.o% /1000 - 50 Then Print " LOG timeout"
For i = 0 To 99
  If a%(i)>0 Then

' Process a%

Edited 2024-01-27 08:14 by phil99
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4233
Posted: 10:49am 27 Jan 2024
Copy link to clipboard 
Print this post

All,

The LOG function is nice for capturing streams of pulses.
I you want to capture the shutter time of a camera, that is single pulse.
It is much easier to use:

shutter_time% = PULSIN GPxx,polarity


Where shutter_time% is the time in multiples of 0.1us (for a shutter time of 1/1000, the maximum for a camera) that is a resolution of 0.01%

example
Shutter time     Reading
1/100            100000
1/300            30000
1/1000           10000

Really, PicoMite V50800 has EVERYTHING you can desire, build in STANDARD.
It is GREAT...

Regards,

Volhout
Edited 2024-01-27 20:53 by Volhout
PicomiteVGA PETSCII ROBOTS
 
rea23
Newbie

Joined: 16/09/2022
Location: Switzerland
Posts: 26
Posted: 01:51pm 27 Jan 2024
Copy link to clipboard 
Print this post

Hello Volhout & Phil

Really, you, PicoMite and the whole forum are great!

I will try with the PULSIN function.

Best regards and thank you very much
Hans
 
DaveJacko
Regular Member

Joined: 25/07/2019
Location: United Kingdom
Posts: 76
Posted: 09:55pm 27 Jan 2024
Copy link to clipboard 
Print this post

Great Project rea23 !
it might be worth checking that the turn-on and turn-off times of the photo diode are equal. I don't think that you will find a problem here, but the good old Cadmium Sulfide sensors seemed to have some delay.
 
LeoNicolas

Guru

Joined: 07/10/2020
Location: Canada
Posts: 479
Posted: 02:00am 28 Jan 2024
Copy link to clipboard 
Print this post

Sorry, it's not directly related with MMBasic, but this video has nice information about shutter speed, shutter artifacts, rolling shutter, etc

https://youtu.be/cDhomtxiT3c?si=drn90GUUprL9hJYT
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3194
Posted: 02:58am 28 Jan 2024
Copy link to clipboard 
Print this post

Entertaining video !!
Geoff Graham - http://geoffg.net
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4233
Posted: 07:48am 28 Jan 2024
Copy link to clipboard 
Print this post

Measuring fast shutter speeds can be a challenge on the sensor.
Without going into designing a sensor yourself, there is a relatively good solution that can be purchased for near nothing.

Fast photosensors are integrated in IR sensors (TV remote control)
But these will only respond to modulated (38kHz) light.

What you need:
IR LED and series resistor (you do not need much power, so 330ohm is fine)
IR remote sensor (depending the type you need a pullup resistor at the output).

Let the pico generate a constant 38kHz (PWM) and drive the IR LED with it.
Connect the IR receiver to the GP pin that you use the PULSEIN command on.
The sensors typically output LOW when they detect light, so polarity should be "0".

The IR sensor is designed to output pulses that are 0.1ms accurate, so you can measure up 1/1000 up to 10% accurate. That is enough since the ISO spec states that anything above 1/250 must be 33% accurate.

Regards,

Volhout

P.S. But maybe a simple photo transistor and a flash light will do the job as well.
Edited 2024-01-28 17:53 by Volhout
PicomiteVGA PETSCII ROBOTS
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3801
Posted: 11:41am 29 Jan 2024
Copy link to clipboard 
Print this post

  LeoNicolas said  Sorry, it's not directly related with MMBasic, but this video has nice information about shutter speed, shutter artifacts, rolling shutter, etc

https://youtu.be/cDhomtxiT3c?si=drn90GUUprL9hJYT

Says it's private :(

John
 
zeitfest
Guru

Joined: 31/07/2019
Location: Australia
Posts: 482
Posted: 11:56am 29 Jan 2024
Copy link to clipboard 
Print this post

If you drop a led that flashes at a known rate and photograph it against a regular scale as it falls, the flashes will image as streaks and can be measured against  the scale. There are then standard physics formula that will give distance vs times etc
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4233
Posted: 12:49pm 29 Jan 2024
Copy link to clipboard 
Print this post

Hi zeitfest,

Correct. Would be most usefull with a repeating shutter (film camera).
How to capture a single event (photo camera) with using a photosensitive film is difficult.
Similar methods are used to adjust ignition timing in combustion engines of old.
Then the LED is triggered from the ignition coil.

Another method is using a sound recording with a microphone. The shutter release click, and more loud, the shutter stop sound can simply be seen in the audio.

Volhout
Edited 2024-01-29 22:52 by Volhout
PicomiteVGA PETSCII ROBOTS
 
rea23
Newbie

Joined: 16/09/2022
Location: Switzerland
Posts: 26
Posted: 03:04pm 02 Feb 2024
Copy link to clipboard 
Print this post

It's not as easy as I thought. As Volhout mentioned, the response time can be a problem. I bought a IR phototransistor SFH320FA with a rise and fall time of 7 us. However, the measured shutter speeds are beyond expectations.
The sensor is only sensitive to IR and not to the 650 nm laser. Due to the distance between the laser and the sensor (camera in between), an IR LED is also unsuitable. So I used a halogen bulb. No success in terms of measured times. Maybe I can think of something else...
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4233
Posted: 03:18pm 02 Feb 2024
Copy link to clipboard 
Print this post

Hi rea23,

The photosensor you bought should be used in combination with a transimpedance amplifier to achieve performance.
If you used the phototransistor with a pullup or pull-down resistor (100k or so) it will be slow in reponse time.

That is why I suggested TV IR receiver modules, these output digital and are sensitive, but require modulated light (38kHz). What I do not know is if the lens inside the camera will let IR light pass through.

Why are you using a 650nm laser ? A IR LED is cheap, and may not have a such a narrow angle, but you don't need that (I may be wrong). You just need light to pass through the lens system and the shutter correct ? Are you doing this test with a very small opening ?

Anyway, the combination of laser and SFH320 is not optimal since ther are for different parts of the spectrum. The Halogen bulb will be better since it has a wide spectrum. But you can also purchase a photo transistor for 650nm....

Volhout

P.S. If you can solder small items, this may do what you want:ROHM BH1682FVC-TR
It has a current output, so you need a pull-down resistor. If you use 10k it is quite sensitive (2V @ 1000 lux). With a laser you easilly get 1000 lux on such a small area.
Edited 2024-02-03 01:25 by Volhout
PicomiteVGA PETSCII ROBOTS
 
zeitfest
Guru

Joined: 31/07/2019
Location: Australia
Posts: 482
Posted: 03:40pm 02 Feb 2024
Copy link to clipboard 
Print this post

If you can get on old record player - set up a rotating mirror so the beam sweeps around 360 deg. Take a photo of the beam spot as it hits a wall or such. The photo will show a streak length proportional to the time. [Don't burn a hole in the wall     I take no responsibility whatsoever    ]
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4233
Posted: 03:52pm 02 Feb 2024
Copy link to clipboard 
Print this post

rea23,

If you can get it, the SFH309 (not the SFH309FA) matches spectrum with the laser, and has 2000uA output current, so it can directly drive a 10k pullup resistor.
And it is "through hole" so easy to solder.

Volhout
PicomiteVGA PETSCII ROBOTS
 
LeoNicolas

Guru

Joined: 07/10/2020
Location: Canada
Posts: 479
Posted: 04:23pm 02 Feb 2024
Copy link to clipboard 
Print this post

  JohnS said  
  LeoNicolas said  Sorry, it's not directly related with MMBasic, but this video has nice information about shutter speed, shutter artifacts, rolling shutter, etc

https://youtu.be/cDhomtxiT3c?si=drn90GUUprL9hJYT

Says it's private :(

John


They reposted the video, probably with some corrections.

Here is the new link: https://www.youtube.com/watch?v=28S47EE_opA
 
rea23
Newbie

Joined: 16/09/2022
Location: Switzerland
Posts: 26
Posted: 02:35pm 03 Feb 2024
Copy link to clipboard 
Print this post

@ zeitfest
Because I have been assembling stereo cameras for years, I have long had a device that measures, how well the two cameras trigger synchronously. In the pictures you can see that an inclined, rotating mirror creates a circle with the laser. If the stereo camera images this circle at e.g. 1/1000 s, then the displacement of the two circle segment of  left/right cams show the quality of the synchronization. With my two Canon S110, the result is approx. 1/12,000 s. Incidentally, the times are very accurate with digital cameras. I use the SDM (Stereo Data Maker) firmware extension.

The method is therefore also suitable for measuring shutter speeds, if the rotation speed is known. BUT: With analog cameras, I don't want to use film for this purpose every time! This is the reason why I want to measure the shutter speeds directly (with or without lens).






 
zeitfest
Guru

Joined: 31/07/2019
Location: Australia
Posts: 482
Posted: 12:24am 04 Feb 2024
Copy link to clipboard 
Print this post

Maybe replace the film with a mirror ? eg reflect the beam back through the shutter and use that as a beam gate

Edit -  Doh ! not required ..
Edited 2024-02-04 10:39 by zeitfest
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024