Measuring the response of the electric water heater using the Arduino

This post describes how to measure the response of the electric water heater using the Arduino. By using simple program on the Arduino is very simple to read the output of the temperature response. Arduino has a 10bit ADC accuracy is used to read the output of the LM35 temperature sensor.

The output voltage of the LM35 sensor is amplified using the LM358 with a voltage gain of 5.47. While the output voltage of the LM35 is 10mV per degree centigrade. So the total output voltage LM398 is 5.47x10mV = 54.7mV per degree centigrade.

Arduino simple program are as follows:

To read the temperature using the Arduino ADC channel 0 (A0). Results of ADC convertion is sent in serial with baudrate of 115200baud. By using hyperterminal program, the conversion result is stored in a file in text format form.

Measurement steps

1. Upload arduino program to arduino board
2. Fill water with water and setup the water flow about 6ml/sec
3. Connect output of temperature sensor to A0 of arduino
4. Run hyperterminal and setup the filename to capture data
5. Start no power on elektric heater for some seconds
6. Start power of electric heater for some minutes
7. Remove power of electric heater for some minutes
8. Stop hyperterminal
9. Graph the results using scilab

Graph the results using scilab

By using the Scilab command in the console such as the following, the response will be obtained graphically.

// read file

// convert to matrix
-->d=evstr(sh);

// check size of matrix
-->size(d)
ans  =

2652.    1.

// make matrix of time with sampling about 2ms
-->t=0:0.002:2651*0.002;

// check size t matrix must same with d matrix
-->size(t)
ans  =

1.    2652.

// convert to voltage, fullscale of adc = 5Volt
-->v=(d/1024)*5;

// convert to output voltage of LM35
-->v_sensor=v/5.47;

// convert to exact temperature with 10mv per centigrade
-->tc=(v_sensor*1000)/10;

// plot data
-->plot2d(t,tc,style=5)
-->xgrid()

-->title("Step Responses of Water Heater")

-->xlabel("Number of Samplings")

-->xlabel("Time in second")

-->ylabel("Temperature of water heater fluid (centigrade)")


Last updated by at .