VoronDesign / Voron-Hardware

Cool Hardware designed by the Voron Design group
GNU General Public License v3.0
880 stars 356 forks source link

Klipper Expander - Possible to remove pullup from PA6 & PA5? #155

Closed gargamel778 closed 2 years ago

gargamel778 commented 2 years ago

Hi,

I have just installed Klipper Expander board to control 2x heavy duty PWM fans (using mosfet0 and mosfet1), which works fine.

I would like to use T0 & T1 (pins PA6 / PA5 respectively) for the fans' tachometer pin. I've added the following lines to the relevant fan configuration section in my printer.cfg -
tachometer_pin: expander:PA6 (for fan1) / tachometer_pin: expander:PA5 (for fan2) tachometer_ppr: 2

With one of the fans I'm getting erroneous readings on the dashboard, such as ~700RPM when the fan is off, whereas with the second fan I'm not getting any readings at all. However, when I connect one of the fan's tachometer pin to the GPIO of the Expander board (pin PA7) and configure it accordingly (tachometer_pin: expander:PA7), the fan speed is reported correctly. Unfortunately, there's only one GPIO, so I am able to get correct readings from only one of the fans.

Is it possible to remote the pullup resistors from the board, so that T0/T1 (MCU ping PA6 & PA5) will behave similarly to the PA7 GPIO? I don't intend to use these inputs for thermistors and therefore don't mind performing hardware changes (if possible at all).

raymondh2 commented 2 years ago

You don't want to use a controller that uses PWM on the negative rail of fans and measure the tach signal. It will create a signal that won't make sense. (floating ground)