Design pretty much done with design!

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.

  1. Sensors
  2. Sensor nodes
  3. Node controller
  4. 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.

This entry was posted in ADE7763, Components, Home Energy Monitor, PIC, Processors, Projects. Bookmark the permalink.

5 Responses to Design pretty much done with design!

  1. Bhaskar says:

    Hi, Sweeny.

    i am doing a project on ADE7763. The SPI interface for it looks pretty complex.
    Can u help me with that?? (I am using a PIC18F MCU).

    Thanks in advance,
    regards,
    Bhaskar

  2. Skye Sweeney says:

    I have posted my code for the ADE at http://www.fll-freak.com/misc/PowerMeter.zip. You should be able to use that as a starting point for your post to the PIC. If you have any further issues, you can always email me or post back here.

  3. THL. says:

    Hi Sweeny:

    Appreciate your sharing ,but I tried that the program in arduino is not worked ,Could you assist me about that .Thanks again. Best regard ,Thl

  4. Pushkar says:

    Have you tried using ADE7763 with a shunt resistor?

    • Skye Sweeney says:

      I am afraid I don’t understand the question. A shunt resistor can refer to so many things. I use a shut/burden resistor on the current transformer to convert the output of the CT (a current) into a voltage that can be sensed at the chip.

      I will guess that your question is to not use a CT but a low voltage resistor and measure the slight voltage drop over it. I have not done this and I am not sure I would. In the case of the CT, the windings give you isolation from the high voltage you are monitoring to the low voltage on the chip. If you use a sense resistor you will lose that isolation and you now may have a very dangerous system.

      If this did not address your question, please provide a more detailed question.

Leave a Reply

Your email address will not be published. Required fields are marked *

Blue Captcha Image
Refresh

*