# comparator

## Recommended Posts

How to compare temperature from two different sensors?

##### Share on other sites
Gurgel    209

Not possible at this time, AFAIK.

##### Share on other sites

what are you trying to do though?

##### Share on other sites
Just now, InternetGuy said:

what are you trying to do though?

economical heat recuperator

##### Share on other sites
Just now, QRDL_rus said:

economical heat recuperator

I'm not sure what use you have this for but I guess it's sufficient to have the thermosensors set in a fixed temperature.

##### Share on other sites
Saturnus    1,822

2 sensors (I assume one in each separate environment) will only give a binary output so no comparison possible. However, if you use more than one sensor in each environment you can start making (rather crude) comparisons.

• 1
• 1

##### Share on other sites
On 9/26/2018 at 8:41 AM, QRDL_rus said:

How to compare temperature from two different sensors?

Are you talking greater than or less than comparisons?

##### Share on other sites
thejams    78
On 9/26/2018 at 2:57 PM, Saturnus said:

2 sensors (I assume one in each separate environment) will only give a binary output so no comparison possible. However, if you use more than one sensor in each environment you can start making (rather crude) comparisons.

With enough sensors in each environment you could make pretty sophisticated comparisons

##### Share on other sites
thejams    78

I present to you the 3 bit ONI thermometer - it can measure a temperature range in 7 increments.    Add a logic comparator and voila... you can compare temperatures.  For every additional bit of precision, double the number of sensors + 2 - so for 4 bit precision (15 increments) you would need 30 sensors.

In the screenshot it is set up to measure 10-79.9°C in 10°C increments.  The water temperature is 59,8°C so we get an output of 5.  If the temperature is outside of the range, it outputs 0.

Probably not very practical...

Edited by thejams
• 3

##### Share on other sites
Saturnus    1,822

You don't need to use that many temp sensors though. To measure an absolute range you only need the number of intervals +1 sensors. Or if you're fine with an open range (the two outer intervals being just more than and less than) you only need the number of intervals -1 sensors.

The practical limit for temp sensors would be what would fit inside a temp shift plate range while still allowing for wires to be actually routed to them.

Edited by Saturnus
• 1

##### Share on other sites

hmmm...... and how many people need a comparator? or i needed one

##### Share on other sites
tranoze    46
On 9/26/2018 at 7:41 PM, QRDL_rus said:

How to compare temperature from two different sensors?

Uh, by eyes, of course, click at first sensor, see the temperature, then click at the second sensor, see the temperature, then compare them.

If you want 100% time efficient, pause the game while comparing.

##### Share on other sites
31 minutes ago, tranoze said:

Uh, by eyes, of course, click at first sensor, see the temperature, then click at the second sensor, see the temperature, then compare them.

ёптыть, нахрена вообще датчики, можно ткнуть мышкой в газ и узнать температуру, вот ведь долбодятлы

( google translate: **** sensors at all, you can poke a mouse into the gas and find out the temperature )

##### Share on other sites
thejams    78
1 hour ago, Saturnus said:

You don't need to use that many temp sensors though. To measure an absolute range you only need the number of intervals +1 sensors. Or if you're fine with an open range (the two outer intervals being just more than and less than) you only need the number of intervals -1 sensors.

The practical limit for temp sensors would be what would fit inside a temp shift plate range while still allowing for wires to be actually routed to them.

Thank you, here is an improved version using an 8-3 priority encoder.

Edited by thejams

##### Share on other sites
Saturnus    1,822

@thejamsIf you invert the state of the sensors you can exploit the fact that wires themselves are multi-input OR gates.

Edited by Saturnus

##### Share on other sites
thejams    78

@Saturnus The OR gates are needed to ensure the signal doesn't feed back to the other input lines.  I cant think of a better way to do it.

Edited by thejams

##### Share on other sites
Saturnus    1,822
29 minutes ago, thejams said:

@Saturnus The OR gates are needed to ensure the signal doesn't feed back to the other input lines.  I cant think of a better way to do it.

Well, for one you don't need the 3 OR gates to the right as the output of the first set of OR gates already isolates the output from the input.

##### Share on other sites
thejams    78

Well, I think this version is pretty optimal...

Edited by thejams
fixed the images
• 1
• 1

##### Share on other sites
Saturnus    1,822

@thejams No images

EDIT: Much better optimized now

Edited by Saturnus
• 2

##### Share on other sites
Slvrsrfr    48

thank you for the enlightened discussion folks! I am lost. This seems significant and/or important. I completely don't get what I'm looking at. Could someone lay out a use by example, please? Thank-you. What is all this supposed to do? How could I utilize this knowledge to improve my game? ty, again.

omg you have ceiling light indicators, now i am truly intrigued.

but what do they indicate? I see now it's a 7-point thermostat of sorts..why only 3 lights?

Edited by Slvrsrfr

##### Share on other sites
Saturnus    1,822
3 hours ago, Slvrsrfr said:

but what do they indicate? I see now it's a 7-point thermostat of sorts..why only 3 lights?

It's condensed to 3 bits.

What can you use it for? Well, a 3 bit sensor output is probably overkill for what most people needs in the game but let's say you have two water tanks that you use for a metal refinery cooling. Both tanks are being cooled but each time the metal refinery runs you want to dump the water in the tank with the lowest temperature. That's what you could use a comparator for (although not a terribly good example). You take the absolute value the sensor above would give and compare it to another absolute value.

In any case it's mostly just goofing around just like making 7-segment displays when automation update first came out. Not much of an in-game value but just fun to play around with.

• 1

##### Share on other sites
Slvrsrfr    48

i thought comparator was a misspelling, ty!

and that thing is kinda' enormous at 14x14. excellent example, ty.

Edited by Slvrsrfr

##### Share on other sites
thejams    78
4 hours ago, Slvrsrfr said:

and that thing is kinda' enormous at 14x14. excellent example, ty.

Lol, and I thought it was a pretty elegant implementation

But yeah, the whole world is kinda small compared to how unwieldy the wiring and logic gates are.  For example, the next step in this exercise - the comparator itself would probably be a beast in comparison.

Edited by thejams

##### Share on other sites
On 9/29/2018 at 9:29 AM, thejams said:

The OR gates are needed to ensure the signal doesn't feed back to the other input lines.  I cant think of a better way to do it.

You can use a double NOT gate - it will act like a diode. Signals only propagate in one direction across the logic gates, so you'll preserve signal state and isolation.

##### Share on other sites
thejams    78
6 hours ago, The Plum Gate said:

You can use a double NOT gate - it will act like a diode. Signals only propagate in one direction across the logic gates, so you'll preserve signal state and isolation.

I did say I couldn't think of a better way.

• 1