{"id":1963,"date":"2016-09-21T09:34:03","date_gmt":"2016-09-21T06:34:03","guid":{"rendered":"http:\/\/roboromania.ro\/produs\/senzor-current-5a-acs712\/"},"modified":"2025-04-07T11:03:33","modified_gmt":"2025-04-07T08:03:33","slug":"senzor-current-5a-acs712","status":"publish","type":"product","link":"https:\/\/roboromania.ro\/?product=senzor-current-5a-acs712","title":{"rendered":"Senzor Curent 5A ACS712"},"content":{"rendered":"<p>Compatibil Arduino<br \/>\nSenzorul de curent este de \u00eenalt\u0103 performan\u021b\u0103, bazat pe efectul Hall.<br \/>\nModulul este realizat cu ajutorul circuitului ACS712.<\/p>\n<p><a href=\"http:\/\/roboromania.ro\/wp-content\/uploads\/2015\/08\/ACS712-roboromania.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-881\" src=\"http:\/\/roboromania.ro\/wp-content\/uploads\/2015\/08\/ACS712-roboromania-300x300.jpg\" alt=\"ACS712-roboromania\" width=\"300\" height=\"300\" srcset=\"https:\/\/roboromania.ro\/wp-content\/uploads\/2015\/08\/ACS712-roboromania-300x300.jpg 300w, https:\/\/roboromania.ro\/wp-content\/uploads\/2015\/08\/ACS712-roboromania-150x150.jpg 150w, https:\/\/roboromania.ro\/wp-content\/uploads\/2015\/08\/ACS712-roboromania-180x180.jpg 180w, https:\/\/roboromania.ro\/wp-content\/uploads\/2015\/08\/ACS712-roboromania.jpg 458w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><a href=\"https:\/\/roboromania.ro\/wp-content\/uploads\/2016\/09\/ACS712-testing-DC.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-9740\" src=\"https:\/\/roboromania.ro\/wp-content\/uploads\/2016\/09\/ACS712-testing-DC-300x224.webp\" alt=\"\" width=\"300\" height=\"224\" srcset=\"https:\/\/roboromania.ro\/wp-content\/uploads\/2016\/09\/ACS712-testing-DC-300x224.webp 300w, https:\/\/roboromania.ro\/wp-content\/uploads\/2016\/09\/ACS712-testing-DC-600x448.webp 600w, https:\/\/roboromania.ro\/wp-content\/uploads\/2016\/09\/ACS712-testing-DC.webp 768w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><a href=\"https:\/\/roboromania.ro\/wp-content\/uploads\/2016\/09\/Arduino-AC-Current-Measurement.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-9741\" src=\"https:\/\/roboromania.ro\/wp-content\/uploads\/2016\/09\/Arduino-AC-Current-Measurement-300x208.jpg\" alt=\"\" width=\"300\" height=\"208\" srcset=\"https:\/\/roboromania.ro\/wp-content\/uploads\/2016\/09\/Arduino-AC-Current-Measurement-300x208.jpg 300w, https:\/\/roboromania.ro\/wp-content\/uploads\/2016\/09\/Arduino-AC-Current-Measurement-600x416.jpg 600w, https:\/\/roboromania.ro\/wp-content\/uploads\/2016\/09\/Arduino-AC-Current-Measurement.jpg 631w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Uite un cod ajutator :<\/p>\n<p>\/*<br \/>\nMeasuring AC Current Using ACS712<br \/>\nroboromania.ro<br \/>\n*\/<br \/>\nconst int sensorIn = A0;<br \/>\nint mVperAmp = 185; \/\/ use 100 for 5A30A Module<\/p>\n<p>double Voltage = 0;<br \/>\ndouble VRMS = 0;<br \/>\ndouble AmpsRMS = 0;<\/p>\n<p>void setup(){<br \/>\nSerial.begin(9600);<br \/>\n}<\/p>\n<p>void loop(){<\/p>\n<p>Voltage = getVPP();<br \/>\nVRMS = (Voltage\/2.0) *0.707; \/\/root 2 is 0.707<br \/>\nAmpsRMS = (VRMS * 1000)\/mVperAmp;<br \/>\nSerial.print(AmpsRMS);<br \/>\nSerial.println(&#8221; Amps RMS&#8221;);<br \/>\n}<\/p>\n<p>float getVPP()<br \/>\n{<br \/>\nfloat result;<br \/>\nint readValue; \/\/value read from the sensor<br \/>\nint maxValue = 0; \/\/ store max value here<br \/>\nint minValue = 1024; \/\/ store min value here<\/p>\n<p>uint32_t start_time = millis();<br \/>\nwhile((millis()-start_time) &lt; 1000) \/\/sample for 1 Sec<br \/>\n{<br \/>\nreadValue = analogRead(sensorIn);<br \/>\n\/\/ see if you have a new maxValue<br \/>\nif (readValue &gt; maxValue)<br \/>\n{<br \/>\n\/*record the maximum sensor value*\/<br \/>\nmaxValue = readValue;<br \/>\n}<br \/>\nif (readValue &lt; minValue)<br \/>\n{<br \/>\n\/*record the minimum sensor value*\/<br \/>\nminValue = readValue;<br \/>\n}<br \/>\n}<\/p>\n<p>\/\/ Subtract min from max<br \/>\nresult = ((maxValue &#8211; minValue) * 5.0)\/1024.0;<\/p>\n<p>return result;<br \/>\n}<\/p>\n<p><a href=\"http:\/\/roboromania.ro\/datasheet\/senzor-curent-ACS712-roboromania.pdf\" target=\"_blank\" rel=\"noopener\">datasheet<\/a><br \/>\nArduino projects.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Senzor Current.<\/p>\n<p>Arduino projects.<\/p>\n","protected":false},"featured_media":880,"comment_status":"open","ping_status":"closed","template":"","meta":[],"product_brand":[],"product_cat":[9,15],"product_tag":[80,7,81,82,41,40],"class_list":{"0":"post-1963","1":"product","2":"type-product","3":"status-publish","4":"has-post-thumbnail","6":"product_cat-senzori","7":"product_cat-module","8":"product_tag-acs712","9":"product_tag-arduino","10":"product_tag-curent","11":"product_tag-hall","12":"product_tag-sensor","13":"product_tag-senzor","15":"first","16":"instock","17":"sale","18":"shipping-taxable","19":"purchasable","20":"product-type-simple"},"_links":{"self":[{"href":"https:\/\/roboromania.ro\/index.php?rest_route=\/wp\/v2\/product\/1963","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/roboromania.ro\/index.php?rest_route=\/wp\/v2\/product"}],"about":[{"href":"https:\/\/roboromania.ro\/index.php?rest_route=\/wp\/v2\/types\/product"}],"replies":[{"embeddable":true,"href":"https:\/\/roboromania.ro\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1963"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/roboromania.ro\/index.php?rest_route=\/wp\/v2\/media\/880"}],"wp:attachment":[{"href":"https:\/\/roboromania.ro\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1963"}],"wp:term":[{"taxonomy":"product_brand","embeddable":true,"href":"https:\/\/roboromania.ro\/index.php?rest_route=%2Fwp%2Fv2%2Fproduct_brand&post=1963"},{"taxonomy":"product_cat","embeddable":true,"href":"https:\/\/roboromania.ro\/index.php?rest_route=%2Fwp%2Fv2%2Fproduct_cat&post=1963"},{"taxonomy":"product_tag","embeddable":true,"href":"https:\/\/roboromania.ro\/index.php?rest_route=%2Fwp%2Fv2%2Fproduct_tag&post=1963"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}