Well, the first part of my thermostat project is coming together. I’ve validated that I can power the Raspberry pi from a 24V AC source with what I’d consider minimal additional components. I’m still waiting for Adafruit to get the capacitive touch screen in stock but I believe this setup will be capable of powering the entire system. I created a forum thread for a brief “how to” on this topic. You can find it here. The next thing I will be testing are some relays that just arrived from Jameco which I’ll use to signal the HVAC unit to come on or shut off.
I purchased a couple of SCT 013-030 CTs for testing with my Raspberry Pi. The Raspberry Pi does not support analog values out of the box so I also purchased the Adafruit ADS1015 analog to digital converter. I got the ADS1015 working with the Pi following several examples found on the web. I then proceeded to look into getting the SCT 013-030 to work. This is turning out to be more “fun” than I expected. The SCT 013-030 includes a built in burden resistor of 38 ohms from what I’ve measured. With that in mind, hooking up a multimeter to the CT output should give us an AC voltage. I tested this and it appears working. The next step would be to measure the voltage using the Raspberry Pi and the ADS1015. Being that the voltage is AC I tried to figure out an “easy” way to grab the maximum voltage value. I put together a basic python program to sample at 128 samples per second and print the results with a time stamp. I discovered negative voltage values resulted in values over 12k but you could actually see the sine wave with the values. I tweaked the python code to ignore values over 12k then save the maximum voltage it sees for the 128 sps and figured this value should be fairly close to the right value. This value is in millivolts and needs converted to amps. To do this I took 1000mV=30A and divided both sides by 1,000. This results in 1mV = .03amps. So I took the millivolt reading from the Raspberry Pi and multiplied by .03 to get Amps.
This appears to somewhat work as I’ve tried three different loads, xbox 360, curling iron, and a halogen bulb. Unfortunately, the results seem low and high for the different loads when compared to my multimeter measurement. However, They do seem to be within maybe +- 10%. I’ll continue to troubleshoot but if anyone has any ideas I would greatly appreciate it.