From 673f7d08e65983f6606b8f990cbf061cce12296f Mon Sep 17 00:00:00 2001 From: Marko Draca Date: Mon, 17 Nov 2025 15:02:07 +0100 Subject: [PATCH 1/4] Update mcp3204.md with diff mode from This PR adds documentation for the new differential mode feature for the MCP3204/MCP3208 ADC components. --- content/components/sensor/mcp3204.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/content/components/sensor/mcp3204.md b/content/components/sensor/mcp3204.md index b4fd95a7a1..5c091d54aa 100644 --- a/content/components/sensor/mcp3204.md +++ b/content/components/sensor/mcp3204.md @@ -62,6 +62,12 @@ sensor: - platform: mcp3204 # Attached to pin 7 of the MCP3208. id: supply_voltage number: 7 # MCP3208 pin number + +# Measures difference between CH1 (IN+) and CH2 (IN-) + - platform: mcp3204 # Attached to pin 7 of the MCP3208. + id: thermocouple_voltage + number: 0 # MCP32xx pin number + diff_mode: true # Enable differential mode ``` ### Configuration variables @@ -69,8 +75,25 @@ sensor: - **mcp3204_id** (**Required**, [ID](/guides/configuration-types#id)): The id of the parent MCP3204 component. - **number** (**Required**, int): The pin number of the MCP3204 - **update_interval** (*Optional*, [Time](/guides/configuration-types#time)): The interval to check the sensor. Defaults to `60s`. +- **diff_mode** (*Optional*, boolean): Enable differential mode measurement. Defaults to `false`. - All other options from [Sensor](/components/sensor). +## Operating Modes + +The MCP3204/3208 supports two input configurations: + +### Single-Ended Mode (default) + +Each channel measures voltage independently relative to ground. The MCP3204 provides 4 channels, and MCP3208 provides 8 channels. This is the default operating mode when `diff_mode` is not specified or set to `false`. + +### Differential Mode + +When `diff_mode: true`, channel pairs measure the voltage difference between two inputs (IN+ and IN-). Specify the positive input channel number with the `number` parameter. The next sequential channel automatically becomes the negative input (IN-). + +Available differential pairs: +- MCP3204: 2 pairs (CH0/CH1, CH2/CH3) +- MCP3208: 4 pairs (CH0/CH1, CH2/CH3, CH4/CH5, CH6/CH7) + ## See Also - [SPI Bus](/components/spi) From d5b4e9748ed7075209360170335a15bc9f06e8bc Mon Sep 17 00:00:00 2001 From: Marko Draca Date: Mon, 17 Nov 2025 15:09:50 +0100 Subject: [PATCH 2/4] Update content/components/sensor/mcp3204.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- content/components/sensor/mcp3204.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/components/sensor/mcp3204.md b/content/components/sensor/mcp3204.md index 5c091d54aa..b20b0c79bb 100644 --- a/content/components/sensor/mcp3204.md +++ b/content/components/sensor/mcp3204.md @@ -73,7 +73,7 @@ sensor: ### Configuration variables - **mcp3204_id** (**Required**, [ID](/guides/configuration-types#id)): The id of the parent MCP3204 component. -- **number** (**Required**, int): The pin number of the MCP3204 +- **number** (**Required**, int): The pin to measure on the MCP3204/MCP3208 - **update_interval** (*Optional*, [Time](/guides/configuration-types#time)): The interval to check the sensor. Defaults to `60s`. - **diff_mode** (*Optional*, boolean): Enable differential mode measurement. Defaults to `false`. - All other options from [Sensor](/components/sensor). From 5d31eb546fd1275de70c38fbaaa332b6dc23c023 Mon Sep 17 00:00:00 2001 From: Marko Draca Date: Mon, 17 Nov 2025 15:10:08 +0100 Subject: [PATCH 3/4] Update content/components/sensor/mcp3204.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- content/components/sensor/mcp3204.md | 1 + 1 file changed, 1 insertion(+) diff --git a/content/components/sensor/mcp3204.md b/content/components/sensor/mcp3204.md index b20b0c79bb..decb97dbed 100644 --- a/content/components/sensor/mcp3204.md +++ b/content/components/sensor/mcp3204.md @@ -91,6 +91,7 @@ Each channel measures voltage independently relative to ground. The MCP3204 prov When `diff_mode: true`, channel pairs measure the voltage difference between two inputs (IN+ and IN-). Specify the positive input channel number with the `number` parameter. The next sequential channel automatically becomes the negative input (IN-). Available differential pairs: + - MCP3204: 2 pairs (CH0/CH1, CH2/CH3) - MCP3208: 4 pairs (CH0/CH1, CH2/CH3, CH4/CH5, CH6/CH7) From 11459cb784d58293a4769692414d8403720dbd26 Mon Sep 17 00:00:00 2001 From: Marko Draca Date: Mon, 17 Nov 2025 16:08:11 +0100 Subject: [PATCH 4/4] Update content/components/sensor/mcp3204.md Channels typo Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- content/components/sensor/mcp3204.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/components/sensor/mcp3204.md b/content/components/sensor/mcp3204.md index decb97dbed..17c132fd93 100644 --- a/content/components/sensor/mcp3204.md +++ b/content/components/sensor/mcp3204.md @@ -63,8 +63,8 @@ sensor: id: supply_voltage number: 7 # MCP3208 pin number -# Measures difference between CH1 (IN+) and CH2 (IN-) - - platform: mcp3204 # Attached to pin 7 of the MCP3208. +# Measures difference between CH0 (IN+) and CH1 (IN-) + - platform: mcp3204 # Attached to pins 0-1 of the MCP3208 (differential pair). id: thermocouple_voltage number: 0 # MCP32xx pin number diff_mode: true # Enable differential mode