# Control solenoid valve with Arduino or with circuit

#### Sourc3

Joined Dec 2, 2021
62
Hi everyone,
first at all, sorry for my english (I need start with that).
I need to do a autorefilling system for a nitrogen dewar with a solenoid valve and a PT100 sensor.
My boss want that it need to have a button to refill analogic and a circuit to autorefill with the PT100, I have said that It shouldnt be dificult with a Arduino but she have asked me if I can do it with a own circuit.
Do u know how dificult can it be or easy solve for that or better I should do with a Arduino.
And other question is how can I feed 24 volts, any idea?
Fernando.

Last edited by a moderator:

#### ericgibbs

Joined Jan 29, 2010
15,691
hi S3,
You need an Instrumentation amplifier and the PT100 wired as a quarter Wheatstone bridge in order to amplify the PT100 signal level.

E

#### Attachments

• 58.2 KB Views: 15
• 190 KB Views: 8

#### Sourc3

Joined Dec 2, 2021
62
hi S3,
You need an Instrumentation amplifier and the PT100 wired as a quarter Wheatstone bridge in order to amplify the PT100 signal level.

E
Hi ericgibbs !
I have a python script to control the PT100 value, It shouldnt be a problem.

#### ericgibbs

Joined Jan 29, 2010
15,691
hi,
how do you plan to connect the PT100 signal to the Python script [ I assume the script is on Windows?]

E

#### Sourc3

Joined Dec 2, 2021
62
hi,
how do you plan to connect the PT100 signal to the Python script [ I assume the script is on Windows?]

E
I use a SMU to read ohm, and it usually work when I hit it with a hot air gun. The script is python using PyVisa, this is the formule I use:

def PT100(R):
v = 31.64259588293078
f = R
v += f * 2.327765488883832
f *= R
v += f * 0.000825034783247256
f *= R
v += f * 5.503555111531539e-07
f *= R
v -= f * 8.846016370591097e-10
f *= R
v += f * 2.79478040084237e-12
return v

#### ericgibbs

Joined Jan 29, 2010
15,691
hi s3,
Which part of the project are you asking for help or guidance.?

E

#### Sourc3

Joined Dec 2, 2021
62
hi s3,
Which part of the project are you asking for help or guidance.?

E
My manager has asked me if I can change the arduino for its own circuit to give it more independence, and I am asking if there is any simple way or the simplest is with arduino.

#### LowQCab

Joined Nov 6, 2012
2,170
Why are You using a Temperature-Sensor to monitor a Fluid-Level ?
.
.
.

Joined Jan 15, 2015
6,698
Why are You using a Temperature-Sensor to monitor a Fluid-Level ?
.
.
.
That's my question also. You seem to want a pressure sensor but you reference a temperature sensor.

If you are using LN2 (Liquid Nitrogen) and using a temp sensor to monitor temp in a Dewar container rather than roll your own it's easier and less costly to just buy a turn key solution off the shelf. Any "process controller" that can read a PT100 sensor will work. I worked with LN2 and you need a solenoid designed for LN2. A simple Google of "pt100 process controller" will give you a few dozen solutions.

Ron

#### LesJones

Joined Jan 8, 2017
3,745
Would it work better by passing enough current trough the PT100 so that there was some self heating. The self heating would increase it's temperature more when it was in nitrogen gas than when it was immersed in the liquid nitrogen.

Les.

#### Sourc3

Joined Dec 2, 2021
62
Why are You using a Temperature-Sensor to monitor a Fluid-Level ?
.
.
.
Because it's easy to know when is inside or outside the nitrogen, other setup that I saw, use the same system.

#### Sourc3

Joined Dec 2, 2021
62
That's my question also. You seem to want a pressure sensor but you reference a temperature sensor.

If you are using LN2 (Liquid Nitrogen) and using a temp sensor to monitor temp in a Dewar container rather than roll your own it's easier and less costly to just buy a turn key solution off the shelf. Any "process controller" that can read a PT100 sensor will work. I worked with LN2 and you need a solenoid designed for LN2. A simple Google of "pt100 process controller" will give you a few dozen solutions.

Ron
I will search that and test the RTD solution from ericgibbs , thanks.

#### Sourc3

Joined Dec 2, 2021
62
Would it work better by passing enough current trough the PT100 so that there was some self heating. The self heating would increase it's temperature more when it was in nitrogen gas than when it was immersed in the liquid nitrogen.

Les.
mmmm that solution look interesant too, thanks!

#### Sourc3

Joined Dec 2, 2021
62
That's my question also. You seem to want a pressure sensor but you reference a temperature sensor.

If you are using LN2 (Liquid Nitrogen) and using a temp sensor to monitor temp in a Dewar container rather than roll your own it's easier and less costly to just buy a turn key solution off the shelf. Any "process controller" that can read a PT100 sensor will work. I worked with LN2 and you need a solenoid designed for LN2. A simple Google of "pt100 process controller" will give you a few dozen solutions.

Ron
I cant use pressure sensor because dewar is open on the top.

#### Sourc3

Joined Dec 2, 2021
62
Im testing with something like that, but the diference of resistance (20-60)ohm is very low, and need a lot of time to accionate the relay. I need some circuit like that but more effective when PT100 isnt in nitrogen.

#### Sourc3

Joined Dec 2, 2021
62
Yesterday I burn a circuit like that, I thought It will work:

The relay was connected in Vb-Va. I need something like that, with 20 ohm (cold) the relay is OFF and with 60ohm (steam) the relay is ON to refill the tank.

#### LesJones

Joined Jan 8, 2017
3,745
Using a relay is a VERY poor way to detect the change of resistance. The pull in and drop our voltage is NOT a closely controlled value in the specification. Also a 24 volt relay will probably pull in at something like 20 volts but it may only drop out at less than 10 volts. Why not use a comparator such as a LM293 ? You could also add a controlled amount of hysteresis if you used a comparator.

Les.

#### Sourc3

Joined Dec 2, 2021
62
Using a relay is a VERY poor way to detect the change of resistance. The pull in and drop our voltage is NOT a closely controlled value in the specification. Also a 24 volt relay will probably pull in at something like 20 volts but it may only drop out at less than 10 volts. Why not use a comparator such as a LM293 ? You could also add a controlled amount of hysteresis if you used a comparator.

Les.
Hi LesJones , Im very noob with electronics, I trying my best. You said that I should sustitute relay for a comparator.. with a comparator can I split in two circuits like relay? The voltajes are completaly diferent.

Joined Jan 15, 2015
6,698
OK, you have a Dewar Flask containing your liquid nitrogen. LN2 is about -196 C. The nitrogen gas above the liquid is much warmer. So all you want to do is when the flask gets low add more N2 to the flask from your supply source using a LN2 solenoid valve. The theory here is when the liquid drops below your sensor the temperature will increase and trigger an add function.

You need to consider the response time of your sensor. Using a single sensor as you describe your N2 will drop below sensor level and turn on your N2 supply. The N2 will hit your sensor level and turn off. Depending on how quick this happens your solenoid can be turning on and off at a pretty quick rate. You have no what we call hysteresis. Bang on and bang off constantly. My own experience with LN2 is when filling the flask it splashes around and bubbles a lot. You want a baffle or similar in the flask to prevent this.

Now if you want to build your own control system I would start as Eric's suggestions in his post #2. You may also want to consider using two sensors to establish a LLL (Lower Liquid Level and a ULL (Upper Liquid Level). All of this can be done using a uC or other micro-controller like an Arduino for example. Point is you will want some signal conditioning between your sensor(s) and your process control. When at your LLL latch a relay controlling your LN2 solenoid. When you reach ULL turn off or deenergize your relay controlling your solenoid. Keeping in mind I assume you have a solenoid designed for use with LN2.

Les also made a good suggestion. Since all of this comes down to ON/Off you could allow your thermistor some self heating effect.

Personally if I were doing this I would just use a pair of Type T Thermocouples along with a MAX31855 Cold-Junction Compensated Thermocouple-to-Digital Converter. This gives you a direct interface to your uC if you go that route. Easy interface for Arduino. You make no mention of the depth of your Dewar flask?

Anyway you have plenty of options.

Ron