[HN Gopher] Show HN: I made a tiny camera with super long batter...
___________________________________________________________________
Show HN: I made a tiny camera with super long battery life
Hey HN! A few years ago someone kept trying to steal my
motorcycle, so I decided to make a small camera with really long
battery life to catch them. The hardware/software is totally open
source, but the companion app only supports macOS currently. (I'm a
big fan of native apps, and didn't want to block releasing on
Linux/Windows support.) I wrote some blog posts about the process:
PCB design: https://toaster.llc/blog/pcb Enclosure design:
https://toaster.llc/blog/enclosure Image pipeline:
https://toaster.llc/blog/image-pipeline Rainproofing:
https://toaster.llc/blog/rainproofing Source:
https://github.com/toasterllc/Photon
Author : davekeck
Score : 225 points
Date : 2024-06-03 13:31 UTC (9 hours ago)
(HTM) web link (toaster.llc)
(TXT) w3m dump (toaster.llc)
| mariocesar wrote:
| I love "the fine print" section. This is so great. Congrats on
| all your hard work
| idiot900 wrote:
| Are there sample images from the camera on the product website?
| This is a neat idea but it would be nice to gauge to what extent
| it is fit for purpose, and a helpful way to do this is with a
| bunch of sample images.
| davekeck wrote:
| I should definitely add some sample images...
|
| For now, the Mac app has real imagery in the demo mode:
|
| https://apps.apple.com/us/app/photon-transfer/id6476578040
|
| (The demo photos are from the Lick Observatory on Mount
| Hamilton.)
| aconz2 wrote:
| very cool, love the website design and the blog posts had a lot
| of interesting bits, like the backplate removal jig. I was kinda
| surprised to see an fpga in there but makes sense. Could that
| design be repurposed as a general image sensor -> sd card module
| or is it pretty specific to the sensor?
| laweijfmvo wrote:
| > exclusively for Mac
|
| Why not just have it connect as a generic mass-storage device?
| Suppafly wrote:
| Yeah, even if you're a mac guy, it doesn't make sense to make
| hardware that is mac only.
| jackstraw14 wrote:
| It looks like the companion app is in the App Store, but yeah
| if it's going to be open source then I don't understand either.
| rasz wrote:
| Saw it on EEVBlog, even owning a Mac is not sufficient if its
| not the latest OS version. SD Card doesnt store pictures in
| windows readable format either.
| miahi wrote:
| I (as a non-mac user, but impulse buyer of odd camera gear)
| appreciate the "exclusively for Mac" label put just after the
| fold. I usually have to read pages (about software) on HN for
| minutes before finding out (in a footer or "get it here" link)
| that it's Mac-only. This way I just know it's not for me and I
| can continue with my boring life.
| davekeck wrote:
| Totally fair question! My reasons were:
|
| 1. To maximize Photon's battery life I tried to make the
| hardware do the absolute minimum to record imagery. To that
| end, Photon stores images on an unformatted SD card (ie one
| huge linear array of bytes) which is easy and fast to index
| into.
|
| 2. A 16-bit MSP430 handles writing the image data, and the
| MSP430's codespace is 99% exhausted without dealing with the
| complexities of a filesystem like FAT32, so adding support for
| a filesystem wouldn't currently fit. (This line of MSP430,
| MSP430FR2433, has a maximum of 16 KB of FRAM, but perhaps I
| could use a different line.)
|
| 3. Photon stores images as RAW image data that require post-
| processing to view the images. Since I wanted to provide a
| polished app to view the imagery anyway, I figured I'd just
| make it a requirement.
|
| I'm not saying those are all particularly good reasons, but
| that was my reasoning anyhow.
| tredre3 wrote:
| It's pretty cool that your MSP handles the SD Card directly!
|
| Personally I think you should keep the focus on a polished
| mac app. For other platforms you can do just the bare minimum
| with a web app that uses WebUSB. People will bitch that it's
| Chromium only but, I mean, chromium has 95% market share
| outside Apple world (and I say this as a FF user).
|
| A hardware solution could be to add a cheap microcontroller
| that would handle the usb port. It wouldn't be powered by the
| battery, only USB and it would act as a proxy between the raw
| sd card and the computer. Presenting a mass storage to the
| computer with folders, converting images to PNGs. Such
| capable MCUs are very cheap (rp2040, esp32-s3) but it
| certainly adds complexity to your project...
| foofoo55 wrote:
| I would suggest the same hardware solution, where the USB
| powers a device-side presentation of the raw data into a
| more universal mass storage device. This also allows file
| transfer to any device without requiring special software.
| I did something like this in 2008 or so (using a FTDI chip
| and PIC mcu, and boy was it ever slow).
| Rinzler89 wrote:
| _> It's pretty cool that your MSP handles the SD Card
| directly! _
|
| SD cards aren't really black magic since they "speak" SPI,
| meaning people have been interfacing basic microcontrollers
| to them since forever.
| davekeck wrote:
| > It's pretty cool that your MSP handles the SD Card
| directly!
|
| The MSP430 is actually the puppet master for an ICE40 FPGA
| that does the high-speed transfers (102 MHz) between image
| sensor -> SDRAM -> SD card.
|
| Here's a post about the architecture if you're curious:
|
| https://toaster.llc/blog/architecture
|
| Thanks for the feedback!
| Rinzler89 wrote:
| Can I ask why you went with a MSP430?
|
| I'm not judging, they were all the rage in low-power embedded
| applications 10-15 years ago, just feels weird to see it in a
| modern design today, when the market now is flooded with low-
| power ARM chips that are way more capable than that, and
| probably easier to program.
| davekeck wrote:
| One main reason I chose the MSP430 was for the FRAM. Photon
| stores all its state (ie the photo ring buffer indices, and
| user settings) in one big FRAM struct, which can be
| read/written just like RAM, but persists across power
| cycles and crashes.
|
| Another reason was MSP430's low power consumption, but like
| you said it sounds like ARM has caught up.
|
| Would love to hear about alternative designs -- are there
| low-power ARM chips that have something like FRAM and don't
| require erase/programming dances to write data?
| nereye wrote:
| If external F-RAM is an option, one can use F-RAM from,
| say Cypress (now Infineon, [1]) together with ARM chips
| from Ambiq, e.g. Apollo 3 Blue Thin [2], which likely
| have even better power consumption than an MSP430.
|
| [1]
| https://www.infineon.com/cms/en/product/memories/f-ram-
| ferro...
|
| [2] https://ambiq.com/apollo3-blue-thin/
| davekeck wrote:
| Dang very cool. If there's ever a Photon 2 I'll
| definitely look at the low-power ARM world.
|
| (FWIW Photon's USB stack is handled by a STM32F730 and
| I've been perfectly happy with it. Expensive though.)
| g_p wrote:
| Not the OP, but my understanding (admittedly a few years
| outdated) is that an MSP430 will, in idle, with sleep
| states properly set up and low power modes in use, drain a
| coin cell battery (e.g. CR2032) over a period of years -
| with the current drawn around 1.5 uA in standby and 0.1uA
| in RAM retention idle.
|
| That is likely even lower than the effective self discharge
| rate of a lithium coin cell battery. I don't believe the
| Arm equivalents like the Cortex M0 can deliver such low
| absolute current - maybe microamps, but more than an MSP430
| from what I can see.
|
| Ref - https://metebalci.com/blog/measuring-the-power-
| consumption-o...
| davekeck wrote:
| > That is likely even lower than the effective self
| discharge rate of a lithium coin cell battery.
|
| That's what I've found too. Based on my measurements and
| calculations, Photon uses 5uA (MSP430 + motion sensor)
| while sleeping, while the battery's self-discharge is
| more like 80uA.
|
| That's probably a good argument for using a more powerful
| chip though, if the battery self-discharge is that high,
| hah.
| laweijfmvo wrote:
| Thanks for sharing the explanations, and hey it's open source
| so someone can make a linux version if they want!
| bambax wrote:
| Ok, so an app is needed to get the data from the device to a
| computer, and you wanted to focus your efforts on a
| "polished" Mac app. But why not make a non-polished Windows
| app as well? Or have someone make it?
|
| Also, is the RAW data specific to the device and if so, why?
| If the device simply used, say, DNG or TIFF, then decoding
| could be done by external software, and all your own software
| would have to do would be to read the SD card and produce RAW
| files...?
| davekeck wrote:
| > But why not make a non-polished Windows app as well? Or
| have someone make it?
|
| If I had more time and money I certainly would!
|
| > Also, is the RAW data specific to the device and if so,
| why?
|
| To maximize battery life, the hardware does zero processing
| on the image data; it simply copies the raw pixels output
| by the image sensor to the unformatted SD card.
|
| > If the device simply used, say, DNG or TIFF, then
| decoding could be done by external software, and all your
| own software would have to do would be to read the SD card
| and produce RAW files...?
|
| True, perhaps I should've used an existing RAW format like
| DNG and exposed the images as a filesystem. That would
| require using a different architecture (ie not using an
| MSP430, like Rinzler89 suggested), and would likely reduce
| the battery life due to having to maintain a filesystem on
| the SD card.
| bambax wrote:
| It seems it's the filesystem that's most costly? Would it
| be possible, maybe, to store DNG file data, one after the
| other, on the card, without a filesystem?
| davekeck wrote:
| I'm not too familiar with the DNG format, but if a DNG
| file could be as simple as [header][2304x1296x2
| bytes][footer] then it might be possible with the current
| hardware.
|
| But without a filesystem, would it be useful to have DNG
| files stored on the SD card? Wouldn't you need special
| software to read off the "packed" DNG data anyway? And if
| you need special software anyway, couldn't the special
| software convert the existing raw image data to the DNG
| format, instead of requiring the hardware to do it?
| Rohansi wrote:
| The software being exclusive to Mac is apparently a feature in
| this case.
| mysteria wrote:
| Cool project, here's a few comments after a quick glance over:
|
| - There's no license on the code and design files in the Github
| repo, thus this currently isn't open source but rather "source-
| available". If you plan to allow others to modify the code and
| build their own cameras you should add an appropriate license.
|
| - The Mac only support (and it's MacOS only, with no iPad/iPhone
| support) with a dedicated app to operate it seems to really limit
| the market for this device. Since all the app does is allow you
| to view/transfer photos and configure the device you probably
| could make do with a simple MTP interface for access to the photo
| files and have a second interface for configuration. Also if you
| do plan to release this under an OSS license and market it as a
| hackable + privacy friendly device Linux support is pretty much a
| requirement.
|
| - Consider using automotive grade ICs to allow the device to
| function below freezing. The current stuff may be fine for Cali
| but people in northern states won't be able to use it outdoors in
| the winter.
| kristianp wrote:
| > Linux support is pretty much a requirement
|
| Support isn't required for linux: I think there will be people
| who will be keen to hack up Linux support based on the open
| source code available, and the same with Windows. However if
| "Dave" wants access a larger market, Windows or even Android
| support would make sense.
| Eric_WVGG wrote:
| so cool!
|
| For your next trick, how about a super long battery life MP3
| player? A friend asked if I knew of an MP3 player that would be
| good for a two-week hike with no access to electricity, and it
| really seems like there's nothing out there beyond carrying
| around a bunch of batteries.
| michaelmior wrote:
| There are other options such as chargers powered by solar
| power, hand crank, fire, etc.
| walterbell wrote:
| FiiO M3 Pro? https://www.amazon.com/FiiO-M3-Pro-Resolution-
| Touchscreen/dp...
|
| _> 15 hours battery life and 35 days standby time: Adopt 1000
| mAh high-capacity lithium-ion battery and USB-C charging
| technology. The M3 Pro has a battery life up to 15 hours and
| standby time up to 35 days. That means if you listen 3.5 hours
| every day, the M3 Pro can go for a whopping 1 week before
| needing to be charged again!_
| taid9iK- wrote:
| My Cowon D2 might be old but it still goes on for days and
| days and ... you get it, it's awesome!
| mixermachine wrote:
| 15 hours seems not that much considering an iPod nano can do
| 30 hours (according to Apple)
| ramses0 wrote:
| https://www.amazon.com/dp/B01NAJ3KQB
|
| ...probably at least 10-25 hours playback on a single battery,
| which means 8 batteries gives you 80 hours of listening (2
| weeks).
|
| For that space though, you could scavenge a solar garden light
| charger and get indefinite listening with ~4 batteries. 1
| loaded, 3 charging, with a nominal "fully charge 3 batteries
| with 16 hours of daylight", which means a ~33% duty cycle.
|
| One sunny day charges 3 batteries, which means you have 45
| hours of charge before needing to obtain another 16 hours of
| sunlight.
| Rinzler89 wrote:
| _> A friend asked if I knew of an MP3 player that would be good
| for a two-week hike with no access to electricity, and it
| really seems like there's nothing out there beyond carrying
| around a bunch of batteries._
|
| Go on the used market and look for old iRiver players if you
| can, preferably the T10. They take AA batteries and last
| forever (45+ hours), have a rugged sporty design and had the
| best non-Apple quality and UX.
|
| The only downside is the small flash storage on them for
| today's standards but only the old players were feature AA
| batteries, before they all switched to sealed internal lithium
| meaning they are now dead.
|
| But on the upside the name brand players from 20 years ago had
| higher quality MP3 decoding SoCs and audio DACs, while the new
| MP3 players with AA batteries you can buy today are all bottom
| of the barrel chinesium e-waste.
| michaelmior wrote:
| > A few years ago someone kept trying to steal my motorcycle, so
| I decided to make a small camera with really long battery life to
| catch them.
|
| The camera seems really cool. But given that the device has no
| way to get photos off it without physical access, it seems like
| this wouldn't be super useful for your original purpose. If
| someone just takes the camera (or manages to successfully steal
| your motorcycle), then then camera doesn't provide any value.
| nicwolff wrote:
| I don't think the camera goes on the motorcycle.
| ipsum2 wrote:
| Love that everything is open source! Code relating to cameras
| have been traditionally locked down and hidden under NDAs.
| Surprised there's no sample photos nor specifications on image
| sensor.
| instagib wrote:
| Looks like 5MP but saves as 3MP files.
| https://github.com/toasterllc/MDCCode/blob/6afdde594861264f8...
|
| Pixel resolution Size = 2304 x 1296 = 2,985,984 pixels Pixel
| count = 2.99 million pixels Resolution = 2.99 mega pixels
| Aspect Ratio Width / Height: 1.78 "landscape" (horizontal)
| orientation Type of aspect ratio = "HD 16:9"
|
| Couple photos here too:
| https://github.com/toasterllc/MDCCode/tree/6afdde594861264f8...
|
| I guess its for hiding a camera near where you park your bike
| and see who stole it or looked at it.
| MarkusWandel wrote:
| > Looks like 5MP but saves as 3MP files.
|
| OMG that's so refreshing. Just recently I've come across,
| both from garage sales, a "40MP" camera smartphone (Chinese
| brand-X) that actually has, probably, a 13MP class sensor in
| it and upscales, and a wildlife camera that does the same.
|
| Waste a great deal of storage just to fool people into
| thinking they got a better camera, and then you have to
| downscale all that again to achieve something like pixel-
| level sharpness.
| peterhi wrote:
| Wonder if this could be co-opted to function like a Narrative
| Clip. Take a photo every 30 seconds (or something like that). I
| had mine for 3 years before it died
| designed wrote:
| 50,000 pic battery life * 1 pic every 30 seconds = ~17 day
| battery life. Not bad
| hiatus wrote:
| Small note: though the battery will last for 50k pictures,
| the storage will begin overwriting old photos after ~20k.
| scld wrote:
| re: Footprints being a solved problem, SnapEDA/SnapMagic is a
| great place to start for beginners. You still want to verify, but
| they have metrics on how many users have used the footprint and
| other "trustworthiness" indicators.
|
| re: the sealing, you may want to test the seals over a temp
| cycle. fully enclosed housings sometimes need a vent to prevent
| pressurizing the housing and, literally, blowing a gasket.
| polalavik wrote:
| Really well done! I also love the design of your website, is it a
| boilerplate/template or did you design it yourself?
|
| Is this the same sensor as the rpi hq cam? Would be cool to have
| interchangeable lenses on this, but that might make
| weatherproofing it difficult.
| abdullahkhalids wrote:
| It says here [1] that the image sensor is AR0330.
|
| [1] https://toaster.llc/blog/architecture/index.html
| clumsysmurf wrote:
| I try to avoid devices with built in batteries. Could a version
| be created that uses a replaceable 18350, 18650 or even AA? I'm
| OK swapping every few months etc, but when its time to dispose of
| it, I don't want to fret about how to remove the battery for
| recycling.
| NegativeLatency wrote:
| Also when the battery dies and it renders the product garbage
| that only someone with fairly advanced skills can fix.
| tromp wrote:
| Would this be suitable for strapping on a helmet to take a
| picture every (other) second on a bike ride and turn into a time
| lapse video afterwards?
| thih9 wrote:
| Looks like yes
|
| > capture photos at particular times or on certain dates,
| perfect for time-lapse photography
|
| With 50k photos on a single charge you could capture almost 28h
| of continuous 0.5fps video.
| tromp wrote:
| I was wondering about the weight which I couldn't find
| specified (although at that size it can't be much) and about
| ways that you could attach a strap to it.
| b20000 wrote:
| I want to know who designed your site and who implemented it :-)
| One of the best sites I have ever seen.
| tamimio wrote:
| Few questions come to mind:
|
| - what's the image resolution? Is it fixed or can it be changed
| in the settings?
|
| - can you attach an actual image file? The previews are barely
| clear to show anything.
|
| - any info about operating temperature? The battery might not die
| but the camera shuts off due to high temperatures, happens to me
| all the time with gopro and the likes.
|
| - what's the storage capacity? Not mentioned anywhere.
|
| Edit: ok I see now the footer of the site, it didn't load before
| higgins wrote:
| great landing page! "IOT? how about NOT"...i lol'd
| qup wrote:
| I really like the focused idea. This is likely the best product
| in its niche. It's an oddly large niche--this is a tool that can
| solve a lot of problems.
|
| Is the battery replaceable if it fails?
| davtbaum wrote:
| Love this - congrats Dave on the launch
| k2xl wrote:
| Would be great if it had Zwave and Zigbee support... Would love
| this for home automation use cases
| rossant wrote:
| Can it record videos?
| LorenDB wrote:
| Why not just use something like Qt to build a native cross
| platform app? As others have mentioned, advertising a device as
| open source and yet Mac only is going to turn away a lot of
| people.
| dbish wrote:
| Nice. Ever read The Circle? Bet you could get some good SeeChange
| camera streams going from this :)
| _Bruno42 wrote:
| Really cool! How much does it weigh? I'd love to attach it to a
| collar on my cat to track their fun adventures.
| carl_dr wrote:
| > "made by Dave in California"
|
| Love this, well done, looks like a great product.
| NegativeLatency wrote:
| Neat, if there was something like this that was more like a car
| dashcam, I'd really like something for my bicycle helmet, I want
| a dashcam like experience incase someone hits me, but the battery
| life and charging ergonomics combined with having to empty the
| flash card on a gopro makes it not work well for the usecase.
| mschuster91 wrote:
| Side note for those with ... let's just say unhealthy spending
| habits: is there a list of all the hardware stuff that HN'ers
| launched/kickstartered?
| scosman wrote:
| Okay, you also made a drag and drop terminal app for rebasing??
| Super cool products all round. True hacker news.
|
| https://toaster.llc/debase/index.html
| foehrenwald wrote:
| >USB-C
|
| >just as god intended
|
| ???
| thebruce87m wrote:
| Not sure about god inventing USB-C but satan definitely
| invented usb 3.0 micro b
| rrr_oh_man wrote:
| Your "fine print" is an honest breath of fresh air.
|
| Excellent communication throughout the page!
| adolph wrote:
| That is neat and your project docs are a fun read.
|
| You'd get a design identity ++ if the dovetail backplate was more
| similar to ejecting toast. . . .but looks like that isn't in the
| final anyway.
|
| Did you consider radar[0] instead of PIR with the MPS430?
|
| 0/ https://www.youtube.com/watch?v=9WiJJgIi3W0
| WhackyIdeas wrote:
| Excellent information. Thank you for releasing all of this, I
| particularly enjoyed reading through the rainproofing as I am
| building a raspberry pi camera and there really aren't any
| examples out there that I could find.
| pineaux wrote:
| Would buy, but doesn't ship to Europe...
| apocalyptic0n3 wrote:
| I'm not interested in the product, but I have to say this site is
| great. Too many sites that get posted in Show HN are so difficult
| to decipher what service they provide or function they serve.
| This landing page is about as clear as you could be straight
| away: it's a small camera -> great battery life -> pricing
| (without going to another page!) -> Mac Only -> Buy/Download
| links. You provide use cases, your tech specs are visible just by
| scrolling a bit, there's photos of the device that highlight its
| size. It even looks good. Only downside is a lack of example
| photos (which sound like they'll be added).
|
| This is a breath of fresh air and I applaud your effort on it.
| davekeck wrote:
| That means a lot, thanks friend.
| bring_back_sky wrote:
| So cool. Imagine if this camera did in-body film simulation as
| jpeg (like Fujifilm cameras) and no need for post-processing of
| RAW files.
| hm-nah wrote:
| I really appreciate the considerations at the bottom of the page.
| Excellent
___________________________________________________________________
(page generated 2024-06-03 23:00 UTC)