Building a low cost wifi camera

Update! Here is a post with the BOM for the project.

Sometime ago I came across the Arducam Mini which is quite a nice camera module from UCTronics. It is a small PCB with a two megapixel OmniVision OV2640 sensor, an interchangeable lens and an FPGA to do the heavy lifting of image processing and JPEG encoding. Priced at around 24 Euros (lens included) you can easily buy a few without hurting your wallet and combined with an ESP8266 you can build quite a low cost wifi camera. Or several. Because designing and building PCBs is both fun and inexpensive I designed a board to go with the ESP8266/Arducam Mini combo, aptly named the Esparducam. And uniquely named too, try googeling for “esparducam“. Heck, even the domain name is available at the time of writing 🙂

The Espaducam board
The Espaducam board

Anyhow. The Esparducam board is a development board for the Arducam Mini module and is quite well suited for ESP8266 development in general.

Espaducam with Arducam Mini module
Espaducam with Arducam Mini module

The board is powered through a barrel connector at a minimum of 5V (upper limit untested) and all the IO pins on the ESP8266 are available on pin headers. The double rows are intended for the design of small breakout boards that sit on the inner 0.1″ aligned headers while the outer headers allow for connecting logic analyzers/oscilloscopes and so on. The Arducam Mini module plugs right into the front header and the standard FTDI connector is at the back of the board.

Image quality is, imho, quite decent at this price point, here are a few samples.

An optional SPI flash can be mounted for image storage and you can connect a standard eBay PIR module to the white JST header next to the FTDI connector if you want to build a motion triggered camera.

I am no hardware engineer but if you are and you find any silly design mistakes please let me know.

Schematics
Schematics

You can order the Esparducam board form DirtyPBCs and I would love to know if you build one. I plan to build a few for house monitoring, kite photography, reading my water meter and whatever else I can come up with.

The demo application listens to port 80 for HTTP GETs and will capture and return an image. It also has a command line interface on the serial port and the command ‘upload:<ip number>’ will capture an image and upload it via HTTP. A Python script is included that will receive and display the image using your system’s default image viewer. Note that the demo application is just that, a demo application. It does not handle simultaneous clients, errors or anything else that occurs in the real world.

IMG_3761Lastly a note about the lens. It uses a mount called M12xP0.5 and there are plenty of lenses to choose between. The one included with the Arducam Mini module has about the same field of view as a normal 50mm lens on a full frame DSLR. I would recommend getting a 3.2mm lens or shorter for some more wide angle if you plan to use the module for surveillance applications. The 3.2mm lens (called LS-40136) can focus at a very short distance making it a candidate for water meter reading applications.

I have yet to try the even shorter ones like the LS-20150 at 2.8mm or the LS-40166 at 2.6mm.

The Esparducam turned out so nice it became my preferred ESP8266 development board, why is a different post.

Code and hardware schematics as always on Github.

 

 

A versatile ESP8266 development board

This is followup to my post about building a low cost wifi camera. I mentioned that the Esparducam board is well suited for ESP8266 development in general and here is why. In addition to the Esparducam board I also designed a number of addon boards. The boards are very small (21×26 mm) meaning you can fit two of them into a standard 50×50 mm PCB you can get produced for very little money. If you want to try a new component or connector and perhaps a newly designed footprint, make a “boardlet” and try it on the Esparducam.

The RFM69C breakout
The RFM69C breakout board

The “ISM boardlet” mounts an RFM96C for building a low cost ISM to Wifi gateway. The board has an optional LED (driven by a mosfet) for link indication. I ported AndrĂ© HeĂźling’s RFM69-STM32 driver for this board and even though I have not had the time to test that much, basic transmission works.

The ESP Pinlet
The ESP Pinlet

The next board, the esp-pinlet, serves as a test bench for ESP12 family modules. After soldering an ESP12e module to an Esparducam board I noticed it would not connect to my Wifi network. For the price of ESP8266 modules, I cannot complain about broken modules but I want to make sure the modules I mount on my boards actually work before soldering. So how do we test ESP12 modules without soldering? Pogo pins! The pinlet board has 1.02mm (40 mil) holes for pogo pins that allows for an ESP12 module to be firmly pressed against the pins while flashed and tested. You can find these on eBay.

Look ma, no solder!
Look ma, no solder!

Schematics on Github.

Update on April 27th

Th pogo pins I used initially where not that good as the needle like shape made them get stuck in some of the ESP12 modules. A much better alternative is the P75-E2 [eBay] type of pin (still 1.02mm / 40mil):

P75-E2 pins
P75-E2 pins

If you plan on building a pinlet board, make use of the fact that you get ~10 in each order to help with alignment.

Pin alignment
Pin alignment

The stack here (top to bottom) is the board having the pins mounted, a spacer board (the red one), five pinlet boards for alignment and at the bottom one board flipped upside down to keep the pins from sliding downwards. The package is fixed with tape and ready for solder.

Commercial pilots control my moodlight

Having spent some time building the Wifi Ghost I wanted it to be something that was actually used. Few people in the house found the interest to change color on a daily basis (myself included). Then it occured to me, why not let the pilots of the aircrafts buzzing around the airspace of southern Sweden control it? They will probably never know that by passing within a few kilometers of my ADS-B receiver they will light up my study.

This will be a small project as most parts are already in place. The ADS-B tracker from my Skygrazer project will feed a script that sets the ghost color via its MQTT topic. What color though? Well, the most prominent color in the airlines’s logo of course! Make a Bing image search for the name of the airline with the word “logo” appended, pick an image, download and analyze. The color will be dimmed according to the distance to the aircraft. I use a maximum distance of 2 kilometers making the light fade up and down whenever an aircraft passes near my house.

The result? A wifi ghost light put to good use. And art 🙂

Code available on Github.