Close

Sensors Calibration

A project log for ARDUINO PWM SOLAR CHARGE CONTROLLER

Arduino based PWM Solar Charge Controller

open-green-energyOpen Green Energy 07/13/2018 at 09:230 Comments

Voltage Sensors :

5V = ADC count 1024

1 ADC count = (5/1024)Volt= 0.0048828Volt

Vout=Vin*R2/(R1+R2)

Vin = Vout*(R1+R2)/R2 R1=100 and R2=20

Vin= ADC count*0.00488*(120/20) Volt

Current Sensor:

As per seller information for ACS 712 current sensor

Sensitivity is =100mV / A =0.100V/A

No test current through the output voltage is VCC / 2= 2.5

ADC count= 1024/5*Vin and Vin=2.5+0.100*I (where I=current)

ADC count= 204.8(2.5+0.1*I) =512+20.48*I

=> 20.48*I = (ADC count-512)

=> I =(ADC count/20.48)- 512/20.48

Current (I) =0.04882*ADC -25

More details on ACS712

Temperature Sensor :

As per data sheet of LM35

Sensitivity=10 mV/°C

Temp in deg C =(5/1024)*ADC count*100

Note : The sensors are calibrated by assuming the arduino Vcc= 5V reference.But in practical it is not 5V always.So there may be chance of getting wrong value from the actual value.It can be solved by following way.

Measure the voltage between arduino 5V and GND by a multimeter.Use this voltage instead of 5V for Vcc in your code.Hit and try to edit this value until it matches the actual value.

Example: I got 4.47V instead of 5V.So the change should be 4.47/1024=0.0043652 instead of 0.0048828.

Discussions