Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

generating pwm wave using sg3525

mariogomez1

Newbie level 4
Joined
Dec 8, 2023
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
80
1702032820976.png


I want to produce a pwm wave using sg3525.I could not build a circuit whose only function is to produce a pwm wave.there is a point that I missed.can you help me with this. i removed this schematic from a working pcb by holding it to the light, unfortunately I do not have a schematic.
 
Hi,

I´m a bit confused.
What´s the exact question?

The IC comes with a datasheet (please post a link). The datasheet usually tells every thing that is needed for proper operation.
It tells how it is designed, what internally happens and what external circuit it needs.
If something is not clear in the datasheet, please tell us which page/chapter you refer to.

You say PWM. But you don´t define what a PWM means for you.
Key features of a PWM are:
* frequency (maybe variable?)
* variable duty cycle (according what input information? or regulated somehow?)
* voltage levels
Please tell us what you expect from the circuit in a technical manner using numbers with units. We (at least me) professional designers don´t like that much words, we like the numbers we can put into our calculators. Numbers are clear, worldwide. Text needs to be translated and often is vague.

It could also be helpful for us if you tell us what the PWM is inteded to be used for.

***
Schematic:
* I personally don´t like the "package style" symbol. A schematic is meant to show the function in a simple way. Thus signals that belong together should be drawn close to each other. Maybe show the function of the signal within the symbol.
Exxample: A simple BJT does not use 1, 2, 3, it uses the arrow marking the emitter, the squared bar as the base and the diagonal line as the collector. And every one knows what it does)
* I´d prefer to use GND symbols. They are free to use, as much as you like ;-)
* every IC should have a bypass capacitor at the supply.
* But most of all it needs to show which signal do you want to be your expected output signal.

***
If needed a PWM, I´d first decide it´s specification, and most probably use a microcontroller to generate it. Thus the frequency as well as the duty cycle is extremely stable, predictable and easy to adjust.


Klaus
 
Do you have a signal output at OSC pin ?

1702046094713.png



Regards, Dana.
 
You are missing the input signal on Pin 1.

There are two parts. A fancy sawtooth generator with variable frequency, (transition) dead-time and sync options.

Now you need to use the comparator like @danadakk has shown.

However, with a positive ramp Sawtooth you need the signal on Pin 2 (non-inv) and sawtooth on pin 1.(inv)

1702057275706.png

--- Updated ---

Do you have any Quad CMOS Op Amps? 4066 analog switches?

then I can make a full scale analog input 0 to 5 V, 0 to 100% at any f with BW.
 
Last edited:
1702057740594.png

Thank you all.I was able to get a pwm wave for sg3525 when I used this schematic that was thrown on this site years ago.As you said, I skipped the 1st and 2nd outputs.only the wave I get now is not in the form I want.I will make the dead time and filtering better and try again tomorrow.I will report the result here.
 
Error amplifier output should be the modulating term but I do
not see that pinned out. You would like to set up the error amp
as a low gain buffer (unless your desired control signal is very
low max-min).
 
unfortunately I couldn't even get the pwm wave I got yesterday.can you suggest me a simple schematic.I don't want to give up at the beginning of the road when I am so enthusiastic about sg3525 :/
 
unfortunately I couldn't even get the pwm wave I got yesterday.can you suggest me a simple schematic.I don't want to give up at the beginning of the road when I am so enthusiastic about sg3525 :/
  • Debugging is simply breaking the result down into smaller problems and observing the effect of each stage from input to output.
  • Is power and ground OK?
  • Is there an oscillator? Can you find the square wave or the sawtooth wave signal?
  • Does it go to the comparator Vin-?
  • Does your input analog signal go to the Vin+ side of the comparator.
  • Observe the outputs of each pin and compare with the datasheet internal schematic.
  • If that doesn't work, put your finger on the pins to affect the bias voltage and cause an effect on the output. Check loose connections. Keep it neat.
  • RC timer? feedback to oscillator, reset pulse? Blanking ? Comparator bias? Input in the correct range of sawtooth signal?
 
can you suggest me a simple schematic.
This circuit is in two sections. One generates a triangle wave. The other accepts an incoming voltage and derives a PWM signal. Very similar to sine PWM.

Power supply is 12V single-ended, implied in op amp parameters.

triangle wave PWM (3 op amps 12V single-ended supply) .png

--- Updated ---

Click link below to see above schematic in Falstad's animated interactive simulator:

1) Opens website Falstad.com/circuit
2) Loads my schematic into the simulator.
3) Runs it on your computer.

tinyurl.com/ylpqja2q

Toggle Full Screen (under File menu)
Enlarge scope traces by dragging mouse upward on border of scope region.
 
Last edited:
This circuit is in two sections. One generates a triangle wave. The other accepts an incoming voltage and derives a PWM signal. Very similar to sine PWM.

Power supply is 12V single-ended, implied in op amp parameters.

View attachment 186782
--- Updated ---

Click link below to see above schematic in Falstad's animated interactive simulator:

1) Opens website Falstad.com/circuit
2) Loads my schematic into the simulator.
3) Runs it on your computer.

tinyurl.com/ylpqja2q

Toggle Full Screen (under File menu)
Enlarge scope traces by dragging mouse upward on border of scope region.

Nice simulation
This relaxation oscillator is not a perfect linear PWM, as it does not have a triangle true integrator feedback cap but rather a low pass filter for partial exponential integration to the hysteresis threshold, so it has a limited range of duty cycle and slows down frequency at each extreme. This may be an acceptable tradeoff for simplicity. It works fine for most applications like SMPS servo control but maybe not Class D HiFi audio or linear sensor ADC. This limits the duty cycle to roughly 10 to 90 % or so depending on Rail to Rail drop and other stuff. Since the slope of the long duration decays, this stretches and lowers the frequency at each extreme.

Reducing the hysteresis from 1/3 to 1% changes the design to a PFM oscillator with the one with the integration period from rail to mid-threshold and 1-shot duration due to hysteresis may be tighter control to better than 1% so you can design it from 0 to 100% or 1% to 99% PFM with a wide range of frequency of pulses.

I digress

Although this is not about the SG3525, readers may be interested in the subtle differences in PWM methods for linearity, when it matters and how to treat the feedback error when it is small at either extreme of duty cycle but for limited range servo 10~90% is good enough. Some SMPS ICs switch from PWM to PFM at low loads to reduce to overshoot and ripple or use PFM exclusively as in the hysteretic converter in order to handle a wider load range with linear PFM control. With PFM, the maximum frequency can be 50:1 to 100:1 at 50% duty cycle in the middle of the control range as it goes from < 1% to >99% if you wanted a wider linear dynamic range.

Duty Cycle conversion to DC
Linear recovery of PFM/PWM requires a linear integrate and hold to restore the DC voltage then dumpt the integrator charge and repeat into the sample and hold. But for incremental servo control like SMPS , a low pass filter perhaps with phase lead compensation may be sufficient. So don't just use an RC LPF to recover this PWM demodulation for large signals as it won't be linear.

Duty Cycle control is a useful way to send DC sense and low frequency data where linearity, gain and offset are more important and this may be achieve using PWM or PFM as long as you know how the reference works for linearity.
For what it's worth
I put a few of these ideas into a simulator, if you want to compare results with DC , sine or sawtooth modulation of PFM.
Like any good Synth it has some live user interactions. ( selector switch, simulation speed and user DC slider voltage )
1702159349836.png
 
I don't think that the 3525 uses a triangle wave. Believe it is a
hard discharge and a sloe ramp. RT may be a current-setting
(w/ VREF or a derivative of) and a current source on CT
produces the linear ramp.

I prefer a triangle wave with switched current ramp myself, but
that is as not amenable to synchronization as the sawtooth
(SYNC jams the discharge and the timing follows). Trying that
on a triangle wave makes weird (maybe OK, maybe not) stuff
because you have to keep twave bottom and top away from the
and "jamming" it does something else. creating a variable delay
from SYNC to "getting into normal range".

Regardless, without being to access and over-drive the error amp
you can't force a duty, and without access at all you can't use
the error amp in a buffer configuration.
 
I don't think that the 3525 uses a triangle wave. Believe it is a
hard discharge and a sloe ramp. RT may be a current-setting
(w/ VREF or a derivative of) and a current source on CT
produces the linear ramp.

I prefer a triangle wave with switched current ramp myself, but
that is as not amenable to synchronization as the sawtooth
(SYNC jams the discharge and the timing follows). Trying that
on a triangle wave makes weird (maybe OK, maybe not) stuff
because you have to keep twave bottom and top away from the
and "jamming" it does something else. creating a variable delay
from SYNC to "getting into normal range".

Regardless, without being to access and over-drive the error amp
you can't force a duty, and without access at all you can't use
the error amp in a buffer configuration.

Yes the 3525 is a linear sawtooth just like my 1st simulation. The deadtime control in this IC is the same as the blanking interval in CRT's with the controlled return slope.

You can't injection locked loop (ILL) an integrating ramp oscillator with a pulse or edge. But you can ILL a Sawtooth just like old TV-CRT horizontal sweep oscillators sync'd to TV h-signals.



There are many ways to control a duty cycle of triangle reference digitally and also demodulate error digitally, but not with analog unless using a PLL to generate f. But there has to be a good reason for it with specs.
 
Last edited:

LaTeX Commands Quick-Menu:

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top