Hi Guys!
I am kind of stuck. I have a Mega with a connceted relay-bench (8 relays). Also conntected are six sensors ACS712ELC-05B. The sensor is mounted correctly the powersupply for a laserdiode with a max-current of 4.5A.
(Powersupply +) -> (Sensor) -> (Relay) -> (Diode +)
(Powersupply GRD) -> (Diode GRD)
I know, that the sensor should also be installed on the GRD-Line in the first way. Tried that, no difference, same readings. Following the sensors documentation in can be installed either POS- or GRD-line.
Everything works fine, except that i just get basic readings trom the sensor. When switching relais on (max power on diodes) and off (diodes work fine), there is no or just minor difference in the readings.
The sensor are mounted quite close to each other - like 2mm board next to board. The relais-bench is about 5cm parallel to the row of sensors.
Did i mount these components to close to each other or what can cause the issue? Components are all brandnew.
Kind regards,
Andy
Here is the schematics. I have six lines for Diodes as the one shown using A0-A5 for readings. The code i use is different from that you showed, but mine is the one provided in the manual that came with the sensor. My readings give me a (more or less) constant value of 2500mV. The Amp-value ranges about 0,15-0,25A (with no load!).
I used my multimeter to check outgoing voltage of the board. There i had a reading of 5V and no changes in the sensordata displayed on serial monitor.
****** Code Begin******
/*
Measuring Current Using ACS712
*/
const int analogIn = A0;
int mVperAmp = 185; // use 100 for 20A Module and 66 for 30A Module
int RawValue= 0;
int ACSoffset = 2500;
double Voltage = 0;
double Amps = 0;
void setup(){
Serial.begin(9600);
}
void loop(){
RawValue = analogRead(analogIn);
Voltage = (RawValue / 1024.0) * 5000; // Gets you mV
Amps = ((Voltage - ACSoffset) / mVperAmp);
IDUINO for maker’s life
www.openplatform.cc
Serial.print("Raw Value = " ); // shows pre-scaled value
Serial.print(RawValue);
Serial.print("\t mV = "); // shows the voltage measured
Serial.print(Voltage,3); // the '3' after voltage allows you to
display 3 digits after decimal point
Serial.print("\t Amps = "); // shows the voltage measured
Serial.println(Amps,3); // the '3' after voltage allows you to display
3 digits after decimal point
delay(2500);
}
****** Code End******
Yes, all the relays work perfect as the diodes are also working when power is provided by the board.
As the power is passing the sensors with no loss i am confused about the readouts.
My only guess is, that may be the position next to each other or to the relays causes the issue…