Skip to the content
PCBKitNew board
2 layers40.6 × 25.4 mmEspcam, the printed circuit board in 3D

ESP32-based mini microscope for fluidic device observation

Size
40.6 × 25.4 mm
Copper layers
2
Thickness
1.6 mm
Parts
3
Nets
14
Pads
32
Tracks, vias
23, 0
Routed
Yes
KiCad
KiCad 5 (file 20171130)
Created
10 Feb 2022
Updated
25 Nov 2023

Overview

Espcam is an open-source printed circuit board by Matchboxscope, from the Matchboxscope/Matchboxscope repository on GitHub. It is a 2-layer board of 40.6 × 25.4 mm with 3 parts on 14 nets, routed with 23 tracks and 0 vias.

Its parts include 2 connectors and 1 IC.

README

README.md

Matchboxscope

This is a repository for the smallest standalone low-cost open-source DIY incubator-contained microscope that can be used for a gazillion different applications. Sounds interesting? Continue reading!

The core component of this device is a ESP32 microcontroller that is packed with a small Camera (OV2460) and microSD card slot, which makes it a perfect match for your microscopy project. In the most minimal version, you don't need anything but the ESP32-CAM and perhaps some chewing gum to raise the objective lens in order to create a finite corrected microscope.

However, we wanted to make the microscope a bit more practical and created some 3D printed parts that will realize the following devices:

The Anglerfish: This device is well preserved in your beloved jars and hence watertight. Why? Throw it in your nearby pond and collect data how microfilm grows on the jars' surface. Fun! Follow the BLUE PILL 🔵

The Matchboxscope: This is a simple self-contained microscope, e.g. for tacking snapshots of your microfluidic chips, your parasite containing slides or just for fun. It comes with a minimum number of parts, but offers a spring-loaded z-stage. Also ideal for your incubator-contained microscopy experiments! Follow the RED PILL 🔴

The Z-Stacker: It adds an automatic focusing unit to the Matchboxscope in order to create temporal Z-stacks of your beloved cell cultures. It needs more electronics, but still relies on the ESP32-CAM only. Lots of fun, too. Follow the GREEN PILL 🟢

Still curious? Continue Reading by clicking on individual device sub-pages!

How to install

In order to get the code compiled and uploaded to your ESP32 camera board, a number of steps have to be carried out to prepare the system.

Compile and Upload

This code is written for the AI_THINKER

  1. Download the Arduino IDE 1.8.X from here
  2. Install the ESP32 IDF tool through the Arduino board manager; Add the following link to the settings (a more in-depth tutorial can be found here): https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json When installing the board, go for the version 2.0.3
  3. (OBSOLETE!) Install the ESP32Cam library following this link and their README
  4. Clone this repository
  • MatchBoxscope: Choose the latest release for the MatchBoxscope, open the .ino and flash the project (v0.1)
  • Anglerfish: We will provide a ready-to-use software solution soon
  • IncubatorMicroscope: We will provide a ready-to-use software solution soon
  1. Compiling: Under Toolsselect your board (DEV Module), port and enable the PSRAM enable 4MB external PSRAM.
  2. Compile and Upload

ATTENTION for Android users: The Wi-Fi in access point mode (AP) does not offer internet, hence Android uses available cellular/mobile data and won't open the local address (192.168.4.1). Solution: Switch off mobile data or disable Wifi+

Wi-Fi settings:

Please have a look in the Wi-Fi settings to adjust them according to your network configuration:

`cpp boolean hostWifiAP = true; // set this variable if you want the ESP32 to be the host const char* mSSID = "Blynk"; const char* mPASSWORD = "12345678"; const char* mSSIDAP = "Matchboxscope"; ``

Upload files to SPIFFs

For the HTML and CSS files, you can upload the files to

Software

Anglerfish Code

Getting many images in an autonomous "diving" experiment is key. For this, we wrote a firmware that enables you to find the focus and as soon as you're done, the microcontroller goes into deep-sleep mode to save energy. The following steps are important to carry out before your experiment.

The protocol

  1. Assemble unit and charge battery
  2. Upload software and insert SD card
  3. Then connect the battery to ESP32 and watch the camera stream via Wi-Fi and adjust the focus so that you can see the surface (of the jar) in focus. That's what the screws and springs are for. You do this once.
  4. Either with a switch (awkward, because you have to solder), or via Wi-Fi (switch in Webgui/HTTP endpoint), deactivate the focus mode.
  5. Microscope goes into deep-sleep mode and wakes up every X minutes to take a photo and save it on the SD card.

In the deep-sleep setting, it consumes virtually no power.

Problem/thoughts:

  • It is not possible to detect whether it is deep-sleep or disconnected from the power supply, so we built in this funny construct with the date/time of flashing the ESP32. So you can reset the EEPROM variable for focus mode (yes/no) when you (re-)flash the microcontroller
  • the SD card and the LED flash hinder each other a bit because they both run on the same pins (yup). But I think we managed to get everything working by relying on the 1-bit mode of the SD card (slower, but more stable); also important: Initialize the SD card before any GPIO assignment (i.e. in setup())
  • The same code could also be used in an incubator-contained microscope, for example, to observe the growth of cells. But for this it would be important to keep the Wi-Fi stream running :)

Videos

That's the software for the Matchboxscope:

And a more in-detail tutorial on how to use the software:

Get Involved

This project is open so that anyone can get involved. You don't even have to learn CAD designing or programming. Find ways you can contribute in CONTRIBUTING

License and Collaboration

This project is open-source and is released under the CERN open hardware license. Our aim is to make the kits commercially available. We encourage everyone who is using our Toolbox to share their results and ideas, so that the Toolbox keeps improving. It should serve as an easy-to-use and easy-to-access general purpose building block solution for the area of STEAM education. All the design files are generally for free, but we would like to hear from you how is it going.

You're free to fork the project and enhance it. If you have any suggestions to improve it or add any additional functions, make a pull-request or file an issue.

Please find the type of licenses here

REMARK: All files have been designed using Autodesk Inventor 2019 (EDUCATION)

Collaborating

If you find this project useful, please like this repository, follow us on Twitter and cite the webpage! :-)

Parts

3
QtyValueFootprintReferences
1Conn1Connector_PinSocket_2.54mm:PinSocket_1x08_P2.54mm_VerticalJ1
1Conn2Connector_PinSocket_2.54mm:PinSocket_1x08_P2.54mm_VerticalJ2
1ESPCAMespcam:ESPCAM_bottomU1

Questions

How big is the Espcam PCB?

It measures 40.6 × 25.4 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Espcam use?

3 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Espcam KiCad files?

From the Matchboxscope/Matchboxscope repository on GitHub, at the commit this page was made from: the board is KiCAD/ESP32Anglerfish/libraries/espcam.kicad_pcb and its schematic KiCAD/ESP32Anglerfish/ESP32Anglerfish.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Espcam design in my own project?

Its repository states no licence, so its author keeps all rights: ask Matchboxscope before reusing the design.

More from Matchboxscope/Matchboxscope

1
  • 2 layersESP32Anglerfish, the printed circuit board in 3D

    ESP32Anglerfish

    Matchboxscope/Matchboxscope

    ESP32-based mini microscope for fluidic device observation

    7 parts103

Similar boards

  • 2 layers40 × 30 mmBlinky, the printed circuit board in 3D

    Blinky

    earthtojake/text-to-cad

    Design physical products with AI

    3 parts26kMIT
  • 2 layers51.9 × 16 mmPassive2-rpi non standard adapter, the printed circuit board in 3D

    Passive2-rpi non standard adapter

    hzeller/rpi-rgb-led-matrix

    Controlling up to three chains of 64x64, 32x32, 16x32 or similar RGB LED displays using Raspberry Pi GPIO

    3 parts4.4kGPL-2.0
  • 2 layers16.3 × 16.3 mmSensor, the printed circuit board in 3D

    Sensor

    scottbez1/splitflap

    DIY split-flap display

    3 parts4.2k
  • 2 layersSub, the printed circuit board in 3D

    Sub

    atopile/atopile

    Design circuit boards with code! ✨ Get software-like design reuse 🚀, validation, version control and collaboration in hardware; starting with electronics ⚡️

    3 parts4kMIT
  • 2 layers85 × 30 mmDual stomp, the printed circuit board in 3D

    Dual stomp

    torvalds/GuitarPedal

    Linus learns analog circuits

    3 parts2.5kGPL-2.0
  • 2 layers124.5 × 33.7 mm172319-1 connector, the printed circuit board in 3D

    172319-1 connector

    rusefi/rusefi

    rusefi - GPL internal combustion engine control unit

    3 parts1.2k
  • 2 layers10.5 × 83 mmProgrammingAdapter, the printed circuit board in 3D

    ProgrammingAdapter

    stuartpittaway/diyBMSv4

    Version 4 of the diyBMS

    3 parts1.1k
  • 2 layers21.2 × 51.3 mmPico reset, the printed circuit board in 3D

    Pico reset

    hackclub/sprig

    🍃 Learn to code by making games in a JavaScript web-based game editor.

    3 parts1.1kMIT