Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
KC868-A6 - how to connect an optocoupler
#1
Hi!

I would like connect to the KC868-A6-V1.4SP an optocoupler - similar to https://pl.aliexpress.com/item/1005008446930626.html . My goal is to detect and react for switching 230V power in monitored circuit.

I flashed the KC868-A6 board with ESPHome - for now with default configuration.

Can someone help me understand
- from which pin should I take a power source for low voltage optocoupler side 
- where to connect its output to the KC868-A6 board
- what I have to add to the ESPHome configuraiton?

Thank you in advance.
Reply
#2
find a dry contact signal output module, connect to KC868-A6's digital input port.
Reply
#3
@admin,
thank you for your answer and my apologize for late response.

I don't know what kind of 'dry contact signal module' should I use.

When I asked I didn't have an optocoupler on on my desk. Now I have and tested its behavior.

When 230V is ON, and 3.3V is connected to the plus contact and GND, voltage between the plus contact and output contact is 3.3V.

Could you help me figure-out where to connect output to the KC868-A6 board?

Thank you in advance.
Reply
#4
I think I can use a module like this  https://aliexpress.com/item/1005005500489256.html. Connect the optocoupler's output to the module's input. Connect the relay contacts to ground and the digital input.

But I would like to confirm that KC868-A6 can't recognize the high state in any other way.
Reply
#5
it showed convert to TTL level, you can ask the seller, whether support output "dry contact" signal, just simplest OPEN/CLOSE signal.
Reply
#6
Can I use analog input to detect/report that 3.0 voltage?
Reply
#7
it's ok.
Reply
#8
But how can I do this? Could you provide me any instructions?
Reply
#9
your sensor output 3v , connect to A1 or A2 analog input port of KC868-A6 board.
Reply
#10
I've asked Claude Code and received an answer. I don't understand the ESP32 and ESPHome much enough to confirm that it can work or it just AI halucination Undecided
Can someone take a look on this?
### ESPHome Configuration


Configuration - the `inverted: true` setting handles the active-low logic:


```yaml
binary_sensor:
  - platform: gpio
    name: "External Optocoupler 1"
    pin:
      pcf8574: pcf8574_hub_in
      number: 0  # IN1
      mode: INPUT
      inverted: true  # Required for active-low!
    filters:
      - delayed_on: 10ms
      - delayed_off: 10ms
```### ESPHome Configuration


### Wiring External Optocoupler


#### Complete Wiring Diagram


```
External Device          Optocoupler          KC868-A6
───────────────        ────────────          ─────────


High Voltage  ──────► LED+ (Anode)
Signal                  LED- (Cathode) ─────► External GND
                       
                        [═══ Isolation Gap ═══]
                       
                        Collector ──────────► 3.3V VCC
                        Emitter ────────────► IN1 (Digital Input)
                       
                                              GND (common reference)
```


#### Physical Connections


```
KC868-A6 Terminal Block:
┌──────┬──────┬──────┬──────┐
│ 3.3V │ GND  │ IN1  │ IN2  │
└──────┴──────┴──────┴──────┘
  │      │      │
  │      │      └──────────────► Connect to Optocoupler Emitter
  │      └─────────────────────► Common reference
  └────────────────────────────► Connect to Optocoupler Collector
```### Wiring External Optocoupler


#### Complete Wiring Diagram


```
External Device          Optocoupler          KC868-A6
───────────────        ────────────          ─────────


High Voltage  ──────► LED+ (Anode)
Signal                  LED- (Cathode) ─────► External GND
                       
                        [═══ Isolation Gap ═══]
                       
                        Collector ──────────► 3.3V VCC
                        Emitter ────────────► IN1 (Digital Input)
                       
                                              GND (common reference)
```


#### Physical Connections


```
KC868-A6 Terminal Block:
┌──────┬──────┬──────┬──────┐
│ 3.3V │ GND  │ IN1  │ IN2  │
└──────┴──────┴──────┴──────┘
  │      │      │
  │      │      └──────────────► Connect to Optocoupler Emitter
  │      └─────────────────────► Common reference
  └────────────────────────────► Connect to Optocoupler Collector
```
Reply


Forum Jump:


Users browsing this thread:
1 Guest(s)