I have tried to attach a couple of “back of the envelope” diagrams (Diag 1 and Diag 2) but there is a limit of 64k
Try: http://s955.photobucket.com/user/terzo_ ... rary/Power
Diag 1 shows how the signal from the CMA113 is sampled only during the negative half cycle of the mains voltage. The average of this is stored in a capacitor and amplified to produce Vout. Vout varies with the current I1 flowing through the sensor. I assume you could use this voltage to feed an analogue input into your Pi and then switch heaters once there is excess exported energy.
Diag 2 shows how you could also use Vout to produce a visual display either using a centre zero meter or a bi colour LED that glows brighter red as more power is imported (or brighter green as more power is exported). Diag 2 also shows how to control a proportional circuit that will feed all excess power to a heater. Whenever there is exported power the capacitor charges and increases the voltage to the controller and the power to the heater. The pot allows the “zero point” to be fine tuned so the electricity meter just stops registering (if you are using a bi colour LED this is the point it changes from red to green). The power indicator LED glows brighter as more power is fed to the heater. You may want to consider using an EMC filter in conjunction with the phase angle power controller.
Some useful bits I used are:
Sockets to plug the CMA113 into:
Switchcraft 732RA 1.3mm Power Socket
http://www.rapidonline.com/cables-conne ... et-20-1084
TruConnect 1.3mm DC PCB Power Socket
http://www.rapidonline.com/cables-conne ... cket-63538
Crydom 10PCV2425 Proportional Power Controller
http://uk.rs-online.com/web/p/solid-sta ... s/2181870/
United Automation F165 15A Filter Module
http://www.united-automation.com/f165-1 ... 30v-15amp/
Kingbright L-57EGW Bi-colour Green, Red LED (25mA)