Smart Home Automation Forum
PWM Output on KC868-A8 - Printable Version

+- Smart Home Automation Forum (https://www.kincony.com/forum)
+-- Forum: Technical Support (https://www.kincony.com/forum/forumdisplay.php?fid=20)
+--- Forum: KC868-A8 (https://www.kincony.com/forum/forumdisplay.php?fid=23)
+--- Thread: PWM Output on KC868-A8 (/showthread.php?tid=5814)



PWM Output on KC868-A8 - claudius - 05-29-2024

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??


RE: PWM Output on KC868-A8 - admin - 05-29-2024

sorry, A8 no PWM output port.


RE: PWM Output on KC868-A8 - claudius - 05-29-2024

(05-29-2024, 09:55 AM)admin Wrote: sorry, A8 no PWM output port.

Any idea for a workaround?


RE: PWM Output on KC868-A8 - admin - 05-29-2024

sorry, no free GPIO with A8. unless you use a extend i2c pwm output module, you can search on aliexpress.


RE: PWM Output on KC868-A8 - claudius - 06-03-2024

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!


RE: PWM Output on KC868-A8 - admin - 06-03-2024

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.


RE: PWM Output on KC868-A8 - claudius - 06-04-2024

Thanks - I'll try.


RE: PWM Output on KC868-A8 - EddyLee - 09-09-2024


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 Big Grin

[Image: PT2Rknf][Image: Dz6NfTP][Image: 7nG8dcd][Image: VpSRSZZ][Image: VgfZ08k]


RE: PWM Output on KC868-A8 - EddyLee - 09-09-2024

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 :-)


RE: PWM Output on KC868-A8 - admin - 09-09-2024

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
}