Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Now you are saying:The sine wave is taken from the main.
So which is it?Because I am using function generator to produce a 50Hz sine wave
Alec used a transformer to block the DC voltage difference.Just a couple of questions, with regards to what alec_t said. Because I am using function generator to produce a 50Hz sine wave, if I were to connect 6VDC to it, wont it blow the generator because of the DC & AC issue.
As in, for my actual prototype, I am using the reference waveform from the grid. But in the lab for now, I am simulating the reference grid waveform from the signal generator instead of the grid.In post #30 you said:
Now you are saying:
So which is it?
It's difficult to advise you if you keep moving the goalposts .
Why do you want to? For generating PWM don't you need waveforms like this? :-
View attachment 82409
With reference to the datasheet, the output sink current is taken as 6mA(Min.), 18mA(Typ.). That was the reason why I take the Rp as 1k to produce a 12mA current. Am I looking at the wrong section?You must NEVER EVER leave an analog input floating without a DC reference voltage. Six of the inputs on the comparators had no DC reference voltage. I biased them at +6V. I also added two supply filter capacitors.
If you look at the datasheet for the LM339 quad comparator you will see that it says LOW POWER which means low output current. It cannot drive a 12mA load but it can drive 4mA fairly well so I increased the value of its load resistors.
I cannot see where 0VDC is on your 'scope photos. Then I also cannot see where the +6VDC reference voltage is located.
National Semi invented the LM339 quad comparator IC. Their datasheet lists the maximum saturation voltage is 0.7V (not very good) when the output current is only 4mA and the supply is 5V. If you use 12mA then only some or none of your circuits will work. Using 4mA then ALL of your circuits will work properly.With reference to the datasheet, the output sink current is taken as 6mA(Min.), 18mA(Typ.). That was the reason why I take the Rp as 1k to produce a 12mA current. Am I looking at the wrong section?
The photos of your 'scope do not show where is 0V. Please use an arrow or something.What do you mean by no 0VDC?
Yes, but the inputs MUST have a DC reference voltage.As for the input to the comparator [LM339], I didnt put in the +6VDC ref.
The triangle wave is at a much higher frequency so its bias resistor is at a 10k lower value so that stray capacitance at the inputs of the comparators do not attenuate it. The low frequency sinewave comes from the pot and since the pot has no value then I used a 100k fairly high value bias resistor to avoid attenuation of the pot signal.Why is it that one resistor is 10k and the other one is 100k?
It is the +12V supply bypass capacitor that all circuits need. All the grounds are connected together and all the +12V points are connected together.And what is the purpose of the capacitor 10uF connected to LM339 GND.
The one at the LM339 is the +12V supply bypass capacitor and the one at +6V filters and provides a low impedance for +6V.I take it as the both 10uF at the supply are the supply filter you were referring to.
National Semi invented the LM339 quad comparator IC. Their datasheet lists the maximum saturation voltage is 0.7V (not very good) when the output current is only 4mA and the supply is 5V. If you use 12mA then only some or none of your circuits will work. Using 4mA then ALL of your circuits will work properly.
The photos of your 'scope do not show where is 0V. Please use an arrow or something.
Yes, but the inputs MUST have a DC reference voltage.
The triangle wave is at a much higher frequency so its bias resistor is at a 10k lower value so that stray capacitance at the inputs of the comparators do not attenuate it. The low frequency sinewave comes from the pot and since the pot has no value then I used a 100k fairly high value bias resistor to avoid attenuation of the pot signal.
It is the +12V supply bypass capacitor that all circuits need. All the grounds are connected together and all the +12V points are connected together.
The one at the LM339 is the +12V supply bypass capacitor and the one at +6V filters and provides a low impedance for +6V.
However, the problem here is that I want to get a output from +VDC to 0V, 0v to -VDC. Do you have any idea how?Of course an LM339 comparator can use a dual supply. Then its inputs will work from the negative supply voltage to the positive supply voltage minus 1.5V. The output will swing from about 0.4V more positive than the negative supply voltage to the positive supply voltage.
Your electronic circuits can use a dual-polarity power supply then their reference voltage is 0V. If a single power supply polarity is used then half the supply voltage is the reference voltage.
To convert the positive pulses to negative pulses, connect an opamp as an inverting amplifier with a dual-polarity supply and a reference of 0V. When the input goes positive with the PWM pulses then the output will go negative with the PWM pulses.
Most PWM circuits use only positive polarity pulses to vary the speed of a motor or dim a light.
Why do you need the negative polarity pulses? What will it be used for?