Irev-Dev / Arduino-Atmel-sPWM

Implementation of an sPWM signal
154 stars 79 forks source link

Improve legibility of the SPWM waveform in PWMsin_2.png #15

Closed shuyuan-liu closed 2 years ago

shuyuan-liu commented 2 years ago

In the original plot it's not immediately obvious which areas are on and which are off, due to the presence of the baseline throughout the entire trace, and the height of the trace (meaning its top and the baseline being far apart and not easy to focus on at the same time). I removed the baseline and replaced it with a shading under the SPWM curve to make the duty cycle more obvious. I would also suggest shrinking the whole graph down to ~1/4 the original height and/or increasing the trace thickness for even better legibility; but I'd like to hear what @Irev-Dev thinks before implementing those.

Irev-Dev commented 2 years ago

Thanks @shuyuan-liu,

I'll happily merge your other suggestions too.

shuyuan-liu commented 2 years ago

Thanks @Irev-Dev for merging. I'll need some time to make the other changes as it's not easy to thicken the sine curve by hand. Maybe it's easier to generate a new graph completely. @Terbytes could I ask how you created the plot and if there's any data I could use to plot a new one?

Irev-Dev commented 2 years ago

Terbytes is an old github account that I closed btw.

I made it in with matlab, but was a long time ago and have since lost code, sorry.

shuyuan-liu commented 2 years ago

That's ok, I'll see what I can do.