EmbDev.net

Forum: Analog Circuits LM311P circuit - connections, wiring and diagram


Author: valentin88 (Guest)
Posted on:
Attached files:

Rate this post
0 useful
not useful
Hello everybody,

once again I need your help.

I want to built an analog signal to TTL circuit. I already got good 
answers to the components in a previsous thread 
(https://embdev.net/topic/398991#new).

Now I am struggling with the next step, which is to integrate the LM311P 
into my circuit. I am not sure how to wire it properly to get the signal 
I want.

Attached you find a drawing of how I would built it, based on my poor 
knowledge about that topic so far.

So basically I have a V_in signal from a BNC (Voltage levels e.g. 
between 2.3 and 2.7 Volts) and I want to have a 0->5 Volts TTL signal at 
V_out to a BNC.
I would use a external power supply to get the required 5V for the Vcc+. 
Also my potentiometers (Poti) are used to adjust my Voltage devisions 
within the circuit to adjust the switching voltage and the hysteresis.

The biggest uncertainty is the 1k resistor between the 5 Volts from the 
power supply and the V_out. As far as my understanding of the working 
principle of the LM311P is right, it switches at V_out (#7) between GND 
(direkt link to #1) or it blocks the link to #1 and so there are the 5 
Volts at V_out. So the 1k resistor in this case just limits the current.

Am I right with this?
How can I improve the circuit diagram?

If something is unclear, please feel free to ask!
Thank you very much in advance!

Regards,
Valentin

Author: Clemens L. (c_l)
Posted on:

Rate this post
0 useful
not useful
valentin88 wrote:
> As far as my understanding of the working principle of the LM311P is
> right, it switches at V_out (#7) between GND (direkt link to #1) or
> it blocks the link to #1 and so there are the 5 Volts at V_out.

This is an open collector output:
https://en.wikipedia.org/wiki/Open_collector

> So the 1k resistor in this case just limits the current.

The pull-up resistor is needed so that the output has a defined voltage 
level when the transistor is off ("open").

A higher resistor value limits the current, but also slows down the 
rising edge of the output signal.


The feedback resistor looks rather small. How large do you want the 
hysteresis to be?


> How can I improve the circuit diagram?

This diagram requires the reader to know the LM311 pin assignments. It 
might be a better idea to use the comparator/opamp triangle symbol.

Author: valentin88 (Guest)
Posted on:

Rate this post
0 useful
not useful
Hi Clemens,

thank you for your fast reply.

First of all I want to have a very fast switching circuit, so 1k should 
be fine then?

The hysteresis should be like 0.05V for signal Voltages e.g. between 2.3 
and 2.7 Volts ( so V1 = 2.475 and V2 = 2.525 Volts).

I know that I drew the pin arrangement, but that is even my question 
whether I planned the right wiring (IC, BNCs, resistors, power supply 
...) ...

Is the IC with an open collector the right thing for me?
The advantage is, that the current to V_out is not going through the IC 
itself and it therefore should be rather restistant towards "over 
current damage".

Thanks
Valentin

Author: Clemens L. (c_l)
Posted on:

Rate this post
0 useful
not useful
valentin88 wrote:
> I want to have a very fast switching circuit

What is "very fast"? 1 µs? 1 ns? 1 ps?

> 1k should be fine then?

That depends on the capacitance of whatever is connected to the output. 
But I'd guess it's about right.

> Is the IC with an open collector the right thing for me?

What do you want to do with the output signal? If you care about the 
speed, an output that can actively drive both states (push-pull) would 
be best for you.

> the current to V_out is not going through the IC itself

When outputting a low signal, the current through the pullup resistor 
(and any current from what you have connected) goes through the 
transistor.

Author: valentin88 (Guest)
Posted on:

Rate this post
0 useful
not useful
Hi Clemens,

you are right. "very fast" is not precise.
It would be great to have a circuit with a maximal reaction time of 
about 50µs.

The output signal is used a trigger signal to enable phase aligned 
optical measurements. Usually a rising edge of 2.4V should already 
trigger the device (accordingly to TTL logic on the web).

You are certainyl right, when the circuit switches to 0V the current 
gets grounded through the IC.

So since there are no major concerns or people saying "that ain't gonna 
work", I guess it is worth trying it.

Thanks!
Valentin

Author: matzetronics (Guest)
Posted on:

Rate this post
0 useful
not useful
That looks a bit dangerous, because the user can adjust the upper 10k 
and the lower 470k Pot to produce a short circuit of the power supply.

Its better to replace them with a single pot and a series resistor which 
also eliminates one adjustment point.
As mentioned you probably should increase the value of the hysteresis 
pot by a large degree.

Author: valentin88 (Guest)
Posted on:

Rate this post
0 useful
not useful
Hi Matzetronics,

Good point with the short circuit possibility. Since I need the 
adjustment I will just add a 10k resistor or so to the lower pot.

As far as I calculated it, the dimensions of the pots are just so, that 
I can adjust everything I need.
So if I increase the hysteresis pot, the hysteresis window decreases. 
Since my signal (gained from a hot wire signal) is quite noisy, I need a 
rather big hysteresis.

So what is the benefit of increasing the hysteresis pot?

Thanks
Valentin

Author: Clemens L. (c_l)
Posted on:

Rate this post
0 useful
not useful
valentin88 wrote:
> So what is the benefit of increasing the hysteresis pot?

It gives you the correct amount of hyseresis.

But I guess you actually wanted to use 470 kΩ for the feedback resistor, 
and just accidentally exchanged it with the lower divider resistor.

Author: valentin88 (Guest)
Posted on:
Attached files:

Rate this post
0 useful
not useful
Ok, I found the problem.
I had it right in my calculations but had it wrong on my plan.

So, attached the improved circuit plan (changes marked red):
1. preventing a short circuit
2. the hysteresis pot being the 470k to adjust the levels I need

That current design should do it?

Thanks everybody for your great help and the fast responses!

Valentin

Author: Clemens L. (c_l)
Posted on:
Attached files:

Rate this post
0 useful
not useful
valentin88 wrote:
> That current design should do it?

Looks OK.

Author: valentin88 (Guest)
Posted on:

Rate this post
0 useful
not useful
Thanks, awesome!

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.