ArduinoGeneral

low pwm voltage and frequency on IO Expansion HAT for Raspberry Pi

userHead trond 2020-11-30 05:45:56 788 Views2 Replies

Hi, 
I'm using the "IO Expansion HAT for Raspberry Pi Zero/Zero W" (SKU: DFR0604).

I've connected it to a Raspberry Pi 3, and am sending 5V to the expansion hat. I have a couple of problems: 
1. When setting pwm duty fully on "board.set_pwm_duty(0, 100)" as shown in the linked python library (https://github.com/DFRobot/DFRobot_Rasp ... emo_pwm.py), I'm only getting about 50% of the input voltage. It is my understanding that the voltage should be the same at the input voltage. Is there anything else that needs to be configured in order to be able to get the full voltage range from pwm?

2. In the code it looks like the pwm frequency is limited to 1000Hz maxium. It is my understanding that the STM32030 has a much higher clock frequency. I'd like my pwm signal to have a frequency as high as possible. Can I set it higher than 1000?

Thanks!

2020-12-01 16:04:59 DFR0604 will reduce the output voltage of the Raspberry Pi to 3.3V. Regarding the frequency, the frequency of the Raspberry Pi PWM signal can theoretically reach up to 50Mhz, but the program needs to be written from the bottom, which cannot be achieved by this library. userHeadPic 347945801
2020-12-01 01:25:31 Just to clarify on the low voltage part of the question:
Measuring between "-" and "+" on the pwm output pins, I'm readying 5.3V, same as input. However, when setting the duty cycle to 100 and measuring between "-" and the signal pin, I'm only seeing 3.3V. Surely the signal should read 5.3V?
userHeadPic trond