Additional SX1509 as fan output



  • Hi,

    I'm trying to configure additional SX1509B (address 0x71) to act as fan output.
    Facts:
    Duet<->SX1509 connection is working (I can see the Duet v1.02 + SX1509 in DWC),
    Mosfet and fan is connected to pin 15 of SX1509,
    I can control fan using M42 P135 Sxxx command,
    Found out that pin number 135 in M42 translates to pin 235 in analog write function.

    I want to control it with M106 command, so I changed pin number in Pins_DuetNG.h for fan3 from 212 to 235. Recompiled firmware, uploaded it to my duet. I can still control the fan with M42 command, but M106 doesn't work. Any hints what else do I need to change in firmware to support that?


  • administrators

    That should work. Are you certain that you are running your rebuilt firmware? It's best to change the version string in file Version.h so you can identify which firmware you are running on the Settings/General page of DWC or by sending M115.



  • Yes, I'm sure. I've changed the version info file already to make sure that it's really upgrading the firmware.


  • administrators

    Are you able to get PWM control of the fan on the extra SX1509B using M42, or only on/off control?



  • I can get PWM output using M42 command. I tried to track the differences between functions that are writing pwm values in M106 and M42 command, but it seems that it points to the same function in the end... That's why I'm asking on forum.


Log in to reply