Motor 1 on Raspberry Pi Dual G2 24v HAT not working

Hey guys, little updates here. Returned the RPI 4B to the retailer and confirmed the RPI itself is faulted. Hopefully, when the replacement comes in, the problem will be solved. Thank you!

1 Like

I wanted to revive this thread since I’m facing a similar issue. It looks like pigpio has issues with the first PWM channel (Hardware PMW function not working on Pi4B revision 1.4 · Issue #517 · joan2937/pigpio · GitHub). Are there plans of revising the driver to use another library that works with v1.4 boards?

Hello, Will.

Unfortunately we do not have a Raspberry Pi Model B Rev 1.4 so we were unable to reproduce the problem with GPIO12. I did test revisions 1.1 and 1.5 though, and they do not seem to have the problem.

If you want to get the library working on revision 1.4, I recommend changing the library to use a PWM frequency of 5 kHz instead of 20 kHz because the people on that GitHub thread are reporting that 5 kHz works. To do this, open dual_g2_hpmd_rpi.py with a text editor and change the number 20000 to 5000 in the following code, which is located on or near line 47:

        _pi.hardware_PWM(self.pwm_pin, 20000, int(speed * 6250 / 3));

Depending on how you are loading the library, you might need to run sudo python setup.py install to reinstall it after editing it.

Please let us know if that works for you.

For anyone else following this thread: you can determine the revision of your Raspberry Pi by running cat /proc/cpuinfo.

–David

Hi David,

That fixed it, thanks!

1 Like