Workshop Manual: Building a Smart laser-Powered Fluorescence Microscope
In this workshop, we will guide you through assembling a laser-powered fluorescence microscope, allowing you to explore fascinating experiments with microscopic details.
Materials Needed
- laser diode
- Beamsplitter
- LED-Matrix with USB-C cable (for bright-field microscopy)
- Electronic Z-stage with some technical nobs
- Mainboard with UBC-mini cable
- PS4 Controller (for controlling the Z-stage)
- Infinity objective
- biconvex lens (f'=50mm)
- Camera with tube lens
- Probe insert
- Probes
- cubes and base plates
Diagram
Theory of Operation
Fluorescence is a photophysical process that describes the spontaneous emission of light shortly after an electron is excited to a higher-energy state. First, an electron is excited from the ground state to the higher-energy state through absorption. After a short time (approximately 10⁻⁹ s), the excited electron returns to the ground state, releasing energy in the form of radiation. Due to the Stokes-shift within the S₁ state, the emitted light has a longer wavelength (λ₂) than the radiation used for excitation (λ₁).
Theoretical Background: Fluorescence
Fluorescence is a photophysical process that describes the spontaneous emission of light shortly after an electron is excited to a higher-energy state. First, an electron is excited from the ground state to the higher-energy state through absorption. After a short time (approximately 10⁻⁹ s), the excited electron returns to the ground state, releasing energy in the form of radiation. Due to the Stokes-shift within the S₁ state, the emitted light has a longer wavelength (λ₂) than the radiation used for excitation (λ₁).
Tutorial: LASER-Powered Fluorescence Microscope
Step 1: Assemble the Microscope
This guide will walk you through building the microscope step by step. You can follow the assembly process according to the functional groups or refer to the diagram above.
1.1: Assembling the Bright-Field Microscope
- Build the Baseplate: This will connect the LED-matrix, probe insert, movable infinity objective, beamsplitter and the camera (which is already connected to the tube lens).Attach wo extra baseplates for the Z-stage.
2. Attach the LED-matrix: Place the LED-matrix and than the probe insert behind it, securing both with two baseplates on top.
3. Install the movable Infinity-Objective: Drill the objective into the attachment of the electronic Z-stage. Because in this Assembly the Z-stage lays flat on the ground choose the insert thats closest to the Z-stage. As shown below the lettering "stage" is placed upward. Innsert the technical pins on the long sides to attach the baseplates.
- Position the beamsplitter cube: Insert the beamsplitter cube (you can leave it empty for now, it will be needed when assembling the fluorescence microscope).
- Add the camera: Finally, attach the camera unit behind the beamsplitter and secure everything with a second layer of baseplates.
Now, your bright-field microscope is ready!
1.2: Assembling the Fluorescence Microscope
But of course if you got this box you want more, so now let's start buidling the fluorescene Microscope
- Prepare a 4x1 Baseplate: After that, attach it to the beamsplitter cube.
- Position the laser: Place the laser at the furthest point from the beamsplitter.
- Collimate the Light: The blue laser is a divergent light source because its a fiber laser, so use the f'=50mm biconvex lens to collimate the light.
- Focus the Light: To focus the collimated light into the objective, insert an empty cube, followed by the f'=100mm biconvex lens.
- Insert the Beamsplitter: Place the beamsplitter carefully. Make sure the filter sides are oriented correctly to avoid blocking the wrong wavelengths.
- Focus Light into the Infinity Objective: to correctly focus the ligth into the infinity objective, position the biconvex lens and infinity objective with about 100mm of space between them.
After completing these steps, you're done with the assembly, nice job!
Step 2: Turn Your Microscope Into a Smart One - aka the Electronics
2.1: Plug in the Electronics as Shown Below
⚠️ Caution! If you need to change any of the cables or their position, always unplug the 12V power cable before doing so. Otherwise, the electronic components might get damaged! :::
- connect the LED-Matrix panel by plugging in the micro-USB and connect it to your PC.
- Connect the Z-stage to the
Z-Motor
on the main board. Ensure there's a motor driver.
- Connect the Laser to the Mainboard at
PMW1
and to12V
Power:- the laser has two plugs: the one coming out of the big white cable goes to
12V
power supply- The black cable goes to
12V-GND
- The black cable goes to
- the second plug goes to
PMW1
- The black cable goes to
PMW1-GND
- The black cable goes to
- the laser has two plugs: the one coming out of the big white cable goes to
Plug in the micro-USB at your ESP32 and connect to your PC.
Plug in the 12V power cable.
2.2: Flashing the ESP32 Firmware
- Before proceeding, ensure your ESP32 board has the latest firmware. You can download and flash the firmware via the official openUC2 website, selecting your version (most likely ESO32-DEV-based UC2 standalone board V3 (beta)), then click on the
connect
button.
The source code can be found here.
- Connect the ESP32 to your computer using the micro-USB cable.
In your Chrome browser, a dialog will prompt you to select the COM port for your ESP32, which should be shown as
CP2102 USB to UART Bridge Controller
. Once connected, you can install the latest firmware by simply clicking the "Install" button.If nothing shows up, you can install the drivers from the prompt that appears when you click anywhere on the screen:
Wait until the firmware has been successfully flashed.
💡 flash your LED-matrix. Repeat the same steps, but this time for the LED-matrix
2.3: Connecting to the Web Interface
After flashing the firmware, go to the testing section on the same website.
Connect to your ESP32 board using the "Connect" button again, ensuring the correct COM port is selected.
Once connected, test the system by sending a simple command:
{"task":"/motor_act", "motor": { "steppers": [ { "stepperid": 3, "position": -1000, "speed": 1000, "isabs": 0, "isaccel": 0} ] } }
This command will move the Z-axis motor by -1000 steps (1 full rotation) at a speed of 1000 steps per second. Each step corresponds to a movement of 300nm when using microstepping. You’ll observe the motor rotating, adjusting the focus.
Note: Ensure that the command string has no line breaks.
- 💡Connect your LED-matrix as well. Duplicate the current tab and connect the LED-matrix again via the button. Choose the correct COM Port.
Now you can test all components through these two tabs.
2.4: Testing in the Web Interface
- After completing the test, go back to the first tab to control the other components via buttons:
Laser 1(on)
andLaser 2(off)
control the laser diode.Motor Z(+)
andMotor Z(-)
control the Z-stage.LED (on)
andLED (off)
control the LED-matrix panel (💡you must change tabs to control it).
2.5: Pairing the PS4 Controller 🎮
The UC2-ESP firmware supports various input devices, including the PS4 controller, to make interacting with the microscope easier. While you've already worked with USB serial commands, using the PS4 controller offers a more flexible, hands-on approach. For more detailed instructions on pairing, refer to the UC2 PS4 Controller Pairing Guide. Here’s a brief summary:
- Put your PS4 controller into pairing mode by holding down the
Share
button and thePS
button simultaneously until the light bar starts blinking. - Click the
Pair Controller
button in the web interface. Alternatively, open the serial prompt in your browser (connected to the ESP32 board) or use the web interface and enter the following command:
{"bt_scan":1}
This will initiate the Bluetooth scan on the ESP32, which will detect and pair with the controller.
Once paired, you can control the motorized stage using the analog sticks and switch the LED-matrix on/off using the buttons:
- Move the Z-stage: Use the left analog stick to move the stage up and down (adjust focus).
- Control the LEDs: Use the controller buttons to turn the LED-matrix on/off and cycle through different illumination patterns.
2.6: Setup and Use the Camera Software
- Connect the camera via cable to your PC.
- For the installation process and useage of the software, follow these instructions: Install MVS App for Camera Utilization.
Congratulations! You Have Completed All the Setup Steps! Now Let's Use the Microscope
Experiment 1: Bright Field Illumination
- Turn the LED-matrix on and the blue LED off.
- Insert the probe into the probe insert.
- Start the camera by pressing the play button (▶).
- Make sure your probe is centered. Shift it around until you see some structure on your screen.
- The image you see might be blurry or, to be precise, out of focus. Use the PS4 controller to move the Z-stage up or down to get a sharp image.
- Now you can move the probe around and inspect it properly.
Hellfeld-Bildaufnahme von Pollen
Experiment 2: Fluorescence Microscopy
- To turn your microscope into a fluorescence microscope, turn the LED-matrix off and the laser on.
- The probe should still be in the probe insert, and the camera should still be on.
- At this point, you're likely seeing a black screen. This is because the fluorescence (the photons emitted by the probe) is much weaker than the bright LED-Array. To adjust, open the feature tree in your camera programm, go to
Acquisition Control
, and increase theExposure time
to 300000 ms. You should now see the fluorescence image. Optional you can go toAnalog Control
, and increase theGain
.
Fluoreszenz-Bildaufnahme von Lens-tissue-Fasern (mit fluoreszentem Marker präperiert)
Experiment 3: Smart Microscopy Using ImSwitch and openUC2
For this, please refer to the installation instructions here.
On top of this, you can use the following ImSwitchClient
template to remote control your microscopy using google colab or jupyter notebook. This gives some hints on the use of the API: