PWM Output



  • Hi All,

    I'm using one of the PWM outputs on the HAT to drive a small DC fan. The fan takes it's 12Vdc (red) from the HAT (HAT is powered by 12Vdc) and obviously the fans common (black) goes back to the HAT's GND. The fan has a separate control wire (yellow) which requires 25kHz and controls buy 0-100% duty cycle. But the output polarity seems to be the reverse to what I need. See a (very bad) wiring diagram attached.

    0_1570503962954_626a731e-6073-4013-83fe-7f496e2394c2-image.png

    How can I reverse the output, so it goes from 0-100% duty and not 100-0%? I have had to change the settings in the LIN block I'm using to get it to work, see image of LIN block settings.

    0_1570504258277_cf65a842-1065-4c88-9f1e-540743810688-image.png

    Cheers

    Mike



  • Hi Mike,
    using the LIN block is the only possibility at the moment. Is it causing some problems in your project?

    Jaroslav



  • Hi Jaroslav,

    No, not causing an issue as such. Setting the LIN block in such a way fixes the problem and allows the fan to operate correctly.

    Cheers

    Mike