Canon SX260HS accurate geo-tagging

  • 34 Replies
  • 5944 Views
Canon SX260HS accurate geo-tagging
« on: 08 / January / 2017, 10:41:55 »
Advertisements
Hi All; I'm new to this forum and this is my first post: thanks to all developers and contributors for such an awesome work!

I'm using the Canon SX260HS to capture UAV photogrammetric imagery: the camera is loaded with CHDK and KAP UAV script, and is remotely controlled by a Pixhawk flight controller.
I need to improve geo-referencing of the images: to do so I placed a phototransistor (VTT7125H) just on top of the AF LED which, when activated upon shutter opening, (should) send a signal to the external interrupt pin of an ublox GPS - so camera trigger events will be recorded in the GPS log with high accuracy time-stamp.
The issue I'm stuck with at the moment is with the LED-phototransistor implementation:
- when operated in ambient light, and obscuring it with the fingers , the phototransitor correctly changes state;
- when the phototransistor is placed on the camera AF LED it fails to detect the pulse most of the time (the phototransistor is masked with black tape);
- AF LED: in KAP_UAV script the camera activates the LED choosing option # 1, 3, 5 (actually all the odd numbers up to 15 seem to work but with different behaviors); I tested the LED either in burst mode or with 2 s intervalometer, and noticed that the LED pulse durations change.
Before posting here I've been searching and googling for some time now: I've read lots of topics in this forum (mainly answered by Waterwingz), on DIY Drones forum, on TuffWing site, etc. - this is where I got most of the ideas to start building this system, but now I'm basically stuck....
Some of the questions I have:
- Based on actual working configurations that some of you have tested, are there any specific requirements/models of phototransistor to use?
- Is there a way to figure out the meaning of the different option numbers associated with the AF LED setting in KAP_UAV script? Based on the preceding, what's the best option to use to get the most precise shutter pulse? I only found this link http://chdk.wikia.com/wiki/SX260 (LED addresses at the bottom of the page), but I'm clueless....
- Can the AF LED pulse duration be configured to be constant at each shutter event (say 300-500 ms)?

Let me know if further information is needed.
Thanks in advance for your support (and patience ;-).

Regards

Re: Canon SX260HS accurate geo-tagging
« Reply #1 on: 08 / January / 2017, 11:16:26 »
The issue I'm stuck with at the moment is with the LED-phototransistor implementation:
- when operated in ambient light, and obscuring it with the fingers , the phototransitor correctly changes state;
- when the phototransistor is placed on the camera AF LED it fails to detect the pulse most of the time (the phototransistor is masked with black tape);
So either the LED is not bright enough,  doesn't stay on long enough, or is at a frequency to which the phototransistor is not sensitive.  I wrote a simple little script to let you turn on each LED and leave it on : LEDtest.lua. You should be able to use it for some more detailed testing of what might be causing this.

Also, please post the complete circuit diagram of how the transistor is configured.

Quote
- AF LED: in KAP_UAV script the camera activates the LED choosing option # 1, 3, 5 (actually all the odd numbers up to 15 seem to work but with different behaviors);
That's an artifact of how the camera_set_led( ) function is implemented. Not every camera port is the same - it's just something we live with. Tell me more about what you mean by different behaviour.  On my G10 for example, I can vary the brightness of the focus assist LED by using a different number.

Quote
tested the LED either in burst mode or with 2 s intervalometer, and noticed that the LED pulse durations change.
Interesting - looking at the code I can see why.  However, it should not matter as the beginning of the shutter opening is when the LED turns on. That's where you want to sync your GPS signal. Turning off will happen somewhat later, after the shutter has closed.

Quote
Is there a way to figure out the meaning of the different option numbers associated with the AF LED setting in KAP_UAV script?
See my suggestion above.

Quote
Based on the preceding, what's the best option to use to get the most precise shutter pulse?
The start of the pulse is a precise as it's going to be.  And it doesn't change with an of the script options.

Quote
Can the AF LED pulse duration be configured to be constant at each shutter event (say 300-500 ms)?
Most probably, if that turns out to be the solution needed.

Ported :   A1200    SD940   G10    Powershot N    G16

Re: Canon SX260HS accurate geo-tagging
« Reply #2 on: 09 / January / 2017, 02:16:36 »
Hi Waterwingz, and thanks for the prompt and thorough reply.
I'm downloading your script and will test it as much as I can (hopefully I can figure it out...  ;-).
The phototransistor circuit is the simplest (maybe too simplistic?) implementation possible: attached an ugly hand-drawn sketch.
Unfortunately I do not have an oscilloscope (with proper sampling rate) at hand, but am using a cheap multi-meter; anyways, I noticed the phototransitor picks up the LED pulse when it's long enough (my estimate is 300-500 ms), and also the switching frequency doesn't seem to be a problem.
Will let you know further results later.
Thanks
Regards

Re: Canon SX260HS accurate geo-tagging
« Reply #3 on: 09 / January / 2017, 05:14:50 »
OK. I've tested the LEDtest script: activating options 1 to 15 always result in the same response - LED turns on at script start and always stay ON until script or camera is turned off; I did not notice any difference between the options.
Now, with the LED ON I get 3.2 V (I also have incresed the pull up resisotr from 10k to 14k); testing again the standard KAP_UAV script, when the LED pulse duration is 'long enough' (again, I'm estimating 300-500 ms) the phototransistor circuit picks it up (outputting 3.2 V).
One thing definitely needs attention is the physical positioning of the 'tiny' phototransistor over the LED: it needs to be perfectly over the LED spot, and also obscuring (sealing, I shall say) it with black tape or similar is important.
How hard would it be to implement LED constant and consistent pulse durations (say 300-500 ms)?
Thanks
Regards


Re: Canon SX260HS accurate geo-tagging
« Reply #4 on: 09 / January / 2017, 08:17:45 »
The phototransistor circuit is the simplest (maybe too simplistic?) implementation possible: attached an ugly hand-drawn sketch.
Hmmm.  You show an NPN transistor in a common collector configuration - I'm more use to seeing a common emitter. It will still switch but I need to think about how that affects the response time and off state voltage.

How hard would it be to implement LED constant and consistent pulse durations (say 300-500 ms)?
All simple changes always take way longer that I initially think.

To get started, try the attached script - it will blink your selected LED every two seconds for whatever duration and repeat rate you select in the script parameter.  (Remember that you can use the zoom level while entering numeric values to change between digits - saves a lot of up/down clicks that way).
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Canon SX260HS accurate geo-tagging
« Reply #5 on: 09 / January / 2017, 09:39:51 »
Hi. I did not think there would be a dramatic difference between a common collector and a common emitter configuration for this specific 'low end' application; the voltage goes from low (0 V) to high (3.2 V) instead of the opposite, but other things might change as well...

I tested the LED2 script: with a pulse duration of 200 ms and down to 1 s shot interval it probably works as needed; I say probably 'cause the pulses are properly detected, but I'm seeing a strange phenomenon: the voltage signal (measured with a gross voltmeter) has a 'periodic swing' - for 5 pulses it stays consistently at 3.2 V, then during the next 5 pulses decreases down to zero, where it stays for another 5 pulses, then it increases back to 3.2 V over 5 pulses, and it stays at 3.2 V for 5 pulses, then all over again...would this depend on the transistor saturation...?
Thanks

Canon SX260HS accurate geo-tagging
« Reply #6 on: 09 / January / 2017, 09:58:10 »
but I'm seeing a strange phenomenon: the voltage signal (measured with a gross voltmeter) has a 'periodic swing' - for 5 pulses it stays consistently at 3.2 V, then during the next 5 pulses decreases down to zero, where it stays for another 5 pulses, then it increases back to 3.2 V over 5 pulses, and it stays at 3.2 V for 5 pulses, then all over again...would this depend on the transistor saturation...?
Very strange.   

Is your meter digital or analog?  If digital it's possible you are running into some sampling frequency thing. 

Otherwise it might be a thermal issue if you are overdriving the phototransistor.

Does it still do it if you increase the pulse width to two seconds and the repeat rate to ten seconds?

Or maybe the camera LED brightness is changing? Are you using the focus assist LED? It's very bright so i am surprised that you are having issues with alignment.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Canon SX260HS accurate geo-tagging
« Reply #7 on: 09 / January / 2017, 15:36:53 »
Hi. It's a lousy&cheap digital multi-meter, so I would talk about 'sampling de-rate'...  ;-)

It appears to always some sort of weird response: with a pulse width of 300 ms and a repeat rate of 7 s, the voltage is 3.2 V for the first two pulses, the it drops down to 0.5 V for the third pulse, and then again two pulses at 3.2 V, etc.

I'm not sure what LED the camera is using: I always see the same green light, and intensity does not seem to change.

Thanks


Re: Canon SX260HS accurate geo-tagging
« Reply #8 on: 09 / January / 2017, 19:25:01 »
It appears to always some sort of weird response: with a pulse width of 300 ms and a repeat rate of 7 s, the voltage is 3.2 V for the first two pulses, the it drops down to 0.5 V for the third pulse, and then again two pulses at 3.2 V, etc.
We need to figure out what is happening here.  Simply increasing the pulse width in the kap_uav.lua script is not going to solve your problem based on what you are reporting here.  I'm at a loss about what to try next - there is not a lot that can go wrong with the system you have setup unless the flight controller I/O is interfering maybe?

Can I assume that your circuit is hooked to your flight controller when you are doing these tests as you are likely getting the 3.3V from the flight controller?  Can you disconnect the "signal" wire going back to the flight controller and see if that helps?  Also, verify that the 3.3V from the flight controller stays constant and is not changing.

Quote
I'm not sure what LED the camera is using: I always see the same green light, and intensity does not seem to change.
From what I can tell - there are two LED's on the SX260.  As small status LED on the back of the camera just above the DISP button,  and the focus assist LED on the front of the camera.   I was asking if you are using the focus assist LED on the front of the camera.
« Last Edit: 09 / January / 2017, 19:30:55 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Canon SX260HS accurate geo-tagging
« Reply #9 on: 10 / January / 2017, 02:47:25 »
Actually this is a stand-alone system not interfaced with the control system; the flight controller will only send the triggering pulses to the camera USB port (as of these tests, the camera is in intervalometer mode, so no fc interference at all). The phototransistor circuit is supplied by a 3.3 Vdc / 800 mA regulator (COM-00526), and the shutter signal lead (which will be connected to the GPS time mark pin) is now connected directly to the volt-meter. I checked the voltage at regulator output, and it's stable and constant at 3.3 V all the time. Agree, there's not much into this circuit; I was thinking maybe, due to really 'low-power' of this stuff, the multi-meter is introducing some sort of capacitive effect...?
I'm using the focus assist LED in the fron of the camera.
Thanks

 

Related Topics