Arduino Uno + 2 Current Sensors + LED Display + Relay


I have been looking at Arduino website tutorials over the past few days with the idea of building a unit to monitor mains current into the house and from a solar panel inverter and displaying it on an LCD display and depending on value then switching on or off a relay.

Never done this kind of thing before so quite a novice!

If i bought a Arduino Uno am i able to connect and read the input values from the 2 x Current Sensors (already have the sensors) via the Arduino chip, pass the details to a LCD display and decide whether to turn on the relay?

Would the Arduino Uno be suitable or do i need something more bespoke?

Thanks in advance


I have been looking at Arduino website tutorials over the past few days

Maybe try reading the words, too.

Of course the Arduino can monitor current sensors, display data on a LCD, and make decisions to turn on or off a relay. Those pictures are not all photo-shopped.

Your program will look something like:

#define RELAYPIN 6  // or any other one

void setup()

void loop()
  int currentA = analogRead(A0);  // assuming the sensor has an analog output

  Serial.print("Current : ");

  if (currentA > 125)  // value is illustrative 
     digitalWrite(RELAYPIN, HIGH);  // switch on
  if (current < 120)
     digitalWrite(RELAYPIN, LOW);  // switch off

The values to switch the relay are a bit apart to prevent “overreacting relay”, there is a “dead zone” in between. You need to investigate good meaningfull values for those.


Many thanks Rob for code snippet,

My neighbour who is into electronics and builds a number of systems as offered to help me along the way, but I did not want him to build the whole thing for me, that would be too easy.

He is testing the ct sensors with various currents/voltages etc so we know what we will be dealing with when we connect them to the Arduino.

My thinking is: monitor incoming mains and incoming solar, work out the difference see if there is a surplus add or minus % onto the difference to help avoid chatter and see how we go from there. May even just go with when surplus of 1.25kw trigger relay which will fire 1kw element leaving 0.25kw buffer.

Probably won't work iniatally but once it's up and running and we can see what's happening we can work from there.

Many thanks