Skip to the content
2 layersESP32Anglerfish, the printed circuit board in 3D

ESP32-based mini microscope for fluidic device observation

Copper layers
2
Thickness
1.6 mm
Parts
7
Nets
15
Pads
42
Tracks, vias
24, 0
Routed
Yes
KiCad
KiCad 6 (file 20211014)
Created
10 Feb 2022
Updated
25 Nov 2023

Overview

ESP32Anglerfish is an open-source printed circuit board by Matchboxscope, from the Matchboxscope/Matchboxscope repository on GitHub. It is a 2-layer board with 7 parts on 15 nets, routed with 24 tracks and 0 vias.

It is built around the BD139. Its parts include 5 connectors, 1 IC and 1 transistor. It belongs with the ESP32 boards of this library.

Main components

1

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

7
QtyValueFootprintReferences
2Conn_01x08Connector_PinSocket_2.54mm:PinSocket_1x08_P2.54mm_VerticalJ1, J2
1BD139Package_TO_SOT_THT:TO-126-3_VerticalQ1
1Connector_LensConnector_PinSocket_2.54mm:PinSocket_1x02_P2.54mm_VerticalJ5
1Connector_NeopixelConnector_PinSocket_2.54mm:PinSocket_1x03_P2.54mm_VerticalJ4
1Connector_PowerConnector_PinSocket_2.54mm:PinSocket_1x02_P2.54mm_VerticalJ3
1ESPCAMespcam:ESPCAM_bottomU1

More from Matchboxscope/Matchboxscope

1
  • 2 layers40.6 × 25.4 mmEspcam, the printed circuit board in 3D

    Espcam

    Matchboxscope/Matchboxscope

    ESP32-based mini microscope for fluidic device observation

    3 parts103

Similar boards

  • 2 layers49.8 × 63 mmPiHat, the printed circuit board in 3D

    PiHat

    joelkoz/QwicktracePCB

    UI for PCB smart exposure table

    15 parts16MIT
  • 2 layers100 × 100 mmAmply, the printed circuit board in 3D

    Amply

    T76-org/amply

    A $10 desktop Bluetooth amplifier you'll love

    67 parts14GPL-3.0
  • 2 layers84.5 × 82.6 mmClassab amp, the printed circuit board in 3D

    Classab amp

    prydin/classab-amp-mosfet

    MOSFET-based 50W Class AB amplifier

    67 parts9
  • 2 layers100 × 79 mmPower board, the printed circuit board in 3D

    Power board

    Dominik-Workshop/dw3005t

    Linear power supply, with digital control

    23 parts8GPL-3.0
  • 2 layers95.9 × 112.6 mmLab supply, the printed circuit board in 3D

    Lab supply

    prydin/lab-supply

    Linear 0-30V, 2A lab supply

    90 parts8
  • 2 layers40 × 99 mmOutput mixer, the printed circuit board in 3D

    Output mixer

    mohoyt/output_mixer

    Simple 4 channel Eurorack output mixer

    114 parts7CERN-OHL-S-2.0
  • 2 layers135.8 × 56.1 mmPower board, the printed circuit board in 3D

    Power board

    xtarke/automated_buggy

    This shield connects microcontroller (MSP-EXP430FR2355) pins to the car's power board. Go to Power Board for more hardware information.

    87 parts5GPL-3.0
  • 2 layers230.1 × 118.5 mmPOWER 0-50, the printed circuit board in 3D

    POWER 0-50

    Aleksei327/STM32G474-Precision-Lab-Power-Supply

    Precision 0–50 V programmable laboratory PSU with 1 mV/1 mA setting steps, hybrid synchronous-buck + linear regulation, STM32G474 control, INA228 metering, and layered hardware protection.

    207 parts4

Questions

What parts does the ESP32Anglerfish use?

7 parts, built around the BD139. 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 ESP32Anglerfish KiCad files?

From the Matchboxscope/Matchboxscope repository on GitHub, at the commit this page was made from: the board is KiCAD/ESP32Anglerfish/ESP32Anglerfish.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 ESP32Anglerfish design in my own project?

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