D20's, hall effect sensors and stereo-photography - page 2 - Hotwire! Hardware Mods, Accessories and Insights - CHDK Forum supplierdeeply

D20's, hall effect sensors and stereo-photography

  • 25 Replies
  • 15197 Views
*

Offline reyalp

  • ******
  • 14117
Re: D20's, hall effect sensors and stereo-photography
« Reply #10 on: 02 / January / 2014, 15:14:26 »
Advertisements
Would I be right in assuming this is just the fault of the OSD and not something more serious?
I wouldn't necessarily assume this, and it might vary by camera. From what I recall, it looked like D10 GetAdCh pretty much read the MMIO directly, while the older a540 might (likely similar to ixus65) did something more complicated.
Don't forget what the H stands for.

Re: D20's, hall effect sensors and stereo-photography
« Reply #11 on: 05 / January / 2014, 12:32:58 »
Well I've done another delay test now that I've found out that the sync option actually did something :)



No it's not a UFO sighting, it's an average of 300 photos taken of the oscilloscope screen. Each division represents 0.1ms (scope set to 5ms per division (5 mini-divisions per larger division) and 10x magnification on). Test was conducted like last time, but with a 555 oscillator controlling the trigger to prevent switch bounce and so I didn't have to sit there doing it manually. Images have been overlayed with Gimp's additive mode, so the brightness should be a linear representation of how often each delay time occurred.

It would seem most of the photos have a sync better than 0.5ms. But then there's the faint representation of a significant number of photos taken about 1.5ms too late, any idea of what could be causing that to happen occasionally?

I tried using the sync option with GetAdChValue, but unfortunately as soon as the trigger is activated, the camera seems to freeze up, wait about 10 seconds (same each time), and then take a photo photo regardless of what I do with the trigger.

Tomorrow I'll probably do this test again to compare it with the standard USB remote input, probably on a few other cameras aswell.

Re: D20's, hall effect sensors and stereo-photography
« Reply #12 on: 05 / January / 2014, 12:43:53 »
No it's not a UFO sighting, it's an average of 300 photos taken of the oscilloscope screen. Each division represents 0.1ms (scope set to 5ms per division (5 mini-divisions per larger division) and 10x magnification on). Test was conducted like last time, but with a 555 oscillator controlling the trigger to prevent switch bounce and so I didn't have to sit there doing it manually. Images have been overlayed with Gimp's additive mode, so the brightness should be a linear representation of how often each delay time occurred.
Very nice!

Quote
It would seem most of the photos have a sync better than 0.5ms. But then there's the faint representation of a significant number of photos taken about 1.5ms too late, any idea of what could be causing that to happen occasionally?
If the camera gets a vsync interrupt after the USB remote signal goes to 0V and before the shutter is actually released you will get an extended interval just like what you are seeing.   The delay is much worse on most newer cameras.

Quote
I tried using the sync option with GetAdChValue, but unfortunately as soon as the trigger is activated, the camera seems to freeze up, wait about 10 seconds (same each time), and then take a photo photo regardless of what I do with the trigger.
Can you tell me more about how you to implement this? Modified source code or CHDK script?  The 10 sec timeout usually means the USB remote code is waiting at _wait_until_remote_button_is_released() for the USB signal to go to 0V.  If it waits too long, then it times out.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: D20's, hall effect sensors and stereo-photography
« Reply #13 on: 08 / January / 2014, 04:14:35 »
Quote
Quote
I tried using the sync option with GetAdChValue, but unfortunately as soon as the trigger is activated, the camera seems to freeze up, wait about 10 seconds (same each time), and then take a photo photo regardless of what I do with the trigger.
Can you tell me more about how you to implement this? Modified source code or CHDK script?  The 10 sec timeout usually means the USB remote code is waiting at _wait_until_remote_button_is_released() for the USB signal to go to 0V.  If it waits too long, then it times out.

Well it's working now, the problem was I had   do { }  while( (GetAdChValue(5)) ...     instead of   do { }  while( (GetAdChValue(5) < 555) ...    a careless mistake that only manifested itself when using the sync option.


Did some sync tests on the D20, and I'm having some problems unfortunately. Without sync, everything functions as expected, and there's about at least 20ms of uncertainty in the delay times. However, when using sync, there's also at least 20ms of uncertainty aswell. The delay time is shortened considerably, and the screen goes dark, so I'm pretty sure the sync is properly enabled, but it's not working properly for some reason. Also tested with the IXUS 65 straight after and it appeared properly synced, so I don't think it's a problem with the test rig.

Here is the code I put in the usb_remote.c file:
Code: [Select]
if ( conf.remote_input == 0 )
{
remote_key = get_usb_bit() ;
}
if ( conf.remote_input == 1 )
{
if (*(short*)0xc090004a < 555)
{
remote_key = 1 ;
}
else
{
remote_key = 0 ;
}
}
if ( conf.remote_input == 2 )
{
if (GetAdChValue(5) < 555)
{
remote_key = 1 ;
}
else
{
remote_key = 0 ;
}
}
   
and

      
Code: [Select]
if ( conf.remote_input == 0 )
{
do { }  while( get_usb_bit() &&  ((int)get_tick_count()-tick < DELAY_TIMEOUT));
}
if ( conf.remote_input == 1 )
{
do { }  while( (*(short*)0xc090004a < 555) &&  ((int)get_tick_count()-tick < DELAY_TIMEOUT));
}
if ( conf.remote_input == 2 )
{
do { }  while( (GetAdChValue(5) < 555) &&  ((int)get_tick_count()-tick < DELAY_TIMEOUT));
}

I have also turned off pretty much every option that can be disabled in the Canon menu, and it's set to manual focus. Interestingly, the delay time seems to vary predictably each time. It starts off at about 50ms, then works it's way down to about 25ms in about 6 to 10 steps, before jumping back to around 50ms and repeating the cycle.
Any idea of why all this may be happening?


Re: D20's, hall effect sensors and stereo-photography
« Reply #14 on: 08 / January / 2014, 09:27:21 »
Did some sync tests on the D20, and I'm having some problems unfortunately. Without sync, everything functions as expected, and there's about at least 20ms of uncertainty in the delay times. However, when using sync, there's also at least 20ms of uncertainty aswell.
Do does this occur when testing with   conf.remote_input == 0   instead of   conf.remote_input == 1 ? (i.e. using regular USB remote sync)

If so, you probably need to try the new USB precision sync code now included in the 1.3.0 trunk.

Quote
The delay time is shortened considerably, and the screen goes dark, so I'm pretty sure the sync is properly enabled, but it's not working properly for some reason.
As you surmised, that's exactly what you should be seeing.

Quote
I have also turned off pretty much every option that can be disabled in the Canon menu, and it's set to manual focus.
Focus and exposure setting will be complete prior to getting to the sync code so this really doesn't matter.

Quote
Interestingly, the delay time seems to vary predictably each time. It starts off at about 50ms, then works it's way down to about 25ms in about 6 to 10 steps, before jumping back to around 50ms and repeating the cycle.
Very interesting but I have no idea what it's trying to tell us.  Unless your 555 timer is close to some integer divisor of the vsync frequency and what you are seeing is the drift cause by not being exactly locked?
Ported :   A1200    SD940   G10    Powershot N    G16

Re: D20's, hall effect sensors and stereo-photography
« Reply #15 on: 08 / January / 2014, 12:22:41 »
Quote
Do does this occur when testing with   conf.remote_input == 0   instead of   conf.remote_input == 1 ? (i.e. using regular USB remote sync)

If so, you probably need to try the new USB precision sync code now included in the 1.3.0 trunk.

I have just tested it with the regular USB remote connected to the 555, and I get the same problem. Unfortunantly I am already using the 1.3.0 source.


Quote
Interestingly, the delay time seems to vary predictably each time. It starts off at about 50ms, then works it's way down to about 25ms in about 6 to 10 steps, before jumping back to around 50ms and repeating the cycle.
Quote
Very interesting but I have no idea what it's trying to tell us.  Unless your 555 timer is close to some integer divisor of the vsync frequency and what you are seeing is the drift cause by not being exactly locked?

Yeah that would make sense; it didn't always do that and sometimes did the reverse aswell. Is there anyway to disable vsync?

I have attached the modified usb_remote.c file. Am I working with the latest one (I'm pretty sure I am)? Is it possible that I have messed something important up by modifing it?

Re: D20's, hall effect sensors and stereo-photography
« Reply #16 on: 08 / January / 2014, 14:08:09 »
Is it possible that I have messed something important up by modifing it?
You probably want to read through this thread - http://chdk.setepontos.com/index.php?topic=8312  It starts to get interesting about half way through.  The code discussed there is now in 1.3.0 but its not enable by default except for the A1200,
« Last Edit: 08 / January / 2014, 14:16:30 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Re: D20's, hall effect sensors and stereo-photography
« Reply #17 on: 10 / January / 2014, 06:37:01 »
Quote
You probably want to read through this thread - http://chdk.setepontos.com/index.php?topic=8312  It starts to get interesting about half way through.  The code discussed there is now in 1.3.0 but its not enable by default except for the A1200,

Awesome! I added the extra code to usb_remote.c (wasn't in there before for some reason) and I'm now getting an average sync of 0.1ms! The largest sync error over about 80 photos was only 0.3ms, and it worked every time.

I haven't put the images together like before; there's not really much point as the length of the beam was about 0.4ms on the screen, (and it's position only varied about 0.3ms), not sure if this is a limit with the phosphor's response time or the shutter-speed of the camera, but anyway the sync is good enough and reliable enough for pretty much any application I can think of.

Well now I guess I need to finish the remote and build the mounting hardware. I plan on using an attiny for the remote, along with quite a few buttons and controls. I'm thinking that since the live-preview disappears when using sync, I will probably make it just halfpress to get the focus and ev set, then when fullpressed, it starts the sync sequence and takes the photo about 200ms later (done with the microcontroller of course).


Re: D20's, hall effect sensors and stereo-photography
« Reply #18 on: 10 / January / 2014, 07:29:47 »
I'm thinking that since the live-preview disappears when using sync, I will probably make it just halfpress to get the focus and ev set, then when fullpressed, it starts the sync sequence and takes the photo about 200ms later (done with the microcontroller of course).
You can certainly do that in a CHDK script or by changing the CHDK code. As an FYI, if you were using a conventional USB remote,  that's what the TwoPush switch setting does for you.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: D20's, hall effect sensors and stereo-photography
« Reply #19 on: 13 / January / 2014, 17:10:52 »
Sorry guys, but since I am preparing my 50 camera rig to shoot synchroniously while amintaining the usb PTP connection theis thread is - or better seems - very interesting to me. It "seems" because one one hand it looks like the is some success by using a method i do not unsterstand at all and on the other hand because waterwingz told me that this might be of interest for me.

Would some here please describe what happens here with word sa non electrician is able to understand? What I think I unterstood is this: the hall-effect-sensor itself is used to make a sync signal pass a waterproof case, right? But why is it connected to the sd-card? To power it only or is the sync signal fed into the camera this way? Thanks a lot for helping someone at a completely lower level! :-)

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal