meta data for this page
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| sensor:pcf857x [2026/05/14 15:51] – vamsan | sensor:pcf857x [2026/05/15 01:03] (current) – [PCF857x Vcc and Vdd] vamsan | ||
|---|---|---|---|
| Line 13: | Line 13: | ||
| The current limits of the PCF857x are heavily lopsided because of its quasi-bidirectional architecture. It handles current entirely differently depending on whether you are sinking current (outputting 0/LOW) or sourcing it (outputting 1/HIGH). | The current limits of the PCF857x are heavily lopsided because of its quasi-bidirectional architecture. It handles current entirely differently depending on whether you are sinking current (outputting 0/LOW) or sourcing it (outputting 1/HIGH). | ||
| + | The [[arduino: | ||
| - | + | ==== PCF857x Pinout ==== | |
| - | **Main Control & Power Header** | + | |
| * **VCC:** Power input. Connects to **3.3V or 5V** to match your microcontroller' | * **VCC:** Power input. Connects to **3.3V or 5V** to match your microcontroller' | ||
| + | * **VDD:** Power input. Connect the external hardware power to **3.3V or 5V**. | ||
| * **GND:** Common ground reference. | * **GND:** Common ground reference. | ||
| * **SDA:** Serial Data line for I²C communication. | * **SDA:** Serial Data line for I²C communication. | ||
| Line 28: | Line 28: | ||
| * **Port 1** (PCF8575 only, P10 to P17): The second group of 8 quasi-bidirectional GPIO pins. | * **Port 1** (PCF8575 only, P10 to P17): The second group of 8 quasi-bidirectional GPIO pins. | ||
| + | ==== PCF857x Reverse side of the module ==== | ||
| + | {{ : | ||
| + | |||
| + | ==== PCF857x Vcc and Vdd ==== | ||
| + | ^Pin^Function^Typical Target^Voltage Role| | ||
| + | ^VCC|Microcontroller (Logic) Side|Connect to your MCU's power pin (e.g., 3.3V or 5V).|Sets the operating reference voltage for the I²C communications line (SDA/SCL).| | ||
| + | ^VDD|Peripheral (Device) Side|Connect to the external hardware power (e.g., 5V).|Directly sets the high voltage logic level of the 16 target output/ | ||
| + | |||
| + | **The Crucial Condition: Check the Solder Jumper** | ||
| + | |||
| + | For this dual-voltage (3.3V/5V) configuration to work safely, the onboard VCC-VDD solder jumper must be open (disconnected). | ||
| + | * If **the jumper is open**, the module’s built-in level shifters are enabled. The I²C lines (SDA/SCL) will communicate securely at 3.3V with your microcontroller, | ||
| + | * If **the jumper is bridged**, VCC and VDD are connected together. Applying 3.3V to VCC and 5V to VDD can create a short circuit, leading to overheating and <color red> | ||
| + | |||
| + | ==== PCF857x module' | ||
| + | To assign a specific 7-bit hex address, use a soldering iron to connect the center pad of each group to either GND or VCC. | ||
| + | |||
| + | |< | ||
| + | ^A2 Status^A1 Status^A0 Status^Resulting Binary Offset^Hex I²C Address| | ||
| + | ^GND (Open)|GND (Open)|GND (Open)|000|0x20 (Default)| | ||
| + | ^GND (Open)|GND (Open)|VCC (Bridged)|001|0x21| | ||
| + | ^GND (Open)|VCC (Bridged)|GND (Open)|010|0x22| | ||
| + | ^GND (Open)|VCC (Bridged)|VCC (Bridged)|011|0x23| | ||
| + | ^VCC (Bridged)|GND (Open)|GND (Open)|100|0x24| | ||
| + | ^VCC (Bridged)|GND (Open)|VCC (Bridged)|101|0x25| | ||
| + | ^VCC (Bridged)|VCC (Bridged)|GND (Open)|110|0x26| | ||
| + | ^VCC (Bridged)|VCC (Bridged)|VCC (Bridged)|111|0x27| | ||
| + | |||
| + | ==== PCF857x using I/O pin ==== | ||
| **Sinking Current (Output LOW / Connecting to Ground)** | **Sinking Current (Output LOW / Connecting to Ground)** | ||
| Line 39: | Line 68: | ||
| * **Maximum per individual pin:** Only 100 µA (0.1 mA). | * **Maximum per individual pin:** Only 100 µA (0.1 mA). | ||
| * **The Limit:** This current is too weak to directly light up an LED or actuate a standard relay trigger. | * **The Limit:** This current is too weak to directly light up an LED or actuate a standard relay trigger. | ||
| + | |||
| + | **How to Correctly Wire Components** | ||
| + | |||
| + | * **Correct (Sinking): | ||
| + | * **Incorrect (Sourcing): | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | {{page>: | ||
| + | |||
| + | ==== PCF857x wiring with relay modules ==== | ||
| + | Connecting optocoupled relay modules to the PCF8575 is a common practice, but it requires strict electrical care. Because of the chip's asymmetrical quasi-bidirectional ports, a mistake in how you trigger the relay will prevent it from working entirely. | ||
| + | |||
| + | **The Triggering Rule: Active LOW Only** | ||
| + | |||
| + | * **Why Active HIGH fails:** Standard optocoupled multi-channel relay modules require 2-5 mA of logic current on their IN pins to light the internal infrared LED and engage the circuit. Because the PCF8575 can source only 0.1 mA when outputting HIGH, it cannot trigger an Active HIGH configuration. | ||
| + | * **Why Active LOW works:** When configured as Active LOW, the PCF8575 acts as a ground connection (0V), cleanly sinking the current from the relay module. The PCF8575 can safely sink up to 20 mA per pin, easily meeting the relay' | ||
| + | |||
| + | For example, the [[actor: | ||
| + | |||
| + | ===== I²C topics on lamaPLC ===== | ||
| + | {{topic> | ||
| + | |||
| + | \\ | ||
| + | \\ | ||
| + | {{tag> | ||
| + | \\ | ||
| + | This page has been accessed for: Today: {{counter|today}}, | ||