CHDK Forum

Using CHDK => Creative Uses of CHDK => Topic started by: fbonomi on 02 / January / 2009, 20:40:41

Title: CHDK in the stratosphere
Post by: fbonomi on 02 / January / 2009, 20:40:41
Title: Re: CHDK in the stratosphere
Post by: fe50 on 02 / January / 2009, 21:37:04
WOW - amazing !
This is the 2nd CHDK that worked above ~ 33 km ! (as the HAPS-1 Pegasus HAB Project, A550 - Script both stills and video? (http://chdk.setepontos.com/index.php/topic,1862.msg20630.html#msg20630)).
Since these images are top class, the panorama will be bombastic, i'm sure...WOW !
Title: Re: CHDK in the stratosphere
Post by: Old Farseeing Art on 02 / January / 2009, 22:03:00
Outstanding!!!

I took my SD1100 up to a tiny 500 feet (about 1/2% of your mission) today.  I was feeling quite sassy until I saw your photos.   I used a glider and it is not likely to get over 1000 feet.   

Down in Florida, hey?  It would be TRULY outstanding to be up there during a shuttle launch and get photos of that.

I'm looking forward to seeing your script if possible.  Being a newby, I could learn a lot from it. 

Great job!!!
Title: Re: CHDK in the stratosphere
Post by: reyalp on 02 / January / 2009, 22:24:58
Awesome pics, great work :D
Title: Re: CHDK in the stratosphere
Post by: pepeloloz on 03 / January / 2009, 01:06:21
Outstanding
Title: Re: CHDK in the stratosphere
Post by: Microfunguy on 03 / January / 2009, 05:47:26
Very, very interesting !

Great to see a practical use of sensor temperature and ISO override.

I am almost tempted to add to SDM   :)
Title: Re: CHDK in the stratosphere
Post by: fudgey on 03 / January / 2009, 07:04:42
Title: Re: CHDK in the stratosphere
Post by: yvesson on 03 / January / 2009, 07:55:48
Title: Re: CHDK in the stratosphere
Post by: dcshrum on 03 / January / 2009, 08:09:18
maybe there's even other things in the rig keeping the camera warm? And it's so much colder that one just can't expect extrapolate linearly that far with confidence.

There is.   If you look here http://dcshrum.ais.fsu.edu/images/IMG_0022.jpg you can see we have a voltage regulator attached to a heat sync.  That was a result of having a 14 volt li-poly battery and a 12 volt motherboard.  The heat sync does get pretty hot.  I never measured it but I'd say after an hour you do not want to touch it.

Curious, has anyone ever wired an external battery?  It would be more efficient to use a voltage regulator off the larger battery.  Actually now that I think about it you could just wire a 5 volt regulator to the USB cable.  But then you would not be able to send signals to the camera.  I believe the camera will run off just USB power. 
Title: Re: CHDK in the stratosphere
Post by: fe50 on 03 / January / 2009, 08:10:11
Title: Re: CHDK in the stratosphere
Post by: fudgey on 03 / January / 2009, 09:05:11
I believe the camera will run off just USB power. 

It's highly likely that it will not work from USB power without exceeding the 500 mA USB spec, not even if you step down to whatever your battery voltage is using a high-efficiency switching regulator. Even if you never use zoom or flash during your flights, you'll have a hard time starting up the camera and shutting it down safely before landing because the lens motors require lots of current.
Title: Re: CHDK in the stratosphere
Post by: fbonomi on 03 / January / 2009, 09:27:11
I don't think the camera runs at all from the USB power.

Other cameras (such as the a570) have an external supply jack that could be used. I used it with a wall adaptor or with a motorbike battery for ver long timlapses...

Anyway, we must consider that we are using the USB 5v line as a "data" line to signal to the camera, so we couldn't anyway turn it off without turning off the whole system :-)
Title: Re: CHDK in the stratosphere
Post by: cybercom on 03 / January / 2009, 09:38:21
maybe there's even other things in the rig keeping the camera warm? And it's so much colder that one just can't expect extrapolate linearly that far with confidence.

There is.   If you look here http://dcshrum.ais.fsu.edu/images/IMG_0022.jpg you can see we have a voltage regulator attached to a heat sync.  That was a result of having a 14 volt li-poly battery and a 12 volt motherboard.  The heat sync does get pretty hot.  I never measured it but I'd say after an hour you do not want to touch it.

Curious, has anyone ever wired an external battery?  It would be more efficient to use a voltage regulator off the larger battery.  Actually now that I think about it you could just wire a 5 volt regulator to the USB cable.  But then you would not be able to send signals to the camera.  I believe the camera will run off just USB power. 

I used the AC Adapter Kit ACK-DC10 (same for my TX-1s as your SD1100). Cut the cable from the Vdc output side of the adapter, attached connectors and used larger capacity batteries.

Used something like this I found at Radio Shack:

Horizon Hobby: Connector Set 7.2V by Tamiya America, Inc (TAM50106) (http://www.horizonhobby.com/Products/Default.aspx?ProdID=TAM50106)

By putting matching connectors on the ac adapter as well, I can either use power off the wall or larger battery packs depending on the situation.

And, BTW, Great Pix!!!

HTH,
Title: Re: CHDK in the stratosphere
Post by: fudgey on 03 / January / 2009, 10:13:32
Title: Re: CHDK in the stratosphere
Post by: Microfunguy on 03 / January / 2009, 10:36:19
I believe the camera will run off just USB power. 

The USB V+ signal is not power, it is a logic signal that turns-on some transistors.
The output from the transistors goes to the DIGIC processor.

The USB signal can be very low power, far lower than some of the USB remote switch circuits pblished.
Title: Re: CHDK in the stratosphere
Post by: dcshrum on 03 / January / 2009, 11:09:36
Ahhhh...  I see.  But the output off the adapter is 7.2 volts?  I would have guessed 3.7 volts as the battery is a single cell lithium. 

That would actually work spot on if its 7.2 volts because the radio is 7.2 volts as well.

I was planning on getting one of these: Adjustable step down switching voltage regulator (http://www.dimensionengineering.com/DE-SWADJ.htm)

Francesco,

When the camera shut off was it due to the battery temperature or a result of the temperature of the CCD?  I'd guess the chemical reaction in the battery sort of slows or stops at very cold temperatures.  With a 14 volt battery, even with a good voltage drop you'd still be able to produce the 7.2 volts required.  It would be reasonably easy to wire up.
Title: Re: CHDK in the stratosphere
Post by: Microfunguy on 03 / January / 2009, 11:38:36
  But the output off the adapter is 7.2 volts? 

He does not say that.

That is how the connectors are described but that must be a standard for RC model cars.

You can use the connectors on lower and far higher voltages than 7.2V.

If your heatsink is getting that hot you are wasting a lot of energy.
Of course, it helps keep the equipment warm.
If cold was not a problem. I would use the far more efficient commercial switching regulators.
In fact, despite the low value of the GBP against the USD, I intend  buying one from the US.
Title: Re: CHDK in the stratosphere
Post by: fbonomi on 03 / January / 2009, 19:19:46
I have posted here: Temperature as measured by the camera (http://icbnn.wordpress.com/2009/01/04/temperature-as-measured-by-the-camera/) an article about the camera's temperature and voltage data that were logged during the flight.

They are rather interesting, I think..
Title: Re: CHDK in the stratosphere
Post by: reyalp on 03 / January / 2009, 19:36:15
Title: Re: CHDK in the stratosphere
Post by: PhyrePhoX on 05 / January / 2009, 13:29:14
impressive, chdk in space again. we should consider creating a wiki page about things that CHDK can do that are completely unique in the world of photography (for example the temperature stuff) or at least in the world of the "cheap photography" :D
Title: Re: CHDK in the stratosphere
Post by: Old Farseeing Art on 06 / January / 2009, 13:10:19
To the op (fbonomi): you mentioned taking 100 meterings, discarding some and averaging the rest. 

I have been shooting from a glider and usually half or more of the shots are blurry from motion blur.  Yesterday I tried to set the camera at a fixed 1/1000 second shutter speed (this worked) but the exposures are too dark. 

I need to learn how to compensate the shorter shutter speed by what? aperture control? ISO control? other?  Can the camera do this automatically or do I need to set it in my script?  Still a newby here...

If you can show the portion of your script that controls exposure, it might be very useful for me to learn how to do that.  Thanks!!!
Title: Re: CHDK in the stratosphere
Post by: fbonomi on 06 / January / 2009, 13:34:49
I need to learn how to compensate the shorter shutter speed by what? aperture control? ISO control? other? 

It depends on the camera you have.

On many cameras setting the camera to "Tv mode" (aka shutter priority) would be fine.

The problem is, the SD1100 does NOT have Tv mode, and has a fixed aperture (no iris).
To make things worst, the camera has a ND filter (a grey filter) that is activated when there's a lot of light, so in very bright scenes (like probably shooting from a glider) the exposure gets again longer

Quote
Can the camera do this automatically or do I need to set it in my script?  Still a newby here...

no, the camera won't do it automatically.

What I did is

1) block the ND filter to "Out" (via CHDK "Extra photo operations" menu)
2) at this point the filter always stays out, therefore at high luminosty the camera thinks to shoot with a filter, shoots without fitler and over-exposes.
3) my code then starts with a "target" shutter time (for example, 1/1000)
4) measures scene luminosity
5) adjusts the ISO up/down (as I said, we can't adjust aperture) to get a "good" exposure with the measured luminosity and the given exposure
6) check that ISO stays in a specified range, (i.e. not too high or too low) and in case adjusts the shutter time back

The disadvantage of this approach is that a rather long time passes between metering and shooting so in the meanwhile the camera might move and point at a darker/lighter area.

Anyway, the 100-metering part is probably not needed in your case, as the glider will fly a bit smoother than the balloon (i.e. not too many up-down swings)

I am enclosing the relevant parts of code for you to study.
Title: PARTS OF CODE:
Post by: fbonomi on 06 / January / 2009, 13:50:16
These are the bits that might be of use for your application

Warning: SD1100 specific!!!

This function meters the brightness
Code: [Select]
-- read curent bv from scene
function read_bv96()
 press("shoot_half")
 while get_prop(115)==0 do
  sleep(100)
 end
 bv=get_bv96()
 release("shoot_half")
 return bv
end


This is the function that actually does the shooting:

Code: [Select]
-- Fast TV shooting

-- Fast Tv mode is defined as a Tv mode where
-- we try to attain a VERY fast shutter time (like 1/5000")
-- by increasing ISO
-- There is anyway a maximum value for ISO

function fast_tv_shoot(bv, fast_tv, max_sv, offset)
-- bv is the brightness we suppose have in the scene
-- if bv=-1 this means we will have to meter ourselves
-- fast_tv is the shutter time we would like to attain
-- max_sv is the maximun sensibility we find acceptable
-- offset is a fine-tuning for very fast exposures

-- Possibile values for fast_tv
-- 1245 = 1/8000
-- 1149 = 1/4000
-- 1053 = 1/2000
--  957 = 1/1000
--  861 =  1/500
--  765 =  1/250

-- Possible values of max_sv
-- 320 = ISO   50
-- 388 = ISO   80
-- 418 = ISO  100
-- 514 = ISO  200
-- 611 = ISO  400
-- 707 = ISO  800
-- 803 = ISO 1600

-- Ixus 80 has fixed aperture
av = 285 + offset

dbg("FAST TV")
dbg("bv " .. bv)

if bv==-1 then
 bv=read_bv96()
 dbg("metered bv " .. bv)
 -- offset measured brightness
end

--if we shoot at fast_tv,
tv=fast_tv
-- resulting sv would be
sv = av + fast_tv - bv

dbg("tv " .. tv)
dbg("sv " .. sv)

-- let's check if it's not too high
if sv>max_sv then
 -- how much must we reduce sv?
 reduce = sv-max_sv
 -- same reduction must be added to tv
 tv=tv-reduce
 sv=max_sv
 dbg("Reduced: ")
 dbg("tv " .. tv)
 dbg("sv " .. sv)
end

-- it might also happen than sv goes too low
-- arbitrary limit of 322 sv (abt ISO 50)
if sv<322 then
 reduce = sv-322
 tv=tv-reduce
 sv=322
 dbg("INCREASED: ")
 dbg("tv " .. tv)
 dbg("sv " .. sv)
end


-- at last moment, set our parameters


-- set shutter time
set_tv96_direct(tv)
sleep(100)

-- set ISO
set_sv96(sv)
sleep(100)

shoot()

writelog("FTV", "Shoot " .. get_exp_count() .. " ".. bv .. " " .. tv .. " " .. sv .. " " .. av)

repeat
 sleep(100)
until get_prop(206)==0

end


Auxiliary functions for debugging and logging:
(if unneeded, remove calls to these functions from fast_tv_shoot)

Code: [Select]
function timestamp()
 h=get_time("h")
 m=get_time("m")
 s=get_time("s")
 return ( h .. ":" .. m .. ":" .. s)
end

function dbg(msg)
 -- uncomment for extra info il log file
 --print(msg)
end

function writelog(prefix, msg)
 ts=timestamp()
 print('###' .. prefix .. ' ' .. ts .. ' '  .. ' ' .. msg)
end


The "offset" parameter is a way to try and calibrate for some errors in exposure (I guess the Sd1100 is somehow not really linear in fast exposures)

I suggest you call the function like this:

Code: [Select]
  -- min shutter 1/1000, max iso 100
  fast_tv_shoot(-1, 957, 418, 24)

or

Code: [Select]
-- min shutter 1/2000, max iso 200
  fast_tv_shoot(-1, 1053, 514, 32)

At faster speeds, a new "offset" value (the last parameter) should be re-calibrated by trial and error.
that's probably useless, as 1/2000 is anyway quite fast.
Title: Re: CHDK in the stratosphere
Post by: Old Farseeing Art on 06 / January / 2009, 14:04:15
Wow! Thank you!!!

I am also using the SD1100 so this will be directly applicable.  I wondered about the nd filter and no real iris... you have given me a great start. 

Thanks again for sharing!!
Title: Re: CHDK in the stratosphere
Post by: kosmonut on 23 / January / 2009, 15:24:05
Wow, fbonomi, both the pics and your work are very impressive!
Title: Re: CHDK in the stratosphere
Post by: fbonomi on 23 / January / 2009, 15:56:16
thanks!
Yes, it was a real fun project
Title: Re: CHDK in the stratosphere
Post by: Old Farseeing Art on 01 / June / 2009, 23:59:38
Just another data point on the path...

I used fbonomi's code in my SD1100 IS quite successfully.  Up to the point where I stopped doing aerial photography and tried under the sea pictures...  My new camera is a SD990 IS.  I couldn't resist the FIFTEEN MEGAPIXELS... sorry for shouting.

Anyway, I transferred the old scripts to the cards prepped for the SD990 and bingo! they worked fine.  So far, no changes necessary.  I'm still trying to sort things out as far as the various shooting modes and such are concerned.  The '990 has quite a bit more options to think about.

I just did one flight yesterday and all went well.  I have lots of work ahead in the way of experiments to see what I can do.

Thanks again, fbonomi!
Title: Re: CHDK in the stratosphere
Post by: fbonomi on 02 / June / 2009, 03:09:20
@Old Farseeing Art: Thanks for keeping us updated!

I am very curious about this project...
do you mean, "unmanned" underwater photography or just "normal" underwater photography?
By "flight", do you mean "dive"?
How did you organize the thing?

I am glad that the scripts worked on the SD990... I think this was just because you happen to use only the most compatible part...

On my side, I am planning to to another balloon launch here in Italy for june 13th if the weather is ok.
I will update this thread if it's a go.
Title: Re: CHDK in the stratosphere
Post by: Old Farseeing Art on 02 / June / 2009, 10:30:09
Quote
do you mean, "unmanned" underwater photography or just "normal" underwater photography?

Sorry, I should have been more plain.  I was flying over the ocean at sunset getting some very nice shots of surfers backlit by the setting sun.  Flying low to get a good silhouette, I did something wrong and landed in the water.  The plane floated (it's closed cell polypropylene) but the camera was immersed and thus destroyed.  So I wasn't intentionally trying undersea photography, it just worked out that way. :haha

Just for fun, I disassembled the camera.  There's a photo of the SD1100 here:
http://transfer-orbit.posterous.com/ (http://transfer-orbit.posterous.com/)





Title: Re: CHDK in the stratosphere
Post by: fbonomi on 02 / June / 2009, 15:08:19
aww.... the poor camera!
That camera has made some really nice photos... the one with the sharks is one of my favoutire ones!