• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Lm311 output

Status
Not open for further replies.

confounded

New Member
Hi, i'm not sure if part of my project is working correctly.

Its from a magazine, and on their diagram output at pin 7 of the lm311 a rectangular waveform is shown.

The inverting input is aprox 100khz triange wave and the non inverting input is aprox 5V dc. (see pics) (i've used 10x probe so voltage on pics are 1/10 voltage)
(The noninverting input will carry an audio signal later)

The output will be a pwm signal.

However on both my project and a circuit i've built on a breadboard to try and work out what ive done wrong i get a non rectangular output at pin 7. As shown on pic but its not a clean trigger, i just captured a split second image, its actually jumping everywhere

Is this the output correct? If not what do you think i've done wrong?
 

Attachments

mvs sarma

Well-Known Member
Hi, i'm not sure if part of my project is working correctly.

Its from a magazine, and on their diagram output at pin 7 of the lm311 a rectangular waveform is shown.

The inverting input is aprox 100khz triange wave and the non inverting input is aprox 5V dc. (see pics) (i've used 10x probe so voltage on pics are 1/10 voltage)
(The noninverting input will carry an audio signal later)

The output will be a pwm signal.

However on both my project and a circuit i've built on a breadboard to try and work out what ive done wrong i get a non rectangular output at pin 7. As shown on pic but its not a clean trigger, i just captured a split second image, its actually jumping everywhere

Is this the output correct? If not what do you think i've done wrong?
instead why not upload the link of the article or the schematic alone. It helps
 

Hero999

Banned
The inverting input is aprox 100khz triange wave and the non inverting input is aprox 5V dc. (see pics) (i've used 10x probe so voltage on pics are 1/10 voltage)
What's the peak to peak voltage of the 100kHz triangle-wave?

What's the DC bias on the inverting input?

The signal on the inverting should swing through the voltage at the non-inverting input to get PWM.

Here's a simulation of a PWM circuit consisting of two op-amps. The first one generates a 400Hz sawtooth/triangle wave, the second acts as a comparator. As you can see the output only changes from on to off when the waveform crosses the voltage set on the potentiometer.
 

Attachments

confounded

New Member
Thanks for replying guys

As shown in my captured waveforms:

Vpp of triangle wave is aprox 11V

DC bias of triangle wave is aprox 5V

I understand how the comparator works to achieve pwm, what i'm not sure of is is the output at pin 7 correct for the given inputs.

Inputs are:

noninverting input = 5V DC

inverting input = 100khz triangle wave

The magazine shows a rectangular output, my output is not rectangular?
 
Last edited:

audioguru

Well-Known Member
Most Helpful Member
Your output will be a square-wave if the 2.2nf capacitor, 4.7k resistor, second 1k resistor and "the rest of the circuit" are not connected.
 

Hero999

Banned
Yes, the 2.2nF capacitor will have an impedance of 720R at the fundamental, much lower at the higher harmonics.

We don't know what load it's driving because we don't know what the rest of the circuit is.
 

confounded

New Member
The rest of the circuit is a transistor and leds, sorry i assumed they didnt affect the output at pin 7.

I've attached a pic

So is the output i am getting at pin 7 correct?
 

Attachments

Hero999

Banned
This is why it's important to post the whole circuit, even if you don't think it's important, it might be.

It turns out that it's totally wrong.

What's the forward voltage of the LEDs?

Unless they're infrared LEDs then the chances are the voltage drop is too high for 12V.

How much current do you want for the the LEDs?

You could get rid of the transistor and connect the LEDs directly to the comparator output. The LM311 is capable of sinking up to 50mA so the chances are you don't need a buffer transistor.

For your reference, here's how to do it correctly with a PNP transistor.

Because it's a PNP transistor, there's no need to have a pull-up, the 10k resistor only helps to speed up the turn-off time of the transistor.
 

Attachments

Last edited:

confounded

New Member
thanks again for replying

actually 6 out of 7 are infra red leds lol sorry again i should of said that.
Lesson learnt i will provide every detail in future. :eek:

I'm still confused though, is the output waveform i am seeing at pin 7 of the lm311 what is to be expected?

What does the 2.2nf capacitor parallel the 4.7k resistor do?

Its not my cirucit, its a project from a magazine.
An amplified lowpass filtered audio signal is supplied to the noninverting input of the lm311, then modulated with the 100khz triangle wave and sent via the infra red leds.
The magazine artical mentions they have provided some trebble boost is this what the 2.2nf and 4.7k resistor do?
Im building a wooden enclosure for this transmitter and im at the stage where once its in it wont be coming back out so am trying to make sure everything is working ok.

also i removed all components after pin7 to see if i would get a rectangular wave and ofcourse i did :) so is the waveform im getting expected with the components in place or do you think i have misconnected them?
 
Last edited:

Hero999

Banned
It appears you've got too much loading on the output. The confusing thing is I would expect the output to be nearer 12V than 0V so maybe you have mis-connected it.

I don't see how adding a high-pass filter will make any difference after the PWM circuit. If you want treble boost then it needs to be before the PWM circuit and there needs to be a treble cut at the receiver to stop it from sounding distorted.
 

confounded

New Member
I still dont understand what the 2.2nf capacitor and 4.7k resistor are for. Are they a high pass filter?
When i remove the capacitor my output is a rectangular wave.
Do i want a rectangular wave or do i want the output i am getting with the capacitor and resistor in place? :confused:
 

Hero999

Banned
The 2.2nF capacitor acts like a 720R resistor at 100kHz and a short circuit at the higher frequency harmonics (a squarewave has infinite harmonics)

You want a rectangular wave for PWM, I suggest using the the circuit I posted above.
 

confounded

New Member
thanks again for replying, you've been very helpfull.

I will use your circuit in order to get a rectangular wave.

However i would really like to know why the magazine has put the 2.2nf and 4.7k resistor in. There must be a reason.

The reason i've been concerned about the waveform at pin 7 of the lm311 is because the magazine had drawn a rectangular wave by it, on their schematic, and i did not have this.

What really matters i guess is what the waveform across the leds will be and i've captured both the waveform of the original circuit and your (heros) solution.
Is one to be preferred or will both work?

(i've used x10 probes so voltage on captured waveform is 1/10)
 

Attachments

confounded

New Member
I've also built the infra red reciever, and just tested them out.

I can hear audio if there is about a 10cm distance but theres a high pitch noise over it, any further distance between transmitter and reciever and it doesnt work! i just get noise.
 

Hero999

Banned
How do you know that the receiver isn't wrong?

Circuits in magazines can have errors, just because it's published, it doesn't mean it's right.

It seems odd that the waeform doesn't hit 0V, it's possible that background infrared radiation is causing the LEDs to generate a small voltage.
 

confounded

New Member
unfortunatly i think the reciever is wrong, probably due to how i've assembled it.
Trouble is i cant prove either the transmitter or reciever works.

Like the transmitter, ive built another reciever on a breadboard and this doesnt work either, or maybe it does and the transmitter is the problem.

Really frustrating :mad:
 

Hero999

Banned
How about posting a schematic of the receiver?
 

Roff

Well-Known Member
How do you know that the receiver isn't wrong?

Circuits in magazines can have errors, just because it's published, it doesn't mean it's right.

It seems odd that the waeform doesn't hit 0V, it's possible that background infrared radiation is causing the LEDs to generate a small voltage.
Once the collector voltage drops below the cumulative knees of the LEDs, they become high impedance, and the discharge path for the collector capacitance become close to an open circuit. The voltage would get to zero if the frequency were very low.
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top