V2024_step_03.rst 15.74 KiB

Warning

OhmPi is a participative project open to all, it requires skills in electronics and to respect the safety rules. OhmPi must be assembled in a professional context and by people competent in electronics. The OhmPi team cannot be held responsible for any material or human damage which would be associated with the use or the assembly of OHMPI. The OhmPi team cannot be held responsible if the equipment does not work after assembly.

STEP n°3: MUX board

The multiplexing of the channels is a mechanical multiplexing based on OMRON's manufacturing relays (G5LE-1-VD 12 VDC). Each relay is combined with a ZVN4206A power MOFSET. The raspberry has only 30 GPIOs, which is not enough to activate all the 64 electrodes, which represent 512 GPIOs. We used gpio expander I2C (MCP23017). We have associated these components with an I2C multiplexer of type type TCA9548A from adafruit. This combination allows to go up to 512 GPIOs and up to 128 electrodes. Each card has its own digital address between 0X70 and 0X77. In the following presentation for an OhmPi 64 electrodes, we will use the addresses 0X70 for channel A, 0X71 for channel B, 0X72 for channel M and 0X73 for channel N. 0X73 for the N channel. 4 MUX board will be needed to multiplex an OhmPi 64 electrodes.

PART A Assembly of MUX board

Required components

alternate text
1 ../../img/v2023.x.x/step_n_3/a/MUX_00.jpg
Mux board pcb
2 ../../img/v2023.x.x/step_n_3/a/MUX_01.jpg
Installation of the 100 kOhm resistors
3 ../../img/v2023.x.x/step_n_3/a/MUX_02.jpg
Installation of the MOSFET ZVN4206A
4 ../../img/v2023.x.x/step_n_3/a/MUX_03.jpg
Installation of the diode 1N4007
5 ../../img/v2023.x.x/step_n_3/a/MUX_04.jpg
Installation of the relay
6 ../../img/v2023.x.x/step_n_3/a/MUX_05.jpg
Installation of the terminal screw
7 ../../img/v2023.x.x/step_n_3/a/MUX_06.jpg
Installation of generic male header
8 ../../img/v2023.x.x/step_n_3/a/MUX_07.jpg
Installation of Pin strip (6 pins) and pin strip (16 pins)
9 ../../img/v2023.x.x/step_n_3/a/MUX_08.jpg
Installation of DIP Dual In Line Socket 2*14
10 ../../img/v2023.x.x/step_n_3/a/MUX_09.jpg
Installation of Adafruit TCA9548A
10 ../../img/v2023.x.x/step_n_3/a/MUX_10.jpg
Installation of MCP23017

Note

This step must be duplicated 4 times for every Mux card.

PART B MUX board address

To build an ohmpi it is necessary to have 4 MUX boards, with 4 different addresses. It is therefore necessary to identify each board, by assigning an address, which will be allocated in the OhmPi code. We present here the addresses selected by default.

For the A electrode board, we suggest addressing it with address 0x70:

1 ../../img/v2023.x.x/step_n_3/b/A_0x70.jpg
Mount the jumpers and note the value of the address and the electrode name on the mux board (A).
../../img/v2023.x.x/step_n_3/b/A_0x70-a.jpg
Zoom on the jumper

For the B electrode board, we suggest addressing it with address 0x71:

2 ../../img/v2023.x.x/step_n_3/b/B_0x71.jpg
Mount the jumpers and note the value of the address and the electrode name on the mux board (B).
../../img/v2023.x.x/step_n_3/b/B_0x71-a.jpg
Zoom on the jumper

For the N electrode board, we suggest addressing it with address 0x72:

3 ../../img/v2023.x.x/step_n_3/b/M_0x72.jpg
Mount the jumpers and note the value of the address and the electrode name on the mux board (B).
../../img/v2023.x.x/step_n_3/b/M_0x72-a.jpg
Zoom on the jumper

For the M electrode board, we suggest addressing it with address 0x73:

4 ../../img/v2023.x.x/step_n_3/b/N_0x73.jpg
Mount the jumpers and note the value of the address and the electrode name on the mux board (B).
../../img/v2023.x.x/step_n_3/b/N_0x73-a.jpg
Zoom on the jumper

PART C Validation of MUX board

The first step is to test the Mux boards before assembling them definitively. To test the Mux boards, it will be necessary first to make a simplified assembly of the Mux board and the measurement board.

The first thing to do is to prepare a 50 cm long flat wire with two 6-poles connectors.

1 ../../img/v2023.x.x/step_n_3/c/20211207_115706.jpg
Build a cable with 6 contacts with 6 pins connector.
2 ../../img/v2023.x.x/step_n_3/c/20220124_142929.jpg
Prepare the measurement board and the first mux board by example the card with address 0x71.
3 ../../img/v2023.x.x/step_n_3/c/20220124_143105.jpg
Connect the 12V power supply cables to the MUX board without powering the board.
4 ../../img/v2023.x.x/step_n_3/c/20220207_154111.jpg
Connect the 12V power supply screw terminal of the mux board to the 12V screw terminal power supply of the measurement board.
5 ../../img/v2023.x.x/step_n_3/c/20220124_143823.jpg
Connect the 6-contact cable

Start your 12V power supply, the raspberry must start.

Run the terminal and write:

i2cdetect -y 1

Three addresses should appear, including the address of the MUX board you have selected. This implies that your board has been detected.

Open the script called "test_mux_board.py".

Run the script