Skip to content
Tiago Lobão edited this page Aug 26, 2018 · 3 revisions

Welcome to the CS5490 wiki!

Here you can find the introduction for the CS5490 usage. This page is incomplete so if you have any suggestions or issues to report you can contact me tiago.blobao@gmail.com

CS5490 Datasheet


Step by step

Hardware

You can see a complete energy node circuit of this [Smart home energy monitoring & management system](https://www.instructables.com/id/Smart-home-energy-management-system-SHEMMS/)

Energy Node Circuit

Instance the class

Here you will learn how to correctly make a cs5490 instance for you board
  1. Arduino UNO and ESP8622 Custom Arduino Boards uses software serial, so you need to define TX and RX pins.
CS5490 line(MCLK,rx,tx);
  1. ESP 32 and Arduino MEGA It uses by Serial2 default.
CS5490 line(MCLK);

Begin communication

At setup code, you need to begin serial communication.
line.begin(baudRate);

Reading and Writing

See Methods page and choose a register to read or write
You can read any register with
line.readReg(page, address);

You can write any register with

line.write(page, address, value)

"line" variable is consider the default instance of the class CS5490 for every example in this Wiki

Clone this wiki locally