You are browsing as a guest. Sign up (or log in) to start making projects!

SNAPX

Hardware
  • 5 Devlogs
  • 17 Total hours

A handheld mini camera built on an ESP32-S3-CAM live preview on a small SPI TFT screen, a physical shutter button to snap and save full res photos to a microSD card, and 18650 battery power via the board's micro USB input. Basically a tiny standalone digital camera from scratch.

Ship #1 Pending review

SNAPX is a handheld camera I built from scratch on an ESP32-CAM. Live preview on a 1.8 inch screen, a metal shutter button on the side, and a case I designed in Onshape and printed.

To get photos off it you connect to the wifi network the camera hosts itself and open the page, and you get a gallery of everything on the device with download and delete. That was not the original plan. I was going to save to an SD card, but the camera sensor takes up almost every usable pin on this board and there was genuinely nothing left for it. Ended up saving to internal flash and building the wifi gallery instead, which turned out better anyway since I never have to pull a card out and find a reader.

Hardest part was two days on a white screen that turned out to be my battery browning the board out, and soldering the whole thing together before testing every part wired up at once. Had to unsolder and resolder inside a packed case, which I will not be doing again.

Proud of the live preview mostly. It runs raw RGB565 straight to the display so there is no JPEG decoding in the loop, which is what took it from a slideshow to something you can actually frame a shot with.

If you want to test it, power it on, point it, press the button. Flash fires and it freezes on your shot. Then connect to the SNAPX wifi and go to the url to see the photos.

  • 5 devlogs
  • 17h build
Video of Project → See source code →
Open comments for this post

3h 12m 1s logged

Log 5

Last one. SNAPX is done.

Reprinted the case on a textured plate so the print surface picks up that pattern on the bottom face. Small thing but it makes it look way less like a generic 3D printed box.

Code side i spent this round mostly on polish. Cleaned up the UI on the web gallery, the page you get when you connect to the cameras wifi to pull photos off it. Also made the onboard LED actually flash when you take a photo, so it fires at the same time as the shutter instead of just being a light that sits there.

Then the photos themselves. They were saving rotated 90 degrees from what the preview showed, because the preview gets rotated in software but the encoder was getting the raw buffer straight off the camera. Quality was also so bad. Fixed the rotation and then pushed the JPEG quality up and turned on the sensors white balance, gain, exposure and lens correction, which it does not do by default. Same lens, same sensor, completely different photo.

Final assembly is done. One thing worth mentioning, the battery is not inside the case. Its a powerbank plugged into it, so the enclosure only holds the board, screen and button.

Really happy with how this turned out.

0
0
16
Open comments for this post

3h 22m 1s logged

Log 4

Spent a lot of time just fixing things this round. Went back over all the solder joints and redid the ones that looked sketchy properly this time instead of just enough to get continuity. Cleaned up a bunch of stuff in the code too. After all that it finally worked properly.

Then moved on to the enclosure. Designed the whole thing in Onshape and printed it.

Printed it more than once. Quite a few times actually. Most of that was me not having the right measurements for small things, mainly how far the camera sits from the front face so the lens lines up properly with the hole, and figuring out how the board actually mounts and stays put inside. Then a lot of back and forth on tolerances and wall thickness, printing a version, seeing what was too tight or too loose or too flimsy adjusting and going again.

So this one was mostly CAD, not much code. Which was a nice change of pace honestly and it feels like an actual object now instead of a pile of wires.

0
0
7
Open comments for this post

3h 39m 52s logged

Log 3

Got the live preview working and made the mistake of thinking that meant I was done. Soldered the whole thing together. Screen, button, camera, all of it permanently.

Screen immediately stopped working. Just black and white, nothing else. And this one is fully on me because I had only really tested the camera properly on its own. I never tested the screen and the switch together with everything else wired up the way it would actually be in the final build. So the first time all of it existed at once was after it was already soldered.

Ended up resoldering it multiple times and it came back so it was just a bad joint somewhere. But that meant unsoldering and resoldering while everything was already packed together, which is so much worse than doing it on a breadboard. Nothing has room, nothing is accessible and im trying not to melt the wire next to the one im actually working on.

Then the SD card. I had planned the whole time to save photos to the SD slot on the screen module, and it would not write at all. Turns out the reason is the camera sensor already takes up almost every usable pin on this board, and the pins the SD card needs are the same ones I had already given to the screen. The couple of pins that were still free after that are the serial lines the USB programmer uses, and one of those went to the shutter button. So there was genuinely nothing left for it. It was never going to work with the way I had it wired.

Spent a long time trying to make it work anyway before accepting that. Very tired by this point.

So I dropped SD entirely and made it save to the ESP32s internal flash instead, then put a web server on the camera so it hosts its own wifi network. Connect to it from your phone, open the page and you get every photo on the device with download and delete.

Honestly this ended up being way better than the SD card ever would have been. No pulling a card out and finding a reader every time I want to see what I shot, I just connect and pull them straight to my phone.

Lesson from all of this, I am never soldering a whole build together again without testing every single part wired up together first. Test the finished layout, not the individual pieces.

0
0
29
Open comments for this post

2h 58m 6s logged

Log 2

Spent multiple days chasing two problems that both turned out to be things I did to myself.

First one, the new board came in (after breaking the camera on the other board i was using) and the camera kept failing with a frame buffer malloc error on every single boot. I assumed the replacement board was bad too and started genuinely worrying I had cooked the hardware AGAINN but it urned out I had the generic ESP32 Dev Module profile selected in Arduino IDE instead of AI Thinker ESP32 CAM. That profile doesnt enable PSRAM so there was literally no memory for the camera to allocate a frame buffer from. Switched it and the camera initialised first try. So long debugging that for a dropdown menu.

Second one was worse. The screen sat blank white, flickering, occasionally flashing the correct image for about a second before going back to the annoying white screen. I rewired the whole thing so many times, reflashed it constantly, swapped libraries, tried different SPI speeds, checked every pin against the datasheet. Nothing.

After days of testing i found out the problem was the battery… My lipo setup could not hold voltage once the camera and the screen were both pulling current at once, so the board was browning out and resetting over and over. Plugged it into USB and it was rock solid immediately. (i was using the same battery to troubleshoot for days btw)

now for next time i know that If a screen is doing something stupid and the wiring checks out, check your power before you touch anything else guysss

0
0
99
Open comments for this post

3h 29m 35s logged

Started SNAPX this week, a handheld camera im building on an ESP32-CAM.

First thing was ordering parts. Got the ESP32-CAM board, a 1.8 inch ST7735 screen, a 12mm metal push button for the shutter, and an 18650 setup for power. While I was waiting on those I spent a while just reading pinout diagrams and working out what connects where, because the camera sensor eats almost every usable pin on this board and there isnt much left over.

Once everything came in I got the camera going first. Streamed it over wifi to my browser just to confirm the sensor actually worked before wiring anything else in. That took way longer than it should have. This board has no USB port and no auto reset circuit, so GPIO0 has to be grounded by hand every single time i upload. I spent a solid while convinced my code wasnt uploading when really it was just booting the old firmware that was already on the chip.

Then I broke it. Because of that upload process I was pulling the camera module in and out over and over, and the ribbon cable eventually gave out. Sensor stopped being detected at all, just threw a probe failed error no matter what I tried. Ordered a replacement board, this time one that comes with a programmer attachment so the camera can stay seated and I never have to touch that ribbon again.

While waiting on that I switched over to the screen and got it working on its own. Nothing fancy, just a test sketch filling it red and printing some text, but it confirmed the wiring and libraries were right before I try combining it with the camera.

Next up is getting the actual camera preview onto that screen.

2
0
14

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…