Arduino code for PowerMeter using ADE7763

So here is the current version of the code. Not cleaned up yet, but it is functional. It does not include the code for the PIC processor needed only if you want to mux 30+ sensors into the one ADE. Just remove the BUS_xxx methods that are used to control the muxes.

PowerMeter

This entry was posted in ADE7763, Arduino, Components, Furnace Monitor, Projects. Bookmark the permalink.

5 Responses to Arduino code for PowerMeter using ADE7763

  1. segu says:

    Any news about if this project is still going would be appreciated.
    And thank you for sharing knowledge.

  2. Thamanoon says:

    Thank you for your code, I modify to use with STM32 instead. I can not use SPI in all mode of STM32 to interface with ADE7763, but I can do with bit shift like this:

    void SPI_Send ( u8 data)
    {
    u8 j,data_in;

    data_in = data;
    for ( j = 0; j <8; j++ )
    {
    GPIO_WriteBit(GPIOC,GPIO_Pin_8,Bit_SET);
    if ((data_in & 0x80)!=0)
    {
    GPIO_WriteBit(GPIOC,GPIO_Pin_10,Bit_SET);
    }
    else
    {
    GPIO_WriteBit(GPIOC,GPIO_Pin_10,Bit_RESET);
    }
    data_in=data_in<<1;
    GPIO_WriteBit(GPIOC,GPIO_Pin_8,Bit_RESET);
    }
    }

    u8 SPI_Receive (void)
    {
    u8 j,data_in=0;

    for ( j = 0; j <8; j++ )
    {
    GPIO_WriteBit(GPIOC,GPIO_Pin_8,Bit_SET);
    data_in=data_in<<1;
    if(GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_9) == Bit_SET)
    {
    data_in +=1;
    }
    else
    {
    data_in +=0;
    }

    GPIO_WriteBit(GPIOC,GPIO_Pin_8,Bit_RESET);
    }
    return(data_in);
    }

  3. karl says:

    Hi

    Could you share your schematics? Shunt should be on hot or neutral line?

    • Skye Sweeney says:

      I do not have a schematic in a form that can be distributed at this point. It is just scrawled on a piece of paper. I hope to get to the job of entering it into either KiCad or Eagle in the next few months.

      As for the shunt, I am not sure what you are referring to. The only ‘shunt’ I am using is a burden resistor across the coil of the current transformer. Often shunts are used as a small voltage drop that an opamp might amplify to determine current. I am not using such a process to determine current. I use the safer current transformer (CT) method.

Comments are closed.