chdk 1.1 + SX230HS shutdown problem - General Help and Assistance on using CHDK stable releases - CHDK Forum supplierdeeply

chdk 1.1 + SX230HS shutdown problem

  • 11 Replies
  • 5995 Views
chdk 1.1 + SX230HS shutdown problem
« on: 15 / October / 2012, 08:34:03 »
Advertisements
Hi.
I managed to get everything up and running, i even wrote a small script for remote control that works fine
but i do face a strange problem so i need your help and advice.
During remote control after a random number of commands the camera shuts down like i removed the battery.
The lens stays out and i have to press the power on button of the camera to revive it.
Also the green led light of the camera sometimes stays on some times it goes off also.
Anyway this happens always when the usb switch is activated in order to give a command never in idle.
I suspect 3 things:
a) bad camera battery
    The battery was fully charged prior to operation and the camera indicated 96% but maybe the battery
    cannot supply the current needed
b) chdk bug
c) bad script

Also the command    "get_zoom_steps x" is not recognized and i get an "uknown statement" (or command i don't remember) although this command is clearly described in the scripting manual.

Here is my script
@param z
@default z 16


while 1

   do
      a = get_usb_power
   until a>0

   if a <=5 then gosub "take_pic" else if a <=8 then gosub "zoom_in_a_bit" else if a <=11 then gosub "zoom_out_a_bit" else if a <=15 then gosub "zoom_out_full" else if a <=18 then gosub "zoom_in_full" else gosub "take_pic" endif

wend

end

:take_pic
   shoot
   return

:zoom_in_a_bit
   print "zoom in"
   if get_zoom <= 112 then set_zoom_rel z
   return

:zoom_out_a_bit
   print "zoom out"
   if get_zoom >= 16 then set_zoom_rel -z
   return

:zoom_out_full
   print "Full zoom out"
   set_zoom 0
   return

:zoom_in_full
   print "Full zoom in"
   set_zoom 128
   return


return

Chris
« Last Edit: 15 / October / 2012, 08:53:33 by hendrix »

Re: chdk 1.1 + SX230HS shutdown problem
« Reply #1 on: 15 / October / 2012, 09:33:13 »
I suspect 3 things:
a) bad camera battery
    The battery was fully charged prior to operation and the camera indicated 96% but maybe the battery
    cannot supply the current needed
b) chdk bug
c) bad script
Script looks okay and its probably not the battery.

If you take a look at this thread,  you will notice a similiar problem that was fixed for some cameras but not others.

http://chdk.setepontos.com/index.php?topic=7071.

There is a test script in the first post that you could try ( and several others posted through out the thread ).

p.s   This confused me at first until I realized you started this conversation in another thread ... no need to do that.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: chdk 1.1 + SX230HS shutdown problem
« Reply #2 on: 15 / October / 2012, 09:49:34 »
Hi.
Thank you very much for the info, i am searching also for more information.
Your answer implies that it is a CHDK bug, am i right?
Please let me know what i did wrong with the topics so i can avoid it it in the future.
I thought that since it was not my first post i should continue  here instead.
Chris

Re: chdk 1.1 + SX230HS shutdown problem
« Reply #3 on: 15 / October / 2012, 10:06:53 »
the command    "get_zoom_steps x" is not recognized and i get an "uknown statement" (or command i don't remember)

I do not use CHDK but maybe it does not support that form of the command.

Try :-

x = get_zoom_steps


David


Re: chdk 1.1 + SX230HS shutdown problem
« Reply #4 on: 15 / October / 2012, 10:23:27 »
Your answer implies that it is a CHDK bug, am i right?
It's possible that it's a bug.  Testing the scripts at the link I posted would help narrow that down. 

We could also try to get a dump log after it crashes : http://chdk.wikia.com/wiki/Debugging#Camera_crash_logs_.28romlog.29

Quote
Please let me know what i did wrong with the topics so i can avoid it it in the future.
I thought that since it was not my first post i should continue  here instead.
Not a big deal - when one is searching through the forum for something, its easier to find good information if people keep related things in the same thread.   It also makes it easier to answer question if you can see what has already been tried.


Ported :   A1200    SD940   G10    Powershot N    G16

Re: chdk 1.1 + SX230HS shutdown problem
« Reply #5 on: 15 / October / 2012, 10:29:09 »
Ok i got it.
Now about the recommendations i will write some scripts (set_aflock etc) to test tomorrow and report back.
I will also try the press button method instead of the set_zoom command also (sounds safer)
For now i will try the x=get_zoom_steps to see if the camera will accept it.
Chris

Re: chdk 1.1 + SX230HS shutdown problem
« Reply #6 on: 15 / October / 2012, 11:31:00 »
I performed some test and here is what i found.
The
press "zoom_in"
sleep 300
release "zoom_in
etc ....
works fine and extra smooth.
The set_zoom method also now works because i found that my camera (SX230HS)
has 126 zoom steps and with the set_zoom 128 statement i was overdriving it probably.
So far so good but tomorrow it will get tested thoroughly and i will know for sure.
What i did was to first get the zoom steps and then set the limits.
l = get_zoom_steps
print l " number of zoom steps"
z = l
z = z/6
.
.
.
.
set_zoom 0
.
.
set_zoom l
.
.
etc.

Chris

Re: chdk 1.1 + SX230HS shutdown problem
« Reply #7 on: 15 / October / 2012, 12:31:45 »
Just an update.
I can't make the camera shut down anymore  :) so i think it is working well now.
It looks like if i go above or below the zoom limits the camera stops working.
I also did some tests with other zoom steps that didn't exceed a zoom of 125 (max is 126) but i did encounter the shut down problem so i now have the feeling that the camera zoom step must divide exactly the
maximum zoom steps ( "get_zoom_steps" modulus "zoom_step" must equal 0  ) in order for the camera to work.
Chris


Re: chdk 1.1 + SX230HS shutdown problem
« Reply #8 on: 16 / October / 2012, 03:17:17 »
For anyone that has problems finding a suitable  SX230HS and compatible cameras usb cable
i found this:
https://www.sparkfun.com/products/9167
By removing the metal sleeve and a bit of filling it should work fine for creating a video splitter.
Chris
 
« Last Edit: 16 / October / 2012, 03:19:07 by hendrix »

Re: chdk 1.1 + SX230HS shutdown problem
« Reply #9 on: 17 / October / 2012, 12:44:53 »
Ok i made much progress today but three new questions came up.

1) What happens if i call "get_usb_power" first with no arguments and immediately call it again with the argument 3, does it still keep the number of pulses last detected or the first with no argument call erase all relevant data?

2) what is the maximum usb power pulse width that can be measured, 250ms (25) or more?

3) Someone told me that CHDK can measure analog voltages is it true? From where?

I am now at a point where everything works well just need some tweaking hence my questions.
Thank you again ALL for your time
Chris

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal