PWM, not working properly, need advice!

shortbus

Joined Sep 30, 2009
10,045
What is the load on your PWM? Is it a mosfet gate? If so it could be ringing on the gate back feeding in to your circuit.
 

crutschow

Joined Mar 14, 2008
34,470
Bill,
I took a video of the PWM... at the very beginning and end the triangle wave seems to go haywire. The squarewave is pin 7 and the triangle wave is pin 6

http://youtu.be/Lpgv3nfWcho
The waveforms look more or less normal to me. At the maximum and minimum duty-cycles you are going to 0% or 100% output with circuit noise causing some sporadic pulses. The "haywire" is likely from the oscilloscope sync. If you sync on the sawtooth waveform you should get a stable sync and will better see what is happening.
 

Thread Starter

bytraper

Joined Sep 28, 2010
127
Just to let everyone know what happened with this, there was no problem with the pwm, the error was completely mine.

I made a really bad error that I didn't pick up on for ages. Floating inputs on the 5v rail cause random noise.... should have realised when I put my hand near it and it started to go wonky. Stupid, stupid stupid.

Didn't see it on the schematic because I'd drawn it so compact.
 
Top