Read DC analog signals with CT input

I am using a EmonTX to monitor a PV plant and record 5 temperatures from a solar hot water tank. Everything is working like a charm but there just one more signal I need to log.

Hot water solar panel are provided with a PT1000 connected to a controller that regulates heat exchange with tank. There is no way for me to install a new one so I want to read it "in parallel" using EmonTX.

I believe I need a high impedance analog input able to read DC values from 0.0 to 5.0V. Is it possible to adapt the CT input 3 for such a task?

Thanks in advance

Robert Wall's picture

Re: Read DC analog signals with CT input

Yes you can, but unless you specifically want to use the socket, it would probably be much easier to use one of the spare analogue inputs (AIO4 & 5) that appear on the port headers (see http://openenergymonitor.org/emon/sites/default/files/emonTx-io.png). Those inputs are 0 - 3.3 V but dividing the 5 V down to 3.3 V is trivial. However, you must ensure that no other connection to the emonTx is connected to earth - as the input of your controller will probably be referenced to ground and you must avoid ground loops.

If you want to use CT3 input, leave out C11 & R17, and put a wire link in place of R15. Make R16 33 kΩ     and connect a 18 kΩ to the plug tip in series with your input. The plug sleeve will be your 0 V line. 

That will load your source with approximately 50 kΩ but if the source is a low impedance will present an adequately low impedance to the ADC input. The reason you want to do that is (from the Atmel data sheet):

The ADC is optimized for analog signals with an output impedance of approximately 10 kΩ or less. If such a source is used, the sampling time will be negligible. If a source with higher impedance is used, the sampling time will depend on how long time the source needs to charge the S/H capacitor, with can vary widely. The user is recommended to only use low impedance sources with slowly varying signals, since this minimizes the required charge transfer to the S/H capacitor.

Clearly, increasing the resistor values will decrease the load on your output, but you might need to be careful when reading the ADC to ensure it has settled.

dBC's picture

Re: Read DC analog signals with CT input

I do something very similar to what your describing to monitor my solar hotwater, although with a stock Arduino not an EmonTX.  In the attached display I sniff both the 46.0C and 37.8C by unobtrusively monitoring the Resol controller drive the PT1000.

Most controllers pulse the PT1000 rather than energise it continuously, to avoid any self-heating effects in the probe; that's definitely how mine works.   Have you put a voltmeter across the probe terminals?  If you see a steady voltage then it's an easier problem, but more likely you'll see 0V and every once in a while (~2 seconds from memory on the Resol), there'll be a short sharp pulse.  It's that pulse you need to capture and measure, and since you don't really know when it's coming, you pretty much need to dedicate an A/D converter to sniffing it constantly.

The other issue is you need to ensure your sniffer is always energised, or have a way to isolate it from the probe terminals when it's not (a relay or equivalent).  The Arduino's  A/D input impedance drops to close to nothing once it's unpowered as the protection diodes start conducting any pulse that comes in.   My Resol immediately reports "Sensor Fault"  (and shuts the circulation pump off for safety) if I power down the Arduino without disconnecting it.

Robert Wall's picture

Re: Read DC analog signals with CT input

If you're connecting directly across the sensor and the controller input rather than the controller analogue output (which is fundamentally wrong but possibly the only way available to you), then the divider - presenting a 10 kΩ load with the emonTx unpowered - might well get around the "Sensor Fault" problem - but it might still cause unacceptable errors ( ~10 °C) to the controller even when powered and presenting a 50 kΩ load. In that case, you might need to go to 680 kΩ and 390 kΩ, which should give an error of about 0.25 °C when powered.

dBC's picture

Re: Read DC analog signals with CT input

One nice thing about the Resol controller is it displays all its temperature readings on the LCD display (to 1 decimal place) so its pretty easy to see if your load has had an impact, and also provides an easy way to calibrate your A/D readings with temperature (assuming you trust their calibration).

Scarlaz's picture

Re: Read DC analog signals with CT input

I think maybe the best way it to use one spare analog input as Robert suggested (I ignored they existed...).

My solar controller is a rebranded Resol device but PT1000 probes are continiously powered as I can see a steady 1.7---1.9V on inputs. A disconnected probe input measures 5V on controller input. 

Maybe I can add some load resistances between the load and the emonTX just to ensure that controller keeps working in case the sniffer is off.  .... but this will probably mess up A/D conversion. 
Confused...

 

Robert Wall's picture

Re: Read DC analog signals with CT input

"Maybe I can add some load resistances between the load and the emonTX just to ensure that controller keeps working in case the sniffer is off.  .... but this will probably mess up A/D conversion. 
Confused...
"

Why confused? My guess is the controller feeds a constant current into the PT1000 sensor - just a temperature-dependent resistor - and measures the voltage. If you add a parallel resistance, you will reduce the resistance the controller sees and reduce the temperature it indicates.

Therefore you want to put the highest possible resistance in parallel with the sensor to reduce the load. Now that you've said that the normal operating voltage of your sensor is about 2 V, which is less than the 3.3 V input range of the emonTx, then all you need is a single resistor in series with the analogue input. However, because of the effect of the sample & hold capacitor that I quoted earlier, you might want to put a capacitor across the input pin to ground so that the capacitor supplies the charge to the s & h capacitor. I suggest a resistor value of 470 kΩ and a capacitor of 1nF. The series resistor and the internal protection diodes will save the analogue input from damage if the sensor becomes disconnected, and the error will be less than 1 °C at 70 °C even when the emonTx is not powered.

dBC's picture

Re: Read DC analog signals with CT input

For what its worth, I happened across my old calibration data in the archives (see attached photo).  This is using an external 2.02V reference for the A/D.  If you do the resistor maths with reference to the pt1000 resistance chart, it looks like my controller is pumping about 1.371mA thru' the probe.  But given yours is a non-pulsing model, that may not be relevant to you.

dBC's picture

Re: Read DC analog signals with CT input

And remember,when doing any end-point calculations, on a good day the collector temperature can get well in excess of 100C.   You can see in the attached graph the bottom of the tank (i.e. the cold end) hit 70C by about 10am.   It then turns off the circulation pump to avoid blowing the tank up.  Instead it lets the collector boil, which has a steam release valve up there.  You'll see the circulation pump cycles for the rest of the day to keep the tank at 70C, until eventually the collector cools down at about 5pm.  I was clearly away that day, because there was no draw on the hotwater at all.

Scarlaz's picture

Re: Read DC analog signals with CT input

SUCCESS!

Thanks to your help and suggestion I made it.

I managed to read a PT1000 input connected to a "Digisol" temperature controller (a rebranded Resol).
To do this I connected a 560kΩ in series and a 4.7nF capacitor in parallel to the AI5 on the EmonTX.
I also had to put a software filter to smooth temperature readings since 1 bit on analog input corresponded to about 1°C.
When the EmonTX is powered down the analog temperature readout on the solar controller drops by about 1.5°C (this is a very good result).
If I disconnect the EmonTX, the temperature reading on the solar controller remains unchanged!! Great! Analog input is not affecting solar controller functions.

Now I have one analog temperature and 5 digital DS18B20 probes connected to my solar boiler. They helped me tracking down some performance issues on a bad installation. dBC plant performs much better.
 

Robert Wall's picture

Re: Read DC analog signals with CT input

You could probably increase your 560kΩ if you want to reduce the apparent temperature drop (the 1.5°C) but if you are happy with it as it is, then leave well alone. I'm glad you've got it working nicely.

dBC's picture

Re: Read DC analog signals with CT input

dBC plant performs much better.

I chose a pretty extreme solar day (just 9 days after the summer solstice) for that graph just to show how hot the roof collector can get.  My average days look a lot more like yours.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.