4 ms·
My first instinct: can we use some other core? Do we really need Linux to take a photo and transfer it to the cloud? I'm not a hw person so curious how to comp
by markus_zhang 2y ago
My first instinct: can we use some other core? Do we really need Linux to take a photo and transfer it to the cloud?
I'm not a hw person so curious how to complete the task with minimum budget.
Interesting read. Thank you!
- bigiain 2y agoMy same first thought. For no reason other than I have a pair of them sitting on my kitchen table right now, I wondered how the ESP32-CAM setup would compare. I think it's only good for 2megapixel images, But I'd bet both its startup time and its power consumption would be close to an order of magnitude lower. (Here's some details if you're curious: https://components101.com/modules/esp32-cam-camera-module https://components101.com/modules/esp32-cam-camera-module )
- tetris11 2y agoI'm always a little perplexed by the world of microcontrollers. How would you program this without having some kind of embedded linux? And where does the OS live in this modules? Or does this sit on a Pi?
- deleted 2y ago[deleted]
- markus_zhang 2y agoIn many cases there is no OS, just bare metal. I have dabbed into embedded programming (but never really into hardware) briefly and the process looks like this: you manipulate some pins and they make things work. You read manuals to figure out which pins to use and how to manipulate them to make certain things happen. For example, to make a peripheral work, you first need to connect certain pins (following the manual), then you need to send some black magic signals to these pins to make it work in certain ways (think ROM reading/writing, LCD screen display, etc.). Reading the manual and the data sheets, IMO, is where the real complexity comes from -- and you can always use "Standard" components and use a library. Here is a good textbook: https://web.eece.maine.edu/~zhu/book/ https://web.eece.maine.edu/~zhu/book/ If you need an OS sometimes a RTOS is considered instead of Linux. Embedded Linux is pretty "heavy" in the embedded world AFAIK.
- tetris11 2y agoIn the context of the camera modules above, what would you wire the pins into? Surely a Pi, running Linux?
- bigiain 2y agoYou kinda cheat. There's a bunch of dedicated hardware/firmware that you use to run the camera module. That lets a fairly simple microcontroller and code to mostly ignore the electrical details of the camera, and just abstract that away so you can just send commands to the camera via pre existing libraries, then deal with the data representing an image. Here's a reasonable overview: https://lastminuteengineers.com/getting-started-with-esp32-cam/ https://lastminuteengineers.com/getting-started-with-esp32-c...
- tetris11 2y agoOh wow, so that tiny chip can run a whole webserver with bluetooth and wifi, programmed purely using arduino. Pretty cool!
- bigiain 2y agoCraziest thing about it is, you can get one including the camera for under $10: https://www.aliexpress.com/item/1005006299363624.html https://www.aliexpress.com/item/1005006299363624.html
- bigiain 2y agoNo OS. There's just a setup() function and a main loop() that runs forever. It's really really fun, at least to my brain. If you want to see how it works without spending any money, TinkerCAD (https://tinkercad.com https://tinkercad.com) will let you layout, program, and simulate an Arduino. They're somewhat less powerful than the ESP32 CAM proposed to replace this, but it's a good way to "dip your feet" in programming and wiring up microcontrollers.
- grishka 2y agoThe problem is that this particular project uses camera and wireless networking, both requiring very non-trivial drivers. It is possible, in principle, to do it on bare metal, but getting the required peripherals working won't be easy.
- hypercube33 2y agoESP is a platform that has both though - wireless and camera on the esp32. Those can quick resume out of a low power sleep and connect to Wi-Fi and dump a picture or a series of pictures - I don't know what's more efficient.
- kfarr 2y agoOr Pi Pico W, I've used that on a few projects. Nearly instant boot
- NavinF 2y agoAre you talking about the 2MP ESP32-CAM modules? Those things are an order of magnitude worse when it comes to fps and perceptual image quality vs Arducam's offerings for the RPi. Also all sorts of specialized hardware like depth sensing cameras work out of the box with the RPi. ESP32 can do both wifi and cameras in the same sense that I can run back to back marathons. I just gotta take a couple of naps at hotels along the way.
- m00x 2y agoYou can connect the esp32 to a proper camera, you don't just have to use the development board for it. If you're just taking a picture and uploading it via wifi, you're better off doing it bare metal. It can do everything stated in OP's post. MIPI support isn't available until ESP-P4 though.
- NavinF 2y agoHow can the esp32 be connected to a proper camera? All the RPi cameras as MIPI so what's an example of a compatible camera? Do you have to debayer and sharpen the image yourself? I've seen a lot of half-assed ISPs and they make good cameras look like crap