Skip to content

Commit 88ea083

Browse files
Create tutorial_template
1 parent c39b29d commit 88ea083

1 file changed

Lines changed: 240 additions & 0 deletions

File tree

Lines changed: 240 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,240 @@
1+
---
2+
id: Template_experiements
3+
title: Template for Experiment tutorials
4+
---
5+
6+
# Tutorial: Building a XXX
7+
8+
Short introduction for Example:
9+
In this workshop, we will guide you through assembling a XXX
10+
---
11+
Image of complete setup
12+
13+
14+
### Materials Needed
15+
16+
1.
17+
2.
18+
3. etc.
19+
20+
21+
### Diagram
22+
23+
image of black and white box diagram,
24+
components labeled for easier understanding
25+
26+
27+
### Theory of Operation
28+
29+
Explanation of the finished setup for example:
30+
Light-sheet microscopy is based on the principle of fluorescence and
31+
like confocal microscopy, it is a technique that creates optical sections that can then be
32+
reconstructed into a coherent image. It differs from traditional microscopy technologies in its special type of illumination and detection, which enables gentler and faster acquisition of 3D images, making it particularly suitable for the three-dimensional visualization of biological samples.
33+
---
34+
35+
images as needed
36+
37+
38+
### Theoretical Background
39+
40+
Explanation of the physical prinziples the setup/ experiment is based on
41+
for example: Fluorescence is a photophysical process that describes the spontaneous emission of light shortly after an electron is excited to a higher-energy state.
42+
43+
44+
## Tutorial: XXX
45+
46+
Image of all the components laying next to each other
47+
needed for the setup/ experiment
48+
49+
50+
## Step 1: Assemble the XXX
51+
52+
Step by Step describtion on how to place the cubes and adjust the optical parts. No Electronics here!
53+
54+
This guide will walk you through the assembly step by step. You can follow the process according to the functional modules or refer to the diagram above for orientation.
55+
56+
57+
58+
1. placement
59+
60+
Image of finished 1. task
61+
2. placement
62+
Image of finished 2. task
63+
3. placement
64+
Image of finished 3. task
65+
66+
67+
68+
## Step 2: Electronics
69+
70+
only if Laser is used:
71+
72+
**⚠️ ATTENTION!**
73+
74+
NEVER LOOK DIRECTLY INTO THE LASER! EYE WILL BE DAMAGED DIRECTLY
75+
76+
NEVER SWITCH ON THE LASER WITHOUT INTENDED USE
77+
78+
BEAM HAS TO GO AWAY FROM ONESELF - ALWAYS!
79+
80+
81+
### 2.1: Plug in the Electronics as Shown Below
82+
83+
**⚠️ Caution!**
84+
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!
85+
86+
image of complete Electronic setup (you can see every wire connected correctly)
87+
88+
- connect the XXX to the Mainboard at `XXX1`
89+
90+
- Connect XXY to the Mainboard at `XXY2`
91+
-
92+
-
93+
-
94+
95+
96+
- Plug in the micro-USB at your ESP32 and connect to your PC.
97+
98+
- Plug in the 12V power cable.
99+
100+
101+
### 2.2: Flashing the ESP32 Firmware
102+
is always the same , no changing here
103+
104+
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 your version (most likely **ESO32-DEV-based UC2 standalone board V3 (beta)**), then click on the `connect` button.
105+
106+
![](./IMAGES/Electronics_Box_5.png)
107+
108+
The source code can be found [here](https://github.com/youseetoo/uc2-esp32).
109+
110+
2. Connect the ESP32 to your computer using the micro-USB cable.
111+
112+
113+
3. 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.
114+
![](./IMAGES/port_selection.png)
115+
116+
![](./IMAGES/install_esp.png)
117+
118+
If nothing shows up, you can install the drivers from the prompt that appears when you click anywhere on the screen:
119+
120+
![](./IMAGES/Electronics_Box_3.png)
121+
122+
4. Wait until the firmware has been successfully flashed.
123+
124+
125+
### 2.3: Connecting to the Web Interface
126+
is always the same , no changing here
127+
1. After flashing the firmware, go to the testing section on the same website.
128+
129+
2. Connect to your ESP32 board using the "Connect" button again, ensuring the correct COM port is selected.
130+
131+
![](./IMAGES/connect_again.png)
132+
133+
3. Once connected, test the system by sending a simple command:
134+
135+
```json
136+
{"task":"/motor_act", "motor": { "steppers": [ { "stepperid": 3, "position": -1000, "speed": 1000, "isabs": 0, "isaccel": 0} ] } }
137+
```
138+
139+
![](./IMAGES/Electronics_Box_1.png)
140+
141+
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.
142+
143+
**Note:** Ensure that the command string has no line breaks.
144+
145+
146+
147+
### 2.4: Testing in the Web Interface
148+
is always the same , no changing here
149+
150+
1. After completing the test, go back to the first tab to control the other components via buttons:
151+
- `Laser 1(on)` and `Laser 1(off)` control the laser diode.
152+
- `Motor Z(+)` and `Motor Z(-)` control the Z-stage.
153+
- `Motor X(+)/Y(+)/A(+)` and `Motor X(-)/Y(-)/A(-)` control the XYZ-stage.
154+
- `LED (on)` and `LED (off)` control the LED-matrix panel
155+
156+
157+
158+
### 2.5: Pairing the PS4 Controller 🎮
159+
only if some sort of motorized stage is used
160+
161+
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](https://openuc2.github.io/docs/Electronics/PS4-Controller/PS4-Controller). Here’s a brief summary:
162+
163+
1. **Put your PS4 controller into pairing mode** by holding down the `Share` button and the `PS` button simultaneously until the light bar starts blinking.
164+
2. 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:
165+
166+
167+
```json
168+
{"bt_scan":1}
169+
```
170+
171+
This will initiate the Bluetooth scan on the ESP32, which will detect and pair with the controller.
172+
173+
Once paired, you can control the motorized stage using the analog sticks and switch the LED-matrix on/off using the buttons. The complete pinout of the diffrent function you can find here: [UC2 PS4 Controller Pairing Guide](https://openuc2.github.io/docs/Electronics/PS4-Controller/PS4-Controller)
174+
175+
176+
177+
### 2.6: Setup and Use the Camera Software
178+
only if HIK Camera is used
179+
180+
1. Connect the camera via cable to your PC.
181+
182+
2. For the installation process and useage of the software, follow these instructions: [Install MVS App for Camera Utilization](https://openuc2.github.io/docs/Electronics/HIKCamera/SoftwareTutorial)
183+
184+
185+
## Step 3: Aligning the XXX
186+
187+
Most of the Times Alliging the Experiemnt is only possible after the Electronic setup
188+
189+
190+
1. placement
191+
192+
Image of finished 1. task
193+
2. placement
194+
Image of finished 2. task
195+
3. placement
196+
Image of finished 3. task
197+
198+
199+
200+
## Step 4: Install Imswitch (optional)
201+
202+
203+
#### 1. Installation process
204+
205+
For this, please refer to the installation instructions [here](https://openuc2.github.io/docs/ImSwitch/Quickstart).
206+
207+
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:
208+
209+
<a target="_blank" href="https://colab.research.google.com/drive/1W3Jcw4gFn0jtQXa3_2aCtJYJglMNGkXr?usp=sharing">
210+
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
211+
</a>
212+
This makes use of the default URL hosted publicly on https://imswitch.openuc2.com/imswitch/index.html, but you can change this to the `PORT` (i.e. 8001) nad `URL` (e.g. the Raspberry Pi's IP address that runs ImSwitch in docker and is in the same network as you computer).
213+
214+
215+
216+
**Your Setup is compete, now let's start the Experiments**
217+
218+
219+
---
220+
---
221+
222+
223+
## Experiment 1:
224+
1. step
225+
Image of finished 1. task
226+
2. step
227+
Image of finished 2. task
228+
3. step
229+
Image of finished 3. task
230+
231+
232+
233+
234+
## Experiment 2:
235+
1. step
236+
Image of finished 1. task
237+
2. step
238+
Image of finished 2. task
239+
3. step
240+
Image of finished 3. task

0 commit comments

Comments
 (0)