I have managed to output two 5V PWM signals at high frequencies from the range of 80 to 90kHz. I have tried using bidirectional logic level converters to shift 5V down to 3.3V. However, there are voltage spikes seen on the oscilloscope. Then I tried using RC low pass filter to smooth out the outputs, but I am unsure of which cutoff frequency to use, to ensure a smooth output. Can anyone help?
Why bidirectional?
It's called 'ringing'. It helps if you use a driver that is intended for the purpose. Those logic level converters are basically just a mosfet and its internal capacitances create pretty significant spikes esp. when turning off.
Is the spike necessarily bad for your application? What do you need the waveform for?
I'd start with something like 10x the combined capacitance of the mosfet (input + output) as that should put a decent dent into those spikes. You'd have to spice it to see how bad it is for the leading edges of your waveform. Question again is how bad that would be and what you can get away with.
These may result from attaching the scope itself. You'll have less distortion with a passive voltage divider as level shifter.
You'll need no such filter with a passive voltage divider. Filter characteristics depend on the following circuits impedance etc.
PWM is a digital signal, there is only a rectangle and no smooth output.
Is that a problem? I NEVER see a "perfect" pulse on my 'scope. And, sometimes the ringing is an artifact of the 'scope probe or caused by connecting the 'scope. I've seen a few rare cases where connecting the 'scope probe makes the circuit fail and a few cases where it makes a circuit work...
One of the great things about digital is that it doesn't have to be perfect as long as the 1's are 1's and the 0's are 0's, and the data is normally read after ringing has stopped.
PWM is a little "different" because it's not normally used as digital data, but in most cases it's less critical.
Try the UNO at 3.3V.
- I would test (at both x1 and x10) and adjust the probe's compensation.
- Try using the x10 setting as this significantly reduces the capacitive and resistive loading imposed by the probe.
Note that ringing can be reduced by adding a small series resistance in the signal. In your case, with only 80 to 90kHz frequency, I would start by trying 100Ω if ringing or spikes are an issue.
This is the output with noise. How do I filter this away? The output went through the 5V to 3.3V logic level converter.
After adding the RC filter with R=100 ohms and C=18 pF. This is the output that I get. There are still some signs of voltage spikes. I want it to look more like a 'smooth' 3.3V PWM with lesser spikes.
Does anyone have any suggestions? Thanks
I think both uni and bi directional also works for me. So I just get the bidirectional one.
I have uploaded the waveforms below. You can take a look at it.
I want to feed the PWM signals to the H-bridge MOSFET inverters. It's for a wireless power transfer project. The MOSFET cannot take too high voltage. I want to keep it at 3.3V. Currently, the peak to peak voltage is around 3.6V. I would like to lower it closer to 3.3V. Hopefully below 3.5V to be safe. I don't want to damage the mosfets.
Okie, can you take a look at the photos I just uploaded. Any suggestions are appreciated, thanks!
Its probably just your probe (its set to x1).
The spike itself looks to be about 0.5V (not a problem), and it most likely goes away when you remove the probe. Yeah, I know, the scope trace also disappears.
Alright, so in this case, do I still need to add the 100 ohms resistor or continue with the RC low pass filter? Since you mentioned that the original waveform could be already stable at 3.3V, so there are actually not many voltage spikes present right?
I will test it again tmr with the x10 probe, and update it here. Will the oscilloscope automatically scales to display the right output if I switch to x10 probe? Sorry, I am new to this hahah.
What kind of mosfets are you using in the driver? I'd be surprised if they wouldn't withstand this. I bet there are other things that are much more pressing than this.
Not convinced, but worth a shot. Don't think this spike is going to go away though.
Have you tried already what @DrDiettrich suggested? It's by far the easiest solution.
If you in fact require a solution, which I seriously doubt, as I think there's not a real problem here.
In your oscilloscope manual, there it should show a simple procedure to adjust the probe's compensation (may or may not be required, but its a good procedure to test).
If you mean using a voltage divider to convert the 5V to 3.3V PWM, instead of using the logic level converter. I have already tried it, for high frequencies, the waveform looks way more distorted than what I have now after going through the logic level converter. I feel like I just need to get rid of the voltage spikes.
Okie thanks, I let u know when I try it tmr.
Maybe a bit more of a rational approach and see if the mosfets you're driving would really have a problem with this. What does their datasheet say?