Smart Home Automation Forum

Full Version: PWM Output on KC868-A8
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am using the KC868-A8.
I need at least ONE - preferably two PWM outputs from the KC868-A8.
Any idea except dismounting two(four) relays??
sorry, A8 no PWM output port.
(05-29-2024, 09:55 AM)admin Wrote: [ -> ]sorry, A8 no PWM output port.

Any idea for a workaround?
sorry, no free GPIO with A8. unless you use a extend i2c pwm output module, you can search on aliexpress.
I found the
Pca9685pw 16 Kanal 12-Bit pwm Servo Shield Treiber i2c
at AliExpress.
Can you help with the I2C wiring on the KC868-A8 board and the software interface?
Thanks!
you can use ESPHome config pca9685.
there is a white socket on A8 PCB, 4 pins printed label: SDA,SCL,GND,3.3V. just connect these wires to your new PCA9685 module is ok.
Thanks - I'll try.
Hello, I was also faced with the same question and looked at the circuit diagram and found that the GPIO2 for the 433Mhz receiver is unused and therefore I also have a PWM-capable GPIO. I hope this helps and sorry for the possibly bad overetching :-)
yes, if you don't use RF 433M module, you can use gpio2 for PWM output. here is arduino demo code for GPIO2 use for PWM.
Code:
const int pwmChannel = 0;
const int pwmFreq = 5000;
const int pwmResolution = 8;
const int gpioPin = 2;  // GPIO2

void setup() {
  // Configure the PWM channel
  ledcSetup(pwmChannel, pwmFreq, pwmResolution);
 
  // Attach GPIO2 to the PWM channel
  ledcAttachPin(gpioPin, pwmChannel);
}

void loop() {
  // Output a PWM signal with 50% duty cycle
  ledcWrite(pwmChannel, 128);  // 128 is 50% of 8-bit resolution
}