digitalWrite(13, HIGH);//Turn the relay on and add the resistor to be measured in the circuit delay(500);//Stabilize the relay contacts test=analogRead(A0); dRes=map(test,0 ,1023, 0, 6600);//Map A/D digital data. 6V max voltage divider is two 1.5k OHM resistor with 1% tolerance dRes=(dRes/1000); digitalWrite(13, LOW); delay(10); float v1; float v2; float R2=3000;// Load resistors value-This is the voltage divider for the analog input composed of two 1.5K resistor float I; v1=RefV-dRes;//Get voltage drop on relay. RefV is the reference voltage. v2=dRes; I=(v2/R2);//Compute for Current-I=I1=I2=..... //By knowing the I, R1 can be calculated ContR=(v1/I);// ContR is the R1 in the circuit so R1=V1/I, R1 also represent the resistor to be measured dContR=ContR; //Transfere value to another variable (for LCD Display)
but I was hoping I could capture up to .2 Ohms if possible.
can't seem to get an accurate measurement or it won't show measurement at all.