Thanks, nice explanation. Needed something with greater current capacity for RC battery use than the 10/20/30A that were usually available. I was also surprised by the small connectors, but the pads underneath seem pretty big, so I think I'll remove the resist layer from the pads with a glass fiber brush to get a bigger contact area once I receive my order.
I'm a bit late to the party, but awesome video and great explanation thank you. I’m building an RC motor thrust stand, I have the Arduino outputting the PWM and thrust (weight in grams) working. I just need to combine a way of measuring up to 35V DC and 40A, I can use your video and code to combine with mine. This is the good side of RU-vid; people can share their skills and knowledge. 😊
Hi, here is voltage and current used energy meter ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-oufDb7AtvNk.html or may be this one ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE--pg7jbkaB6A.html by the way here the ACS sensors with library which makes the code very clean ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-sB6EULTix2k.html
9:04 Hall effect sensor doesn't have positive or negative, it can measure from both side, thus you can connect it in anyway you like between any of the wires, either high side or low side in any direction, depending on the way you have connected you will have reducing or increasing voltage on current in output
this module can't measure from both side. only the modules with letter B can do it. Of course hall effect can work both way. but the chip will not work if it is not made for bidirectional. see datasheet.
Hello, Thanks, I am having trouble with the ACS 100A bidirectional. I can measure 0,55V on the Current sensing pin, even tho it should be 2,5V with no amps flowing. I have bought several boards now, but also a sensor without a board, and they all have this issue. I am almost certain I'm doing something wrong, but I did it just like in your video. The output voltage is in some way proportional to the current, so the sensor kind of works, but it's not the right gain and offset. I connected 5V, GND and sensing pin. Is it neccessary to switch to DC maybe? Thanks!:)
You are welcome. This has two version The one with "B" in the name means bidirectional and that is for AC and DC. Check your chip. But you said the voltage is right, this is strange. I have explained it in the video. Try not to modify the code and do it again.
@@robojax thanks:) i know the B is bidirectional and can measure positive and negative current, around 2,5V voltage. But all my 3 chips I have give me 0,55V... I was sure I am doing something systematically wrong, but it's all correct...
Either you have selected wrong chip in the code, so check it again or code is modified. Please check the chip and see if it is totally different chip which is not defined in the code.
Thank you for this great video. One thing I don't see from your video or from the data-sheet is the min-max voltage range on the IP+ pin. I'm looking to connect this to solar, which in my case can go up to 150v DC, max 15amps. Do you know if the ACS758 will work with this?
@Robojax: is the second output a unit gain buffer? On a scope or meter do both output the same value? The ADC are usually high impedance and should not load the sensor. The risk of the buffer output is additional noise, drift and offset
@@robojax output of the module. It seems it has one output direct from the 758 while the other one goes through the opamp? Thank you for the fast response
Hi there. OU1 is connected to the VOUT of the Allegro via 120 Ohm series resistor -> unbuffered output that should also work for 3V3 to connect to high impedance ADC inputs. It also has a small bypass to GND. OU2 is connected to the output of op-amp 1. Op-amp 1 is in „voltage follower“ configuration -> it will buffer VOUT to allow for low impedance measurement inputs. That is actually useful in high noise environments, because having current on the measurement wire will make it less susceptible to EM noise. The op-amp can drive up to 50mA, but it requires a supply of >=4.4V. Op-amp 2 in the same package is unused. The op-amps are TI 2272 low noise types.
@Robojax If you stick to the 5V voltage reference of the Arduino, it is probably better not to hard code 5V into your code. If e.g. your 5V rail is 4.8V (e.g. due to USB supply) you already have an error of 4%. Since this device features a linearity of < 1.25%, it is more robust to just say 1023 equals +100A and 0 equals -100A (that probably neglects offsets, just as an example).
Thank you so much for making this video and providing the code and library for this sensor, this will save me a ton of time and I didn't even know about all the extra calculations necessary to do accurate measurements so again thanks for adding all that to the code. I'll use your code as part of my program and do some testing and if I get it to work properly I'll give you a donation for saving me a ton of time which I appreciate very much. Ow, by the way I wanted to get the library and used the link you provide in the description and it says that the video is not available so I would appreciate a link to the library so I can download that too, thanks.
Hello, the code and library okay excep I removed the video. I will remove this video too . Here is the latest video used with library ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-sB6EULTix2k.html
Thank you for your contribution. But I think 1st you should measure the lower ending Current like 0.2A, then we can understand how much precision it is.
you are welcome. First if you are measuring 0.2A, then use 1A or 5A version. this module is not suitable for less than 10A. I have explained the error and datasheet. By the way you are you watching very old video and have written library for Allegro current sensor. use the library in this video ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-sB6EULTix2k.html
the asc758 200 amp bidirectional outputs 1mV per amp, so at 200amp I will get 2 volts out of the 5V supply voltage reference, in order not to loose precision it would be better to use a 2.5 volt exernal reference I think , it could better the accuracy ..iMHO
Nice video, I've try this sensor U-type for 50A for current sensing of DC Load that I used in a DC to AC inverter, so when the battery and inverter connected and sensed by this sensor, in serial monitor of Arduino the displayed current is unstable. I assumed the inverter used a MOSFET so the ON OFF current consumption make it unstable. Please help to solve about this case, to make stable reading on Serial monitor. thank you
Hello, yes I missed to motion that. It works and I have shown the datasheet on this page robojax.com/learn/arduino/?vid=robojax-allegro_ACS758 where you get the code
Excellent video THANKS! I have a question, can the proper current type be used to measure the charge voltage from an alternator to the battery in a vehicle? I'm thinking 100 amp since my alternator is 100 amp. I understand the problem with the high power connections and can over come that easily. I've tried a shunt type system and that did not work, even though it did fine on the test bench. This method looks much better. Thanks again!
You are welcome. Yes it can be used. I have written library for this so it can be used easily. Good luck with your project. Here is the video and Library ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-X9Ka-om9IBM.html
Great Video. So what is your recommendation on the connection to the sensor if you want to measure up to 50A DC? I want to monitor the current of a solar system. Therefore I need a reliable connection of the sensor to the cable. Thanks for the help. LW
In order to reduce the voltage drop and power loss on the wire, try to use thicker wire . Please see this page where it show AWG 10 is suitable for 55A www.powerstream.com/Wire_Size.htm. Solder it directly on the pin of the sensor.
The opamp is used as a voltage follower. "OU1" is a direct connection to the analog output of the sensor, which is only able to source 3mA or sink 1mA. "OU2" is buffered through the opamp, a TLC2272C which is able to source or sink an absolute maximum of 50mA. Even though an arduino has a high input impedance, i'd recommend to use the "OU2" solder pad.
not comment. I haven't written code for that. but if you listen to my explanation, I have left nothing without explaining. you should be able to write your code for stm32.
Here the eight better video Measuring 50A to 200A using Allegro ACS770 Current Sensor with Robojax Arduino Library ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-sB6EULTix2k.html
Hello, it seems you either missed the part that I explained or skipped the video. you can use it I belive with 3.3V. Here is the the better video where you can use the library to have clean and simple code ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-sB6EULTix2k.html or just watch the current video. you can set you sensor voltage to 3.3V.
Thanks for this video! I have use it with accurate result on an arduino uno, but when i use the same code on my "arduino uno wifi rev 2" it always said "no current"... Is there something i have to change in the code to make it work on the "uno wifi rev 2"?
you are welcome. test the Analog pin shown in this video ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-TbLdAQpE4jE.html after the issue is resolved, use this latest code and library I've written that makes the code more clean ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-sB6EULTix2k.html
cheers for this video... i got a question? i want to measure amps from solar into my 24v batts with a ads1015- may you know this board can i power/run the arduino with a buck converter from the same batts where i measure too... or does it blow up, and i need an extra power supply... thanx so far, would be nice to hear from you cheers, from the green heart of germany
Yes you can power Arduino from the same source if you bring the voltage to 15V or lower and connect to the power connector. cheers from Canada, Ahmad. Thanks
hi robojax, i have followed your instruction and set it up according to my sensor settings which is for 50B and i got negative current output after adding ESP8266, a Relay and a Microwave sensor to my project, i am not sure why, can you help me? it was a nice video tho
Cool very good your work would you have a video similar to my project? I have a screwdriver project where I use Arduino mini or attiny85. and SSD1306 mini LED display. with ACS758 50-or-200A module. of amperage. with an H Bridge and 4 touch button 2 to increase and decrease the amperage that the engine will be turned off. and 2 button to turn the motor to the left and to the right so the screwdriver will not blow the screw .... which I will tighten, be it small or large ... for arduino I only know how to write the code. thanks in advance
Hi, your projects involves so manything LED display, touch, motor, H-bridge, current sensing and pubhs buttons. I have them all but separate. you would have to put them together. Search it by clicking on Robojax under the this video and then click on "Videos" or go directly here ru-vid.comvideos
Hi robojax. I bought this sensor ACS758KCB-150B to sense AC current but the sensor only senses DC current and not AC. When a 200W AC load passes through the sensor, the Vout of the sensor still remains as 2.5V Pls help with suggestions
@@robojax it's not about the code or Library. It's the sensor itself, it the 2.5V offset never increases no matter how Amps of AC current passes through it, and I powered it with 5V
I have provided the link to the datasheet. Here once again, it is in the last pages robojax.com/download/datasheet/robojax_ACS758_current_sensor_datasheet.pdf
I have explained it fully as how it works so if you learn how it works you should be snake to do it. Check for latest video where I’ve written library to make is better
The sensor is prefect. it is the item sold as module with PCB that has issue. You can solder your own wire directly to the sensor pins and it should be fine.
I have written new library for ACS current sensor . Use the library from this latest video ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-X9Ka-om9IBM.html and I will update library to calculate energy
Hi, Here is solution. I assume you have got 4 exact module. for 1 module you have the following variables: VIN voltage_raw voltage current Everywhere you see these variables, change them to for 1 module you have the following variables: VIN1 voltage_raw1 voltage 1 current 1 Then every where these are used, make copy of them in the code for example the line that was initialy #define VIN A0 make should look #define VIN1 A0 now duplicate them for 2nd sensor like #define VIN2 A1 and (for example) the original line float voltage_raw = (5.0 / 1023.0)* analogRead(VIN); which you changed to float voltage_raw1 = (5.0 / 1023.0)* analogRead(VIN1); now make copy of it as float voltage_raw2 = (5.0 / 1023.0)* analogRead(VIN2); and do this for all 4 sensors. good luck.
@@robojax , I have changed everything so that 4 sensors are now listed and changed VIN, Voltage_raw, voltage, current, one each for each sensor, but have an error now of Arduino: 1.8.9 (Windows Store 1.8.21.0) (Windows 10), Board: "Arduino/Genuino Uno" C:\Users\Owner\OEM\Software\Libraries\sketch_aug04a\sketch_aug04a.ino: In function 'void loop()': sketch_aug04a:82:11: error: expected ';' before numeric constant voltage 1 = voltage_raw1 - QOV + 0. 007 ;// 0.007 is a value to make voltage zero when there is no current ^ sketch_aug04a:83:13: error: expected ';' before numeric constant voltage 2 = voltage_raw2 - QOV + 0. 007 ;// 0.007 is a value to make voltage zero when there is no current ^ sketch_aug04a:84:15: error: expected ';' before numeric constant voltage 3 = voltage_raw3 - QOV + 0. 007 ;// 0.007 is a value to make voltage zero when there is no current ^ sketch_aug04a:85:17: error: expected ';' before numeric constant voltage 4 = voltage_raw4 - QOV + 0. 007 ;// 0.007 is a value to make voltage zero when there is no current ^ sketch_aug04a:86:17: error: expected initializer before numeric constant float current 1 = voltage 1 / FACTOR; ^ sketch_aug04a:87:17: error: expected initializer before numeric constant float current 2 = voltage 2 / FACTOR; ^ sketch_aug04a:88:17: error: expected initializer before numeric constant float current 3 = voltage 3 / FACTOR; ^ sketch_aug04a:89:17: error: expected initializer before numeric constant float current 4 = voltage 4 / FACTOR; ^ sketch_aug04a:94:18: error: 'current' was not declared in this scope Serial.print(current,2); // print the current with 2 decimal places ^ exit status 1 expected ';' before numeric constant This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.
You can not have a variable as "voltage 2" In arduino variables have no space and can't start with numbers. I am sorry I did not type or RU-vid remove it. make them voltage2, current2 etc. no space. I have made the code for you in the same page at the bottom: bit.ly/rjx-757
@@robojax, thanks for the code, i couldn't have done it myself as i am a bit unwise on coding , I have deleted "if(abs(voltage) > cutOff )" and also "else{ Serial.println("No Current"); } " Also added a missing " ; " at float voltage3// internal variable for voltage3 I have been able to calibrate each sensor by adding or subtracting at voltage1 = voltage_raw1 - QOV + 0.022 ;// 0.007 is a value to make voltage zero when there is no current voltage2 = voltage_raw2 - QOV + 0.012 ;// 0.007 is a value to make voltage zero when there is no current voltage3 = voltage_raw3 - QOV - 0.012 ;// 0.007 is a value to make voltage zero when there is no current voltage4 = voltage_raw4 - QOV + 0.007 ;// 0.007 is a value to make voltage zero when there is no current So far it is going well on bencktop test, i hope later to add a LCD readout and try and data log the data, but work is awaiting me this week. I have created a link of my changes if you want to look over it? www.dropbox.com/s/2wugj0ffdlfiw7o/4SensorsUtube.ino?dl=0
you are welcome. Yes many people have no idea of the high current concept. they think any wire can pass any current. By the way I have written library for Alegro sensors. you can see it here ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-sB6EULTix2k.html
I have shown that in the video. I don't remember now the exact model. When I explained different models I mentioned which I one was used in this video.
I watch the video at 17:11 and watched 3 times but could not read the resistor. it was not important that's why I did not mention it. We just needed to see the result form this sensor and compare it with meter.
If you see here in the datasheet on page 10 for example it show 2% error. robojax.com/download/datasheet/robojax_ACS758_current_sensor_datasheet.pdf and also it has drift of 200mA magnetic offset error. if you want to measure millampere use a sensor that measure to maximum of 5A. like ACS712 ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-3C33DpcSwIw.html
The PCB holes are to the side of pads, it's easy to sand off the paint and the pads are fairly decent. I think maybe these are higher voltage sensor for main power as they are rated to 1.2kv thus a thinner wire be typical with main power, but still too small for decent mounts. 50a PCB screw mounts would fit if that is your limit. Is the ou1 for 5v and ou2 for 3.3?
you would do something if (current >2.5){digitwlWrite (8, HIGH). 2.5 is the current you want to control pin 8 that is connected to relay. If your relay module is low triggered, then use LOW instead of HIGH. I assumed "current" is the variable holding the current value. Watch the video to see which variable has the value of current.
@@robojax Thanks. Can ACS758 measure small current via Arduino Uno in the range of 1mA to 1000mA value both in AC and DC current? Can you please suggest a part number of ACS758 that can measure small current accurately? THANKS!
@@anythingunderthesun9930 the nojse is 10mv/A but the error is 2 precent of full scale, so 1A for the smallest 50A version. As a result you'll get more accurate readings as the current increases
This is exactly why I'm asking because those connectors on that IC seem too thin. Even the 200A one is very thin compared to a 200A wire. I'm a little bit sceptical. Thanks
Thank you for pointing this important fact which I have not mentioned. It works with AC and DC and I have updated the page (where the code is) on Robojax.com to display that.
Hi for AC measuring the advance codes don´t work propely :( with the basic code I get values pretty close ) using the Output Voltage 1 because using the OV2 the readings are crazy even without any consuption. in the serie monitor I get always two readings... one positive and other negative what makes sense because I reading AC current, check readings : ibb.co/n8JjsWF
Hi, You can increase the delay time in loop so it read much slower. Or change the cufOFFLimit float cutOffLimit = 1.00;// so ignore the values you don't need. But the best option would be to get the average of reading of let's say 10 reading or 100 reading and average it. there are tones of loop code the average the reading available. You can can find it for Temperature and other parameters.
what what current measurement you are getting 0.005? if at zero. Then it is about right. Check the main voltage to the VCC pin using a multimeter. snag.gy/AHhRpV.jpg