4-20mA Pt100 input for the generic heating / cooling controller

The generic heating / cooling controller (hcctl) is a flexible bang-bang controller based on an ATTiny25.

The controller will accept 4-20mA input if the input is shunted by a 50Ω 1% resistor (2 x 50Ω 1% resistors is a practical implementation) and the 4-20mA sensor is wired between nominal +24 and the input pin. Note that 4-20mA sensors may operate properly on less than 24V (the one used here is a DIN rail mount that works for 10-24V).


To demonstrate the capability, a Pt100 RTD is connected to a 4-20mA converter and then to a hcctl test module (see above). The test module is driving a small incandescent lamp which is clipped to the RTD to provide a cycling test.


The trial 4-20mA converter is specified for -50-100° input from a Pt100 RTD. For the test, the set point is chosen as 40°, so current I=(40–50)/(100–50)*16+4=13.6mA, input voltage developed across the 50Ω resistor is 0.0136*50=0.68V, the ADC count setpoint=0.68/1.1*1024=633. Differential is set to 5 for short cycles for testing purposes.

The concept of hcctl is flexible common code based with application constants stored in EEPROM. Above is a screenshot of the EEPROM structure for the application.

4-20mA converters are available for a wide range of inputs, eg temperature, pressure, humidity etc.

For temperature sensing applications, low cost (<$20) converters are available on eBay for Pt100 RTDs and Type K thermocouples covering a wide range of temperatures. Beware though that Chinese sellers often advertise Pt100 devices as for thermocouples, and vice versa to a lesser extent (thermocouple converters are more expensive, so they lure customers with the low price of Pt100 converters which of course are not suited to thermocouples at all… select carefully when negotiating the maze of Chinese cheats). Thermocouple converters will usually have only two terminals for the thermocouple, good Pt100 converters should support a three wire connection to the Pt100.

Above is an example Type K thermocouple converter, note two terminals for the thermocouple and two to the output connections.

Above is a Pt100 converter, three wire connection to the Pt100 is supported.

Above is a Chinese WZP Pt100 RTD, it is more than 10° high at 20°… Chinese junk. None of the WZP Pt100s I have measured approach Class B accuracy (Class B is the poorest accuracy at 0.4°). Pt100s are very accurate sensors… except if they come from China.

Can you work out what this one is?

This is Chinese Quality, it is advertised as a K themocouple converter 0-1000°, and it probably is judging from the two input screw terminals designed to take thermocouple wire, but the label shows a three terminal connection as would be used with an RTD for lead compensation; and the text is for a thermocouple. The Chinese do not understand what they are making and selling, and from experience, don’t care.

Full documentation at Generic heating / cooling controller.