Industrial Automation 8-Layer Stackable HAT for Raspberry Pi Open drain output pwm frequency change

alexburcea

Moderator
Staff member
Hi,

The PWM frequency for the open drain outputs can not be changed. Only 3 of 4 channels can have this feature with a new firmware.

Alex.
 

Tom098

New member
Hi Alex, thanks for the reply.

If I've understood your response if I update the firmware the frequency can be changed on 3 of the channels?
 

Tom098

New member
I only require 1 output to have a frequency between 100-1000Hz (ideally 500Hz) which is the speed control signal sent to a pump.
 

alexburcea

Moderator
Staff member
Hi Tom,

We just released a new firmware version for hardware version 4 and up and a new megaind command. Please update the card firmware and the command (instructions in the readme and readme)
Now you can change the PWM frequency for open drain channels 1 to 3 (individual on each channel) from 10 to 6400Hz. Channel 4 remains at 6.4KHz. The frequencies once changed are saved into flash memory so will be the same also after repower.
Give it a try and let me know.
Alex.
 

Tom098

New member
Hi Tom,

We just released a new firmware version for hardware version 4 and up and a new megaind command. Please update the card firmware and the command (instructions in the readme and readme)
Now you can change the PWM frequency for open drain channels 1 to 3 (individual on each channel) from 10 to 6400Hz. Channel 4 remains at 6.4KHz. The frequencies once changed are saved into flash memory so will be the same also after repower.
Give it a try and let me know.
Alex.
Hi Alex,

Ive updated the firmware and command but cant seem to find the new megaind commands to change the frequency. Could the python read me be updated please?

Regards, Tom
 

alexburcea

Moderator
Staff member
The frequency can be changed only from the command line "megaind 0 odfwr 1 500" for example. Since the value is saved in flash you will not need to change it once. run "megaind -h odwr" for more info.
The python library does not have this feature yet, we will take care of it later.
 
Top