Found an interesting post:
https://www.cloudynights.com/topic/8399 ... v-outputs/
Last remark there "Posted 06 August 2024 - 10:02 PM" mentions 'capacitive filtering' on the PWM outputs.
Options:
Using a resistor of 1k to GND and a comparator to detect high shoulder voltage would be an option. Voltage threshold could be 11V or so.
Using a LM393, you could power it from 12V supply, it has an open collector output which could be used to interface directly with your pico (you need shared GND then) or you could drive an optocoupler with this.
Also possible to use a voltage divider 12V down to 3V with a total of prox 1k. Feed this 3V into an analog input of the pico and measure voltage very fast at most 1ms intervals. Do threshold and duty cycle calculation in code. Avoids the additional comparator. But needs shared GND and I would add some protection just in case the PWM is on but pico not yet powered (perhaps a schottky from GPIO to Vcc).
Brute force: use the opto isolator you have but increase load current with a parallel resistor to 100mA or even more. 100mA would need a 120 Ohm resistor rated 2W. This additional load needs to be provided by your systems power source, of course.
Or use your own wifi access of picoW and control the flap independent from the other controller.
Before going ahead, I would propose to increase PWM duty cycle with a 1k load and look for the signal. Just to see if there are more surprises.
And perhaps decrease the load to 100 Ohm to see the voltage decay is faster (use multiple 1k in parallel or look for a resistor with higher power rating or run this test not unattended and only for a really short time and small PWM duty cycle ).
https://www.cloudynights.com/topic/8399 ... v-outputs/
Last remark there "Posted 06 August 2024 - 10:02 PM" mentions 'capacitive filtering' on the PWM outputs.
Options:
Using a resistor of 1k to GND and a comparator to detect high shoulder voltage would be an option. Voltage threshold could be 11V or so.
Using a LM393, you could power it from 12V supply, it has an open collector output which could be used to interface directly with your pico (you need shared GND then) or you could drive an optocoupler with this.
Also possible to use a voltage divider 12V down to 3V with a total of prox 1k. Feed this 3V into an analog input of the pico and measure voltage very fast at most 1ms intervals. Do threshold and duty cycle calculation in code. Avoids the additional comparator. But needs shared GND and I would add some protection just in case the PWM is on but pico not yet powered (perhaps a schottky from GPIO to Vcc).
Brute force: use the opto isolator you have but increase load current with a parallel resistor to 100mA or even more. 100mA would need a 120 Ohm resistor rated 2W. This additional load needs to be provided by your systems power source, of course.
Or use your own wifi access of picoW and control the flap independent from the other controller.
Before going ahead, I would propose to increase PWM duty cycle with a 1k load and look for the signal. Just to see if there are more surprises.
And perhaps decrease the load to 100 Ohm to see the voltage decay is faster (use multiple 1k in parallel or look for a resistor with higher power rating or run this test not unattended and only for a really short time and small PWM duty cycle ).
Statistics: Posted by ghp — Fri Mar 07, 2025 10:11 am