A winter day in Moscow and a low power camera - Page 1
Forum section: electronics / general

author: Artlav
author_rank: Frequent Contributor
timestamp: December 12, 2014, 08:32:57 pm
content: An $20 JPEG camera, an $4 RF module, Atmega and some batteries.Yesterday i've put them together into a little radio-controlled time lapse camera, and wanted to see how long the batteries will last.So, it was left staring out of the window from 2:50 to 20:30 taking about 1 frame each 30 seconds.The result happened to illustrate the mood of a winter day in Moscow.The camera itself:On 4 AAs it runs for about 30 hours, on 4 AAAs - 12 hours (extrapolating).This got me thinking - have anyone made a camera for time-lapse photography, that would run from batteries for a few months (i.e. from a bunch of D cells)?The idea is kind of to leave it be in a nice spot and come back next year, without worrying about getting power there.Mine seem to be quite inefficient on that front, having to transmit the frames, and thus keeping the camera module on all the time.But if you could somehow obtain a raw CCD chip, figure out how to make an FPGA standby at very low power, and store the frames onto an SD card...

author: Wilksey
author_rank: Super Contributor
timestamp: December 12, 2014, 09:15:41 pm
content: Wow, you might think i'm weird for saying that looks quite nice lol, here in the UK that's a day off work!What do the temperatures get down to in the winter in Moscow?

author: Whales
author_rank: Super Contributor
timestamp: December 12, 2014, 09:41:35 pm
content: Thanks for sharing the project and its footage -- it's very niceDespite the snow, would a small solar panel be possible?Code:4 cells * ~2.2 Ah * ~1.4V average = 12.32 Wh12.32 Wh / 30 hour run = 0.41 watts on averageSomething in the magnitude of a 160x160mm cell will do 4W. Will cost a little bit and you will need a charging circuit + rechargeable cell. I'm not sure how most rechargeable chemistries behave in sub-zero.EDIT: Set it up under someone elses electric light with a smaller panel + supercapacitors so you don't need any batteries.

author: Artlav
author_rank: Frequent Contributor
timestamp: December 12, 2014, 10:00:46 pm
content: Quote from: Wilksey on December 12, 2014, 09:15:41 pmYeah, i heard about the "snowlidays" you like to have .Quote from: Wilksey on December 12, 2014, 09:15:41 pmThe record this winter is still at -13*C.Depends greatly on many things, really - can be -35*C in november, can be raining on New Year's day (while USA was freezing... Something broke, i guess).But usually it does not get too far below -20*C, and most days are at warm -10*C-ish.Quote from: Whales on December 12, 2014, 09:41:35 pmHm, if my solar powered weather station is to be believed, there wasn't a sunny day for two weeks already.And, it wasn't getting enough sun for a net gain in battery charge since late October.With only a month's worth of power in it's 2.8Ah Li-ion battery, that means i'll have to climb up there and change the battery soon.That thing is a bunch of sensors and an RF module, even then it does not survive the winter on solar power.A camera would do no better.Quote from: Whales on December 12, 2014, 09:41:35 pmNot great.Quality li-ion can be charged at very low current down to about -20*C without immediate damage, but below that you only got supercaps and Lead Acid.Quote from: Whales on December 12, 2014, 09:41:35 pmA wireless charger, hm?Might not quite work on a roof, due to a lack of lights to seep from.

author: Whales
author_rank: Super Contributor
timestamp: December 12, 2014, 10:05:15 pm
content: Perhaps you can find an aircraft warning beacon on a building

author: Artlav
author_rank: Frequent Contributor
timestamp: December 12, 2014, 10:18:33 pm
content: Quote from: Whales on December 12, 2014, 10:05:15 pmHm.I don't see any.Do you?http://orbides.1gb.ru/img/090315-pan-night.jpg(Warning - 6Mb of panoramic view)

author: IanB
author_rank: Super Contributor
timestamp: December 12, 2014, 10:49:19 pm
content: Quote from: Artlav on December 12, 2014, 08:32:57 pmWell, the system can sleep most of the time surely, and just wake up to take each picture? Does it need an FPGA to run it or can't it just use a microprocessor? Writing to an SD card doesn't seem hard. Plenty of battery powered monitor systems do that.A typical pocket camera can take several hundred pictures on one charge and that is with all the overhead of the camera systems, LCD, backlight, and so on. It should be possible to beat that with a dedicated system and a bigger battery.

author: Artlav
author_rank: Frequent Contributor
timestamp: December 12, 2014, 11:32:42 pm
content: Quote from: IanB on December 12, 2014, 10:49:19 pmI was under impression that it would take an FPGA to clock out data from a CCD chip?Certainly not in Atmega's range of capabilities.I've managed to scavenge a Sharp rj2361aa0ab chip (what it says on the back), and the closest datasheet i could find list frequencies in 10s of MHz.Would need a fast ADC as well...That, or i'm approaching it from the wrong end.I tried to interface a linear CCD to an atmega, years ago, and it just does not seem to work at lower frequencies.

author: Wilksey
author_rank: Super Contributor
timestamp: December 13, 2014, 12:08:28 am
content: Anything below 10 degrees here is considered "choppy", you go below 5, well, we are just not prepared for road conditioning.The issue with snow is really the ice it compacts into, front wheel drive cars, lots of idiots and lorries! Local driving is mostly OK, it's motorway / highway driving that seems to be flawed.Anyway, cool project and time lapse!

author: IanB
author_rank: Super Contributor
timestamp: December 13, 2014, 12:54:10 am
content: Quote from: Artlav on December 12, 2014, 11:32:42 pmI wasn't thinking so much of a bare CCD chip, I was thinking more of a complete camera module, such as the ones used in smartphones?

author: Psi
author_rank: Super Contributor
timestamp: December 13, 2014, 01:04:53 am
content: You can get solar cells that do 0.5V @ 5A for like $4 each on ebay/aliexpress. (or like $1 if you buy 20)They are just the raw cells though, very thin, you need to protect them somehow.

author: Artlav
author_rank: Frequent Contributor
timestamp: December 13, 2014, 10:37:27 am
content: Quote from: IanB on December 13, 2014, 12:54:10 amMight be a good idea, if i can find one.However cell phone-sized cameras are terrible, optic-wise.The view i shown was black with a touch of noise on one, while the 1/3 inch sensor in my UART camera gives a nice picture.Then again, i'm curious at what would it take to interface one of these CCD chips.If only i could get one with a datasheet...Quote from: Psi on December 13, 2014, 01:04:53 amThe lack of solar cells is not the problem.The lack of sun is.

author: jancumps
author_rank: Unknown
timestamp: December 13, 2014, 11:15:36 am
content: Here's a summer photo I took late last June with the camera of my youngest.Not electronics related but could not stop myself from posting

author: Yago
author_rank: Frequent Contributor
timestamp: December 13, 2014, 11:35:47 am
content: Looks like a small wind turbine for charge would yield more than solar !

author: jeremy
author_rank: Super Contributor
timestamp: December 13, 2014, 05:14:25 pm
content: This used to be available:http://www.mathias-wilhelm.de/arduino/reviews/hacrocam/It read out the data at something like 50MHz iirc from a sensor using just an ATXMEGA via DMA to an external SRAM. So I guess it is possible to do something like this using a microcontroller only. Perhaps you could just dump the image to an SRAM via FPGA, and then use a super low power micro to write it to the storage medium?

author: Artlav
author_rank: Frequent Contributor
timestamp: December 13, 2014, 06:46:57 pm
content: Quote from: jeremy on December 13, 2014, 05:14:25 pmActually, i did the math.With some design changes i can make a camera that does 1 frame every 10 minutes for just under a year, on 8 alkaline D cells.The limit is actually the 2 GB microSD card (if i won't bother with FAT32 support).Big issue was the camera module, which used up 50mA even in power save mode.With a P-FET above it, i can do a frame&write to microSD for 15 joules, or 90 joules per hour.Add 1 joule/hour to ping the radio every 10 minutes and round off, that's 100 joules per hour.A D cell stores about 60000 joules, and i need 4 of them to get the voltage.So, 2 strings of 4 will give me about 200 days of runtime, in pessimistic estimate.A box of batteries is cheaper than any renewables.Etching the board already.If it works, i might make an open source project out of it - a simple and cheap time lapse camera, capable of lasting for years might be interesting to people, no?Quote from: Yago on December 13, 2014, 11:35:47 amPerhaps...They are a pain to wind, however.No pun intended.Quote from: jancumps on December 13, 2014, 11:15:36 amNice!Tourism or relatives?

author: jancumps
author_rank: Unknown
timestamp: December 13, 2014, 07:14:54 pm
content: Quote from: Artlav on December 13, 2014, 06:46:57 pmWork. Must have been there 30 times now. Also to Lipetsk and Lebedyan.

author: jeremy
author_rank: Super Contributor
timestamp: December 13, 2014, 09:20:15 pm
content: Quote from: Artlav on December 13, 2014, 06:46:57 pmOf course! I would definitely be interested. Could just do a drive by card swap every few months to look at your pictures. Make sure you have decent mounting holes so that it can be put in a weatherproof enclosure.What sensor are you using?

author: dannyf
author_rank: Super Contributor
timestamp: December 13, 2014, 10:35:10 pm
content: QuoteNicely done. I am surprised that the sky lights up in no time - i am sure that's how it works everywhere but those pictures made it so "explosive".BTW, what kind of neighborhood is that? Are those buildings recent or from the old times?

author: Artlav
author_rank: Frequent Contributor
timestamp: December 14, 2014, 12:16:28 am
content: Quote from: dannyf on December 13, 2014, 10:35:10 pmDon't forget - it's 15 minutes per second, and the camera continuously adjusts brightness.Quote from: dannyf on December 13, 2014, 10:35:10 pmAn above average newly built residential area.Recent, built around 2005.Quote from: jeremy on December 13, 2014, 09:20:15 pmEnclosure is a given.What i like doing are time lapses years long, showing the Earth moving around the sun, or an apartment block being built.Or both:For such things, you'd want to leave the camera be, at zero maintenance, outside, through a russian winter or two.Quote from: jeremy on December 13, 2014, 09:20:15 pmA JPEG camera likehttp://www.ebay.com/itm/TTL-Interface-Camera-Module-CF0706C-V3-JPEG-CVBS-MCU-UART-/181550946094, modded for 3.3V.It's 640x480, with 1/3" sensor - good performance at night compared to cell phone ones or OV7670.Averaging 48Kb per frame at max quality.Ok, built a new board and tried it out.It writes a picture to an SD card without problems.Power, however, does not want to play nice - the theory and practice diverged a bit in what is being considered "sleep mode" by various parts.Namely, the RF module does not want to play ball and go below 2mA, and microsd card sucks lots of current from MOSI line when it's VCC is out.A redesign incoming, but the basic idea seem to work.

author: dannyf
author_rank: Super Contributor
timestamp: December 14, 2014, 12:30:02 am
content: Wouldn't it be easier to just use an electronic trigger? That's how those high-altitude balloon guys do.

author: Artlav
author_rank: Frequent Contributor
timestamp: December 14, 2014, 12:37:16 am
content: Quote from: dannyf on December 14, 2014, 12:30:02 amHm?Please clarify what this means.

author: dannyf
author_rank: Super Contributor
timestamp: December 14, 2014, 12:51:12 am
content: Many cameras allow for shutter releases, both wired or wireless. Some are simple 2.5mm plugs, and others are fancier. You can simply plug the shutter release into the camera and then trigger it via your mcu periodically.The balloon guys use this approach to take video / still images - early Canon's were popular with them. Google for more.

author: Artlav
author_rank: Frequent Contributor
timestamp: December 14, 2014, 12:54:57 am
content: Power. A consumer camera will last hour on the batteries i plan for a year's worth of run time. Thats the whole point.

author: Artlav
author_rank: Frequent Contributor
timestamp: December 14, 2014, 03:21:49 pm
content: Quote from: evb149 on December 14, 2014, 01:41:43 amHm.Are there converters like that that can do 100mA active, and waste under 20uA with no load, at the same time having an efficiency much higher than an LDO from 5.5V to 3.3V?I'm not immediately aware of one.If anyone knows of one, please let me know.Quote from: evb149 on December 14, 2014, 01:41:43 amAn Atmega328P + DS1338 RTC chip take under 20uA in power down mode, which exceeds the battery's inherent life time by an order of magnitude.So, +1 for simplicity.Quote from: evb149 on December 14, 2014, 01:41:43 amYeah, a little trap i found was that the microSD card sucks current from data lines when it's VCC is disconnected.Quote from: evb149 on December 14, 2014, 01:41:43 amA box of alkaline D cells is cheaper than any of these, even if i get a couple of cycles out.And, they work at -30*C just fine.Quote from: evb149 on December 14, 2014, 01:41:43 am"High quality" in my case is 640x480, compressed to 48Kb per frame at the best quality setting.That's 2.5Gb per year at the 10 minutes per frame rate.

author: Artlav
author_rank: Frequent Contributor
timestamp: December 14, 2014, 11:25:20 pm
content: Quote from: evb149 on December 14, 2014, 10:19:06 pmAh.That's the piece i wasn't thinking about.Don't look for a converter that can produce 20uA output and consume as much itself, but just connect any good converter to power ONLY the big loads like the camera, RF and the SD card, while using an LDO for the uC.When it's done, shut down the converter.In other words, i finally got it why there are "shutdown" pins on the converter chips.Hm. Best case scenario is twice the run time for the same battery count (or half the battery count, actually).Practical numbers for now are 3 seconds at 100mA for the camera to stabilize and get a picture, then 13 seconds at 60mA to write the picture down.4 joules per picture, if we ignore the RF.That is, 56Wh per year, or 4 D cells with a converter.I'm leaving it overnight staring out of the window again...Quote from: evb149 on December 14, 2014, 10:19:06 pmOnly problem is, i have the RF module share the same SPI bus.So, full disconnect necessary.

author: Artlav
author_rank: Frequent Contributor
timestamp: December 15, 2014, 12:15:27 am
content: Quote from: evb149 on December 14, 2014, 11:59:31 pmThe bottleneck is the UART camera, running at 115.2kbit/s.Nothing i can do about that, short of starting from scratch.However, i haven't optimized the storage system yet, to the point that the SD card might even be running at 100KHz (i get 4 kb/s, while the expected maximum is 12kb/s).Quote from: evb149 on December 14, 2014, 11:59:31 pmThat's a flat out no.The neat part of my current setup is that i can remove the card from a running camera (which will just go back to sleep if there is no card present), get it into a PC, watch the pictures, tweak setting in a config file, then plug it back in, and it would continue running without a hitch.Using a raw write or an onboard FLASH chip would kill all these advantages at negligible gain.

author: Artlav
author_rank: Frequent Contributor
timestamp: December 15, 2014, 05:07:25 pm
content: Made a project page for the camera,http://orbides.1gb.ru/lapse_camera.php, since this deviated in a new and wonderful direction that might be a shame to just lose in the forum archives.The camera have been running for a day, and all seems to be well.It made me wonder, whether the RF module is even needed.All the settings are stored on an microSD card, and it is supposed to sit in some remote location.Can anyone think up a good reason why a camera like that would need a (slow) RF module?At first all i wanted is an RF-accessible camera, which grown into a time lapse one.Time to split the two projects.The time lapse camera, as it looks now.Several problems with it - RF module sticks out, the card is in an inaccessible place, camera is not lined up with the mounting holes, etc.Time for a new board.Quote from: evb149 on December 15, 2014, 12:47:35 amHm, i planned on a sealed enclosure.However, if it is to ever be opened, it should indeed be coated and prepared for any environment.

author: Artlav
author_rank: Frequent Contributor
timestamp: December 22, 2014, 12:55:59 pm
content: Aaaand it's on Hackaday already.http://hackaday.com/2014/12/22/a-year-long-time-lapse-camera/Interesting.