DIY ESP32 camera board with OLED display, RGB LEDs, SD card & light sensor
To make the experience fit your profile, pick a username and tell us what interests you.
Because we are waiting for arrival of PCBs I started to design case for our camera. It should be simple but functional & rigid but easy to open. I spend few hours with this design, but at the end we have mostly parametric design which we can easily modify if we need.
Here is 3D animation of our case:
We will get PCBs very soon
We made one board working and now, when I know what I did wrong, it is time for new revision.
I added missing pull-up resistor for RESET line for the OLED screen and looked again on those 2 schematics which I mentioned before. I decide to go with SeedStudio connection scheme, because there is SD card already in use (do not know if is used also in camera code example). I also changed reset button, because it was highest part of the board and I do not like that. I changed FPC connector as well, because it was difficult to find one which will match PCB footprint. I used Molex connector because I could find it in some Eagle library and also because 3D model is available.
You can see here how board is routed:
Here is top & bottom side of new version:
Here is 3D animation:
New version is finished and I will post new log as soon as I assemble one or more boards. Stay tuned.
I ordered PCB at ALLPCB.com and they arrived in about 5 days from order. They are, as always, really nice. Just look at them:
So now, I have to assemble one to find out, if I made some mistake.
I made stencil at my work from Mylar foil and applied solder paste on top side of the board. I placed all parts which I had in that moment (some of them were on order) ,put the board in to my oven and reflowed it. Few caps melted together, but that was not a big deal to repair. I decide to test board before i will go more further.
OK so lets go to bottom side of the board.
Firstly I soldered SD card slot. Uploaded sketch to test it, plugged in SD card and it worked.
Next in order were LEDs. Because I use them quite often, there was no problem with them and they worked at the first time.
Because I ordered OLED displays from Aliexpress and I did not receive them before I start to play with this board, I decide to sacrifice one of the OLED module board which we have for our Arduino Academy in FabLab Brno. I used a lot of flux, a lot of solder and nice piece of solder wick but I managed to take off display from original PCB. I soldered it after that very carefully to my board, programmed it with I2C scanner sketch and I get no device at serial monitor :/ . I checked voltages (OK), continuity of pads (OK) and I compared schematic to original board from Adafruit, but did not make it work. OK I will go forward, display is not so important.
Last piece to place is camera connector. This is 24 pin FPC connector with 0.5 mm pitch. Because my eyes are not in best shape and can not focus on such a small part, i used our binocular microscope. I soldered all pins, checked with multimeter that there are no bridges and also measured 1.8 and 2.5 voltages which are required for camera. I uploaded camera example for ESP32 board, change pins to my setup and plugged camera. Board connected to the network but I received error on initialization of the camera. I checked again connector for bridges and voltages but camera did not work :( .
After few days, I asked my friend Luboš Moravec if he can look at this board, because he is real engineer and not PCB hobby maker like me.
He started with OLED display because not long time ago, he was playing with similar display but really small one. Both of our displays use SH1106 driver. He looked at my schematic, compared it for some time with original one and after that grabbed 10K resistor and soldered one leg to 3.3V and second one to RESET pad on display. Programmed board with I2C scanner sketch and after few seconds looked at me with smile at his face, because there was right I2C address of the display. At the end, he soldered one 0805 resistor between 3.3V a RESET pad so I can fold display and hold it in place with double sided sticky tape.
Now, the camera module.
This one was bit more tough. Because I did not take camera connection from one schematic, he had to reverse engineer it to make his own version of it in his head. Because I shared one analog for camera and for light sensor , he tried to take it off, if it will work but i did not. After that he tried to take off some resistors and capacitors, which were at my schematics but not on those which he used for comparison. This also did not wol´k. When he was...Read more »
Ok, so what features should board like this have?
My main concern was, if I will find enough resources to put all parts together. I already designed some parts on another boards (SD card, UART, RGB leds) but camera & OLED circuits was unknown for me. Big recourse for all of my boards is Adafruit library with all of their great boards and because of that, I found their OLED brakeout board. So basically i just copied schematic for OLED display, change it to use just I2C, and that was all. Also SparkFun have very nice library of boards, so I used their design for light sensor.
Biggest problem was with connection of the camera. I found some schematics on Google and I made my connections based on them and just when I finished my routing of the board, I did find schematic for SeedStudio board also for M5Stack board, but I decided to keep my setup and did not change my routing.
This is how my board looks like:
Here are screenshots from Manufacturing tab in Eagle:
Here is 3D visualisation from Fusion 360:
Board is ready for production :-) .
This project is part of infrastructure or service, which we are trying to build and maintain at Fablab Brno for for our members. Because we are developing access system for our Prusa printers, based on Fabman service, we also want to enable possibility to see, what is happening on our printers, for our members. We installed Octoprint with webcams on out printers and it worked well, until plugin which we used became popular and service start to be paid. This, and also fact that nobody maintain RPis with Octoprint, let me to look for some other options for this service. In mean time, I did found this YT video about ESP32 & OV7670 camera, but had no time to try it. But I was already thinking about ESP32 replacing whole RPi setup.
So some time ago, I did find this small board which I liked because of SD card and also this this one, which I liked because of OLED screen. Because one of board lack some features of the second one, and vice versa, I decide that I will make our own design.
Become a member to follow this project and never miss any updates