# Current sensor with Arduino + HCS712 Help !!!! First post.

Hello, this is my first post and I write you for ask an advice to find the right way. I want to realize a Energy Monitor and save data to a SD Card (Power:Voltage*Current with Voltage fixed to 230V). The kit will be: Arduino Uno; Sd Shield (to save data and analize to PC); Real Time clock with DS1307 (to link the date to the measure read); Hall Sensor Allegro HCS712 like current transducer (HCS712ELCTR-20A-T). Hall Sensor: range 20A, sensibility 100mV/A (so an output of 2V maximum ... ok Arduino analog input) On Hall sensor I have questions and doubt: 50Hz voltage:i will read a value but i will not know if is the maximum value or the RMS value . How can I create an analog signal RMS without passive components (like diode with 0,7V drop on a signal of 2V); With 50Hz the period is 20mSec. Can I sample with faster speed? (like 20 samples, 1 once 1mSec) and calculate the RMS? In this case, how can I calculate the RMS? I do the acquisition each 10 second. So I need 20mSec to do the samples and 9 Sec to calculate the RMS, like the results of the RMS to the date, Save the data to the SD card. Is this the right way? Thanks in advance.

here u can find some math functions: http://arduino.cc/en/Reference/HomePage

here u can c what RMS is: http://en.wikipedia.org/wiki/Root_mean_square seems to be the root of the arithmetic mean of the squared meaurements...

u can sample with 10kSamples/second with the standard configuration...

here u can set the reference voltage of the ADC: http://arduino.cc/en/Reference/AnalogReference?from=Reference.AREF

9 seconds should be enough...