Camera Project Help
UDC
Posts: 11
Hello,
I am modifying a digital camera (Minolta DiMage A2) to take time series photos on the ocean
floor. It will be taking a picture every 4 - 8 hours for a period of 4 months. The timing is variable,
based on the Microdrive size, 4GB=8hrs, 6GB=6hrs and hopefully soon 8GB=4hrs. I am using
a BASIC Stamp 2 and a Pocket Watch B. The Stamp is powering 2 ea 2N2222's, which power
2 ea., 9 vdc relays. 1 relay turns the camera on, 30 second delay for warm up, 2nd relay operates
the shutter, 20 second delay for file writing and then power down the camera and wait for the next
shot. I had a little trouble, possibly with the timing of the astable, in that it would fire twice before
shut down, I think I have solved it, but may be a kludge. Anyway, here are my questions:
1) What are others experiences with the Pocket Watch, how accurate/reliable?
2) Are there better timing devices for the Stamp (DS1302?)?
3) I don't see the Stamps current drop as much as expected during SLEEP, is it my program?
Run=0.49mA, Relay1=7.3mA, Relay2=7.7mA, Sleep=0.39mA
4)I tried working this same circuit using a DG441 CMOS Switch instead of relays, but they never shut off,
any ideas why?
5) Though it's alot to ask, could I get some pointers on programming? Timing is an important aspect, but
as much or more so is power draw, 4 months stand-alone ...
Program attched.
Many Thanks in advance.
Jonathan
I am modifying a digital camera (Minolta DiMage A2) to take time series photos on the ocean
floor. It will be taking a picture every 4 - 8 hours for a period of 4 months. The timing is variable,
based on the Microdrive size, 4GB=8hrs, 6GB=6hrs and hopefully soon 8GB=4hrs. I am using
a BASIC Stamp 2 and a Pocket Watch B. The Stamp is powering 2 ea 2N2222's, which power
2 ea., 9 vdc relays. 1 relay turns the camera on, 30 second delay for warm up, 2nd relay operates
the shutter, 20 second delay for file writing and then power down the camera and wait for the next
shot. I had a little trouble, possibly with the timing of the astable, in that it would fire twice before
shut down, I think I have solved it, but may be a kludge. Anyway, here are my questions:
1) What are others experiences with the Pocket Watch, how accurate/reliable?
2) Are there better timing devices for the Stamp (DS1302?)?
3) I don't see the Stamps current drop as much as expected during SLEEP, is it my program?
Run=0.49mA, Relay1=7.3mA, Relay2=7.7mA, Sleep=0.39mA
4)I tried working this same circuit using a DG441 CMOS Switch instead of relays, but they never shut off,
any ideas why?
5) Though it's alot to ask, could I get some pointers on programming? Timing is an important aspect, but
as much or more so is power draw, 4 months stand-alone ...
Program attched.
Many Thanks in advance.
Jonathan
Comments
The docs state the accuracy is better·than ±304 sec/year
2) Are there better timing devices for the Stamp (DS1302?)?
Yes, but is a deviation of ±101 seconds per deployment not good enough?
3) I don't see the Stamps current drop as much as expected during SLEEP, is it my program?
Run=0.49mA, Relay1=7.3mA, Relay2=7.7mA, Sleep=0.39mA
Be sure to set unused pins as input, you may also want to configure all pins as input during sleep, then switch them back when you wake up.
4)I tried working this same circuit using a DG441 CMOS Switch instead of relays, but they never shut off, any ideas why?
did you include a strap resistor (resistor ~10K tieing the gate to ground)? If you didn't you could have injected charge into the gate of the switch that kept it activated
5) Though it's alot to ask, could I get some pointers on programming? Timing is an important aspect, but as much or more so is power draw, 4 months stand-alone ...
Ill leave this to others who have more knowledge of power saving techiques in stamps.
>The docs state the accuracy is better·than ±304 sec/year
Was wondering more along the lines of real world vs doc
>>2) Are there better timing devices for the Stamp (DS1302?)?
>Yes, but is a deviation of ±101 seconds per deployment not good enough?
It seems like the Stamps Sleep is using an internal clock, my fear is that as I boost the
sleep count to save power the PW may lose time and the two cancel each other out
2 months down the road.
>>3) I don't see the Stamps current drop as much as expected during SLEEP, is it my program? Run=0.49mA, Relay1=7.3mA, Relay2=7.7mA, Sleep=0.39mA
>Be sure to set unused pins as input, you may also want to configure all pins as input during >sleep, then switch them back when you wake up. Also strap unused inputs.
Thanks, not a huge saving (0.05mA) but every drop counts
>>4)I tried working this same circuit using a DG441 CMOS Switch instead of relays, but they >>never shut off, any ideas why?
>did you include a strap resistor (resistor ~10K tieing the gate to ground)?
Yes, and just played with it again, to no avail. Think the BS2 just doesn't like·it. I'll try again
later, the relays work and I'm getting close to launch.
Much appreciate the help. Guess the programmers felt I was beyond help ... ;-)
So that I may gain a little better understanding of your circuit, let me rephrase it as I understand it, and confirm I understand correctly.
You have a camera deployed underwater for 4 months at a time, at periodic intervals a picture is taken, this interval is critical and must be precise.
You are correct that there is some difficulty getting a precise sleep interval since SLEEP uses the internal clock reference. My suggestion is to use the long astable alarm feature of the Pocket Watch. Upon powerup the Pocket Watch will not have its alarm activated, thus the alarm level will be logic low, feed this through an inverter then into the reset pin of the Basic stamp. This means the reset pin will be high whenever the alarm is not activated and the stamp will be in full power mode, set the DURATION to one minute and the PERIOD to 4 (8) hours. The stamp will take the picture then execute END, which is like SLEEP but never wakes up on it own. After 4 hours the stamp will be placed into a state of reset for 1 minute then woken back up, take your picture then END. This way your sleep cycles will be 4 (8) hours and 1 minute long according to the time as computed by the Pocket Watch. There are some other ways to configure this if you must be exactly 4 (8) hours.
Post Edited (Paul Baker) : 4/20/2005 7:05:19 PM GMT
Using the reset pin is a great idea! Some point in the future I may work out using an event sensed on another instrument to trigger the camera ... ah the future.
Thanks for the insights and I'll try and get a postable circuit made up.
Cheers
Is there a way to combine the programs, so that after the Timer part runs once and starts the Pocket Watch, it then deletes itself and all that's left is the Camera Control part? That way I could load the program, shut down power, button everything up and mount on the platform, then at the appropriate time apply power and it starts and runs ....
Any help greatly appreciated.
BTW you chose a nice camera, I have the A1 and love it (except I cant figure out how to take macro mode pictures which are in focus).
Please define "bottom of the ocean" in terms of feet, meters, leagues, or miles, and also where you are located. It's only inches deep in some places, and miles in others. Where you are also makes a difference in the ocean temperatures. The temperatures within the Altantic Gulf stream can be at least 10-15 degrees warmer than waters imediately surrounding it. I'm sure other areas may have higher localized temperature differentials than that.
Regards,
Bruce Bates
Without getting into the different temperatures ranging across the entire bodies of water on the planet ...;-)
The areas·I am most interested in are coastal, max depth as rated by the current "can" I am using is 100 meters. I work for the U.S. Geological Survey and the majority of our work is the coastal waters of the mainland US, meaning temperate waters. I would hazard that almost all of my work will be warmer than the -10 C the PocketWatch is rated for.
Version 2 of the camera system will be coming out of the water at the end of Sept. Version 1 using a Tattletale 4 came out in May and did not fair too well. Had some minor leakage, but seems like enough to cause problems with the electronics. It worked, per se, but not as planned. Timing and number of shots were off. Though it did take pictures and that's a plus. For other reasons we had to dive on the site and took a look at this one and did not see any water in the housing ... Yahoo!
Will post comments and pictures if Sept is a success, comments only if not ... ;-)
Cheers, Jonathan
Your request still lacks some specificity, but in spite of that, you may find the following NOAA tables helpful. These are unfortunately monthly surface temperates, by month, for all the coastal regions of the United States. I suspect at depth temperatures can probably be extrapolated from that. Here is the link to the NOAA data:
··· http://www.nodc.noaa.gov/dsdt/cwtg/
In investigating the data they're offing there, it's measured only at a 4 foot depth which is certainly less than optimal for your purposes. Additionally, that is apparently fairly raw data which hasn't been checked for errors.
Here is a NOAA world ocean temperatures link which may be more appropriate if you zoom in on the area you're interested in. It should give you better at depth temperatures:
··· http://www.nodc.noaa.gov/OC5/indprod.html
I hope that is helpful.
Regards,
Bruce Bates
Post Edited (Bruce Bates) : 8/28/2005 3:51:55 PM GMT
For you, I went and checked our records. The lowest temperature I have for this site at a depth of 104 feet
is 3.467 degrees C. Still far above the - 10 C listed as the PocketWatch's lowest operating temp. Bottom of the ocean is relatively constant (and yes there are extremes and I don't plan to put down on a black smoker!). My read is that bottom temp will not be a major factor in reliablity of the Stamp and PocketWatch, although I do agree that it is a factor as well as with the batteries and should be considered.
Jonathan
If you are concerned with accuracy of timing, consider the Dallas DS32khz. It is an ultrastable 32khz osciillator that can drive a real time clock chip. I think they are coming out with an RTC that has the DS32khz built in. The Pocket Watch is a PIC chip that runs all the time (?), and is therefore not a micropower option. It may be that a DS1302 or DS1307 is a much better option if current consumption is as big an issue as you say.
You asked, <<I don't see the Stamps current drop as much as expected during SLEEP, is it my program?
Run=0.49mA, Relay1=7.3mA, Relay2=7.7mA, Sleep=0.39mA>>
Take a look at this URL: emesystems.com/BS2power.htm
There are well known tricks for minimizing the current in the Stamp. This applies after you have taken care of external current hogs, and proper pin levels. Especially in the original BASIC Stamp, you have to adjust your final program code in a way that puts the SLEEP instruction on a byte boundary in the eeprom. That makes the difference between 390 microamps and 50 microamps. If you go for one of the multibank Stamps, the BS2pe is the champ for low current drain.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Thanks much, for the info. I am waiting on v3 until v2 comes home. If everything held together, then v3 may be
very close to 2. If not then look at changing to the DS1302/07. That route was and still is considered. Original battery
size was based on the consumption of the TT4, so it "should" be overkill for the BS2. But real life can always find a
way to kick a little ...