Main Site Documentation

5 volt PWM


I need to do some PWM control of a pump for variable speed control and the voltage level needs to reach 5 volts not 3.3. I did some PWM test on the UC5550 and FEZ and the max is 3.3 volts. I recall seeing that the FEZ outputs are 5V tolerant. Is there any quick way to get a 5 volt PWM with the FEZ? For a regular digital output on the FEZ how would I get 5 volts? The IORef pin reads 3.3 volts.

Long term, I will be using the UC5550, not FEZ. What external circuity would be recommended to get from 3.3 to 5 on PWM for an industrial application? I will be in the 1 kHz to 1.5 KHz range. Thanks!


I would look at a device like SN74LVC1G07, which has an Open Drain output to be used as a voltage level shifter by simply connecting a pull-up resistor to 5 volts.

There is a extensive family of this type of device from Texas Instruments, rated for High Reliability, Automotive, temperature ranges, and some even have a Schmitt trigger on the input.



You should never connect a pump to your FEZ, or any microcontroller directly. Look online on how you would control a relay fro example. You need a circuit that consists of a transistor and a diode. There are also chips that do that. In this image ( that I found online) VCC is your 5V. Replace the relay coil with your pump/solenoid/anything :slight_smile:



The pump is powered separately through an external 24 vdc supply. The PWM is just as a control circuit for speed control.

How do I get the FEZ to GPIO to be 5 volt tolerant instead of the default 3.3?


Fez INPUTS are 5v tolerant. Nowhere would you have seen a modern micro that can output at higher than VCC. Fez and most if not all GHI devices runs VCC at 3v3


and since your reply and mine arrived at the same time, to be clear the I part of a GPIO is 5v tolerant already, no change. For the O part, you need to work with the 3v3 you have and control something else that will produce 5v.


Thanks for the clarification.


Hi Gus:

mattc mentioned that he had a variable speed controller, hence my simple level shifter solution was offered.



You are right