Skip to content

Commit f6b24ff

Browse files
committedMar 1, 2025
updated readme for new MUX and ADS1115
1 parent 5bf9a97 commit f6b24ff

File tree

2 files changed

+126
-81
lines changed

2 files changed

+126
-81
lines changed
 

‎README.md

+47-42
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@ The logarithmic resistor array and optional MOSFET configuration allow measureme
1616

1717
- Real-time I-V curve measurement
1818
- Maximum Power Point (MPP) tracking
19+
- ADC (ADS1115) for precise voltage measurements
1920
- OLED display with live readings
2021
- E-ink display for persistent measurements
2122
- Logarithmic resistor array for wide measurement range
2223
- Optional MOSFET for low-resistance measurements
23-
- Built-in voltage divider for measuring higher voltage sources (>3.3V)
24+
- Optional: Built-in voltage divider for measuring higher voltage sources (>3.3V)
2425

2526
## Button Control
2627
The device features a single button for measurement control:
@@ -55,46 +56,51 @@ The web interface provides real-time visualization of measurements, displaying b
5556

5657
## Hardware Overview
5758
```ascii
58-
+-------------+ +----------+ +-----------+
59-
| Solar | | Resistor | | MUX |
60-
| Cell |---->| Array |---->| CD74HC |
61-
| (DUT) | | (R1-R16) | | 4067 |
62-
+-------------+ +----------+ +-----------+
63-
| |
64-
| |
65-
| |
66-
| +---------+ |
67-
+---------->| MOSFET | v
68-
| | Circuit | GND
69-
| +---------+
70-
| |
71-
| |
72-
| |
73-
| | +--------------+
74-
+----------------+------->| ESP32-S3 |
75-
| Mini |
76-
| (ADC1) |
77-
+--------------+
78-
^
79-
|
80-
|
81-
+---------------+
82-
| UI Controls |
83-
| OLED, Pots, |
84-
| Button,E-ink |
85-
+---------------+
59+
+-------------+ +-----------+ +--------------+
60+
| Solar | | ADS1115 | | ESP32-S3 |
61+
| Cell |---->| ADC (I2C) |---->| Mini |
62+
| (DUT) | | | | (I2C Master) |
63+
+-------------+ +-----------+ +--------------+
64+
| ^
65+
| |
66+
| |
67+
| |
68+
| +---------+ |
69+
+---------->| MOSFET | |
70+
| | Circuit | |
71+
| +---------+ +---------------+
72+
| | | UI Controls |
73+
| v | OLED, Pots, |
74+
| GND | Button,E-ink |
75+
| +---------------+
76+
|
77+
|
78+
| +----------+ +-----------+
79+
+----------->| Resistor | | MUX |
80+
| Array |---->| ADG706 |
81+
| (R1-R16) | | or 4067 |
82+
+----------+ +-----------+
83+
|
84+
|
85+
v
86+
GND
8687
```
8788

8889
## Key Components
8990

90-
- ESP32-S3 Mini
91-
- CD74HC4067 16-channel multiplexer
91+
- ESP32-S3
92+
- ADG705 16-channel multiplexer
93+
- or lower precision: CD74HC4067 16-channel multiplexer
9294
- SSD1306 OLED display
93-
- 16 precision resistors (83Ω - 10.3kΩ)
95+
- 16 precision resistors (15Ω - 20kΩ)
9496
- MOSFET for low-resistance measurements
97+
- ADS1115 ADC for precision Analog Voltage measurements
9598

9699
## Technical Notes
97-
### Resistance Measurement Accuracy
100+
### Low internal resistance with ADG706 Multiplexer
101+
To be able to measure the currents at high load (low voltages), which completes the curve to the end, a high quality multiplexer is needed, with very low internal resistance. This is the reason why ADG706 was chosen over the CD74HC4067.
102+
103+
#### Resistance Measurement Accuracy with 4067
98104
The CD74HC4067 multiplexer has a significant internal ON resistance (RON) of approximately 70Ω that affects measurements. Rather than compensating for this in software, we've directly measured each resistor through the MUX circuit. The resistor values listed in the code (83Ω - 10.3kΩ) already include this MUX internal resistance, ensuring accurate current calculations without additional compensation.
99105

100106
For example:
@@ -104,6 +110,12 @@ For example:
104110
- No additional software compensation needed
105111
- Measurements remain accurate across the full range
106112

113+
### Sensitivity of the ESP32 internal ADC
114+
The ESP32 is known for quite a shitty ADC, non-linear in the middle range, with a very slow slope near the ends. This can cause significant issues with accurate voltage measurements, especially at low voltages.
115+
116+
### Use external ADC, such as ADS1115
117+
Solves the issue.
118+
107119
## Getting Started
108120
1. Clone this repository
109121
2. Install PlatformIO
@@ -130,13 +142,6 @@ The project includes a custom PCB design for a MUX ADG706 for more reliable meas
130142
![Prototype during DSSC measurement](images/prototype/I-V-curve_DSSC_measurement.jpg)
131143
*First prototype of the I-V Curve Analyzer testing a series of Dye-Sensitized Solar Cells (DSSC). The compact design allows for easy in-line measurements during workshops and experiments.*
132144

133-
### Component Library
134-
The [`ad706/`](MUX-ADG706/ad706/) directory contains all necessary files for the ADG706 multiplexer:
135-
136-
- [`ADG706BRUZ-REEL7.kicad_sym`](MUX-ADG706/ad706/ADG706BRUZ-REEL7.kicad_sym) - KiCad symbol file
137-
- [`SOP65P640X120-28N.kicad_mod`](MUX-ADG706/ad706/SOP65P640X120-28N.kicad_mod) - Footprint for the 28-pin SOP package
138-
- [`ADG706BRUZ-REEL7.step`](MUX-ADG706/ad706/ADG706BRUZ-REEL7.step) - 3D model for visualization
139-
140145
### Project Files
141146
The KiCad project (`MUX-ADG706/`) contains:
142147

@@ -153,9 +158,9 @@ Code and hardware design by Marc Dusseiller (@dusjagr), with assistance from the
153158
## Future Improvements
154159
Future development plans for the I-V Curve Analyzer include:
155160

156-
1. **Enhanced Multiplexer**: Replace the current multiplexer with ADG706 for lower internal resistance, improving measurement accuracy especially in the low-resistance range.
161+
1. DONE **Enhanced Multiplexer**: Replace the current multiplexer with ADG706 for lower internal resistance, improving measurement accuracy especially in the low-resistance range.
157162

158-
2. **IoT Integration**: Utilize the ESP32's WiFi capabilities to upload measurements to an IoT cloud service for:
163+
2. ONGOING **IoT Integration**: Utilize the ESP32's WiFi capabilities to upload measurements to an IoT cloud service for:
159164
- Remote monitoring and data logging
160165
- Long-term performance analysis
161166
- Data sharing and collaboration

‎hardware/HARDWARE.md

+79-39
Original file line numberDiff line numberDiff line change
@@ -13,71 +13,104 @@ To select your board, edit the `include/board_config.h` file and uncomment the a
1313

1414
## Block Diagram
1515
```ascii
16-
+-------------+ +----------+ +-----------+
17-
| Solar | | Resistor | | MUX |
18-
| Cell |---->| Array |---->| CD74HC |
19-
| (DUT) | | (R1-R16) | | 4067 |
20-
+-------------+ +----------+ +-----------+
21-
| |
22-
| |
23-
| |
24-
| +---------+ |
25-
+---------->| MOSFET | v
26-
| | Circuit | GND
27-
| +---------+
28-
| |
29-
| |
30-
| |
31-
| | +--------------+
32-
+----------------+------->| ESP32-S3 |
33-
| Mini |
34-
| (ADC1) |
35-
+--------------+
36-
^
37-
|
38-
|
39-
+---------------+
40-
| UI Controls |
41-
| OLED, Pots, |
42-
| Button,E-ink |
43-
+---------------+
16+
+-------------+ +-----------+ +--------------+
17+
| Solar | | ADS1115 | | ESP32-S3 |
18+
| Cell |---->| ADC (I2C) |---->| Mini |
19+
| (DUT) | | | | (I2C Master) |
20+
+-------------+ +-----------+ +--------------+
21+
| ^
22+
| |
23+
| |
24+
| |
25+
| +---------+ |
26+
+---------->| MOSFET | |
27+
| | Circuit | |
28+
| +---------+ +---------------+
29+
| | | UI Controls |
30+
| v | OLED, Pots, |
31+
| GND | Button,E-ink |
32+
| +---------------+
33+
|
34+
|
35+
| +----------+ +-----------+
36+
+----------->| Resistor | | MUX |
37+
| Array |---->| ADG706 |
38+
| (R1-R16) | | or 4067 |
39+
+----------+ +-----------+
40+
|
41+
|
42+
v
43+
GND
4444
```
4545

4646
## Pin Assignments
4747

4848
### ESP32-S3 Mini
4949
```markdown
50+
# MUX Control
5051
PIN_MUX_S0 (2) -> MUX control pin S0
5152
PIN_MUX_S1 (6) -> MUX control pin S1
5253
PIN_MUX_S2 (4) -> MUX control pin S2
5354
PIN_MUX_S3 (5) -> MUX control pin S3
55+
56+
# Analog & Digital IO
5457
PIN_SIG (1) -> ADC input for voltage measurement
5558
PIN_POT_Y (16) -> ADC input for Y-axis scaling
5659
PIN_POT_X (18) -> ADC input for X-axis scaling
5760
PIN_BUTTON (35) -> Digital input for mode button
58-
PIN_TPI (10) -> Test Point Input control
61+
PIN_TPI (10) -> MOSFET control pin
62+
63+
# I2C Interface (OLED & ADS1115)
64+
SDA_PIN (8) -> I2C Data
65+
SCL_PIN (9) -> I2C Clock
66+
67+
# E-ink Display (SPI)
68+
EPD_DC (38) -> E-ink DC
69+
EPD_CS (37) -> E-ink CS
70+
SRAM_CS (33) -> SRAM CS
71+
EPD_RESET (10) -> E-ink Reset
72+
SCLK (12) -> SPI Clock
73+
MISO (13) -> SPI MISO
74+
MOSI (11) -> SPI MOSI
5975
```
6076

6177
### ESP32-C3 Super Mini
6278
```markdown
63-
PIN_MUX_S0 (2) -> MUX control pin S0
64-
PIN_MUX_S1 (3) -> MUX control pin S1
65-
PIN_MUX_S2 (4) -> MUX control pin S2
66-
PIN_MUX_S3 (5) -> MUX control pin S3
67-
PIN_SIG (1) -> ADC input for voltage measurement
68-
PIN_POT_Y (6) -> ADC input for Y-axis scaling
69-
PIN_POT_X (7) -> ADC input for X-axis scaling
70-
PIN_BUTTON (8) -> Digital input for mode button
71-
PIN_TPI (9) -> Test Point Input control
79+
# MUX Control
80+
PIN_MUX_S0 (21) -> MUX control pin S0
81+
PIN_MUX_S1 (10) -> MUX control pin S1
82+
PIN_MUX_S2 (2) -> MUX control pin S2
83+
PIN_MUX_S3 (1) -> MUX control pin S3
84+
85+
# Analog & Digital IO
86+
PIN_SIG (0) -> ADC input for voltage measurement
87+
PIN_POT_Y (4) -> ADC input for Y-axis scaling
88+
PIN_POT_X (3) -> ADC input for X-axis scaling
89+
PIN_BUTTON (7) -> Digital input for mode button
90+
PIN_TPI (20) -> MOSFET control pin
91+
92+
# I2C Interface (OLED & ADS1115)
93+
SDA_PIN (8) -> I2C Data
94+
SCL_PIN (9) -> I2C Clock
95+
96+
# E-ink Display (SPI)
97+
EPD_DC (5) -> E-ink DC
98+
EPD_CS (6) -> E-ink CS
99+
SRAM_CS (9) -> SRAM CS
100+
SCLK (8) -> SPI Clock
101+
MISO (4) -> SPI MISO
102+
MOSI (3) -> SPI MOSI
72103
```
73104

74105
## Components List
75106

76107
- ESP32-S3 Mini development board
77-
- CD74HC4067 16-channel multiplexer
108+
- ADG705 16-channel multiplexer
109+
- or lower precision: CD74HC4067 16-channel multiplexer
78110
- SSD1306 OLED display (128x64)
79111
- Adafruit 2.9" Tri-Color eInk Display FeatherWing (IL0373)
80112
- 16 precision resistors for measurement array
113+
- ADS1115 analog-to-digital converter
81114
- MOSFET circuit for low-resistance measurements
82115
- Push button for measurement control
83116
- Various connectors and headers
@@ -119,6 +152,13 @@ GND |12 13| S3
119152
+-----------+
120153
```
121154

155+
### ADS1115 Analog-to-Digital Converter
156+
- VCC → 3.3V
157+
- GND → GND
158+
- SDA → GPIO8 (I2C Data)
159+
- SCL → GPIO9 (I2C Clock)
160+
- A0 → Positiv Voltage of the panel for measurement
161+
122162
### Resistor Array
123163
Connected to MUX channels, values in ohms:
124164
```markdown

0 commit comments

Comments
 (0)
Please sign in to comment.