Overshoot Of PWM Signal


While I was tinkering with my oscilloscope and arduino uno. I found that pwm signals overshoot. I know I can use resistors and capasitors for removing the overshoot but I want to choose my resistor and capasitor wisely. I don't want overshoot also I don't want the rise time to be long either. How can I calculate the resistor and capasitor value?

Most likely an oscilloscope probe or wiring artifact.

What I see could easily be the measurement not the PWM.

Are you using a 10x probe? Have you matched it to your scope?
Does the Rigol has a calibration source? usually on the front of the scope.

Is the scope right a the pin of the board (both probe and ground)?

What you show is about 50 Mhz. Too high to be of much concern and just a likely more difficult to measure. Unfortunately at these speeds it usually requires very careful probe connections to be useful.



I calibrated the scope 1 hour ago.


So it is a scope problem. How can I trust my scope after this? You say it is showing non realistic signals.

Could be wiring, too. Show it to us, and show how and where you are probing, including ground connections.

Long, loopy connections have inductance and capacitance, and ring. End of story.

I fixed the cable but overshoot still happens

I see long, loopy, yellow and green wire connections in that photo. That is a tuned circuit!

Get rid of those wires, use the shortest possible connections to the probe and try again.

Overshoot still happens but less then the first one.

That last photo is nothing to worry about!

You might find this article interesting: Pololu - Understanding Destructive LC Voltage Spikes

Thanks for the advice it really helped.

Can't say that yet.
The calibration I'm talking about is actually called "Probe Compensation".

All 10X probes have a small screw adjustment on the part that plugs into the scope. Some scopes have a 1V p-p square wave used to compensate the probe. This video shows how to connect to the probe calibration (compensation) terminals on a Tek scope. I'll assume your Rigol has something similar. If you haven't done this yet you should do it now a retest. I don't think this is the root of your issue but its the first place to start.

After you've completed the above, (even if you can't) connect the probe and the scope ground at the exact same point in your circuit. Make the same measurement.

Probe Calibration

How can I trust my scope after this? You say it is showing non realistic signals.

We'll get to that but first we need to verify the basics.

Thanks for the answer,

I calibrated my probe. The reason behind the overshoot is my orange and green cables. After changing them with smaller adapters. Overshoot reduced signifacantly but there is a still one question in my mind.

All sensors and measurement instruments can giving misleading or completely incorrect results.

That signal looks good, and agrees with what you expect.

If you do get unexpected results with the scope, artifacts are always something to consider. Change the wiring, probe locations, and see if that changes what you see. Check against a known good signal source.

One learns that high frequency measurements ( in your case 50 MHz) are a little tricky to measure. Straight wires are inductors and almost any material can add capacitance. The higher the frequency you are trying to measure the shorter you scope ground lead needs to be. For very high frequencies some probes have a ground spring connection right near the probe tip.

Any non sine wave signal can be considered to be the sum of smaller and higher frequency signals. Google Laplace It is a good estimate that a sharp rising or falling edge contains frequencies up to 0.35/RiseTime.

If a risetime = 1µSec then frequencies up to 1 MHz can be expected.

So slow changing signals are pretty easy to measure with confidence but fast changing signals can be more difficult. Of what you are seeing, some if from the measurement and some is real life.

Unfortunately this is the way of the real world works (as opposed to a drawing in a book).

Every sensor introduces artifacts, you learn to compensate for them. You'll get much better results with a short ground spring style ground connection on the probe, the long ground lead + croc clip has tonnes of inductance. However the spring-style ground connection requires there be lots of places to rest the ground wire, such as a bare metal groundplane, its more awkward to use.

For instance: https://www.digikey.co.uk/product-detail/en/cal-test-electronics/CT3668/CT3668-ND/5029188

Thanks for the answers. They really helped.

I may not have explained it the best way.

Think of changing electrical signals as hitting something with a hammer.
If you hit something very slowly (hit is probably not the best word) there will be little vibration on what you hit and those things around it.

If you hit something very quickly you will generate vibrations in what you hit and everything nearby.

The signal you see is similar. And in this case the actual scope leads are part of the things surrounding the fast risetime (aka hit).

By shortening the scope leads you minimize the added effect of the scope however there is still likely some ringing on the signal.
We all learn how much ringing is too much and if the downstream signal is not adversely effected then they can be ignored (for a hobby project).

For a production design more effort will have to go into understanding the ringing because if you make a million of anything you will eventually find any issue that can arrise.

Thanks for the answer.