Jump to content

Can you compare two sensor values using automation?


Recommended Posts

For example, do not send in Chlorine anymore if it would increase its pressure significantly over the pressure of Oxygen in the base, therefore spilling Chlorine through the whole base (maybe not the best example as it can be more or less done through other means, but you got the picture).

11 hours ago, Tobruk said:

For example, do not send in Chlorine anymore if it would increase its pressure significantly over the pressure of Oxygen in the base, therefore spilling Chlorine through the whole base (maybe not the best example as it can be more or less done through other means, but you got the picture).

Unfortunately no. There's no comparator in the game... yet.

40 minutes ago, pether said:

XOR gate sends green signal if signal values are different. Add NOT after it and it will send green signal when both signals have the same value. Now you can compare them.

Nope. Not what the OP asked for.

Your solution works for a single data point but it doesn't work as the OP intended. He requests something, a comparator, that compares the sensors and outputs a certain output if one sensor is higher than the other regardless of the individual sensor settings.

2 hours ago, TripleM999 said:

I don't know, if this is buildable, but maybe one can combine a sunlamp and a solar powerplant as some kind of dense meter and compare the powerproduction.

Same problem. Sensor will retrieve only one value. So you would have to build one sensor per value you would like to compare.

I had the same question. User story is pretty simple:
There are two tanks (A and B) with liquids and there are doors to transfer heat between both tanks. We want to close the door when tank A is colder than tank B. Since both temperatures can vary we need to compare them.

 

This example can be possible done with many temperature sensors in both liquids tanks but the resolution of this scale would be poor.

 

Can't You just use gas element sensor to keep the level of chlorine as You desire? I am keeping CO2 level stable having two different CO2 geysers and erratic number of slicksters.

Just now, sheaker said:

Can't You just use gas element sensor to keep the level of chlorine as You desire? I am keeping CO2 level stable having two different CO2 geysers and erratic number of slicksters

I do, yes. That's why I said the example is not an ideal one. Yours better, but the fundamental question stays the same.

You can do this, but it is _really_ painful in ONI. For example, when comparing the temperature of two liquids, you can do the following: Heat them both up (adjusted for different specific heat capacity by volume or heater on/off time if the liquids are different) until they trip a sensor set to the same temperature. The one that trips first was warmer.

This is essentially a cut down "single slope" A/D conversion misused for comparison: https://www.allaboutcircuits.com/textbook/digital/chpt-13/slope-integrating-adc/ (Sorry, did not find a good reference...)

For your pressure example, you could lock in several gas tiles each with doors and then pump out until a threshold is reached. Whichever trips first had lower pressure. 

 

@Gurgel gave me an idea. You could use staggered door compressors and an atmo sensor for ADC. When the sensor triggers, you know the number of closed doors to calculate... or in your case the one with the less closed doors has higher pressure.

17 minutes ago, TripleM999 said:

@Gurgel gave me an idea. You could use staggered door compressors and an atmo sensor for ADC. When the sensor triggers, you know the number of closed doors to calculate... or in your case the one with the less closed doors has higher pressure.

Interesting :rolleyes:

38 minutes ago, TripleM999 said:

@Gurgel gave me an idea. You could use staggered door compressors and an atmo sensor for ADC. When the sensor triggers, you know the number of closed doors to calculate... or in your case the one with the less closed doors has higher pressure.

Or you can use a series of pressure sensors directly, with staggered trip-values. Probably not much more effort. Both give you just a step-answer though, with limited resolution.

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...