I got a good chunk of time in the lab this weekend to pretty much nail down the design for the Power Monitor. I now have two sensor nodes on breadboards connected to an Arduino reporting data back to a Linux box. I will now transition into designing the PCB to get sent out for fab. Learning Eagle as I type for that exact purpose.
I will try to get out better design information over the next few weeks. But for now I will give a brief tour. The system is broken down into a couple of major sections.
- Sensor nodes
- Node controller
- Data collection
The sensors are stock current transformers for measuring current and step down transformers for voltage sensing. The current sensors use a small burden resistor to generate a voltage signal in the +- 0.5V range. The transformers (120-12VAC) use a secondary voltage divider to also get down into the +- 0.5V range.
The sensor nodes are based on the Analog Devices ADE7763 power measurement IC. This is a great chip. (I had ordered other measurement chips including the one from Crystal, but since this one does everything I want, I never even powered up any others.) The ADE7763 has on board signal processing to do all the RMS, power, and energy computations. It takes in differential pairs in the range of +-0.5V one each for current and voltage. Various measurement types can be read out of the chip via its SPI interface.
The only “problem’ with the ADE is that it is an SPI device. That means that each chip needs its own chip select. So I was looking an a huge logistic problem controlling 30+ chip selects from a single Arduino. The rats nest of wires was leaving me cold. So I solved this problem by distributing the chip select function to a small PIC processor on each sensor node. The PICs would all share an SPI like bus (data and clock) that the Arduino could drive to indicate what sensor node should respond to the single chip select the Arduino drives. I did this by picking a PIC part with a comparator on it. The Arduino chip select goes to one side of the comparator. The other comes from a signal generated from the PIC. The output of the comparator goes the to ADE7763. Given the proper reference signal (V/2), the Arduino chip select passes through unmolested. But when the sensor node is not selected, the reference voltage changes such that the comparator output is locked high disabling the ADE.
Since I also had an issue with the ADE7763’s reset line, I also allocated this to the PIC. Now the Arduino can clock over a sensor node address to enable the sensor node (by setting the reference voltage) or it can send over a reset address to have the PIC provide a short reset pulse to the ADE. All this on just a single set of bussed clock and data lines.
The next block in the power monitor system is the node controller. This is an Arduino that cycles through all the sensor nodes every few seconds and pulls the parameters I am interested in off the sensor. These would be Irms, Vrms, Prms, and accumulated Energy. It then sends this data on to the last processing block via RS-232.
In my case this last block is my Linux file server. It is already collecting other information about the house and is left on 24/7. It will now collect this data save it locally and push it to Pachube.