LM 393 switching soft

Hi guys, hope someone can help.

I've got a LM393 on a 12v supply measuring a thermistor. I've got it switching around the right temperature but have a grey area where the output ramps up brightening the LED until it switches fully on.

How do i increase the feed back so the output switches from 0 to 1 ?

TIA

--
Mitch

terminal_crazy@sand-hill.freeserve.co.uk
www.sand-hill.freeserve.co.uk/terminal_crazy
Reply to
Terminal Crazy
Loading thread data ...

--
You\'ll need to introduce some hysteresis by connecting a large-valued
resistor form the output to the + input.

Got a schematic?

JF
Reply to
John Fields

thanks

I'd tried feedback to the +ve side of the sensor(on the -ve input) . Presumably feeding back to the +ve input would raise it towards the +ve rail ?

I'll have a play with this first thanks.

--
Terminal_Crazy

Mitch - 1995 Z28 LT1 M6          terminal_crazy@sand-hill.freeserve.co.uk
Lancashire England          http://www.sand-hill.freeserve.co.uk/terminal_crazy/
Reply to
Terminal Crazy

formatting link

Reply to
JeffM

This is an op amp? A smidgen of positive feedback is what it takes. Output of the amp to the + input (with very high value resistor) actual value depends on resistors in the sensor and reference but usually 100Ks to meg ohms.

Frequently a resistor in series with a pot to ground on the output will be used to take a small voltage off the output and gives an adjustable hysteresis to feed back to the non inverting input. Cheap and dirty is a high value resistor from out to non-inverting.

Reply to
default

i.e. some small positive feedback.

Typically. Cs can help too.

Always a good place to start.

Graham

-- due to the hugely increased level of spam please make the obvious adjustment to my email address

Reply to
Eeyore

You need to know what you're doing to get it right, especially if this is to be a volume manufactured item. 'Fiddling' with components is not the way. It's calculable and you should understand exactly the effect you're introducing.

Graham

due to the hugely increased level of spam please make the obvious adjustment to my email address

Reply to
Eeyore

No. An LM393 is a dual comparator

Graham

due to the hugely increased level of spam please make the obvious adjustment to my email address

Reply to
Eeyore

Feedback to the inverting input will change the gain of the comparator from "infinite" to some finite value. That's not what you want.

This is about hysterisis, adding "snap" to the changeover of the comparator. Hence some positive feedback, ie a resistor from the output to the non-inverting input, means that when the input goes above the value on the other input of the opamp (that other input sets the level at which the comparator will switch) the comparator output will go "high" and that resistor will add some voltage to the input. The input thus sees more voltage than the incoming voltage, and thus the comparator is "more" on.

Michael

formatting link

>
Reply to
Michael Black

Only real difference is the open collector out versus push-pull out ?

Reply to
default

Maybe, it there may be some specific shaping of the circuitry to make it better for comparator use.

Any op-amp can be used as a comparator, it is the same general circuitry.

Michael

Reply to
Michael Black

I've had a play and read a bit more about them and got this layout now...

12v ____________________________________________________________ | | | | | | | | | / | | | \\ / _____________ | | /10K \\ | / | | \\ |\\ /10k | \\4K7| | / 2 | \\ \\ | / | | |-------------| - \\ / | \\ C|\\ | | | \\ | | /---B| | 2N3906 | / |LM393 \\_|______| _ E|/ / \\ | / | _______| \\ /10K 3 | / | | |_______ /
Reply to
Terminal Crazy
[snip]

Perhaps a capacitor in parallel with the LED?

That might delay the turn-on of the LED until the relay engages. You'd have to experiment with various values of cap, though...

Reply to
Randy Day

Are you really using and 2N3906? If so then you have it connected incorrectly. The 2N3906 is a PNP transistor. You need to either:

1) Swap the collector and emitter connections so that the collector is connected to the relay/LED and the emitter is connected to 12v. A 1K resistor from the base to the 12v supply might also help ensure the the transistor is turned off.

or:

2) Use a NPN transistor with your current circuit.

The 2N3906 might work (I have never tried it) in your current arrangement but if so then it will work very poorly. The resulting very low gain from using the transistor 'backwards' might explain the results that you are seeing.

Dan

Reply to
Dan Coby

--
It should be less than that; you forgot about the switch point adjust
pot.
Reply to
John Fields

Some op-amps don't like being driven into saturation.

Reply to
Nobody

thanks Dan & John. I'm just measuring the thermister atm temp vs resistance.

The circuit was of the internet (one i've got stashed as notes) but didn't really explain enough re feedback etc.

The transister pinout is now confusing.. also from the same set of circuits.

The Phillips specsheet shows pinout as

TO-92 c | \\ b | | e | / but doesn't state view(ie above / below)

My Electronic catalogue shows it as b | \\ c | | e | / Viewed from BELOW

Can anyone confirm orientation. I'll try it now with the 2N3904.

Thanks

--
Terminal_Crazy

Mitch - 1995 Z28 LT1 M6          terminal_crazy@sand-hill.freeserve.co.uk
Lancashire England          http://www.sand-hill.freeserve.co.uk/terminal_crazy/
Reply to
Terminal Crazy

OK I.ve' now got this working again...

2n3904 wired as

B C C rather than B E E can anyone confirm pinouts for 2N3904 & 2N3906 ?

4K7 resistor across LED stops relay energising... replaced with 10k & seems ok

LED still glows before relay energises ( Not really a problem though as I cm mount an LED OFF the relay output )

Thanks

--
Terminal_Crazy

Mitch - 1995 Z28 LT1 M6          terminal_crazy@sand-hill.freeserve.co.uk
Lancashire England          http://www.sand-hill.freeserve.co.uk/terminal_crazy/
Reply to
Terminal Crazy

Yes, many comparators including this one are open-collector. It tends to be useful.

But usually much slower.

Graham

-- due to the hugely increased level of spam please make the obvious adjustment to my email address

Reply to
Eeyore

And indeed some can reverse their output if overdriven.

Graham

-- due to the hugely increased level of spam please make the obvious adjustment to my email address

Reply to
Eeyore

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.