Fireplace Gas Valve Controller Circuit

Thread Starter

JimStokes

Joined Oct 25, 2015
38
Hi all.

I've been working on a circuit using a Raspberry Pico to monitor room temperature and turn on/off my gas fireplace - a thermostat really. Room temperature is monitored via signals from at TMP36 and from the built-in temperature sensor on the Pico. The temperature setting can be adjusted up/down in 0.5C increments using two MOM Switches. A 1306 Oled displays current and set temperatures. And this part of the circuit all works fine, albeit still necessary to tweak when I get things working.

The problem I have is that the gas valve on the stove is turned on by 'shorting' the connection between thermopile (TPTH) and TH. Measured voltage between TPTH and TH is 0.56V. In order to create the short with my PICO circuit, I have been trying to use a MOSFET (BS170). This MOSFET has a minimum Gate voltage of 0.8V and maximum of 3.0V. I've reduced the 3.3V PICO high signal from GPIO16 to about 2.6V using a divider, in order to keep the gate voltage between min and max.

On the bench, I've been using a higher voltage 3.4V to emulate the TPTH side so that I can use an LED/resistor combination to see if/when the gate opens, which it does exactly as expected when set temperature exceeds current temperature.

When I hook it up to the fireplace, however, nothing happens. Any suggestions? Is it related to the need for a common ground? If so, how to wire that as I don't believe that TH is a ground.

Thanks for your help. I've attached a schematic thing....

Jim (in Guelph, Ontario, Canada)
 

Attachments

Ajith-N

Joined Sep 14, 2020
31
Hi all.

I've been working on a circuit using a Raspberry Pico to monitor room temperature and turn on/off my gas fireplace - a thermostat really. Room temperature is monitored via signals from at TMP36 and from the built-in temperature sensor on the Pico. The temperature setting can be adjusted up/down in 0.5C increments using two MOM Switches. A 1306 Oled displays current and set temperatures. And this part of the circuit all works fine, albeit still necessary to tweak when I get things working.

The problem I have is that the gas valve on the stove is turned on by 'shorting' the connection between thermopile (TPTH) and TH. Measured voltage between TPTH and TH is 0.56V. In order to create the short with my PICO circuit, I have been trying to use a MOSFET (BS170). This MOSFET has a minimum Gate voltage of 0.8V and maximum of 3.0V. I've reduced the 3.3V PICO high signal from GPIO16 to about 2.6V using a divider, in order to keep the gate voltage between min and max.

On the bench, I've been using a higher voltage 3.4V to emulate the TPTH side so that I can use an LED/resistor combination to see if/when the gate opens, which it does exactly as expected when set temperature exceeds current temperature.

When I hook it up to the fireplace, however, nothing happens. Any suggestions? Is it related to the need for a common ground? If so, how to wire that as I don't believe that TH is a ground.

Thanks for your help. I've attached a schematic thing....

Jim (in Guelph, Ontario, Canada)
Yes, your FET is floating...and you are driving only its Gate. That's not going to help as your FET's 'S' is not grounded. That's the signal marked TH. Any problem wiring TH to ground?
 

KeithWalker

Joined Jul 10, 2017
3,137
The gate voltage of a MOSFET is the voltage between the gate and source. In your schematic, the source is not connected to anything else in your circuit, so if you measure the voltage from G to S, all you will see is a bit of random AC voltage.
 

Ajith-N

Joined Sep 14, 2020
31
If TH can't be safely wired to your Pico's ground, then you can use a cheap electromechanical relay instead of a FET. If you don't like relays then you can use an opto-isolator etc and things get a bit more complex.
 

Thread Starter

JimStokes

Joined Oct 25, 2015
38
Yes, your FET is floating...and you are driving only its Gate. That's not going to help as your FET's 'S' is not grounded. That's the signal marked TH. Any problem wiring TH to ground?
Thanks for your response. So, I can connect the S to ground on the PICO circuit. But I have no idea about grounding the TH. And won't creating such a ground take away all the thermopile 0.56V which is required to activate TH?

Thanks again.
Jim.
 

Ajith-N

Joined Sep 14, 2020
31
Thanks for your response. So, I can connect the S to ground on the PICO circuit. But I have no idea about grounding the TH. And won't creating such a ground take away all the thermopile 0.56V which is required to activate TH?

Thanks again.
Jim.
I'm assuming that you measured 0.56V there w.r.t TH. I may be wrong. If TH is connected (internally) to something behind the scenes (which I can't see from your schematic), there might be a hazard in shorting TH to ground. Though I think that's quite unlikely, please ensure that there are no mains voltages at those three terminals you have marked TH, THPT etc! If so, you could connect TH via a resistor say a 4.7K to your Pico's ground and that's a bit safer than a direct connection, to try out -- only if there are no mains voltages and such like.
 

Thread Starter

JimStokes

Joined Oct 25, 2015
38
I'm assuming that you measured 0.56V there w.r.t TH. I may be wrong. If TH is connected (internally) to something behind the scenes (which I can't see from your schematic), there might be a hazard in shorting TH to ground. Though I think that's quite unlikely, please ensure that there are no mains voltages at those three terminals you have marked TH, THPT etc! If so, you could connect TH via a resistor say a 4.7K to your Pico's ground and that's a bit safer than a direct connection, to try out -- only if there are no mains voltages and such like.
So I connected S and TH to PICO ground using a 4.7k resistor, then a variable resistor 100K and played around, but neither gave the response of 'shorting' TPTH and TH and opening the gas valve. There are no mains voltages associated with the fireplace. Electrically, it is only the 0.56V that is generated by the thermopile in the pilot flame, which is usually enough to open the gas valve. I'll have to check to see if I'm losing voltage from Drain to Source when connected to the PICO ground, maybe making the voltage insufficient to open the valve.....

Thanks again for you help.

Jim.
 

crutschow

Joined Mar 14, 2008
34,679
I've reduced the 3.3V PICO high signal from GPIO16 to about 2.6V using a divider, in order to keep the gate voltage between min and max.
You are going in the wrong direction.
That is the min and max Vgs threshold voltage tolerance, where the MOSFET barely starts to turn on (1mA drain current).
It's not the maximum allowed voltage which is 20V.
So, depending upon the characteristics of the particular MOSFET you have, it may not be turning on at all with a Vgs of 2.6V.

The Vgs to fully turn on that MOSFET is 10V (below).
For your purposes, 3.3V may be marginal.
You may need to use a logic-level type MOSFET with a max Vgs(th) of ≤2V.

I see no particular need to use an opto-coupler for isolation in your application.

1699719394345.png
 
Last edited:

Thread Starter

JimStokes

Joined Oct 25, 2015
38
As mentioned by Ajith-N , I wonder if an opto-isolator would work using a PC817.

View attachment 307267
Or a SSR.
View attachment 307268
Have tried PC817, but requires 3.6V signal which PICO cannot provide (only 3.3V). Tried 4N26 Opto, which works with 3.3V Pico signal, but does not effect the 'short' between TPTH and TH that I need. I expect that part of the 0.56V at TPTH is lost through the 4N26 Opto, to the point where it is too low to effect the 'short'.
Thanks, good idea, but....

Jim.
 

Thread Starter

JimStokes

Joined Oct 25, 2015
38
You are going in the wrong direction.
That is the min and max Vgs threshold voltage tolerance, where the MOSFET barely starts to turn on (1mA drain current).
It's not the maximum allowed voltage which is 20V.
So, depending upon the characteristics of the particular MOSFET you have, it may not be turning on at all with a Vgs of 2.6V.

The Vgs to fully turn on that MOSFET is 10V (below).
For your purposes, 3.3V may be marginal.
You may need to use a logic-level type MOSFET with a max Vgs(th) of ≤2V.

I see no particular need to use an opto-coupler for isolation in your application.

View attachment 307269
Thanks, now I understand how that works.

On the bench I used a low voltage circuit with LED/resistor to represent TPTH and TH. A voltage at the gate of BS170 of 2.6V switched the MOSFET on and the LED was bright. Perhaps there's a better MOSFET, but this one seems to work logically anyway, just not allowing the very low voltage to flow from TPTH to TH. But I'll remove the voltage divider now, given what you've told me, and will see if that's enough to effect the 'short' between TPTH and TH.

Thanks again,
Jim.
 

Thread Starter

JimStokes

Joined Oct 25, 2015
38
That's not correct. What value resistor did you use for the input R1?

Right. I'm using a board - PC817 4 Channel Optocoupler Isolation Board Voltage Converter Adapter Module 3.6-30V Driver Photoelectric Isolated Module PC 817 - which I see will operate on 3.3 or 5v.

Will try that again.

Thanks, Jim.
 

Thread Starter

JimStokes

Joined Oct 25, 2015
38
Right. I'm using a board - PC817 4 Channel Optocoupler Isolation Board Voltage Converter Adapter Module 3.6-30V Driver Photoelectric Isolated Module PC 817 - which I see will operate on 3.3 or 5v.

Will try that again.

Thanks, Jim.
There's a 1.03V drop on the coupled circuit, which means that the 0.52V TPTH would not survive and couldn't effect the 'short' I need to open the gas valve.

But thanks for your help. Would have been a great approach if it worked.

Jim.
 

crutschow

Joined Mar 14, 2008
34,679
Can you apply 10V to the MOSFET gate and see if that works to close the gas valve?
If so, then reduce the gate voltage until you find the minimum voltage needed.
 
Top