Anyone know the power max power consumption of an arduino uno with Ethernet board? I have an arduino uno with an Ethernet shield running an energy monitor sketch for my house hooked up to two current transformers. I’m powering the setup through the arduino USB port. The only other device drawing power besides the Ethernet shield is a set of 1kohm voltage deviding resistors. I’m curious what current this setup could be drawing because I found I was getting glitchy operation with a 1 amp power supply and great with a 2 amp. The only reason I ask is because 1 amp seems high to me but maybe it’s normal.
Hi!
Looking for another topic I saw this old one: Ethernet Shield Power Consumption
which says that power consumption of an ethernet shield lies around 150mA. This is far enough from 1A to believe that you got a problem in your 1A power supply or in your circuit.
A sketch of your circuit would be useful for others to take a look and try to help.
Sorry about that. I was away from the computer when I made this post. Normally I attach the sketch. Here is the sketch if your interested. I have been tweaking it quite a bit and am starting to be happy with it. Feel free to offer any improvements.
#include <SPI.h>
#include <Ethernet.h>
#include <BlynkSimpleEthernet.h>
#include <TimeLib.h>
#include <WidgetRTC.h>
char auth[] = "*********";
char ssid[] = "********";
char pass[] = "********";
double calibration0 = 0.355008;
double calibration1 = 0.355008;
double kilos0;
double kilos1;
double peakkilos;
unsigned long startMillis;
unsigned long endMillis;
double RMSCurrent0;
double RMSCurrent1;
int RMSPower0;
int RMSPower1;
int peakPower0;
int peakPower1;
int TotalRMSPower;
int current0 = 0;
int maxCurrent0 = 0;
int minCurrent0 = 1000;
int current1 = 0;
int maxCurrent1 = 0;
int minCurrent1 = 1000;
int zero0 = 516;
int zero1 = 516;
int Volts = 121.2;
BlynkTimer timer;
WidgetRTC rtc;
void setup()
{
Serial.begin(115200);
Blynk.begin(auth, IPAddress(10, 0, 0, 151), 8080);
setSyncInterval(10 * 60);
}
void loop()
{
if (Blynk.connected()) { // If connected run as normal
Blynk.run();
rtc.begin();
timer.run();
} else {
Blynk.connect();
}
readPhase();
displayKilowattHours();
displayCurrent();
displayPower();
if (hour() == 23 && minute() == 59) {
kilos0 = 0;
kilos1 = 0;
}
delay(100);
readPhase();
delay(100);
readPhase();
}
void clockDisplay()
{
String currentTime = String(hour()) + ":" + minute() + ":" + second();
String currentDate = String(day()) + " " + month() + " " + year();
Serial.print("Current time: ");
Serial.println(currentTime);
}
void readPhase ()
{
maxCurrent0 = zero0;
minCurrent0 = zero0;
maxCurrent1 = zero1;
minCurrent1 = zero1;
for (int i = 0 ; i <= 200 ; i++)
{
current0 = analogRead(A0);
current1 = analogRead(A1);
if (current0 >= maxCurrent0)
maxCurrent0 = current0;
else if (current0 <= minCurrent0)
minCurrent0 = current0;
if (current1 >= maxCurrent1)
maxCurrent1 = current1;
else if (current1 <= minCurrent1)
minCurrent1 = current1;
}
zero0 = ((maxCurrent0 - minCurrent0) / 2) + minCurrent0;
zero1 = ((maxCurrent1 - minCurrent1) / 2) + minCurrent1;
RMSCurrent0 = (maxCurrent0 - zero0) * calibration0;
RMSCurrent1 = (maxCurrent1 - zero1) * calibration1;
RMSPower0 = Volts * RMSCurrent0;
RMSPower1 = Volts * RMSCurrent1;
TotalRMSPower = RMSPower0 + RMSPower1;
endMillis = millis();
unsigned long time = (endMillis - startMillis);
kilos0 = kilos0 + (((double)RMSPower0 / 1000) * ((double)time / 3600000));
kilos1 = kilos1 + (((double)RMSPower1 / 1000) * ((double)time / 3600000));
peakkilos = kilos0 + kilos1;
startMillis = millis();
}
void displayKilowattHours() //Displays all kilowatt hours data
{
Serial.print(kilos0);
Serial.print("kWh ");
Serial.print(kilos1);
Serial.println("kWh");
Serial.print(peakkilos);
Serial.println("kWh");
Blynk.virtualWrite(V2, peakkilos);
}
void displayCurrent() //Displays all current data
{
Serial.print(RMSCurrent0);
Serial.print("A ");
Serial.print(RMSCurrent1);
Serial.println("A");
Blynk.virtualWrite(V0, RMSCurrent0);
Blynk.virtualWrite(V1, RMSCurrent1);
}
void displayPower() //Displays all watts
{
Serial.print(RMSPower0);
Serial.print("W ");
Serial.print(RMSPower1);
Serial.print("W ");
Serial.print(TotalRMSPower);
Serial.println("W");
}
As we´re dealing with an electrical issue, by "sketch of your circuit" I meant the electrical connections of your circuit
Here is a sketch of the electrical side of the circuit. I believe I have found the issue. The issue seems to be with the ramp up of power from the power block. If I leave the Arduino plugged into the power block when the block is not plugged into the wall, then plug the power block in that is when I see the glitchy behavior. If I plug the power block into the wall then the Arduino into the power block the Arduino works fine. Anyone else have this issue and find a way to work around it?
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.