TUTORIAL: How to use the ACS712 Hall Effect Current Measure Sensor Module - Arduino (Part 2)

preview_player
Показать описание
Using the ACS712 current sensor to measure current! With Arduino... This video is about the coding and testing.
Рекомендации по теме
Комментарии
Автор

You are my hero. Your video is the only one I have seen that actually teaches how to work with the ACS712 sensor and write the code. It is all well and good downloading libraries and just mimicking everyone else but it doesn't teach you anything. You have taken the time to break it down and work through the process step by step. You are also the only YouTuber I have found who has explained why an offset is necessary and how to work it into the code. You have also kept the code simple and barebones. From here I can now do the smoothing.
I'll definitely be checking out your other videos and finding you on Patreon. Please keep the good oil coming!

seditiousmonkeyart
Автор

this is my first comment for someone on youtube, and that's because it's the first time I see someone gives such step by step details, I really appreciate your efforts. keep it up.

naelzaino
Автор

thank you Antony for the clear and simple explanation. It was a great help...
cheers..!!

tejobhiru
Автор

Erstes und wirklich gescheites Video zum ACS712.
Vielen Dank für die tollen Erklärungen!

foldi
Автор

Good and easy to understand tutorial... Thank you

CreativeJithin
Автор

Thank you. Nice overview. Well scripted for beginners, but not so full of fluff to make it unbearable for veterans... Much appreciated.

thomassmith
Автор

Thanks.... Please keep making videos... you are very helpful!!!

I_revolution
Автор

6:15 10 bit goes to 1023. With 1024 possible values, including 0.

You may like my channel!

TheRainHarvester
Автор

Amazing videos, thanks a lot for your insight and clear explanations! Excited to get this sensor and start building things. One question, could I use this, or a similar set-up to measure how much power is being drawn instead? I have a set-up where I am using a Solar Powered Mobile Phone Charging Station, the phones are being charged via USB, and I am interested in determining the amperage that is being drawn from the USB charging hub.

samuelkellerhals
Автор

I noticed in a reply you had misplaced the code. Here is the code you developed in this video:
#define ACS712 A0
float vpp = 0.0048828125; //volts per point(vpp) is 5.0v/1024 = 0048828125
float mVperAmps = 0.66; //mV constant of ASC712 30A



void setup() {
Serial.begin(9600);
pinMode(ACS712, INPUT);
}

void loop() {
int counts = analogRead(ACS712)+1; //reads 511-512. This is middle point of sensor
float voltage = counts * vpp; //converts sensor read into volts 511 = 2.5v
voltage -= 2.5; //offsets voltage to zero(0)
float amperage = voltage/mVperAmps;

Serial.println("Amps = " + String(amperage));
delay(500);
}

seditiousmonkeyart
Автор

Hello! what if i connect a relay series with the lamp? will it turn on? thanks

diands
Автор

i got negative and postive amperes. how to correct it? thankyou very much

diands
Автор

hello thank you for this video and i wanna ask if i can use the ACS712 current sensor for a low current like 100mA or what should i use please?

DhouhaBT
Автор

Hello there, thanks for sharing your knowledge with us, I got a question and I'd be glad if could answer me based on your knowledge on ADS, it seems these modules won't work nicely if I want to read low currents such as 1mA, 10mA and so on... If I use a 12bit Arduino or a 12/16bit adc module, would that help me in reading both low and high currents? I'd think so as the resolution would be higher, a 12bit Arduino would give me analog reads from 0 to 4095 if I'm not mistaken... I did a sketch to read currents by using a single resistor of 1R, it does work pretty fine, but according to my maths I'd be able to read a maximum of 5A, for that current I'd have to have a 25W resistor.. I'd appreciate your comment on this, thank you.

guelweles
Автор

what kind of load that you're using?

wisnuwicaksono
Автор

Hello,

I have a 30W solar panel with Vmpp 17.2 V and Impp 1.74A, I'm using the ACS712 5A module but it's always giving me wrong measurements. not more that 4V actually. what do you think is the problem and how can I fix it?

jelkabisa
Автор

Would it help to put a little bypass capacitor on the signal so it's not as jittery?

SKNMI
Автор

Grazie.ma per avere lo sketch?cosa devo che non riesco a tradurre?

Maximuspro
Автор

To smooth out the value, maybe you can store the running values into variables of 10 or more, then get the average.

Example algorithm:
var 1 = 0.00 //first millisecond put the value here
var 2 = 0.02 //next millisecond put the value here
var 3 = 0.01 //next millisecond put the value here
var 4 = 0.00 //next millisecond put the value here
var 5 = 0.00 //next millisecond put the value here
.
.
.var n = ?

>Get the sum of all VAR then divide by their number; if there are 10 variables, then divide their sum by 10.
>If there are 10 variables, then you've got 10 milliseconds to change their values.
>At 11th second display the Average value.

Arrays and For loops can ease the coding here.

Anyways, this is just my idea, just sharing. Yours might be better.

kymcainday
Автор

I am facing an issue!! Unlike you mine 0Ampere values i.e (510-514) are fluctuating ... When i increases the amperes it shows an abnormal behavior of fluctuating values with too much error.... What should I do?

riffatmustafa
visit shbcf.ru