{"id":7351,"date":"2020-09-26T09:58:04","date_gmt":"2020-09-26T13:58:04","guid":{"rendered":"https:\/\/dronebotworkshop.com\/?p=7351"},"modified":"2023-04-12T10:19:59","modified_gmt":"2023-04-12T14:19:59","slug":"esp32-cam-develop","status":"publish","type":"post","link":"https:\/\/dronebotworkshop.com\/esp32-cam-develop\/","title":{"rendered":"Build an ESP32-CAM Developers Module"},"content":{"rendered":"\n
<\/a> <\/a><\/p>\n Today we will be constructing a developers module that simplifies working with the popular ESP32-CAM.\u00a0 It even has a useful portable power supply that can deliver 3.3 and 5-volts!<\/span><\/p>\n Even if you don\u2019t need an ESP32-CAM specific developers module you\u2019ll probably get some great ideas for building something perfect for your own application.<\/span><\/p>\n The ESP32-CAM is an amazing module that features a camera, microSD card, and flash LED combined with an ESP32 microcontroller – all for under 10 US dollars. With it\u2019s built-in Bluetooth and WiFi, along with a wealth of digital and analog I\/O ports this module is a winner for remote control and IoT projects.<\/span><\/p>\n However working with an ESP32-CAM module can be a bit daunting, as it isn\u2019t as \u201cbreadboard-friendly\u201d and many other microcontrollers which we\u2019ve grown accustomed to working with.\u00a0<\/span><\/p>\n So in order to simplify ESP32-CAM development, I\u2019ve put together a simple project, a developers module that makes working with the ESP-32 a lot easier.<\/span><\/p>\n <\/p>\n Let me explain why I did this, and why you might consider building something similar for yourself.<\/span><\/p>\n I was getting ready to do a number of experiments with the ESP32-CAM in preparation for another video and article when it dawned upon me how awkward it was working with these amazing little creatures.\u00a0<\/span><\/p>\n So I decided to build a more permanent experimenters platform, one that would resolve all of the annoying bits that make working with the ESP32-CAM more difficult than working with, say, an Arduino, or even another ESP32 without the camera.<\/span><\/p>\n And thus this project was \u201cborn\u201d!\u00a0 It actually \u201cevolved\u201d from being a simple way of breaking out the pins and mounting the external antenna into a complete developers platform with a built-in portable power supply.<\/span><\/p>\n So what are these ESP32-CAM Developers issues that I find so annoying? Actually, there are a few, but the main ones are as follows:<\/span><\/p>\n Another consideration is that in the \u201creal world\u201d you often need to test your creation in remote areas, away from your workbench or perhaps even away from electricity (i.e. the rafters of your attic). Being tethered to a USB cable and computer doesn\u2019t make that very easy, so a portable power supply would be in order.<\/span><\/p>\n Now, to be fair, there are other ways around most of these issues. For example, the ESP32-CAM module can still be used on a solderless breadboard, providing that you place it at the very end and use a toothpick or paperclip to access the Reset switch.\u00a0 Not exactly convenient, but workable.\u00a0 And most folks just bypass the breadboard altogether and just use female jumper wires.<\/span><\/p>\n The Developers module that I built has the following features:<\/span><\/p>\n <\/p>\n I wired the Developers module and power supply using perfboard and wire-wrap wire (which I soldered, not wire-wrapped).\u00a0 It took me a long afternoon, about 5 hours, to complete the project.<\/span><\/p>\n I made use of parts I had around the workshop, and you can do the same, so the parts list is very flexible.\u00a0 And you can design an \u201cimproved\u201d version of this module with more LEDs and pushbuttons, or one that supports a different microcontroller.<\/span><\/p>\n It\u2019s all up to you how you want to build it, you can create an identical device to the one I built or you could improvise and make something truly unique!<\/span><\/p>\n Here are the parts I used for the module. This list does NOT include the portable power supply, which we will get to in a moment:<\/span><\/p>\n You can use 40-pin Female and Male Dupont headers to make all of the required headers, just use a small set of diagonal cutters to cut them to size. On the female headers, you may have to sacrifice a pin or two to make the cut, and you can trim the ends with a small hobby knife.\u00a0 The male ones cut easily.<\/span><\/p>\n <\/p>\n The ESP32-CAM Developers Module is built on two pieces of perfboard, one that holds the ESP32-CAM and optional antenna and the other for the remaining components.<\/span><\/p>\n Here are the wiring diagrams for both of the boards, starting with the board that holds the ESP32-CAM.<\/span><\/p>\n <\/p>\n And here is the other board, the one that has the solderless breadboard and FTDI adapter on it:<\/span><\/p>\n <\/p>\n Read on for a few hints on wiring all of this up.<\/span><\/p>\n The front assembly, the one that has the ESP32-CAM module and antenna on it, is very easy to wire up. I used a 3cm x 7cm perfboard for this, and before I started wiring the board I drilled a hole to accommodate the antenna connector.<\/span><\/p>\n When you are laying out this board <\/span>DO NOT MAKE THE SAME ERROR I MADE!!<\/b><\/p>\n I placed my ESP32-CAM module with the writing right-side-up and the microSD card at the top, as it seemed the most logical way to arrange the board. Turns out that <\/span>while this arrangement looks great, it actually results in a sideways image!<\/b><\/p>\n I will be rewiring another front section board, the beauty of this design is that the modules are interchangeable.\u00a0 When you hook up your front section put the ESP32-CAM module on its side, so that the final image is correctly oriented.<\/span><\/p>\n <\/p>\n The wiring is very simple for this section, the only challenge is that the two 8-pin female Dupont headers (which hold the ESP32-CAM module) are on the opposite side from the 16-pin female Dupont header that connects this board to the base board.<\/span><\/p>\n To make this easier I wired the two 8-pin female headers first, and ran their wires through the perfboard holes right above the 16-pin female header. I did all this without having the 16-pin connector mounted. I then cut and stripped the wires, mounted the 16-pin header on the other side, and soldered each wire.<\/span><\/p>\n With all the headers in this project once you get one pin soldered it will hold the header in place, you can \u201cspot solder\u201d each header with a small bit of solder on one pin to hold them while you are assembling the project.\u00a0 Make sure you have them aligned squarely with the pegboard, as once you solder a few pins they can be difficult to adjust.<\/span><\/p>\n And teste all your wiring with an ohmmeter after you are done, to make sure all the connections are correct and that there are no short circuits between pins.<\/span><\/p>\n The main board can be wired in sections to make it easier. I suggest not mounting the solderless breadboard until everything is wired and tested with an ohmmeter.<\/span><\/p>\n <\/p>\n Here is the sequence I used when wiring my board, note that I wired the cross-connections between the front 90-degree header and the two 16-pin headers last.\u00a0<\/span><\/p>\n Take it a step at a time and test your wiring as you go. If possible, use color-coded wires to make testing and troubleshooting easier.<\/span><\/p>\n <\/p>\n Once you are done plug the front board into the main board, without the ESP32-CAM module. Use your ohmmeter and test out all 16 connections from the ESP32-CAM sockets to the two connectors at the back of the module. Check out the FTDI and power connections as well.<\/span><\/p>\n If all looks good then you can proceed to construct the power supply base.<\/span><\/p>\n The power supply base would actually make a fine project on its own, if you want to do that then just skip the connection up to the ESP32-CAM Developers module.<\/span><\/p>\n One of the first considerations for your power supply will be the enclosure. You’ll want one that can support the ESP32-CAM Developers Module and that can also hold your battery.\u00a0<\/span><\/p>\n I chose a case I happened to have in stock, it was new but was purchased several years ago. It has a length of 12.8 cm, a width of 6.4 cm, and is 2.4 cm tall. That’s 5 inches x 2.5 inches x \u215e of an inch if Metric is not your thing!<\/span><\/p>\n Internally the case had a few plastic standoffs that were already threaded for an M3 screw. I removed most of the standoffs (using diagonal cutters) but retained two of them to mount my circuit board upon.<\/span><\/p>\n The ESP32-CAM Developers Module mounts to the top of the enclosure using M2.5 threaded standoffs and nuts, these are the correct size for the mounting holes provided in the perfboard.<\/span><\/p>\n The case selection is where you can get creative, so let your imagination do the work.\u00a0 You probably have something around the house that would work just fine, if not then Amazon is a good source of small project cases.<\/span><\/p>\n You can be very flexible when selecting components for the power supply. Essentially I used a 9-volt battery to drive two small linear regulator modules, a 3.3-volt and a 5-volt one.\u00a0\u00a0\u00a0<\/span><\/p>\n All of the parts were chosen on the basis of already being in stroke in my workshop, so feel free to substitute!<\/span><\/p>\n <\/p>\n Here are the details regarding the parts I used for my power supply base:<\/span><\/p>\n Once you have your components and case gathered together we can start assembling it.\u00a0<\/span><\/p>\n Here is the hookup diagram for the power supply base:<\/span><\/p>\n <\/span><\/p>\n Note that the power to the ESP32-CAM Developers Module is supplied via a 3-pin cable with a Dupong female connector.\u00a0<\/span><\/p>\n Also, I didn\u2019t include a power LED with this but it could be easily added if you wish.\u00a0<\/span><\/p>\nIntroduction<\/span><\/h2>\n
Why the Developers Module?<\/span><\/h2>\n
ESP32CAM Prototyping Issues<\/span><\/h3>\n
\n
Developers Module Features<\/span><\/h3>\n
\n
Building the ESP32-CAM Developers Module<\/span><\/h2>\n
Parts for Module<\/span><\/h3>\n
\n
Module Hookup<\/span><\/h3>\n
Module Assembly – Front Section (with ESP32-CAM)<\/span><\/h3>\n
Module Assembly – Base Section (with FTDI & Breadboard)<\/span><\/h3>\n
\n
Building the Power Supply Base<\/span><\/h2>\n
Power Supply Components<\/span><\/h3>\n
\n
Power Supply Hookup<\/span><\/h3>\n
Power Supply Assembly<\/span><\/h3>\n