Will this actually work?

RexLan

Senior Member
I have corrected the schematic and added the relay, removed the FET and display.

Revised code at end

Thanks for the help ... I needed it!!


I have a new Carrier Infinity 5 stage heat pump system - best there is. Turns out in their wisdom they will not let the AC function below stage 2 if it is between 60 and 55° and at less than stage 4 if it is between 55 and 40° outside temps. This totally makes this system unusable in my new home that has 4 zones one of which is interior and requires cooling. Unfortunately it took me 2 months to figure this out as it is an "unpublished specification" that is inconsistent with their published specification.

So I now need to "trick" the control board so it is never between these two temperatures. I have a circuit that I want to switch in a parallel resistor to the outside temperature thermistor so it stays about the 60° range. This will allow the unit to run as it should and it does indeed work well when it does.

I am not a circuit guru and even less in code but I built a thermometer a while back and dug all that up. All I need to do is switch in this resistor (I think) and I would like to do it with a small signal N channel FET. I would like to stay away from a relay if this will work and use the old thermometer board with the modification and some additional code that I will post later if this will work electrically. I also don't have any relays. There is no power on the circuit and the HP simply reads the thermistor value and uses a look-up I assume for the corresponding temperature vs. resistance.

Please have a look and give your advice. The display and 7219 work correctly now.

Thanks very much Final schema

HP Temp Monitor_1.jpg
 
Last edited:

sghioto

Senior Member
In theory will it work? Yes. How did you determine the thermistor values for the Carrier system? Does R4 represent the Carrier thermistor or is that part of your mod ?
Steve G
 
Last edited:

RexLan

Senior Member
Yes R4 is the existing Carrier thermistor. I have their chart and it gives the values for every degree.

So the small FET will turn on and switch the additional resistor into the circuit and turn off when the Picaxe goes low? Is the R1 resistor on the gate needed ... I though it might be to make sure the FET turned off completely.
 

hippy

Technical Support
Staff member
There is no power on the circuit and the HP simply reads the thermistor value and uses a look-up I assume for the corresponding temperature vs. resistance.
I would be surprised if there really were 'no power' and it all worked by some magical process :)

I would personally use a relay so there's no worry about what currents are flowing, what voltages there may be, what risks you are creating other than in 'fiddling the reading'.

If you don't have a relay the solution would be to go out and buy one.

I hope that doesn't come over as too flippant but it just seems to me that the less risk, KISS, approach is best. Better to say there almost certainly won't be any problems than hope there won't IMO.
 

sghioto

Senior Member
After looking more closely at the FET this may not work as the Gate must be negative to the Source to be off and the Source is not referenced to the ground on the 08M. Might be better to use a small 5 volt relay.

Steve G
 

RexLan

Senior Member
I had thought about the thermistor and it should have some voltage or current to work. I don't know what their circuit is but it did not register on my DVM.

I can get a relay easy enough but will have to make a new board which is what I was trying to avoid.

My board will be powered from their board so there will be common grounding. I will need to investigate this a little more.

Their thermistor plugs into their circuit board and I have put a 33K resistor in parallel by just inserting it in the plug. It does work and changes the value (temperature). I have also removed the thermistor and put a simple resistor in its place and that too works and gives an appropriate value. The difficulty with that is I lose my other protections like not running it in low ambient and loss of low ambient lockouts for the heat pump itself.

Thanks very much for the replies ...
 

premelec

Senior Member
@RexLan - not sure I understand the situation entirely - 4 zones... Thermostat on each? What you say seems to imply you want to cool one zone while heating the others... with one compressor you can't heat and cool at the same time - though you could switch from heating to cooling sequentially allowing only one zone to control at a time..... you could also run another energy loop from outside back to inside for only one area... Hysteresis is commonly put in a system to keep it from switching around too much... I expect the manufacturer has reasons they've done what they have and it would be good to understand why it has been done... Probably not a simple spoofing of the thermistor values... unless you spoof them for only one zone while others aren't operating... Or maybe I don't understand your situation... good luck!
 

Jeremy Harris

Senior Member
I also have a Carrier heat pump (re-badged and sold in the UK under a number of well-known trade names). What I found when making a Picaxe control system for it was that all the "zero volt" connections, where sensors and dry contacts can be used for control, were referenced to the internal 0V rail and the dry contact connections had a pull-up to the internal +12V rail via a resistor (value unknown).

I opted to use small relays to switch the various functions on the heat pump (on/off, heating/cooling mode, eco-mode on/off, domestic hot water mode on/off etc) and found this worked very well indeed.

FWIW, I was NOT impressed with the lack of information on how the internal control system worked at all. My unit is badged Glowworm, a well-known UK heating appliance manufacturer, and they were totally clueless about what was inside the unit. I later found this unsurprising, as they were just buying in Carrier units and sticking their name plate on the front (a very common practice here, where despite Carrier being the inventor of these things and probably the biggest manufacturer, that name is almost unknown here, where air-con isn't that common in houses).

As an example, Glowworm refused to acknowledge there was a cooling mode, even though it was blatantly obvious as the schematic showed a 4 way valve and it went into cooling mode every time it defrosted when in heating mode. Luckily a friend managed to dig out all the detailed Carrier manuals for my model, which then enabled me to make a properly comprehensive control system, and also allowed all the internal set-point temperatures to be adjusted, using the Carrier Command Unit, that connects to the heat pump via a 4 wire interface (2 power, 2 data) and allows pretty much every internal setting to be changed.
 

RexLan

Senior Member
I also have a Carrier heat pump (re-badged and sold in the UK under a number of well-known trade names). What I found when making a Picaxe control system for it was that all the "zero volt" connections, where sensors and dry contacts can be used for control, were referenced to the internal 0V rail and the dry contact connections had a pull-up to the internal +12V rail via a resistor (value unknown).

I opted to use small relays to switch the various functions on the heat pump (on/off, heating/cooling mode, eco-mode on/off, domestic hot water mode on/off etc) and found this worked very well indeed.

FWIW, I was NOT impressed with the lack of information on how the internal control system worked at all. My unit is badged Glowworm, a well-known UK heating appliance manufacturer, and they were totally clueless about what was inside the unit. I later found this unsurprising, as they were just buying in Carrier units and sticking their name plate on the front (a very common practice here, where despite Carrier being the inventor of these things and probably the biggest manufacturer, that name is almost unknown here, where air-con isn't that common in houses).

As an example, Glowworm refused to acknowledge there was a cooling mode, even though it was blatantly obvious as the schematic showed a 4 way valve and it went into cooling mode every time it defrosted when in heating mode. Luckily a friend managed to dig out all the detailed Carrier manuals for my model, which then enabled me to make a properly comprehensive control system, and also allowed all the internal set-point temperatures to be adjusted, using the Carrier Command Unit, that connects to the heat pump via a 4 wire interface (2 power, 2 data) and allows pretty much every internal setting to be changed.

That is interesting. I am retired but was an HVAC engineer and did mostly commercial work. I just built this home and put their Greenspeed 21 SEER system in with 4 zones.

@ premelec - The issue is the outdoor temperature sensor and really has nothing to do with zoning. The Infinity Touch Control has the software to run the system and currently it will not allow the compressor to run (cooling mode) in 1st stage (low) if it is less that 60°. It will not allow the compressor to run in less than 4th stage if it is below 55° outside. It locks it if it is less than 40°.

@Jeremy Harris - I'm not an electronics type (hobby level) and I am simply looking to trick the software into thinking it is warmer outside when it is between 60° and 40° so my cooling function will work. Heating function works great and so does cooling if it is above 60°.

The current Touch Control is WiFi enabled and I can upload new software to it. I have made a formal complaint to Carrier about my issue because it is inconsistent with their published specifications. I designed the system but purchased and installed by a Factory Authorized Dealer so I have a 100% satisfaction guarantee. To invoke that will cost this small dealer about $20,000 of duct work and labor and Carrier will just take the equipment back. The dealer is great and I can't bring myself to tag him with what is clearly Carrier's failure. So, I am looking for a solution like Hippy said KISS.

Using the FET is real simple but I can remake a board if needed. I am just not sure the Picaxe can turn the FET on/off.
 

AllyCat

Senior Member
Hi,

Another vote to use a relay (bistable type if power consumption is a real concern), unless you can identify the exact internal circuitry on HP_1 and HP_2.

Alternatively, you might consider a "bilateral switch" such as the HC4066, or for operation up to 15 volts a "classic" 4000-series 4016. Or of course, add a "heater" (resistor) to fool the thermistor. ;)

Cheers, Alan.
 

RexLan

Senior Member
Yep .. thought about the heater too.

Looks like I will need to get a relay and make a new board. I see there are a few on eBay - cheap and one has a relay but only SP.
 

hippy

Technical Support
Staff member
Looks like I will need to get a relay and make a new board. I see there are a few on eBay - cheap and one has a relay but only SP.
Single pole isn't a problem as your MOSFET would effectively be a single pole switch, switching the resistor either in or out of the circuit.

I would look for a 5V relay which can be driven direct by a PICAXE output then it should be pretty simple to wire up.
 

Jeremy Harris

Senior Member
I would look for a 5V relay which can be driven direct by a PICAXE output then it should be pretty simple to wire up.
This is exactly what I did, hippy. The contact rating need only support a mA or two, so any small, low power, reed relay that can be driven directly from a Picaxe pin will work OK. I found some 5 V relays on Ebay that were cheap and effective, and used less than the 20 mA that a Picaxe pin can sink/source. If concerned about power consumption, then one of the latching relays we discussed in the thread will reduce that to a very low level, as the relay only draws a pulse of current from the Picaxe when changing state: http://www.picaxeforum.co.uk/showthread.php?29157-Can-the-14m2-directly-control-a-latching-relay-with-a-5V-20ma-coil

The ones I used drew 14 mA for a few ms when changing state, and were very easy to drive from a Picaxe directly, with no intermediate components, other than a back EMF protection diode (and it's questionable as to whether that was really needed, given the protection already on most Picaxe pins).
 

RexLan

Senior Member
This is exactly what I did, hippy. The contact rating need only support a mA or two, so any small, low power, reed relay that can be driven directly from a Picaxe pin will work OK. I found some 5 V relays on Ebay that were cheap and effective, and used less than the 20 mA that a Picaxe pin can sink/source. If concerned about power consumption, then one of the latching relays we discussed in the thread will reduce that to a very low level, as the relay only draws a pulse of current from the Picaxe when changing state: http://www.picaxeforum.co.uk/showthread.php?29157-Can-the-14m2-directly-control-a-latching-relay-with-a-5V-20ma-coil

The ones I used drew 14 mA for a few ms when changing state, and were very easy to drive from a Picaxe directly, with no intermediate components, other than a back EMF protection diode (and it's questionable as to whether that was really needed, given the protection already on most Picaxe pins).
@Jeremy .. I sent you a PM about the Carrier SW
 

RexLan

Senior Member
We actually seriously considered that option using a night light!

I have revised it and this is the new schematic ... hope nothing is wrong with it. May need a series R in the Picaxe output?

BTW - I just sold my home in Port Charlotte and moved into my new built home here 2 months ago. Closed the FL property last Thursday!HP Temp Monitor_1.jpg
 

premelec

Senior Member
Suggest using a potentiometer [rheostat wired] in series with trial R so you can fiddle it a bit if needed... use SPST relay to switch in parallel with Rthermistor [assuming neg coefficient will shift temperature read up].
 

RexLan

Senior Member
I deleted the display since the unit will be outside anyway so not it is quite simple.

If there is something wrong with the code please advise.

Thanks to all for the assistance ... and patience!





Code:
#Picaxe 08M
 
 		'***************************************
 		'*                                     *
 		'*             PICAXE 8M               *
 		'*    DS 18B20 TEMPERATURE Sensor &    *
 		'*	Carrier 25VNA8 OAT correction    *
 		'*                                     *
 		'*   Version:1                         *
 		'*                                     *
 		'***************************************


 '*******************
 '**** VARIABLES ****
 '*******************
'Word0 (b0 and b1) 
Symbol Counter         	= b0
Symbol TempW	 	= b1

'Word1 (b2 and b3)
symbol Temp_Value 	= b2

'Word2 (b4 and b5)
Symbol  Temp_Sum		= b4
Symbol  Temperature    	= b5

'Word3 (b6 and b7)

'Word4 (b8 and b9)
  
'Word5 (b10 and b11)

'Word6 (b12 and b13)


'Output Pin Assignments
Symbol Relay 		= 2


 '********************
 '** CONSTANTS   *****
 '********************
 
 'Miscellaneous
 
Symbol Samples 		= 10
'Symbol Relay		= outpin 5 

 
 
'############################################################################
'#    MAIN PROGRAM                                                          #
'############################################################################

Main: 		
	Gosub Get_Temperature
	
	If Temperature >=40 and Temperature <=62 then high Relay
	else low Relay
	endif
	
	For Counter = 1 to 4
	Pause 60000
	next
	
Goto Main

'############################################################################
'#    SUBROUTINES                                                           #
'############################################################################
 
 
Get_Temperature:

	Temp_Value = 0
	Temp_Sum = 0
	
	'Get temperature
	For Counter = 1 to Samples
	Readtemp12 2, Temp_Value
	Pause 1000
	Temp_Value = Temp_Value * 9 / 80 + 32
	'Temp_Value = 18 * Temp_Value + 320 / 100
	Temp_Sum = Temp_Sum + Temp_Value
	Next
	
	Temperature = Temp_Sum / Samples
		
Return

		
Goto main
 

premelec

Senior Member
You might want to use unit like an AD590 if you need to have a very long lead to temperature sense unit. [linear current with Kelvin T]
 

hippy

Technical Support
Staff member
You did not mention it earlier but from your code and given your location it would seem that you are dealing with Fahrenheit temperatures rather than Celsius. Given that 40F is just 4C it would seem likely temperatures could drop to below 0C so a conversion which can handle or limit negative Celsius temperatures is probably in order and wise to have anyway.

I am not convinced your Celsius to Fahrenheit conversion is correct for a READTEMP12 value.

Get the code working without averaging first, then add averaging, or you are just complicating the issue.
 

RexLan

Senior Member
You did not mention it earlier but from your code and given your location it would seem that you are dealing with Fahrenheit temperatures rather than Celsius. Given that 40F is just 4C it would seem likely temperatures could drop to below 0C so a conversion which can handle or limit negative Celsius temperatures is probably in order and wise to have anyway.

I am not convinced your Celsius to Fahrenheit conversion is correct for a READTEMP12 value.

Get the code working without averaging first, then add averaging, or you are just complicating the issue.
Excellent point ... I have no idea how to do that hippy ... help me please on the 0C issue. However, that said I am not interested in anything below 40° F but it may bugger the system if it gets confused so probably best to clean it up like you suggest.

That is the code I used in my greenhouse monitor for the READTEMP12 but I really only need 1° F resolution. Am I better off using just READTEMP ?

Also .. does my initial reading from READTEMP12 need to be a word value instead of bit value?
 
Last edited:

RexLan

Senior Member
You might want to use unit like an AD590 if you need to have a very long lead to temperature sense unit. [linear current with Kelvin T]

I will mount this inside the cabinet with the existing board so should only need 3-4" of wire to plug into the connector.
 

hippy

Technical Support
Staff member
Also .. does my initial reading from READTEMP12 need to be a word value instead of bit value?
Yes; 12 bits are returned 'nnnnnnnn.nnnn' so measured to 1/16th of a degree C. It's two's complement and sign extended to the full 16-bits so a brute force method to convert C to F and limit to positive C should be -

Code:
ReadTemp12 PIN, w0
If w0 >= $8000 Then
  w0 = 0
End If
w1 = w0 * 9 / 8 + 320
w2 = w0 * 9 / 8 + 325 / 10
If w0 reads $148 (328) as it would for 20.5C that gives 689 in 'w1' which represents 68.9F, and 'w2' holds 69

So I guess your original conversion wasn't as wrong as it first appeared to me to be.
 
Last edited:

hippy

Technical Support
Staff member
I don't need but 1° F resolution. Should I be using READTEMP instead?
I would say it depends on how accurate you want things. I would go for the most accurate even if it's not needed. With READTEMP -

15C => 59F
16C => 60F ( actual 60.8F )
17C => 62F ( actual 62.6F )

If you want something to switch at almost exactly 62F you need to be able to read 16.7C which will require READTEMP12 and then calculating to 0.1F
 

RexLan

Senior Member
You are right.

OK help me on this ... I am NOT good with this stuff.

I will use the READTEMP12 and change the code so it is a word value.

Probably will need to address the negative issue as well because we do get down to 10°F allot and it may cause a problem if the code can not handle that ... even though it will not have anything to do at those temps.
 

RexLan

Senior Member
Revised Code

Code:
  #Picaxe 08M
 
 		'***************************************
 		'*                                     *
 		'*             PICAXE 8M               *
 		'*    DS 18B20 TEMPERATURE Sensor &    *
 		'*	Carrier 25VNA8 OAT correction  *
 		'*                                     *
 		'*   Version:1A                        *
 		'*                                     *
 		'***************************************


 '*******************
 '**** VARIABLES ****
 '*******************
'Word0 (b0 and b1) 
Symbol Counter         	= b0
			 	

'Word1 (b2 and b3)
symbol Temp_Value 	= w1

'Word2 (b4 and b5)
Symbol  Temp_Sum	= b4
Symbol  Temperature    	= b5

'Word3 (b6 and b7)



'Word4 (b8 and b9)

  
'Word5 (b10 and b11)

'Word6 (b12 and b13)


 '********************
 '** CONSTANTS   *****
 '********************
 
 'Miscellaneous
 
Symbol Samples 		= 10
Symbol Relay		= 2 

 
 
'############################################################################
'#    MAIN PROGRAM                                                          #
'############################################################################

Main: 		
	Gosub Get_Temperature
	
	If Temperature >=40 and Temperature <=62 then 
		high Relay
		else low Relay
	End If
	
	For Counter = 1 to 4
	Pause 60000
	next
	
Goto Main

'############################################################################
'#    SUBROUTINES                                                           #
'############################################################################
 
 '********************
 '*** MAIN PROGRAM ***
 '********************

Get_Temperature:

	Temp_Value = 0
	Temp_Sum = 0
	
	'Get temperature
	For Counter = 1 to Samples
	Readtemp12 2, Temp_Value
	Pause 1000
	If Temp_Value <= $8000 Then
		Temp_Value = 0
	End If
	Temp_Value = Temp_Value * 9 / 80 + 325 / 10
	Temp_Sum = Temp_Sum + Temp_Value
	Next
	
	Temperature = Temp_Sum / Samples
	Counter = 0
	
Return

		
Goto main
 

hippy

Technical Support
Staff member
This will handle temperatures below 0C but limits below 0F to 0F, which avoids the rest of the code having to deal with negative F's ...

Code:
Get_Temperature:
  w0 = 0
  For counter = 1 To 16
    ReadTemp12 PIN, w1
    If w1 < $8000 Then
      w1 = w1 * 9 / 8 + 320
    Else
      w1 = -w1 * 9 / 8
      w1 = -w1 + 320
      If w1 >= $8000 Then
        w1 = 0
      End If
    End If
    w0 = w0 + w1
    Pause 1000
  Next
  w0 = w0 / 16
Return
Here 'w0' will contains 689 representing 68.9F etc.
 

RexLan

Senior Member
This will handle temperatures below 0C but limits below 0F to 0F, which avoids the rest of the code having to deal with negative F's ...

Code:
Get_Temperature:
  w0 = 0
  For counter = 1 To 16
    ReadTemp12 PIN, w1
    If w1 < $8000 Then
      w1 = w1 * 9 / 8 + 320
    Else
      w1 = -w1 * 9 / 8
      w1 = -w1 + 320
      If w1 >= $8000 Then
        w1 = 0
      End If
    End If
    w0 = w0 + w1
    Pause 1000
  Next
  w0 = w0 / 16
Return
Here 'w0' will contains 689 representing 68.9F etc.
Thanks so much ... Geez you guys are smart! I can follow it but well above my pay grade for sure.
 
Top