Author Topic: Please laugh with me, point sticks and tell me what is wrong  (Read 8936 times)

0 Members and 1 Guest are viewing this topic.

Offline Simon

  • Global Moderator
  • *****
  • Posts: 15394
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Please laugh with me, point sticks and tell me what is wrong
« on: January 11, 2013, 09:26:57 am »
We have been nutty enough to buy the attached circuit on strip board for an urgent project (despite the fact I could probably make it from scratch my way faster but you know.... management!)

Is it just me or is this circuit totally screwed up and causing about as many problems as it solves. It is supposed to be a thermostat for the relay of a compressor clutch for an air con system to work between 3 deg C and 23 deg C with a hysterisis of 3-4 deg C so that the clutch does not keep coming on and off. I am going around in circles, and it seems that it won't switch when the sensor reaches the higher range.

Resistance values on the chart are in K ohms

I am a little concerned that an op amp was used rather than a comparator, as far as I can tell it is an inverting amplifier with a gain of about 15 and a varying "0" point.
« Last Edit: January 11, 2013, 09:28:45 am by Simon »
 

Offline qno

  • Frequent Contributor
  • **
  • Posts: 422
  • Country: nl
Re: Please laugh with me, point sticks and tell me what is wrong
« Reply #1 on: January 11, 2013, 09:37:46 am »
What are the numbers in the sheet?

Why spend money I don't have on things I don't need to impress people I don't like?
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 15394
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Please laugh with me, point sticks and tell me what is wrong
« Reply #2 on: January 11, 2013, 09:40:44 am »
you mean the ones on the left ? that is the value in K ohms of the sensor at different temperatures
 

Offline qno

  • Frequent Contributor
  • **
  • Posts: 422
  • Country: nl
Re: Please laugh with me, point sticks and tell me what is wrong
« Reply #3 on: January 11, 2013, 09:56:46 am »
Did you measure this in-circuit?
Why spend money I don't have on things I don't need to impress people I don't like?
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 15394
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Please laugh with me, point sticks and tell me what is wrong
« Reply #4 on: January 11, 2013, 10:02:03 am »
no they were measured with the probe disconnected.
 

Online TerraHertz

  • Super Contributor
  • ***
  • Posts: 3739
  • Country: au
  • Why shouldn't we question everything?
    • It's not really a Blog
Re: Please laugh with me, point sticks and tell me what is wrong
« Reply #5 on: January 11, 2013, 10:17:01 am »
It's supposed to have hysteresis, but the op amp feedback is connected to the inverting input. Giving linear operation.
Should be connected to the + input. Without even thinking about whether the values are sane.

Edit: So there's a teeny bit of hysteresis provided by the schmitt trigger input of the 4096. Which will vary with the supply voltage.
I wonder what geni-arse(sic) designed this?

Edit2: Also, I'm having trouble finding data in the IN5365 zener. What?! What voltage is it? And why is it there?
Purpose is maybe to prevent exceeding CMR on the op amp if the sensor is unplugged? But it will have some leakage current, and that's going to cause sensor inaccuracy. Same with the reversed IN4004, though not so much.

« Last Edit: January 11, 2013, 10:31:10 am by TerraHertz »
Collecting old scopes, logic analyzers, and unfinished projects. http://everist.org
 

Offline blackdog

  • Frequent Contributor
  • **
  • Posts: 611
  • Country: nl
  • Please stop pushing bullshit...
Re: Please laugh with me, point sticks and tell me what is wrong
« Reply #6 on: January 11, 2013, 10:19:02 am »
Hi Simon, :-)


This will not work the way you want it...
There is no hysterisis, only gain.
The feedback resistor should be going to the + input of the opamp.
You have to do the math for the 51K and the 470K resistor for the 3C hysterisis.

Kind regarts
Blackdog
“Two things are infinite, the universe and human stupidity, and I am not yet completely sure about the universe.”
 

Offline Kremmen

  • Super Contributor
  • ***
  • Posts: 1287
  • Country: fi
Re: Please laugh with me, point sticks and tell me what is wrong
« Reply #7 on: January 11, 2013, 10:19:37 am »
It's supposed to have hysteresis, but the op amp feedback is connected to the inverting input. Giving linear operation.
Should be connected to the + input. Without even thinking about whether the values are sane.
You beat me to it. Exactly the same observation: the amp is working as an amp, not a comparator. It doesn't make sense in the context of this application - you want a comparator, not an amp per se.
You sure the feedback goes to the neg input actually?
Nothing sings like a kilovolt.
Dr W. Bishop
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 15394
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Please laugh with me, point sticks and tell me what is wrong
« Reply #8 on: January 11, 2013, 10:23:40 am »
yes it does go there, I suspect the person supplying the diagram is having us on in case we try to make it ourselves instead of pay him to, we in turn had it made by someone else cheaper and the result is that I've spent a week trying to work out what my employers is doing with the output, what control positions they want to do what and any errors made by the guy who made it.
 

Offline Kremmen

  • Super Contributor
  • ***
  • Posts: 1287
  • Country: fi
Re: Please laugh with me, point sticks and tell me what is wrong
« Reply #9 on: January 11, 2013, 10:36:19 am »
Sure is a lot of work for an essentially trivial thing like that  |O
Just make it yourself and don't confess if they ask  %-B
Nothing sings like a kilovolt.
Dr W. Bishop
 

Online TerraHertz

  • Super Contributor
  • ***
  • Posts: 3739
  • Country: au
  • Why shouldn't we question everything?
    • It's not really a Blog
Re: Please laugh with me, point sticks and tell me what is wrong
« Reply #10 on: January 11, 2013, 10:37:19 am »
I can sort of see his thought process. He used the op amp to scale the sensor signal, then low pass filtered it with an RC, then used the 4096 to provide a (roughly) constant amount of hysteresis. I bet the sensor is wired some distance away, right? And maybe the +12V supply is horrible - noisy and varying - especially when the output load (a relay?) is turned on or off. Thus feedback from output state to all the imperfections in the circuit, providing a complex behavior mess.
Collecting old scopes, logic analyzers, and unfinished projects. http://everist.org
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 15394
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Please laugh with me, point sticks and tell me what is wrong
« Reply #11 on: January 11, 2013, 10:56:21 am »
I have wired up a second board and it is working now to a fashion although I still have heating and cooling reversed but that is probably due to use using a NC relay instead of a NO relay. The sensor could be some distance away and the power supply was in the box, we now have the op amp section working off 28V and the NAND gate working off 12V from a regulator (a mod the assembler made). The problem with this circuit is that it seems to be very convoluted and unless you wire it up just right it all goes very very wrong. This guy is very old school. I'd have used a micro probably as there are other circuits needed like fan speed controls. In any event it could have been more simply built with a proper comparator and using a mosfet on the output.
 

Offline qno

  • Frequent Contributor
  • **
  • Posts: 422
  • Country: nl
Re: Please laugh with me, point sticks and tell me what is wrong
« Reply #12 on: January 11, 2013, 11:25:23 am »
The inverter is there because the circuit is working in the oposite way.
As temperature rises the output will go low.
He should have connected the sensor between +12V and the input and swap the + and - input of the opamp.
The hysteresis resistor should go to the + of the opamp as described before.
Hysteresis is a bit variable due to the change in sensor resistance.
You will have to find a good compromise over the temperature range.
Power supply disturbance can be solved by operating the circuit on 5V generously decoupled.
You can stick the circuit on an experimenters board.
Is he using any of the other opamps in the LM124 or other gates of the 4093?
Why spend money I don't have on things I don't need to impress people I don't like?
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 15394
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Please laugh with me, point sticks and tell me what is wrong
« Reply #13 on: January 11, 2013, 11:43:42 am »
he is using only one opamp and one gate. He seems to be using the gate for the hysterysis as we have establishded that at the moment the circuit is working as a differential amplifier essentially. So what I will do now is use another gate to re negate the output to what we want.
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 15394
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Please laugh with me, point sticks and tell me what is wrong
« Reply #14 on: January 11, 2013, 02:34:09 pm »
adding another not gate just kept the output permanently on, The guy doing the wiring has finally conceded to just swap his relay contacts (yes it took some bloody convincing) and I'll take the gate back out. I think the problem is that we now have the op amp on 28V and the logic gate on 12V and now that we realize that the gate is taking an analogue input in and is providing the hysteresis. Yes i could adapt it to power the whole thing from 12V but I've been told not to meddle any more in case we make more problems.
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 7569
  • Country: us
    • SiliconValleyGarage
Re: Please laugh with me, point sticks and tell me what is wrong
« Reply #15 on: January 11, 2013, 03:57:38 pm »
Really? 1/4 of an 424 and 1/4 of a 4093 to make an invertor ( schmitt i know )

Could be done usong 1 lm393... First half comparator , second half comparator with hysteresis. The delay is the rc constant between them...
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 15394
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Please laugh with me, point sticks and tell me what is wrong
« Reply #16 on: January 11, 2013, 04:19:29 pm »
yep quite although this is a section of schematic from a larger schematic so it could be that the rest were used elsewhere. Yes I'd have just used a comparator, but what is the point of a comparator followed by another comparator with hysterysis, surely the first will output high or low making a following one pointless ?
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 15435
  • Country: za
Re: Please laugh with me, point sticks and tell me what is wrong
« Reply #17 on: January 11, 2013, 04:27:43 pm »
He did say point sticks...... Simon could do better with half the parts anyway.

Anyhow you can use a comparator and do the logic right with it anyway first time.
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 15394
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Please laugh with me, point sticks and tell me what is wrong
« Reply #18 on: January 11, 2013, 04:41:49 pm »
Anyhow you can use a comparator and do the logic right with it anyway first time.

Quite, that is what I don't understand this guy is just converting levels from positive to negative and back to positive. Am I deluding myself or can the hysteresis be made to work either way round ?
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 15435
  • Country: za
Re: Please laugh with me, point sticks and tell me what is wrong
« Reply #19 on: January 11, 2013, 05:15:25 pm »
Yes, it will do an offset on either the input or the reference depending on how you wire the comparator, and this provides the hysteresis. providing you are not using multiple comparators off the same point it has no effect otherwise.
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 15394
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Please laugh with me, point sticks and tell me what is wrong
« Reply #20 on: January 11, 2013, 06:10:52 pm »
whoever designed this is either very clever ( :-\) or does not have a clue what he is doing.
 

Offline miceuz

  • Frequent Contributor
  • **
  • Posts: 376
  • Country: lt
    • chirp - a soil moisture meter / plant watering alarm
Re: Please laugh with me, point sticks and tell me what is wrong
« Reply #21 on: January 11, 2013, 06:46:29 pm »
I've made similar circuit just yesterday  :D I've used LM35 temp sensor and LM358. As I needed it to work somewhat in range of 0 - 4 C, I've added two diodes in series on the ground connection of LM35. As diode voltage drop drifts with temperature, I've added the same two diodes to bottom of trimpot and have chosen trimpot value so current thru it would be equal to quiscient current of LM35, so diodes drift the same, that sets the temperature point, buffered it with half of LM358 and used second half as a comparator with hysetesis. Just works..

Offline helloworld922

  • Regular Contributor
  • *
  • Posts: 57
  • Country: us
    • My personal blog
Re: Please laugh with me, point sticks and tell me what is wrong
« Reply #22 on: January 11, 2013, 07:23:53 pm »
 :scared:

I always thought this was the recommended way for designing a comparator circuit with hysteresis (attached circuit).

Vhyst = R1 * (Voh - Vol) / (R1 + R2)

Voh is the high output level (in this case pullup to relay source voltage) and Vol is the low output level (assuming an actual open collector/drain comparator, this should be 0).

I have the pnp transistor in there which means if Vsense > Vref the coil will energize, otherwise it won't. You can of course just as easily have an npn transistor in there to do the opposite (or use MOSFET's instead).

R3 is your variable resistance temp sensor, R4 is to provide a voltage divider to get Vsense.

Reference:
Analog Devices: Curing Comparator Instability with Hysteresis
 

Offline lewis

  • Frequent Contributor
  • **
  • Posts: 702
  • Country: gb
  • Nullius in verba
Re: Please laugh with me, point sticks and tell me what is wrong
« Reply #23 on: January 11, 2013, 08:31:57 pm »
Simon, if you must use an op-amp instead of a comparator, use something like this (attached). I bet the designer of the original circuit stuck the logic gate in there because the output offset voltage of the op-amp when 'off' was enough to turn on the transistor driving the relay at all times. Putting a low value zener in the base circuit gets around this without resorting to a schmitt trigger. The 4.7K resistor provides enough pulldown to overcome the leakage of the zener. It might need to be lower, 1K-2.2K.

The 1N914 diodes provide ESD protection for the op-amp if the temperature sensor is mounted remotely. Another pair of diodes will need to go on the set-point potentiometer if that is mounted remotely too.

This circuit will energise the coil when the temperature is lower than the set point. If you want the relay to work the other way, reverse the inverting and non-inverting inputs, but move the feedback resistor to the non-inverting input and exchange the 1uF and 100nF caps. The 100nF is a bit low for noise smoothing, but speeds up the hysteresis action. Try changing it to 1uF. Or, just swap the temp sensor and it's pullup for the same effect.

You'll need to select the unlabelled resistors for your application.

You might want to run everything to the left of the relay coil from a voltage regulator if the supply is noisy or if it's likely to go over 32V, even transiently. The op-amp doesn't like it up it.

The diode in reverse parallel with the relay coil is a 1N4007, transistor can be TIP122 if the relay is a big bastard, or BC337-40 or something if <50mA coil current. No zener in parallel needed.

Remember, if you do use a comparator, it will probably have an open collector output and a pullup on its output will be necessary.

In theory it's easy to do with bugger all parts, but in the real world where there's noise, ESD and crap, additional protection components are required. I've probably forgotten something, I'm sure someone will point out if so!
I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 15394
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Please laugh with me, point sticks and tell me what is wrong
« Reply #24 on: January 11, 2013, 08:40:42 pm »
if it were me I'd use a comparator, I have no idea what the hell he thought he was doing. I'd rather do it with a micro-controller and then the hysterysis would not be needed because I can just stipulate in software that the coil has to be off for at least a minute before it can be turned back on again, as all it is about is not overwhering the compressor clutch or relay, although I'd swap that for a mosfet.
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 15394
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Please laugh with me, point sticks and tell me what is wrong
« Reply #25 on: January 14, 2013, 11:47:00 am »
If I just reverse the op amp inputs what will happen ? I tried it and my output just stayed on.
 

Offline lewis

  • Frequent Contributor
  • **
  • Posts: 702
  • Country: gb
  • Nullius in verba
Re: Please laugh with me, point sticks and tell me what is wrong
« Reply #26 on: January 14, 2013, 02:51:38 pm »
Hi Simon, you need to make sure the feedback resistor always goes to the + input.

So if you just reverse the inputs on the diagram I attached, the feedback resistor will now go to the - pin. You need to change this so it goes to the + pin.

If you want it done with a microcontroller let me know. We do do customised design and product development on a daily basis, if you need things like this done on the cheap and very quickly, drop me an e-mail at www.abeltronics.co.uk/contact
I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 15394
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Please laugh with me, point sticks and tell me what is wrong
« Reply #27 on: January 14, 2013, 03:10:35 pm »
I meant swapping the pins on the circuit I posted.

we are sending these as they are (nuts I know, we have thermostats in stocks that cost a fiver each that we have used for years but they want this junk). Ultimately I am hoping to redesign the wholes thing myself with a micro to do thermostat, fan speed and a delayed power line to a small pump.
 

Offline lewis

  • Frequent Contributor
  • **
  • Posts: 702
  • Country: gb
  • Nullius in verba
Re: Please laugh with me, point sticks and tell me what is wrong
« Reply #28 on: January 14, 2013, 05:10:51 pm »
Hi Simon, should be the same thing in theory. I suspect the output offset voltage of the op-amp is just enough to keep the gate triggered in one direction. What supply voltage are you using? It says 12V on the diagram but also 24V/28V DC next to where it says 12V. Don't power the gate from more than 15-18V whatever you do...

I'd measure the output of the op-amp with a voltmeter while adjusting the preset pot, and do the same while heating the thermistor with your fingers or a soldering iron. Remember that circuit is configured as an amplifier, not a comparator, and is a complete lash-up. You're relying on the triggering threshold of the logic gate for the 'comparator' bit which is extremely variable. (Well, not extremely as such, but extreme enough). You need to see what the op-amp output voltage is doing when you adjust the op-amp's inputs.

I really really wouldn't recommend using that circuit, it is far from satisfactory. The offset voltage and schmitt trigger threshold will vary with temperature and if you have a marginal design on the bench it will almost certainly fail in the real world. The microcontroller idea is much better, I've replaced plenty of comparators with microcontrollers in commercial designs in the past.
I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 15394
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Please laugh with me, point sticks and tell me what is wrong
« Reply #29 on: January 14, 2013, 09:50:54 pm »
I tried using the schematic in the PDF that someone posted to make a quick breadboard circuit. It was a mess with no hysterysis. I still ended up with op amp type behavior (fading LED) from an LM339..... surely the only way to have histerysis is to put a resistor from output to +input so that as the output switched the resistor is put in parallel with either one side of the other of the reference voltage divider or (assuming compatible) voltage divider formed by the sensor resistor and it's accompanying fixed resistor.
 

Offline lewis

  • Frequent Contributor
  • **
  • Posts: 702
  • Country: gb
  • Nullius in verba
Re: Please laugh with me, point sticks and tell me what is wrong
« Reply #30 on: January 14, 2013, 11:44:44 pm »
Absolutely right! Were you using my circuit?
I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 15394
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Please laugh with me, point sticks and tell me what is wrong
« Reply #31 on: January 15, 2013, 06:43:27 am »
No I was trying to follow the analog devices pdf someone posted early on that gave formulas and everything but it had no histerysis when I tried it.

http://www.analog.com/library/analogDialogue/archives/34-07/comparators/
« Last Edit: January 15, 2013, 06:54:50 am by Simon »
 

Offline Kremmen

  • Super Contributor
  • ***
  • Posts: 1287
  • Country: fi
Re: Please laugh with me, point sticks and tell me what is wrong
« Reply #32 on: January 15, 2013, 07:31:17 am »
I tried using the schematic in the PDF that someone posted to make a quick breadboard circuit. It was a mess with no hysterysis. I still ended up with op amp type behavior (fading LED) from an LM339..... surely the only way to have histerysis is to put a resistor from output to +input so that as the output switched the resistor is put in parallel with either one side of the other of the reference voltage divider or (assuming compatible) voltage divider formed by the sensor resistor and it's accompanying fixed resistor.
If you mean the hand drawn schematic then there is one small but crucial mistake: the comparator output is missing the collector pull-up resistor. If you use an LM339 or similar part, it has an open collector output that does not pull up actively. Thus the relay transistor is never driven properly, unless you insert a pull-up resistor into the circuit.
Otherwise the hysteresis part is correct: it is done using positive feedback. But that also will behave strangely if you dont pull the output up properly.
Nothing sings like a kilovolt.
Dr W. Bishop
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 15394
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Please laugh with me, point sticks and tell me what is wrong
« Reply #33 on: January 15, 2013, 07:53:26 am »
No I was referring to the Analog Devices PDF that I linked to above. Yes I did use a pull up resistor.
 

Offline helloworld922

  • Regular Contributor
  • *
  • Posts: 57
  • Country: us
    • My personal blog
Re: Please laugh with me, point sticks and tell me what is wrong
« Reply #34 on: January 15, 2013, 08:05:09 am »
You mean the one I linked to (edit: I guess you linked to it, too)? It has hysteresis, but I think comparators might have troubles sinking significant current so they may not be able to drive the relay coil directly.

My circuit used an additional transistor (I chose a PNP, but could be a P-channel MOSFET instead or the NPN/N-chan variant for opposite logic) to drive the coil.

The one possible issue is I wasn't quite sure where the pullup resistor should tie up to (R6). I picked the relay power source so the transistor will be fully off/on on both high and low levels, but this may cause havoc on the rest of the circuit (haven't calculated it). R5 is used to limit base current so it may not be required if using a MOSFET solution.

You do have the comparator in a positive feedback configuration, right?
« Last Edit: January 15, 2013, 08:07:55 am by helloworld922 »
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 15394
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Please laugh with me, point sticks and tell me what is wrong
« Reply #35 on: January 15, 2013, 08:10:27 am »
yes I'd use a transistor too (a mosfet not a flipping darlington like this old fart did) but my concern at the moment is understanding and getting the comparator to work WITH histerysis.
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 15394
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Please laugh with me, point sticks and tell me what is wrong
« Reply #36 on: January 15, 2013, 08:44:55 am »
The attached is what I deem to be a comparator with histerysis, the "sensor" could be any of those resistors to suit.
 

Offline Kremmen

  • Super Contributor
  • ***
  • Posts: 1287
  • Country: fi
Re: Please laugh with me, point sticks and tell me what is wrong
« Reply #37 on: January 15, 2013, 10:02:28 am »
Yep, sure is. You can tell by the Mk 1 eyball but attached a snap simulation confirming the same. Sorry about the ridiculous comparator symbol, that was the best Multisim could come up with a moment's notice.
By the way, you can't really have a voltage source connected to the comparator output. That will be an effective short when the output transistor conducts. I left that out and it simulates just fine without it.

P.S. scope traces are color coded in the schematic. All traces 5 V/div.
« Last Edit: January 15, 2013, 10:09:46 am by Kremmen »
Nothing sings like a kilovolt.
Dr W. Bishop
 

Offline lewis

  • Frequent Contributor
  • **
  • Posts: 702
  • Country: gb
  • Nullius in verba
Re: Please laugh with me, point sticks and tell me what is wrong
« Reply #38 on: January 15, 2013, 12:57:28 pm »

If you mean the hand drawn schematic then there is one small but crucial mistake: the comparator output is missing the collector pull-up resistor. If you use an LM339 or similar part, it has an open collector output that does not pull up actively. Thus the relay transistor is never driven properly, unless you insert a pull-up resistor into the circuit.
Otherwise the hysteresis part is correct: it is done using positive feedback. But that also will behave strangely if you dont pull the output up properly.

My circuit uses an op-amp, Simon seemed to want to use an op-amp.
I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 15394
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Please laugh with me, point sticks and tell me what is wrong
« Reply #39 on: January 15, 2013, 12:59:13 pm »
No I'm happy with a comparator, the idiot that designed the hand drawn schematic used an opamp, probably because he was using the other 3 for something else in the grander scheme of things.

I generally have LM339's knocking around for breadboarding.
 

Offline lewis

  • Frequent Contributor
  • **
  • Posts: 702
  • Country: gb
  • Nullius in verba
Re: Please laugh with me, point sticks and tell me what is wrong
« Reply #40 on: January 15, 2013, 01:09:00 pm »
The attached is what I deem to be a comparator with histerysis, the "sensor" could be any of those resistors to suit.

This circuit should work mate, what's it doing?
I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 15394
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Please laugh with me, point sticks and tell me what is wrong
« Reply #41 on: January 15, 2013, 02:02:17 pm »
not tried it, we are currently bunging the nut jobs circuit in and forgetting it (along with some hashing up). Wrng i know, but I'm not in charge, I've already recomended we use the comercial thermostats we have around with the necesary protection circuitry added.
 

Offline helloworld922

  • Regular Contributor
  • *
  • Posts: 57
  • Country: us
    • My personal blog
Re: Please laugh with me, point sticks and tell me what is wrong
« Reply #42 on: January 15, 2013, 03:50:41 pm »
Quote
By the way, you can't really have a voltage source connected to the comparator output. That will be an effective short when the output transistor conducts. I left that out and it simulates just fine without it.

That's one of the "oddities" of using TINA-TI: you add in "voltage measurement" components (VM1).

Your circuit looks fine, though maybe a larger pullup resistor would work better? You're drawing ~12mA through the pullup when output goes low. The datasheet specs a min rated output current sink of 5mA which would cause Vo = 1.5V.

Quote
not tried it, we are currently bunging the nut jobs circuit in and forgetting it (along with some hashing up). Wrng i know, but I'm not in charge, I've already recomended we use the comercial thermostats we have around with the necesary protection circuitry added.

Yeah, it is funny why you guys don't use a commercial temperature trip sensor. These puppies have all this stuff built in and output a digital signal when the trip point is reached. Even have hysteresis built in :P I think Dave had a video where he ranted about dumb management (actually, a few different videos)...
« Last Edit: January 15, 2013, 03:57:27 pm by helloworld922 »
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 15394
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Please laugh with me, point sticks and tell me what is wrong
« Reply #43 on: January 15, 2013, 04:27:14 pm »
yea quite, it's called we conned ourselves out of the money we spent on them so now we must use them, we have commercial stats that do what we want but they won't use them.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf