3.3v to 5v pwm
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- Drogzeth
- Posts: 5
- Joined: Fri Sep 23, 2016 6:29 pm
3.3v to 5v pwm
I was curious if there is a simple way to boost a 3.3v pwm signal to a 5v pwm signal.
- michaelmeissner
- Posts: 1873
- Joined: Wed Aug 29, 2012 12:40 am
Re: 3.3v to 5v pwm
There are two ways that occur to me off the top of my head:
- Use a level shifter (or use a transistor or optocoupler) to convert the 3.3v signal to 5v. You need to figure out whether the level shifter will react fast enough for the PWM signal that you are using ;
- Use one of the PWM shields/add-on boards that are controlled via i2c or spi -- most of these have an external power input, so you can control them via 3.3v but hook up 5v power. External boards have the advantage that they are fire and forget, i.e. you don't have to keep doing the PWM signal in the microprocessor, but the disadvantage is they are harder to setup.
- adafruit_support_bill
- Posts: 88852
- Joined: Sat Feb 07, 2009 10:11 am
Re: 3.3v to 5v pwm
What are you using the PWM signal for? If it will be just a logic-level input to some other circuit, then a level shifter should work. If it is going to be driving a motor or other significant load, then you will need a transistor of some kind to switch the current.
- Drogzeth
- Posts: 5
- Joined: Fri Sep 23, 2016 6:29 pm
Re: 3.3v to 5v pwm
I have the adafruit servo pi hat that I want to use for led's. Unfortunately the pwm signal is 3.3v but I need 5v for the high power led's that I have.
- adafruit_support_bill
- Posts: 88852
- Joined: Sat Feb 07, 2009 10:11 am
Re: 3.3v to 5v pwm
If they are 'high power' LEDs, you can't drive them directly from the HAT anyway since it can only sink about 25mA per channel. You would need some transistors to switch the current to your high power LEDs. These work well: https://www.adafruit.com/products/355Unfortunately the pwm signal is 3.3v but I need 5v for the high power led's that I have.
Please be positive and constructive with your questions and comments.