You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/02_Toolboxes/02_ElectronicsBox/01_automation_intro.md
+46-53Lines changed: 46 additions & 53 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
4
4
## Introduction
5
5
6
-
The openUC2 Discovery Electronics Kit empowers users to explore advanced microscopy techniques by combining geometric optics and automation. By utilizing affordable, modular components, this kit allows you to build a fully functioning digital microscope with smart features such as automated focus stacking and digital phase contrast. It’s an ideal learning tool for educators, students, and hobbyists interested in microscopy, optics, and electronics.
6
+
The openUC2 Discovery Electronics Kit empowers users to explore advanced microscopy techniques by combining geometric optics and automation. By utilizing affordable, modular components, this kit allows you to build a fully functioning digital microscope with smart features. It’s an ideal learning tool for educators, students, and hobbyists interested in microscopy, optics, and electronics.
7
7
8
8

9
9
*Electronics components to have a lot of fun with open-source fully automated microscopy*
@@ -17,44 +17,58 @@ This kit is perfect for classrooms or workshops where participants learn how to
17
17
## Components Included in the Kit:
18
18
19
19
### In Cubes:
20
-
1.**Camera** (USB3, monochrome)
21
20
2.**Motorized Z-Stage** (NEMA 11 stepper motor)
22
21
3.**openUC2 LED Array** (3 concentric circles with NeoPixels)
23
-
4.**Baseplates** (10x for modular setup)
24
22
25
23
### Not in Cubes:
26
-
1.**Objective Lens** (RMS compatible, 10x finite or 4x finite)
24
+
1.**Objective Lens** (RMS compatible, 10x finite)
27
25
2.**openUC2 Electronic Board** (ESP32-based control unit)
28
-
3.**Box + Foam Insert** (for safe storage and transport)
29
26
4.**Micro USB Cable** (for connecting ESP32)
27
+
4.**USB-C Cable** (for connecting LED Array)
30
28
5.**Controller** (PlayStation-style)
31
29
6.**12V Power Supply** (to power motors and lights)
30
+
4.**Baseplates** (8x for modular setup)
31
+
32
32
33
33
---
34
34
35
35
## Experiment #1: Testing the USB Serial Interface via the Web
36
36
37
37
In this first experiment, we’ll walk through how to control the motorized Z-stage and LED array using the web-based serial interface.
38
38
39
-
### Step 1: Flashing the ESP32 Firmware
40
-
1. Before proceeding, ensure your ESP32 board has the latest firmware. You can download and flash the firmware via the official [openUC2 website](https://youseetoo.github.io/), selecting the appropriate version (currently v3 Standalone).
39
+
### Step 1: Hardware Setup for Testing and controlling the Z-focus Motor
40
+
**⚠️ Caution!**
41
+
If you need to change any of the cables or their position, always unplug
42
+
the 12V power cable before doing so. Otherwise, the electronic
43
+
components might get damaged!
44
+
45
+
These instructions based on the Pinlay-Out of the **ESO32-DEV-based UC2 standalone board V3 (beta)**)
46
+
find the Pin-layout for the **ESO32-DEV-based UC2 standalone board V4** here
47
+
48
+
- connect the LED-Matrix to the Mainboard at `LED1`
49
+
- Connect the Z-stage to the position `Z-Motor` on the main board. Ensure there's a motor driver.
50
+
- Plug in the micro-USB at your ESP32 and connect to your PC.
51
+
- Plug in the 12V power cable.
52
+
53
+
### Step 2: Flashing the ESP32 Firmware
54
+
1. Before proceeding, ensure your ESP32 board has the latest firmware. You can download and flash the firmware via the official [openUC2 website](https://youseetoo.github.io/), selecting the your version, then then click on the connect button.
41
55
42
56

43
-
*Choose the ESP32 v3 board (not BETA or re-work!) and flash it (but only if you need an update)*
57
+
*flashing prozess shown for the ESO32-DEV-based UC2 standalone board V3 *
44
58
45
59
The source-code can be found [here](https://github.com/youseetoo/uc2-esp32)
46
60
47
61
2. Connect the ESP32 to your computer using the micro-USB cable.
48
62
49
63

50
64
51
-
3. In your Chrome browser and click on "Connect." A dialog will prompt you to select the COM port for your ESP32, which should show as `CP 20x`. 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 following propmpt that results when you hit anywhere on the screen:
65
+
3. In your Chrome browser and click on "Connect." A dialog will prompt you to select the COM port for your ESP32. 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 following propmpt that results when you hit anywhere on the screen:
52
66
53
67

54
68
55
69
4. Wait until the firmware has been flashed successfully.
56
70
57
-
### Step 2: Connecting and Testing the Web Interface
71
+
### Step 3: Connecting and Testing the Web Interface
58
72
1. After flashing the firmware, go to the testing section on the same website. You’ll find buttons to control the motor and LEDs (This can be tested with the hardware connected or with only the ESP32 connected via USB)
59
73
60
74

@@ -73,30 +87,30 @@ This command will move the Z-axis motor by -1000 steps (1 full rotation) at a sp
73
87
74
88
> **Note:** Ensure the command string has no line breaks.
75
89
76
-
### Step 3: Hardware Setup for Testing and controlling the Z-focus Motor
77
-
1. Plug the ESP32 board into your computer via USB.
78
-
2. Connect the 12V power supply to the provided port.
79
-
3. Attach the NEMA 11 motor to the Z-motor port on the board.
80
-
4. Turn on the system and verify that the motor responds to commands.
81
-
5. The motor should move when you enter the command or hit the buttons.
90
+
91
+
###Step 4: testing in the Web Interface
92
+
(valid since March 2025)
93
+
After completing the test, go back to the first tab to control the other components via buttons:
94
+
-`Motor Z(+)`and `Motor Z(-)` control the Z-stage.
95
+
-`LED (on)` and `LED (off)` control the LED-matrix panel, as well as the other buttons in this section to turn on single LEDs or a ring pattern.
### Step 4: Controlling the LED Array (obsolete since March 2025)
100
114
101
115
1. Use the web interface to turn the LEDs on and off or control brightness.
102
116
2. Try adjusting the LED patterns (e.g., lighting only certain rings) using the available commands. This turns a ll red. Try to turn on individual LEDs. For this checkout the Documentation to the Command set/API [here](https://openuc2.github.io/docs/Electronics/Advanced/UC2-ESP/APIDescription/INTRO)
@@ -114,12 +128,12 @@ Experiment with other colors by changing the RGB values.
@@ -169,37 +183,16 @@ Next, you will build a motorized digital microscope using the components provide
169
183
1.**Mount the Objective Lens**: Attach the RMS-compatible objective to the lens holder on the Z-stage.
170
184
2.**Assemble the Z-Stage**: Attach the motorized Z-stage to the base plate and secure the camera above it using the provided baseplates and cubes.
171
185
3.**Connect the Electronics**: Plug in the ESP32 board, motorized stage, and LED array. Ensure the 12V power supply is connected to provide power to the motors and LEDs.
172
-
4.**Connect the Camera**: Attach the camera to the UC2 setup and connect it to your computer for capturing images.
173
186
174
187
For detailed assembly steps, refer to the **smartphone microscope** tutorial, which provides an in-depth guide to building the optical system.
175
188
176
-
177
-
### Step 3: Controlling the Microscope with the PS4 Controller
178
-
179
189
Now that the microscope is built and the PS4 controller is paired, you can control the motorized Z-stage and LED array:
180
190
181
191
-**Move the Z-stage**: Use the **left analog stick** to move the stage up and down (adjust focus).
182
192
-**Control the LEDs**: Use the **controller buttons** to turn the LED array on/off and cycle through different illumination patterns.
183
193
184
194
This setup allows you to navigate through your sample and adjust focus without touching the hardware, which is particularly useful when working with sensitive samples or in teaching environments where ease of use is essential.
185
195
186
-
### Video Tutorial
187
-
188
-
For a visual guide on how to set up the microscope and use the PS4 controller for control, watch the following video:
This experiment provides a more interactive experience with your microscope, enabling smooth, hands-free control of the imaging process using a PS4 controller. You can continue to experiment with different settings, such as motor speeds and LED illumination patterns, to optimize your microscope for various samples.
203
196
204
197
205
198
@@ -355,12 +348,12 @@ This file configures the ESP32 stage, LED control, and the camera for widefield
355
348
For a visual guide on how to set up ImSwitch and control the UC2 system, watch the following video:
Differential Phase Contrast Microscopy is a Computational Microscopy technique that uses partial coherent sources to illuminate a sample at various angles (oblique illumination). The angle determines the illumination NA which contributes to the final resolution. Throughout this tutorial we are going to revise the theory and implementation of DPC using OpenUC2! The tutorial will explain how to build your own DPC setup and we provide with the reconstruction algorithm given the physical parameters (based on Waller's Lab reconstruction algorithm).
9
9
10
10
11
-
## Weak Object Transfer Function
12
-
13
-
## Condenser lens
14
-
15
-
## Tutorial: DPC setup
16
-
17
11
18
12
### Materials needed:
19
13
@@ -36,6 +30,25 @@ Differential Phase Contrast Microscopy is a Computational Microscopy technique t
36
30

37
31
38
32
### Instructions for assembling the DPC setup:
33
+
34
+
### Video Tutorial
35
+
36
+
For a visual guide on how to set up the microscope, watch the following video:
This experiment provides a more interactive experience with your microscope, enabling smooth, hands-free control of the imaging process using a PS4 controller. You can continue to experiment with different settings, such as motor speeds and LED illumination patterns, to optimize your microscope for various samples.
51
+
39
52
**Step 1: Download Imswitch and the ESP32 microcontroller drivers**
40
53
41
54
Once the drivers are installed you can visit ([youseetoo.github.io](https://youseetoo.github.io/indexWebSerialTest.html)) to test the LED array pattern sequences.
## 🔌 Board layout and schematics (UC2 Standalon v4)
9
+
10
+
The board comes with 4 motor controllers (e.g. A4988 Bipolar Stepper controller or TMC drivers with pololu pinout), the ESP32 Dev Kit, a bunch of pins for in/outgoing connections, 3 darlington transistors (BD809) and the power distribution. It is inspired by the CNC shield and can
11
+
12
+
- run up to 4 steppers
13
+
- run multiple high power LEDs
14
+
- be controlled via PS3/PS4 Controllers
15
+
- drive Adafruits Neopixels
16
+
- trigger a Camera
17
+
- provide scanning patterns for Galvos
18
+
- control/readout external devices using I2C
19
+
20
+
We use the ESP32 in order to ensure connectivity via
21
+
- Wifi
22
+
- Bluetooth
23
+
- USB Serial (mostly used)
24
+
25
+

26
+
27
+
28
+
### new jacks pinouts
29
+

30
+
31
+
32
+
### connecting devices to the StandaloneBoard_V04:
0 commit comments