Coder Social home page Coder Social logo

ade7758's Introduction

ADE7758

THIS IS NOT FOR BEGINNERS. RISKS of ELECTRICUTION, DAMAGE TO ELECTRONIC DEVICES ATTACHED INCLUDING LAPTOPS are POSSIBLE. USE at your OWN RISK.

Arduino Library for ADE7758

This Library is not a complete ADE7758 library. I just implemented only the functions I used in a certain project.

Library files are ADE7758Lib.h and ADE7758Lib.cpp. To include the library in your projects, you can #include "ADE7758Lib.h" in you project provided you put the files in your project folder. The library uses SPI at mode1 (CPOL=0 - clock idle is low,CPHA=1- data is read at falling edge of clock). The library results are uncalibrated. What I did to calibrate is to sample on different voltage levels and current levels measured from multimeter and perform a linear regression. Well, an equation given 2 points sometimes is enough. I sampled at 110V, 220V, 230V. I also sampled with different current loads. You can add a calibration function using the methods discussed in the datasheet.

An Example ino file is included that uses the methods included in the source code.

You can implement other functions by filling up the empty functions I left in the .cpp file. Just read the datasheet for the algorithm.

for SCHEMATIC:

Use at your own RISK. This circuit has been tested by Computer and Electrical Engineering Majors in one of the 230V RMS line-to-line phase of a 3-Phase 60Hz source. This circuit works even if your feed 3 single-phase input as long as you connect the neutral line to the VN.

Jumpers JP1,2 and 3 are for when you decide to use two-watt meter method (tested). Remove jumpers when you want to use 3 watt-meter method. NEVER TOUCH the board(even the ground plane) when the power is on!

On each branch in VAP, VBP and VCP, I added a series 1M resistor and a pull down 1K resistor after the 1M. This is a voltage divider to divide the line voltage to LineV*1K/(1K+1M) or approximately LineV/1000 so a 110V line to ground will appear as 110mV in the VAP of the IC.

For two-watt meter method (please read about this), JP1,2 and 3 is shorted. Connect line Voltage A to VAP header. Line voltage B to VAP in the header connect Line Voltage C to VN header (no need to connect anything to VCP header). Therefore, what you read in AV register is the VAC voltage and BV register is the VBC. In two-watt meter method, you only need two line voltages and the currents running to these lines to solve the over-all power. So connect your current sensor to IA and IB only. NOTE: Current Sensor you should use is a current transformer. Add a low resistance high power resistor between the two pins of the CT as shunt so that you can read voltage. The current channels in the IC reads voltage. Compensate for the ratio in the program, the resistor and voltage to current conversion based on the resistor (I=V/R) in your program. Advantage: no need for neutral ground. Disadvantage: some information are not available.

For three watt meter method just remove tha short in JP1,2 and 3. Connect voltage A, B, C and Neutral lines to VAP,VBP,VCP and VN respectively. connect all line currents to each corresponding current input header.

Also notice that the ADE is isolated from the SPI header using high speed opto-isolators so that there is less risk of damaging your Arduino and PC.

Connect to arduino SPI pins you used the SPI header in the schematic. In PCB layout, use separate ground planes for AC and MCU DC sides. THE AC side has AC components, Analog DC and digital DC(DC side of the ADE7758). Use the same ground plane for AC and Analog DC. SO a total of 3 Ground planes. Connect the Analog ground to DC side of the ADE7758 by at a single point. (Read about mixed signal routing).

ade7758's People

Contributors

engkan2kit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ade7758's Issues

schematic ade7758

Thank you for sharing... where can ı find any schematic or wiring about ade7758 for using with arduino ?

What's the sample rate of this library?

Thank you a lot for that library, I'm in charge of a project that need the measument of a three-phase line, and I'm choosing the CI for this measurement... That's why I'm asking you, how much time takes between a measurement and another. (I didn't have the chip, I'm looking for some options)

Code for Arduino uno

Hi!

I'm trying to test it for an Arduino UNO, this is for an Arduino MEGA, is this correct?

Regards!

CALIBRATION PROBLEM

Hello,

I have installed your library and I am using the ADE7758 IC as mentioned in your schematic. The code is working fine and providing the output in the serial monitor. I can see that we are getting the output in the form of HEXADECIMAL values. How should i convert it into proper values like 230.4 v , 1.58 A etc. ? please guide me to extract the same values from your sketch. Is there any calibration required to get my desired value ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.