From 96dbadf063a5567a3c27f8b2f238572b11345214 Mon Sep 17 00:00:00 2001
From: jkl <sagitta1618@gmail.com>
Date: Wed, 26 Jun 2024 18:38:46 +0200
Subject: [PATCH] Add troubleshooting info

---
 .../assembling_mb2023_MUX_2023_12V.rst        |  5 +--
 .../assembling_mb2024_MUX_2023_dph5005.rst    |  9 ++--
 .../assembling_mb2024_MUX_2024_dph5005.rst    |  5 +--
 doc/source/source_rst/hardware/hw_mb.rst      |  2 -
 doc/source/source_rst/hardware/hw_ohmpi.rst   |  5 +++
 doc/source/source_rst/troubleshooting.rst     | 42 +++++++++++++++----
 6 files changed, 47 insertions(+), 21 deletions(-)

diff --git a/doc/source/source_rst/hardware/assemble_ohmpi/assembling_mb2023_MUX_2023_12V.rst b/doc/source/source_rst/hardware/assemble_ohmpi/assembling_mb2023_MUX_2023_12V.rst
index 14962da4..c6eb4b40 100644
--- a/doc/source/source_rst/hardware/assemble_ohmpi/assembling_mb2023_MUX_2023_12V.rst
+++ b/doc/source/source_rst/hardware/assemble_ohmpi/assembling_mb2023_MUX_2023_12V.rst
@@ -41,9 +41,8 @@ Assembling the OhmPi v2023
    +--------+------------------------------------------------------------+   
 
 .. warning::
-   In MUX2023, the wiring of the electrodes from the IDC connector follows the order below.
-   This means that if you want to wire the ribon cable to additional screw terminals or other types of
-   plugs, you will need to take one wire out of two.
+   In MUX2023, the wiring of the electrodes from the IDC connector follows the order below (different from MUX2024).
+   Take this into account if you wire your ribbon cable to further connectors or screw terminals.
 
    .. image:: ../../../img/mux2023-idc.jpg
 
diff --git a/doc/source/source_rst/hardware/assemble_ohmpi/assembling_mb2024_MUX_2023_dph5005.rst b/doc/source/source_rst/hardware/assemble_ohmpi/assembling_mb2024_MUX_2023_dph5005.rst
index 64752e7c..daf24892 100644
--- a/doc/source/source_rst/hardware/assemble_ohmpi/assembling_mb2024_MUX_2023_dph5005.rst
+++ b/doc/source/source_rst/hardware/assemble_ohmpi/assembling_mb2024_MUX_2023_dph5005.rst
@@ -55,13 +55,10 @@ TODO :list on tools and components
    +--------+------------------------------------------------------------+
 
 .. warning::
-   In MUX2023, the wiring of the electrodes from the IDC connector follows the order below.
-   This means that if you want to wire the ribon cable to additional screw terminals or other types of
-   plugs, you will need to take one wire out of two.
+   In MUX2024, the wiring of the electrodes from the IDC connector follows the order below (different from MUX2023).
+   Take this into account if you wire your ribbon cable to further connectors or screw terminals.
 
-   .. image:: ../../../img/mux2023-idc.jpg
-
-   .. image:: ../../../img/mux2023-connector.jpg
+   .. image:: ../../../img/mux2024-idc.jpg
 
 .. table::
    :align: center
diff --git a/doc/source/source_rst/hardware/assemble_ohmpi/assembling_mb2024_MUX_2024_dph5005.rst b/doc/source/source_rst/hardware/assemble_ohmpi/assembling_mb2024_MUX_2024_dph5005.rst
index 6e335d62..db646786 100644
--- a/doc/source/source_rst/hardware/assemble_ohmpi/assembling_mb2024_MUX_2024_dph5005.rst
+++ b/doc/source/source_rst/hardware/assemble_ohmpi/assembling_mb2024_MUX_2024_dph5005.rst
@@ -49,9 +49,8 @@ Those who wish to build a 16-electrode OhmPi system can neglect steps 8-10, and
    +--------------------------------------------------------------------------------------------------------+
 
 .. warning::
-   In MUX2024, the wiring of the electrodes from the IDC connector follows the order below.
-   This means that if you want to wire the ribon cable to additional screw terminals or other types of
-   plugs, you will need to take one wire out of two.
+   In MUX2024, the wiring of the electrodes from the IDC connector follows the order below (different from MUX2023).
+   Take this into account if you wire your ribbon cable to further connectors or screw terminals.
 
    .. image:: ../../../img/mux2024-idc.jpg
 
diff --git a/doc/source/source_rst/hardware/hw_mb.rst b/doc/source/source_rst/hardware/hw_mb.rst
index e817f983..f72e728c 100644
--- a/doc/source/source_rst/hardware/hw_mb.rst
+++ b/doc/source/source_rst/hardware/hw_mb.rst
@@ -59,5 +59,3 @@ Assemble measurement board (MB)
 
    mb/mb_2023.rst
    mb/mb_2024.rst
-
-   
\ No newline at end of file
diff --git a/doc/source/source_rst/hardware/hw_ohmpi.rst b/doc/source/source_rst/hardware/hw_ohmpi.rst
index 6733d9c1..fd914fe1 100644
--- a/doc/source/source_rst/hardware/hw_ohmpi.rst
+++ b/doc/source/source_rst/hardware/hw_ohmpi.rst
@@ -43,6 +43,11 @@ Below we detail examples of OHMPI systems assemblies in different versions.
 OhmPi systems assembly tutorials
 ********************************
 
+.. warning::
+    We **strongly** recommend to test the assembled system in a controlled environment (in the lab, on resistor boards) before deploying
+    in the field.
+
+    
 .. toctree:: 
    :maxdepth: 1 
 
diff --git a/doc/source/source_rst/troubleshooting.rst b/doc/source/source_rst/troubleshooting.rst
index 16678fa7..19ce9d5a 100644
--- a/doc/source/source_rst/troubleshooting.rst
+++ b/doc/source/source_rst/troubleshooting.rst
@@ -6,6 +6,20 @@ Please have a look at existing open and closed issues before posting a new one.
 We have compiled here below a list of common issues and and explanations on how to fix them.
 For issue with the hardware, make sure your board passes the hardware checks (:ref:`mb2024-test`, :ref:`mux2024-test`).
 
+
+Communication issue between components (I2C, pull-up)
+=====================================================
+
+If you get an I2C communication error or cannot see some I2C address with `i2cdetect`.
+
+Most components of the OhmPi communicate via I2C protocol. This protocol works with two lines (SDA and SCL) that **must be pulled-up** at rest. The pull-up resistor consist in placing a 100k (or similar values) resistor between the line and VDD (5V in this case).
+
+Check with the multimeter the voltage between SDA/SCL and the ground to see if it reaches 5V at rest. If it's not the case, you may need stronger pull-up (smaller value of pull-up resistor).
+
+.. note::
+    On the measurement board v2024, the I2C isolator from Mikroe, already has pull-up that adds to the pull-up already on the ADS1115 board. If the ADS1115 of the Vmn part cannot be seen by i2cdetect, we recommend to remove the pull-up resistors on the Mikroe I2C isolator board (see note fig29 in :ref:`mb2024-build`)
+
+
 Issue with the pulses between A and B
 =====================================
 
@@ -26,15 +40,29 @@ Another possibility is that the MN voltage you are trying to measure is **over t
 In the measurement board v2024, the current sensing part is replaced by a click board. It is possible that the shunt resistance on this click board is burned due to malfunction. In this case, erroneous value of current will be given. The click board must be replaced to solve the issue.
 
 
-Communication issue between components (I2C, pull-up)
-=====================================================
+Noise in the Vmn signal
+=======================
 
-If you get an I2C communication error or cannot see some I2C address with `i2cdetect`.
+The OhmPi system does not filter the signal for 50 or 60Hz power noise. This noise can appear in the Vmn reading if the Tx or Rx battery is connected to a charger connected to the grid.
 
-Most components of the OhmPi communicate via I2C protocol. This protocol works with two lines (SDA and SCL) that **must be pulled-up** at rest. The pull-up resistor consist in placing a 100k (or similar values) resistor between the line and VDD (5V in this case).
+To solve this, you may need to design a system that disconnect the charger (turn if off) when doing a measurement.
 
-Check with the multimeter the voltage between SDA/SCL and the ground to see if it reaches 5V at rest. If it's not the case, you may need stronger pull-up (smaller value of pull-up resistor).
 
-.. note::
-    On the measurement board v2024, the I2C isolator from Mikroe, already has pull-up that adds to the pull-up already on the ADS1115 board. If the ADS1115 of the Vmn part cannot be seen by i2cdetect, we recommend to remove the pull-up resistors on the Mikroe I2C isolator board (see note fig29 in :ref:`mb2024-build`)
+Unexpected electrode takeout
+============================
+
+The IDC socket of the mux2023 and mux2024 are not wired identically. Double check that you connected the right electrode to the right ribbon cable (see drawings in the assembling tutorials)
+
+
+Strong decay in current
+=======================
+
+A strong decay in current can be an indication that the battery cannot supply enough power to the DPH5005 to main the requested voltage.
+
+
+Modbus error
+============
+
+Modbus is the procotol used to communicated between the DPH5005 and the Raspberry Pi via a USB cable.
+If the Pi cannot detect the DPS, a modbus error can happen. Make sure the USB cable is ok and that the DPH5005 is supplied.
 
-- 
GitLab