News for hackers. Stuff that matters.
Re:Show HN: I made a tiny camera with super long battery life by tredre3 on Monday June 03, 2024 @04:17PM (#40567051)
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...

Re:Show HN: I made a tiny camera with super long battery life by Rinzler89 on Monday June 03, 2024 @05:02PM (#40567516)
>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.

Re:Show HN: I made a tiny camera with super long battery life by throw46365 on Monday June 03, 2024 @10:40PM (#40570169)
TIL!
Re:Show HN: I made a tiny camera with super long battery life by LeifCarrotson on Tuesday June 04, 2024 @10:28AM (#40575011)
They speak SPI, but it's a lot slower than SDIO. And there's a lot of work that goes into making an MMC or SD card (or SDHC or SDXC card) into a FAT16 or FAT32 or exFAT filesystem!

If I were doing this project, I'd use an STM32 with its built-in SDIO driver to implement most of the SD card stuff. ST's CubeIDE has easy-to-use filesystem driver that makes this transparent. Use the STM32 to read the card and manage a file for the FPGA to write the bitstream to, then when you plug into USB power, have the STM32 empty this linear file and copy the photos over to BMP images on the SD card. It would be slower, sure, but if you're only using it once a month or once a year, does that really matter? Plug it into USB, go to lunch, and come back to a properly-formatted SDXC card with an exFAT filesystem ready to have the images copied to whatever OS you want to use.

Re:Show HN: I made a tiny camera with super long battery life by davekeck on Monday June 03, 2024 @06:25PM (#40568347)
> 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!

Re:Show HN: I made a tiny camera with super long battery life by foofoo55 on Monday June 03, 2024 @04:27PM (#40567166)
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).
Re:Show HN: I made a tiny camera with super long battery life by qingcharles on Monday June 03, 2024 @08:41PM (#40569467)
I think open source web app with WebUSB is basically the perfect solution as others can then come in and hack a better UI onto it.
Re:Show HN: I made a tiny camera with super long battery life by beardyw on Tuesday June 04, 2024 @03:12AM (#40571523)
> It's pretty cool that your MSP handles the SD Card directly!

No it isn't. Accessing an SD card from a microcontroller requires you to do that. To use FAT involves more effort, though lightweight libraries are available.

Re:Show HN: I made a tiny camera with super long battery life by barbs on Tuesday June 04, 2024 @03:35AM (#40571676)
Maybe an electron app? I mean, we all love electron, right?