Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 8,931
» Latest member: dponyatov
» Forum threads: 3,904
» Forum posts: 19,925

Full Statistics

Online Users
There are currently 39 online users.
» 1 Member(s) | 26 Guest(s)
AhrefsBot, Applebot, Bing, Crawl, Google, PetalBot, bot, Saif Kitany

Latest Threads
Complete Home Assistant c...
Forum: KC868-A16
Last Post: admin
4 hours ago
» Replies: 3
» Views: 15
N60 Sensor channel label
Forum: N60
Last Post: admin
5 hours ago
» Replies: 3
» Views: 23
Http protocol
Forum: News
Last Post: admin
8 hours ago
» Replies: 9
» Views: 55
B24M ESPHome yaml for hom...
Forum: B24M
Last Post: admin
11 hours ago
» Replies: 2
» Views: 593
KC868-16A crashing in inf...
Forum: KC868-A series and Uair Smart Controller
Last Post: admin
11 hours ago
» Replies: 9
» Views: 60
KC868-A16 rev1.6 firmware
Forum: "KCS" v2 firmware system
Last Post: admin
Yesterday, 10:54 AM
» Replies: 3
» Views: 28
4 - 20 mA adc not giving ...
Forum: KC868-AIO
Last Post: admin
Yesterday, 12:47 AM
» Replies: 3
» Views: 29
E8v3 PCB layout CAD file
Forum: Schematic & diagram & Dimensions of KinCony PCB layout CAD file
Last Post: admin
04-15-2026, 09:35 PM
» Replies: 0
» Views: 16
ERROR SIM not inserted SI...
Forum: KC868-E8T
Last Post: admin
04-14-2026, 12:10 PM
» Replies: 18
» Views: 993
B4 Smart Controller ESP32...
Forum: B4
Last Post: admin
04-14-2026, 12:52 AM
» Replies: 0
» Views: 13

  [arduino code examples for F24]-02 Read digital input ports state
Posted by: admin - 11-28-2024, 11:41 AM - Forum: F24 - No Replies

Code:
/*
* Made by KinCony IoT: https://www.kincony.com
*
* Description:
* This Arduino program reads the state of two 16-channel PCF8575 I/O expanders
* and prints the state of all input pins (1-24) to the Serial Monitor. The state of
* each pin is represented as a bit in a 24-bit value, where each bit corresponds
* to an input pin. The program prints the input state in binary format.
*
* Pin Definitions:
* - SDA: GPIO 8
* - SCL: GPIO 18
* - PCF8575 I2C Address: 0x24 for inputs 1-16, 0x26 for inputs 17-24
*/

#include "Arduino.h"
#include "PCF8575.h"

// Define I2C pins
#define I2C_SDA 8  // Define SDA pin
#define I2C_SCL 18  // Define SCL pin

// Set I2C addresses
PCF8575 pcf8575_IN1(0x24); // The I2C address of the first PCF8575 (inputs 1-16)
PCF8575 pcf8575_IN2(0x26); // The I2C address of the second PCF8575 (inputs 17-24)

void setup() {
    Serial.begin(115200);

    // Initialize I2C communication
    Wire.begin(I2C_SDA, I2C_SCL); // Initialize I2C with defined SDA and SCL pins

    // Initialize both PCF8575 modules
    pcf8575_IN1.begin();
    pcf8575_IN2.begin();

    Serial.println("KinCony F24 24 channel input state 0:ON  1:OFF");
}

void loop() {
    uint32_t state = 0; // Use a 32-bit variable to store the state of all 24 pins

    // Read the state of each pin from the first PCF8575 (inputs 1-16)
    for (int pin = 0; pin < 16; pin++) {
        if (pcf8575_IN1.read(pin)) {
            state |= (1UL << pin); // Set the bit for the active pin (inputs 1-16)
        }
    }

    // Read the state of each pin from the second PCF8575 (inputs 17-24, corresponding to pins 0-7)
    for (int pin = 0; pin < 8; pin++) {
        if (pcf8575_IN2.read(pin)) {
            state |= (1UL << (pin + 16)); // Set the bit for the active pin (inputs 17-24)
        }
    }

    // Print the state of all 24 inputs in binary format
    Serial.print("Input state: ");
    Serial.println(state, BIN); // Print the state of inputs in binary

    delay(500); // Delay 500ms
}
arduino ino file download:

.zip   2-digital-input.zip (Size: 976 bytes / Downloads: 423)

Print this item

  [arduino code examples for F24]-01 Turn ON/OFF relay
Posted by: admin - 11-28-2024, 11:40 AM - Forum: F24 - No Replies

Code:
/*
* Made by KinCony IoT: https://www.kincony.com
*
* This program controls a 24-channel relay board via two PCF8575 I/O expanders.
* It sequentially turns on each relay and then turns them off in a loop.
*
* Pin Definitions:
* - SDA: GPIO 8
* - SCL: GPIO 18
*
* Delay Time:
* - 200 milliseconds between switching relays
*/

#include <Wire.h>        // Include the Wire library for I2C communication
#include <PCF8575.h>     // Include the PCF8575 library to control the I/O expander

#define SDA 8            // Define the SDA pin
#define SCL 18           // Define the SCL pin
#define DELAY_TIME 200   // Define the delay time in milliseconds

// Set I2C addresses of the PCF8575 modules
#define I2C_ADDRESS_R1 0x25 // I2C address of the first PCF8575 module
#define I2C_ADDRESS_R2 0x26 // I2C address of the second PCF8575 module

PCF8575 pcf8575_R1(I2C_ADDRESS_R1); // Create a PCF8575 object for the first module (for relays 9-24)
PCF8575 pcf8575_R2(I2C_ADDRESS_R2); // Create a PCF8575 object for the second module (for relays 1-8)

void setup() {
  // Initialize I2C communication
  Wire.begin(SDA, SCL); // SDA on GPIO 8, SCL on GPIO 18 (according to your board's configuration)
 
  // Initialize serial communication for debugging (optional)
  Serial.begin(115200);
  Serial.println("PCF8575 Relay Control: Starting...");

  // Initialize the PCF8575 modules
  pcf8575_R1.begin();
  pcf8575_R2.begin();

  // Turn off all relays initially (set all pins HIGH)
  for (int i = 0; i < 16; i++) {
    pcf8575_R1.write(i, HIGH); // Set relays 9-24 to OFF (assuming HIGH means OFF for relays)
    pcf8575_R2.write(i, HIGH); // Set relays 1-8 to OFF (assuming HIGH means OFF for relays)
  }
}

void loop() {
  // Sequentially turn on each relay (1-24)
 
  // First control the relays on the second PCF8575 (relays 1-8, corresponding to pins 8-15)
  for (int i = 8; i < 16; i++) {
    pcf8575_R2.write(i, LOW);   // Turn on the relay at pin i (LOW means ON for the relay)
    delay(DELAY_TIME);          // Wait for DELAY_TIME milliseconds
  }

  // Then control the relays on the first PCF8575 (relays 9-24)
  for (int i = 0; i < 16; i++) {
    pcf8575_R1.write(i, LOW);   // Turn on the relay at pin i (LOW means ON for the relay)
    delay(DELAY_TIME);          // Wait for DELAY_TIME milliseconds
  }

  // Sequentially turn off each relay (1-24)
 
  // First control the relays on the second PCF8575 (relays 1-8, corresponding to pins 8-15)
  for (int i = 8; i < 16; i++) {
    pcf8575_R2.write(i, HIGH);  // Turn off the relay at pin i (HIGH means OFF for the relay)
    delay(DELAY_TIME);          // Wait for DELAY_TIME milliseconds
  }

  // Then control the relays on the first PCF8575 (relays 9-24)
  for (int i = 0; i < 16; i++) {
    pcf8575_R1.write(i, HIGH);  // Turn off the relay at pin i (HIGH means OFF for the relay)
    delay(DELAY_TIME);          // Wait for DELAY_TIME milliseconds
  }
}
arduino ino file download:

.zip   1-relay.zip (Size: 1.03 KB / Downloads: 464)

Print this item

  F24 ESP32-S3 IO pins define
Posted by: admin - 11-28-2024, 11:39 AM - Forum: F24 - Replies (2)

ANALOG_A1(0-5v)    GPIO5
ANALOG_A2(0-5v)    GPIO7
ANALOG_A3(4-20mA)  GPIO6
ANALOG_A4(4-20mA)  GPIO4

IIC SDA:GPIO8
IIC SCL:GPIO18

PCF8575:U27 (relay9-24) i2c address:0x25
PCF8575:U23 (DI1-16) i2c address:0x24
PCF8575:U49 i2c address: 0x26
  PCF8575(pin number0-7): DI17-24
  PCF8575(pin number8-11): relay5-8
  PCF8575(pin number12-15): relay1-4

if config by ESPHome:

relay1: pcf8575(U49) number:12
relay2: pcf8575(U49) number:13
relay3: pcf8575(U49) number:14
relay4: pcf8575(U49) number:15
relay5: pcf8575(U49) number:8
relay6: pcf8575(U49) number:9
relay7: pcf8575(U49) number:10
relay8: pcf8575(U49) number:11

RF433MHz wireless receiver: GPIO40
------------------------

Ethernet (W5500) I/O define:

clk_pin: GPIO42
mosi_pin: GPIO43
miso_pin: GPIO44
cs_pin: GPIO41

interrupt_pin: GPIO2
reset_pin: GPIO1

--------------------
RS485:
RXD:GPIO17
TXD:GPIO16
--------------------
Tuya module:
RXD:GPIO38
TXD:GPIO39

Tuya network button: Tuya module's P28
Tuya network LED: Tuya module's P16

---------------------
1-wire (pull-up resistance on PCB):
1-wire1:GPIO48
1-wire2:GPIO47
1-wire3:GPIO21
1-wire4:GPIO15

1-wire (without resistance on PCB):
1-wire1:GPIO13
1-wire2:GPIO14
------------------------
SD Card:
SPI-MOSI:GPIO10
SPI-SCK:GPIO11
SPI-MISO:GPIO12
SPI-CS:GPIO9
------------------------
24C02 EPROM i2c address: 0x50
DS3231 RTC i2c address: 0x68
SSD1306 display: i2c address:0x3c

Print this item

  KinCony SIM7600E-L1C 4G breakout LTE core module released
Posted by: admin - 11-28-2024, 11:33 AM - Forum: News - No Replies

The SIM7600E-L1C is a versatile and cost-effective 4G LTE module that integrates multiple communication functionalities, making it suitable for a wide range of IoT and M2M applications. Developed by KinCony, this module provides robust connectivity and high-speed data transmission capabilities, ensuring seamless integration into IoT ecosystems.
[Image: sim7600-1_pix400.jpg][Image: sim7600-2_pix400.jpg]
[Image: sim7600-key-parts.png]
USB-C: connect with SIM7600E's USB port , debug by AT command
pin-S (SLEEP): set module to SLEEP mode
pin-G (GROUND): GND
pin-V (VCC): power supply DC 5-10V
pin-K (KEY): power on/off module
pin-T (TXD): send data
pin-R (RXD): receive data
pin-G (GROUND): GND
pin-RST: SIM7600 chip RESET pin
power chip: AZ1084CD
IPEX2: 4G antenna
IPEX4: GPS antenna
SIM card: Drawer SIM card holder (NANO)
TP1: DC4V power test point
SIM7600 network LED indicator: if blink means network registration successful
1: LED always ON: Searching network/call connect
2: LED 200ms ON, 200ms OFF: Data transmit
3: LED 800ms ON, 800ms OFF: Registered network
4: LED OFF: power off/Sleep
FPC1(16 pins) extender pins define:
[Image: sim7600-fpc.png]
[Image: sim7600-pcb.png]

Print this item

  GPIO Connector
Posted by: williemcvillage - 11-28-2024, 09:14 AM - Forum: KC868-AM - Replies (2)

Hi, I recently bought this board KC868-AM, and I want to use the free GPIOs onboard. 

Can you recommend a connector to soldier on the board? Maybe an aliexpress link?

Thanks

Print this item

  Configure presence sensor settings in ESPHome
Posted by: johnsmith8439 - 11-28-2024, 04:25 AM - Forum: KC868-A16 - Replies (5)

Hello, can I configure settings for your presence sensor in esphome:
https://www.aliexpress.com/item/1005006030673158.html
Or should I configure using remote?
Also, which presence sensor component does it use? LD2410? Thank you.

Print this item

Information IR Receiver Compatibility with KC868-A6 and KC868-A16
Posted by: BHD-13 - 11-28-2024, 12:05 AM - Forum: KC868-A series and Uair Smart Controller - Replies (1)

Hi Admin,
I came across your lesson about ''How to decode IR signal by ESPHome'' which i found extremely helpful and straightforward.
https://www.kincony.com/forum/showthread.php?tid=1220

I want to know whether it is possible to use an IR receiver like the VS1838B on the KC868-A6 or the KC868-16 and if possible, how to wire it.
[Image: Sf60acd7594324052b198ef4d9593c41fS.jpg_1....jpg_.webp]

Print this item

Information IR Receiver Compatibility with KC868-A6 and KC868-A16
Posted by: BHD-13 - 11-27-2024, 11:52 PM - Forum: KC868-A series and Uair Smart Controller - Replies (1)

Hi Admin,
I came across your lesson about ''How to decode IR signal by ESPHome'' which i found extremely helpful and straightforward.
https://www.kincony.com/forum/showthread.php?tid=1220

I want to know whether it is possible to use an IR receiver like the VS1838B on the KC868-A6 or the KC868-16 and if possible, how to wire it.
[Image: Sf60acd7594324052b198ef4d9593c41fS.jpg_1....jpg_.webp]

Print this item

  Suitable CT clamps for M30
Posted by: sumnerboy - 11-27-2024, 08:33 PM - Forum: KC868-M16 / M1 / MB / M30 - Replies (23)

Hi,

I am very interested in getting an M30 for monitoring the various circuits in my home. Some circuits only draw a 1-2A, some 8-10A, some 20-24A.

Can you please provide a list of suitable CT clamps that will work with the M30 for a various range of currents?

Ideally model numbers and specifications so we can source them directly if required.

Many thanks,
Ben

Print this item

  KC868-A4S for heating controll
Posted by: tadam - 11-27-2024, 01:05 PM - Forum: KC868-A4S - Replies (9)

Hello there,

I am looking for confirmation before purchase that I can use this board as I plannig to. Smile
So my plan is to use this board for central heating management. I attached a picture how does the setup looks so far.
I will use Home assistant and esphome.
As you can see I have 
- 4 24V AC valve.
- 5 temperature sensor (ds18B20)
- analog pressure sensor (SEN0257)
- leak sensor (just a basic contact sensor)
- opentherm adapter (this one)
- for network connection I will use ethernet

Do I need an additonal power supply (9-24V DC) to power my board? Or it can be power from 5V?

4x 24V AC valve: This is easy, They can go to the 4 relay. I think I will use the normaly closed terminals, in case of a board issue, the heating should not be affected. There is a separate 24V AC power supply, which only responsible for powering these valves.

5 temperature sensor (ds18B20): As far as I know these sensors has uniq id and can use the same pin, with one wire protocol. I can use the 3.3V output and ground from the board, and GPIO01 for the onewire.

analog pressure sensor (SEN0257): This sensor needs 5V can I get 5V out of this board? The output of this sensor is analog, so I can use AI1 for that.

leak sensor: This is just a digital sensor this is trivial too, it can go DI1 and ground.

opentherm adapter: This board need 3.3V, this I can get from the board. But also needs 2 free IO. Is there an IO I can repurpose in this case? There is only one free "bare" gpio left which is this case GPIO2. All other looks like has a special purpose.

I am really excited for this project and looking forward for responses. Thanks in advance.



Attached Files Thumbnail(s)
   
Print this item