Opamp for 3.3V to 5V

Status
Not open for further replies.
No, I'm not mixing up anything. I'll generate 3.3V PWM, then level shift it up to 5V (still PWM), then filter it to DC so I'll have 0-5VDC out (roughly, not exactly, but close enough).

Then you're making it FAR more complicated than you need to - all you need is a simple NPN transistor (or n-channel FET) and a collector/drain pullup resistor to 5V. This will invert the PWM though, but you should be able to invert that in the settings for the PWM hardware, which is why it's there.
 
So you think that using an NPN transistor, pull-up resistor, and inverting the PWM (not sure I know how to fix that) is simpler than a level-shifter IC, a resistor, and a capacitor? Well you're entitled to that opinion, but I'm gonna disagree for now, since I know how to use the level-shifter and put in a filter (turns out much easier than I originally thought). It really sounds like you're trying to make it more complicated, when I literally have it figured out, and have all the hardware right in front of me. Am I just missing what you're saying, or maybe was it not clear that the shifter I have is an IC with pins that only needs like 4 or 5 wires to connect, and it's completely straightforward?
 

I suggest you try reading your own thread - which is full of opamp circuits, due to you wrongly specifying your requirements.

I would also suggest you try looking at what the level shifter modules (they aren't IC's) actually consist of, and do you actually need four or eight level shifters? - the upwards shifter part is a single mosfet and two resistors (so more parts than a single external fet or transistor anyway). I have a draw full of a mix of the four and eight way versions, for when I might need one.

Nothing wrong with your way, as far as I can tell?, just a little overly complicated compared with the standard way of doing such PWM going back 30+ years, and according to various reports on the level shifter modules they are relatively 'slow', but I wouldn't expect that to be an issue for your application (but can be for I2C).
 
I suggest you try reading your own thread - which is full of opamp circuits, due to you wrongly specifying your requirements.
Nope, I did not wrongly specify requirements. When I understood what was necessary to achieve the outcome via opamps, I suggested/decided that I would be better off going a different route.

Got 10 of these for $6 from Amazon. Perhaps what I meant was breakout and not "IC." If you'll notr on my last post I didn't claim that all level shifters are ICs, I said that the ones I have are. And actually I do think I'll need 2-4 channels just for this project, and more for my next one, at least 5 or 6.

I tested the output through my shifter and I got very nice results with 20kHz PWM. Might be "slow" but it's fast enough for my needs.
 
You're mixing up two ideas.

A PWM signal is DIGITAL – it's high or low, and a digital level shifter will shift the high level signal 3.3v from the Xiao to 5 volts.

The low pass filter converts the highs and lows of the PWM signal to DC.
He is trying to create a non-PWM DC value to control a device that NEEDs a non-PWM analog (dc) input.
 
He is trying to create a non-PWM DC value to control a device that NEEDs a non-PWM analog (dc) input.
I actually do intend at some point to test it with 20kHz or 47kHz PWM to see what happens, maybe it's high enough frequency that the internals of my
controller will function correctly. I tried it with 490Hz (Arduino Uno) standard and that didn't work, but maybe it's just too low of frequency.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…