Forked from reversaal / OhmPi
Source project has a limited visibility.
V2023_step_02.rst 23.96 KiB

STEP n°2: Measurement board

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.

PART A Assembly of the measurement board

Required components

alternate text

Description

alternate text

Figure shows the general schematics for the electronic measurement board developed. We have developed a complete "plug and play" measurement board. To measure electrical resistivity with Raspberry Pi. two ADS1115 were used,one for the voltage measurement one for the current measurement, as proposed by Florsch [7]. The ADS1115 is a 16-bit ADC (Analog-to-Digital Converter), with an adaptable gain. The advantage of ADS1115 is that the input signal value could lie between - to + 6.114 V. For the current measurement we have directly integrated the INA282 component, which allows to realize precise current measurement around a shunt resistor. The assembly are described in the following steps:

1 step_n_2/a/01_mes_board.jpg
Installation of female header, 1 by 10 pins, for ADS1115
2 step_n_2/a/02_mes_board.jpg
Soldering of 4 dual-in-line socket (2 by 2 pins) for optical relay, AQY211EH.
3 step_n_2/a/03_mes_board.jpg
Soldering of 1 dual-in-line socket (2 by 9 pins) for MCP23008.
4 step_n_2/a/04_mes_board.jpg
Soldering of 1 dual-in-line socket (2 by 4 pins)
5 step_n_2/a/05_mes_board.jpg
Soldering of 2 dual-in-line socket (2 by 4 pins)
6 step_n_2/a/06_mes_board.jpg
Traco Power Supply 12V to 5V, TDH15 - 1211N
7 step_n_2/a/07_mes_board.jpg
Four screw terminals for 12V inpout et 5V output
8 step_n_2/a/08_mes_board.jpg
Traco power Supply 12V to 24V, TRN-1215
9 step_n_2/a/09_mes_board.jpg
Two screw terminals electrodes M and N
10 step_n_2/a/10_mes_board.jpg
Four screw terminals, for 12V power supply and for electrodes A and B
11 step_n_2/a/11_mes_board.jpg
Soldering three capacitors (100nF)

Warning

In this version, We used a shunt resistor of 2 ohms, which limits the current measurement to 48 mA. If the current is higher than this value, you just have to decrease the value of the shunt resistor.Change the shunt value in the code.

12 step_n_2/a/12_mes_board.jpg
2 ohms shunt resistor pre-adjustment
13 step_n_2/a/13_mes_board.jpg
Soldering 2 ohms shunt resistor
16 step_n_2/a/16_mes_board.jpg
Soldering two 1.5 kOhm resistors
17 step_n_2/a/17_mes_board.jpg
Soldering two 1.5 kOhms resistors
18 step_n_2/a/18_mes_board.jpg
Female header 2 by 20 pins for Raspberry Pi connection
19 step_n_2/a/19_mes_board.jpg
View of the female header 2 by 20 pins installation for Raspberry Pi connection
20 step_n_2/a/20_mes_board.jpg
Fixing MCP23008 component (Dot mark on the top left corner)
21 step_n_2/a/21_mes_board.jpg
Mounting optical relay, AQY211EH (Dot mark in the top left corners)
22 step_n_2/a/22_mes_board.jpg
Mounting LM158 operational amplifier
23 step_n_2/a/23_mes_board.jpg
Mounting ADS115 board
24 step_n_2/a/24_mes_board.jpg
Fixing the INA282 (Dot mark in the top right corner)

PART B Start-up of the measurement board

Required components
1 step_n_2/b/001.jpg
Shutdown the raspberry Pi and unplug the power supply
2 step_n_2/b/001.jpg
Mounting the bottom spacers on the Raspberry Pi (male/female, 11mm, M3)
3 step_n_2/b/002.jpg
Mounting the upper spacers on the Raspberry Pi (female/female, 11mm, M3)
4 step_n_2/b/003.jpg
Mounting the OhmPi's measurement board on the Raspberry Pi
5 step_n_2/b/004.jpg
Mounting the OhmPi's measurement board on the Raspberry Pi
6 step_n_2/b/005.jpg
Plug the power supply into a socket and connect it to your Raspberry Pi's power port.

PART C Check the measurement board

Run the terminal, and write

i2cdetect -y 1
1 step_n_2/c/i2cdetect.png
If everything is working, three I2C addresses should appear on the screen.
Setting up an equivalent electronic circuit, for this you will need:
  • 4 1kOhm resistor (R2)
  • 1 220 Ohm resistor (R1)
  • 1 small padboard
  • Spool of solder
2 step_n_2/c/ref_circuit.png
Schematic of equivalent electronic circuit test
3 step_n_2/c/20210905_122820.jpg
Prepare the equivalent electronic circuit test
4 step_n_2/c/20210905_123034.jpg
Prepare the battery connections and the terminals.
5 step_n_2/c/20210905_132856.jpg
Soldering cables and terminals
6 step_n_2/c/Inked20211206_150522_LI.jpg
Install the red cables on the +12V terminal and black cable on the ground terminal. Connect to two different 12V batteries
7 step_n_2/c/Inked20211206_150522_LI2.jpg
Connect the equivalent electronic circuit test
7 step_n_2/c/thonny_first_interface.jpg
Run the Thonny Interpreter
7 step_n_2/c/20211206_144334.jpg
Run sample_measurement_example.py example, if everything works you should get the following result (220 Ohm)