#321

  Переглядів 353,913

Andreas Spiess

Andreas Spiess

4 роки тому

Measuring current is simple. Right? You just take a multimeter, connect it to the two cables, and read the value.
If you want to do the same with a Microcontroller like an Arduino or an ESP, things get a little more complicated. Let’s dig into it to see how it works! And which is the best sensor for our projects?
Sensors in the video:
MAX4080: s.click.aliexpress.com/e/_Dku...
INA169: s.click.aliexpress.com/e/_dVM...
INA219: s.click.aliexpress.com/e/_Dn0...
INA3221 (order black module): s.click.aliexpress.com/e/_DlW...
ACS712: s.click.aliexpress.com/e/_dS7...
ACS758: s.click.aliexpress.com/e/_d66...
WCS1800: s.click.aliexpress.com/e/_Ddf...
The links above usually are affiliate links that support the channel (no additional cost for you).
Supporting Material and Blog Page: www.sensorsiot.org
Discord Channel: / discord
Github: www.github.com/sensorsiot
My Patreon Page: / andreasspiess
If you want to support the channel, please use the links below to start your shopping. No additional charges for you, but I get a commission (of your purchases in the next 24 hours) to buy new stuff for the channel
My Amazon.com shop: www.amazon.com/shop/andreassp...
For Banggood bit.ly/2jAQEf4
For AliExpress: bit.ly/2B0yTLL
For Amazon.de: amzn.to/2r0ZCYI
For Amazon UK: amzn.to/2mxBaJf
For ebay.com: ebay.to/2DuYXBp
profile.php?...
/ spiessa
www.instructables.com/member/...
Please do not try to Email me or invite me on LinkedIn. These communication channels are reserved for my primary job
As an Amazon Associate, I earn from qualifying purchases

КОМЕНТАРІ: 866
@mjohn414
@mjohn414 4 роки тому
Ohm's Law: I = U / R
@AndreasSpiess
@AndreasSpiess 4 роки тому
You are right !
@VincentFischer
@VincentFischer 4 роки тому
For fans of the streetfighter franchise it's quite easy to memorize: RI=U
@markusmohr5470
@markusmohr5470 4 роки тому
@@VincentFischer Or for the Swiss: U = RI
@keithroberts5946
@keithroberts5946 4 роки тому
@@markusmohr5470 I was taught I = V/R Same but different symbols
@L-36
@L-36 4 роки тому
I learned V = I * R. Pretty basic.
@JohnBackstrand
@JohnBackstrand 4 роки тому
That hand-pointer is hilarious!
@AndreasSpiess
@AndreasSpiess 4 роки тому
Thank you!
@MPElectronique
@MPElectronique 3 роки тому
Yeahh
@yeahnah6468
@yeahnah6468 4 роки тому
I really like that you explain in detail the reasons for not doing things a certain way, rather then just telling us how to do things correctly the first time. I find it helps me understand things a lot better when I know the 'why not' as well as the 'how to'. Thank you for sharing your knowledge in such a high quality manner!
@AndreasSpiess
@AndreasSpiess 4 роки тому
Thank you for your nice words!
@altamiradorable
@altamiradorable 4 роки тому
As always, this video is torough, detailled and exact !! Thanks Andreas ! Your work is greatly appreciated !
@AndreasSpiess
@AndreasSpiess 4 роки тому
Many thanks!
@Watchyn_Yarwood
@Watchyn_Yarwood 4 роки тому
An enormous THANK YOU to all UKposts content creators for providing all of us with additional content during this very trying time! I can only speak for myself when I say you are helping me retain what little sanity I have left having been sheltered in place for the last 2 1/2 weeks!!
@AndreasSpiess
@AndreasSpiess 4 роки тому
Thank you for the nice words. We are glad to help!
@antoinep.7420
@antoinep.7420 4 роки тому
Thank you very much Andreas. Yesterday evening I was looking at these types of sensors to improve my project. And today there is your video ! Did you hear me from switzerland !?!? ^ ^ Perfect in timing !
@AndreasSpiess
@AndreasSpiess 4 роки тому
I asked Google what you weree searching yesterday and adapted the viceo accordingly ;-)
@muhammadshakil3723
@muhammadshakil3723 4 роки тому
I was researching for few months on measuring mains current and voltage. Finally your video. I have seen almost all video. But no video explains as you did. I needed this video a month ago. So that would reduce lot of my hard work.
@AndreasSpiess
@AndreasSpiess 4 роки тому
Sorry that I was too late!
@Creative884_
@Creative884_ 4 роки тому
This is exactly what I need for power data logging project of measuring voltage & amperage over time 👍 love this channel & thank you for all the hard work you put in to produce your videos.
@AndreasSpiess
@AndreasSpiess 4 роки тому
Glad to read that you can use the content!
@Tom_Seeker
@Tom_Seeker 4 роки тому
@@AndreasSpiess Is it possible to cover power measuring sensors with data logging function in future?
@AndreasSpiess
@AndreasSpiess 4 роки тому
I do not think so because we build our loggers ourselves ;-) So the topic is probably too special for most of my viewers.
@sahilyadav998
@sahilyadav998 4 роки тому
Love your video Mr. Spiess. I am a mechatronics student. I am always able to solve most of my problems and improve my designs just by getting inspiration and knowledge from your videos. Keep up the good work sir and stay safe.
@AndreasSpiess
@AndreasSpiess 4 роки тому
Fantastic! I have not problems wit hCovid-19 because I live in the basement while creating videos ;-)
@SimjetAU
@SimjetAU 4 роки тому
Another super informative video ...I have just gone though this with a project for work although I opted for the ACS 758 higher powered version for my application. It does work very well though as our devices range from 0-13 and 0 to 20 amps.
@AndreasSpiess
@AndreasSpiess 4 роки тому
Thank you for sharing your experience!
@danimatronics1628
@danimatronics1628 3 роки тому
Well presented. I've been using ACS712 sensors in a solar test bed monitoring project for several years now. Lower precision works ok over time, and a single sensor measures battery charge and discharge.
@AndreasSpiess
@AndreasSpiess 3 роки тому
Thank you for sharing your experience!
@whitefields5595
@whitefields5595 4 роки тому
Thanks Andreas, I want to measure the current used by a small brushless motor inside a tank to not only sense when it is running but also for diagnostics in case it stalls. This video just at the right time!
@AndreasSpiess
@AndreasSpiess 4 роки тому
Glad you can use it!
@ScienceFunInnovations
@ScienceFunInnovations 4 роки тому
Looking forward to using some of these sensors in future projects. Thanks!
@AndreasSpiess
@AndreasSpiess 4 роки тому
Have fun!
@tomkinsg
@tomkinsg Рік тому
you videos are such a wonderful resource on the internet. thank you Andreas. Love your country - spent many days leading boy scouts around the country from Kandersteg.
@AndreasSpiess
@AndreasSpiess Рік тому
Thank you for your kind words! You chose a nice place to judge about our country ;-)
@JeffsTravels
@JeffsTravels 4 роки тому
Excellent video. I also appreciate your excellent Spanish subtitles. As a hobbyist playing with electronics who has a need to learn Spanish, I find your videos extremely useful.
@AndreasSpiess
@AndreasSpiess 4 роки тому
The subtitles are made by Luciana, my Translator.
@Zhaymoor
@Zhaymoor 2 роки тому
your channel is the first place to start searching whenever I need something practical and advanced ! ,, thank youuuuuuu man I wish I can meet you someday.
@AndreasSpiess
@AndreasSpiess 2 роки тому
Happy to help! You are also one of my most loyal subscribers!
@jonathanfulcher602
@jonathanfulcher602 4 роки тому
Hi, great video. Right now I am working on a Design, that needs current measurement. I choose the TLI4970, which can do up to 50A bidirectionally, at very low heat losses. It outputs a clean 16-bit digital signal.
@AndreasSpiess
@AndreasSpiess 4 роки тому
An interesting part. An "INA219" with a hall sensor! Good choice.
@Delali
@Delali 4 роки тому
This is a very informative video. Just when i was deliberating on which sensors to choose for my power measuring projects. Thanks for this Mr. Spiess
@AndreasSpiess
@AndreasSpiess 4 роки тому
You are welcome!
@Tom_Seeker
@Tom_Seeker 4 роки тому
This is a video I've been waiting for ! looking to create a voltage/current/power consumption device.
@AndreasSpiess
@AndreasSpiess 4 роки тому
Good luck with your project!
@alexandern8671
@alexandern8671 4 роки тому
Thanks Andreas for another useful and detailed video. Just to mention that the Adafruit script would give the correct bus/load values if you swapped the wires connected to the shunt.
@AndreasSpiess
@AndreasSpiess 4 роки тому
You are right. When I made the video I did not yet recognize that the INA219 can measure current in both directions :-(
@christopherguy1217
@christopherguy1217 4 роки тому
Great video, I like the sensor that can be used without having to cut the wire as I could measure energy consumption of my appliances or circuits.
@AndreasSpiess
@AndreasSpiess 4 роки тому
Thank you!
@AndrewGillard
@AndrewGillard 4 роки тому
Just bear in mind that, just as with clamp-style multimeters and current transformers in general, you have to pass *only one* of the current-carrying wires through the loop of the sensor. So for an AC mains appliance you can pass through the sensor EITHER the line wire (aka live/phase/hot) OR the neutral wire (aka return), and most of the time that still requires modifying the cable (at least to remove the outer layer of insulation for countries/appliances that use double-insulated mains cables) or creating some kind of adapter that you can plug the appliance in to. If you were to pass a mains-powered appliance's cable as a whole through such a sensor it would read zero - or at least close to zero - as the field generated by the current flowing one way in the line wire would be cancelled out by the opposite current in the neutral wire. (There may be a small non-zero reading as a result of sensor error, any current leaking to earth external to the cable [hopefully none!], and - I'm not at all sure about this - maybe even non-unity power factor from capacitive/inductive loads, such as motors, switch-mode power supplies, etc.) And actually, all of these sensors have limited value for measuring mains AC appliances for two reasons: all they tell you is the current - and is that RMS current or the instantaneous current at the time your MCU decided to make a reading? After all, the current draw of most AC appliances goes up and down alongside the sine wave of the voltage! Without knowing the supply voltage, you can't know the power consumed, which is often what we're more interested in. Yes you can estimate the supply voltage at 100/110/115/120/220/230/240V RMS nominal (any I missed there?! 😹), but in practice that varies throughout the day, and thanks to the nightmare that is power factor, unless you know the true, not-RMS voltage (i.e. the exact point on the voltage sine wave - between ±141V [100V RMS] and ±340V [240V RMS]) at the moment the current was measured, at best you're probably only calculating apparent power, not real power; see en.wikipedia.org/wiki/Volt-ampere I've used some smart-home-style current-transformer clamp-based devices that are designed to be clipped around one of the wires leading to/from the house's electricity meter, and I found that they differed from the correct value (as measured by the electricity meter itself) by 20-30%, which I figure is mostly because they have no reference to the mains voltage, so they have to rely on an estimate of the RMS voltage and *a complete guess* at the house's overall power factor! :S
@dzengineeringsolutions3660
@dzengineeringsolutions3660 3 роки тому
@@AndrewGillard very clear thank you for these details
@SVader11
@SVader11 3 роки тому
I'm about to start a design for a current data logger. Glad I found this video. Thanks!
@AndreasSpiess
@AndreasSpiess 3 роки тому
Glad it was helpful!
@tonysfun
@tonysfun 4 роки тому
Just what I was looking for! You are reading my mind! Thanks again Andreas!!!
@AndreasSpiess
@AndreasSpiess 4 роки тому
Perfect! I hope everything is ok on your side? Covid-19 maybe has a long way to get to Lincoln, so you might be lucky ;-)
@tonysfun
@tonysfun 4 роки тому
@@AndreasSpiess The neighbor across my house returned week ago from hospital, almost died, he had Covid-19! I spoke to his wife, about 5 meters away, and she did not get it or did not have any symptoms at all - like many people, who had it not knowing at all. And I hope you are staying safe also, I don't like you get it at all! Have a great Sunday!
@Helmchen81
@Helmchen81 4 роки тому
Endlich ein Video was genau mein aktuelles Projekt betrifft... Solarzellen, Laderegler, Batterien, Verbraucher... Super Video
@AndreasSpiess
@AndreasSpiess 4 роки тому
Danke! Nun sollten wir nur noch ins Do-it-Yourself gehen dürfen...
@exmachina4971
@exmachina4971 4 роки тому
@@AndreasSpiess Na zum Glück stellt die Post noch von AliExpress zu ;-P.
@JoshuaJayG
@JoshuaJayG 4 роки тому
I use the LTC4151 as a current sensor for my home off-grid solar system. I use two per shunt to give me bi-directional current sensing. Not a cheap chip but great for my setup.
@AndreasSpiess
@AndreasSpiess 4 роки тому
Thanks for sharing your experience!
@jasonpluis3493
@jasonpluis3493 4 роки тому
Very timely. I am a novice using a small 5v solar panel to power an Arduino and LoRa unit. I think the current drops too low when shady, so it will useful to implement one of these units to track current and only try to send comms when enough current is available. Thanks!
@ciarfah
@ciarfah 4 роки тому
Jason Pluis adding a battery helps, but luckily you're on the right channel to find out about this sort of thing!:)
@AndreasSpiess
@AndreasSpiess 4 роки тому
Without a battery it is probably easier to use the analog input and decide on the voltage at startup.
@rdagger
@rdagger 4 роки тому
I recommend you take a look at the INA260. It’s I2C and works on 3V or 5V logic. It can measure up to +36VDC at 15A continuous on either high or low side using a 2 mΩ sensing resistor.
@AndreasSpiess
@AndreasSpiess 4 роки тому
Another viewer suggested this part, too. Very nice, but not cheap ;-)
@exmachina4971
@exmachina4971 4 роки тому
@@AndreasSpiess true, it's not cheap, but come on as a Swiss you are used to that. 😜 But jokes aside, it is very precise and has a very low resistor value. So the voltage drop is minimal and the measurement range is huge.
@46I37
@46I37 4 роки тому
I’ve used this part in a commercial 1kwh 24v battery pack. It performs very well.
@CollinBaillie
@CollinBaillie 3 роки тому
I've watched quite a few of your videos, but this one, earned a subscription! Trying to design a DC power supply with 30v/5A on 2 channels, which can be run in series for 10A, and using a 3.3v MCU as the controller, so I think I'll be looking at hall sensors!
@AndreasSpiess
@AndreasSpiess 3 роки тому
Good luck with your project! Seems to be nice.
@steveroberts1861
@steveroberts1861 3 роки тому
Thanks Andreas. This was a very useful test.
@stevepettitt3520
@stevepettitt3520 2 роки тому
Fine video. I chose to use a now obselete Infineon device, the TLI4970 range. This enabled me to resolve 6.25mA yet still measure 25 amps bidirectionally. I was far from perfect in that it used an SPI interface to obtain the current measurement but a one-wire style bus to minimise bandwidth (needed to get the fine resolution).
@AndreasSpiess
@AndreasSpiess 2 роки тому
6mA on 25A is impressif!
@temyraverdana6421
@temyraverdana6421 4 роки тому
Thank you I like it. I like the arrow direction of Power Source too.
@AndreasSpiess
@AndreasSpiess 4 роки тому
You're welcome!
@PeterIllmayer
@PeterIllmayer 4 роки тому
Greate video mate. You have a great gift to educate, throughly enjoy the videos and it keeps me making...
@AndreasSpiess
@AndreasSpiess 4 роки тому
Thank you for your nice words!
@OmarMekkawy
@OmarMekkawy 4 роки тому
Nice video as usual. I think that I have tried the INA219 Before and it measures the current in ( Bidirectional + and - ) without no problems. You could connect it to a battery and ( sink , source ) current.
@daque1960
@daque1960 4 роки тому
Omar Mekkawy I just checked the data sheet and it does have a sign bit. Also I'm pretty sure I hooked my leads up backward when my mAh tester project the first time and I did get negative current readings when the supply read lower than the load.
@AndreasSpiess
@AndreasSpiess 4 роки тому
You are right. My mistake!
@daque1960
@daque1960 4 роки тому
Andreas Spiess, I should have read more of the comments. You stay safe!
@OmarMekkawy
@OmarMekkawy 4 роки тому
@@AndreasSpiess never mind. you are welcome.
@shadow7037932
@shadow7037932 4 роки тому
I've been using ACS724 carrier boards from Pololu and they've been great for my projects.
@AndreasSpiess
@AndreasSpiess 4 роки тому
Thank you for sharing your experience. I assume they are similar to the ACS712?
@fpaolo63
@fpaolo63 4 роки тому
Great introduction lesson !!! May I suggest a lesson on physical values representation on uC. I think to many people are using real and double to perform math stuffs evenif ADC and DAC have usually 10-12 bits + quantization/linearity error. Proper 16/32 bits integer math could be enough ( remember first Bosch engine/break control unit was based on 8bit uC)
@AndreasSpiess
@AndreasSpiess 4 роки тому
Maybe a topic for a quickie...
@electronic7979
@electronic7979 4 роки тому
it was an educational and useful video. I watched every second with pleasure.
@AndreasSpiess
@AndreasSpiess 4 роки тому
Glad you enjoyed it!
@JosePetri
@JosePetri 3 роки тому
Hi! Great video! I have tried some of those sensors, but now I will try the hlw8032 for AC power, looks like it can measure current, voltage, power factor etc... looks promising =]
@AndreasSpiess
@AndreasSpiess 3 роки тому
Maybe you watch my today's video ;-)
@gregortidholm
@gregortidholm 3 роки тому
Amazing video's! Thank you for sharing your knowledge and all the time you put in to these projects!
@AndreasSpiess
@AndreasSpiess 3 роки тому
My pleasure!
@josefknaus9709
@josefknaus9709 4 роки тому
As always. A very good overview of available components. You asked for other current measurment needs. Right now I am looking for a 3 phase AC mains measurement sensor/device with one MQTT "result" = +/- Current Power Consumption. Finaly. AC current measurment and power calulation with coils. In case of enough Solar PV power I would like to control the boiler heater with it. Yes, there are final products on the market. Including thyristor output. Some of the power meter do not have an output. Often the Output is very slow. openenergymonitor would be a way to go. Some chinese Powermeter offer products with MODBUS. But in most cases no CE conformity.
@AndreasSpiess
@AndreasSpiess 4 роки тому
I did not cover mains in particular. There you get other sensors. But I have no overview.
@Paul_VK3HN
@Paul_VK3HN 4 роки тому
Excellent explanation. I just proved your point on destroying an INA169. I put +12v across a 50 ohm RF dummy load from a bench supply with the INA in series. I took the +5v for the INA169 from the 5v pin on a Nano. The Nano was powered from USB. Worked for a while, until I lifted the load. Poof! Unfortunately when it fails it shorts the shunt to ground. Make sure your power supply is current limited.
@AndreasSpiess
@AndreasSpiess 4 роки тому
Shit happens... Fortunately they do not cost a fortune...
@maxxir6365
@maxxir6365 4 роки тому
As always very valuable video! Thanks Andreas.
@AndreasSpiess
@AndreasSpiess 4 роки тому
Glad you liked it!
@dorukbu3133
@dorukbu3133 4 роки тому
I would really like to have your opinion on changing INA 219s shunt resistor for different loads and voltages. I absolutely love your videos. You are a beacon to self- made specialists and electronics entrepreneurs.
@AndreasSpiess
@AndreasSpiess 4 роки тому
Just change the resistor and do the calculations according ohms law (the right one, not mine ;-)
@herdi1510
@herdi1510 Рік тому
6:52 Thank you professor. I thought it is just me who thinking to replaced current sensor with two or more resistor
@AndreasSpiess
@AndreasSpiess Рік тому
:-)
@DanielBates2
@DanielBates2 4 роки тому
I think you'll find low-side shunt based monitoring fairly common actually! 20:20 INA210 and LMP8603 for starters. If using external shunt the safety benefits are great enough to warrant the loss of short-circuit detection the high-side offers (which is another plus for high-side not mentioned).
@AndreasSpiess
@AndreasSpiess 3 роки тому
You might be right. But I do not like to cut ground wires...
@DanielBates2
@DanielBates2 3 роки тому
@@AndreasSpiess One context for using a low-side shunt is when you have panel mounted shunts a distance away from the monitor. It's safer to then have the shunt sensing leads routed to the monitor because they're nearer ground potential. Not sure if it's a matter of personal taste :)
@zikermu
@zikermu 3 роки тому
Thanks a lot for these excellent and educationnal presentation .Everything is clean ( the swiss quality of course ) , even the hand-pointer :D .
@AndreasSpiess
@AndreasSpiess 3 роки тому
The hand seems to have a lot of fans...
@Aman-to1nj
@Aman-to1nj 4 роки тому
In the both first cases if the load circuit is different from the measuring circuit i.e. you power the load and the measuring system(here arduino)with two seperate inputs ,you can use the potential difference between the small resistor to detect the current in the load circuit.
@AndreasSpiess
@AndreasSpiess 4 роки тому
You are right.
@vadimzhdan3293
@vadimzhdan3293 4 роки тому
Cool video, all in one place assembled.
@AndreasSpiess
@AndreasSpiess 4 роки тому
Thank you!
@MadHatter764
@MadHatter764 4 роки тому
This is good timing...I just got my ACS712 analog sensors in and was testing them and they did not show 2.5V at zero current. Reading up on this, I found that they need a precise 5V vcc to guarantee 2.5v at zero. I stuck a 7805 to deliver precise 5V to it and voila, it worked precisely as expected. You should mention that. The INA226 sensors dont seem as sensitive, they must have a 5V zener reference for their ADC or something like that.
@AndreasSpiess
@AndreasSpiess 4 роки тому
I assume the INA219 has a built-in voltage reference. The ACS chips not.
@cezarcatalin1406
@cezarcatalin1406 4 роки тому
You can measure incredibly small currents with the hall sensors by putting an inductor with more turns near it. There are also some self-oscillating inductor types that measure current through a transformer.
@AndreasSpiess
@AndreasSpiess 4 роки тому
This seems to be a quite complex procedure. But you are right. It seems to work.
@noahbjohnson1064
@noahbjohnson1064 3 роки тому
Just ordered a couple samples of the INA260 that has an internal shunt and i2c. Can't wait to see how this compares!
@AndreasSpiess
@AndreasSpiess 3 роки тому
They for sure are ok...
@ErnestDuarte
@ErnestDuarte 3 роки тому
I wish you would have tested the INA260. That seems like a sweet ic. Great videos 📹 ! I appreciate you sharing your knowledge. 👍
@AndreasSpiess
@AndreasSpiess 3 роки тому
You are right, it is a good chip. Welcome on the channel, BTW.
@russellallsop9863
@russellallsop9863 3 роки тому
Hi Andreas, many thanks for your informative videos. When testing the INA169 you increased the voltage but the current remained constant, as per Ohm's the current and voltage are directly proportional there the current should increase when the voltage increases. Looking forward to your reply, Russell
@goldrushjkgh
@goldrushjkgh 4 роки тому
I work as a hardware design engineer and tbh high side current sensing is almost always preferred on our circuits for various reasons. We use opamps from TI specifically for this.
@AndreasSpiess
@AndreasSpiess 4 роки тому
I also do not like to cut ground wires...
@lohikarhu734
@lohikarhu734 4 роки тому
The probkem has been, typically, that you need to measure voltages that are higher than the V+ in the DUT, in case where you are measuring your 'own' current consumption, which is a probkem for most amplifiers... of course, low-side measurements make the V- a bit 'floating', but the voltages being measured are referenced to 'ground', making noise suppression easier... high-side measurements also affect the apparent V+ of the DUT. Lots of considerations to make, almost all of them introduce some compromise in the DUT performance/stability, or bandwidth, or sensitivity, or dynamic range, or... I spent a few years doing this stuff...
@ericmc6482
@ericmc6482 4 роки тому
Which opamps please.
@OmarMekkawy
@OmarMekkawy 4 роки тому
which part number are you using ?
@goldrushjkgh
@goldrushjkgh 4 роки тому
@@OmarMekkawy OPA192
@zeuss194
@zeuss194 4 роки тому
what a timing man ! I was looking for an alternative to usual precision shunt. I have to measure huge variation a current from few mA to 30 amps and classic resistor shunts have theres limits
@AndreasSpiess
@AndreasSpiess 4 роки тому
That is not easy. Most concepts use fast switching shunts for that purpose. I covered this issue for smaller currents in the video I suggested.
@spinjector
@spinjector 3 роки тому
Thank you. This is an excellent video; very informative.
@AndreasSpiess
@AndreasSpiess 3 роки тому
Glad you enjoyed it!
@kitecattestecke2303
@kitecattestecke2303 4 роки тому
Thank you! Very informative Video!
@AndreasSpiess
@AndreasSpiess 4 роки тому
Glad you enjoyed it!
@BerndFelsche
@BerndFelsche 4 роки тому
I used a current transformer to measure AC current drawn by a refrigeration compressor. It was quick and sensitive enough to detect the inrush surge upon start. (This led to a hurried code patch to ignore the excess current for a number of mains cycles after compressor start.) Accuracy was good enough for the application. Better than 50mA according to an uncalibrated AC meter. A few code tricks to get the "RMS" current from the sine wave... detecting zero-cross points for mains frequency and therefore when to measure the "RMS" current.
@AndreasSpiess
@AndreasSpiess 4 роки тому
Maybe I will come back to you with the "RMS tricks" when I prepare a AC current video...
@spkumar2004
@spkumar2004 2 роки тому
It's really great walkthrough, thank you
@AndreasSpiess
@AndreasSpiess 2 роки тому
Glad you enjoyed it!
@sasha.djordjevic3071
@sasha.djordjevic3071 4 роки тому
Great in depth video 👌
@AndreasSpiess
@AndreasSpiess 4 роки тому
Appreciate it!
@RoyvanLierop
@RoyvanLierop 4 роки тому
You should have a look at a company called LEM, I thought they have a production plant in Switzerland. I also missed the distinction between open-loop and closed-loop hall based sensors.
@AndreasSpiess
@AndreasSpiess 4 роки тому
I looked at their products. It seems to be a very special product for precision usage. The principle is interesting, but nothing for this channel.
@ajaybnl
@ajaybnl 4 роки тому
Good One. INA219 is cheap and idle for a ( miliamp ) diy Amp Meter. Thanks for your videos.
@AndreasSpiess
@AndreasSpiess 4 роки тому
You're welcome
@adamhaycroft5610
@adamhaycroft5610 10 місяців тому
Wish i stumbled across this video earlier, what an excellent practical introduction! Wish i'd found you earlier would have saved me a while load of googling time.
@AndreasSpiess
@AndreasSpiess 10 місяців тому
Welcome aboard the channel!
@juergenschimmer960
@juergenschimmer960 4 роки тому
As always a very nice Video and i only have to disagree at a single Topic. At 5:50 you say you have to suply a +- Supply-Voltage to the Opamp. Because all Voltages at the Opamp in the inverting configuration in this Messurment-Circuit are at Zero ore in the positive Range it is sufficient to use only a posetive Supply when You use an Rail-to Rail Opamp. ( The Inputs have to work only from the Negative Rail, without Output Phase−Reversal, the Output would have to work from the negative Rail for the Minimum Current You can messure) You might use even a cheap opamp like the LMV321. Thank You very much for this informative Video.
@AndreasSpiess
@AndreasSpiess 4 роки тому
You are right. If you connect the ground of the op-amp to the battery the inputs would be positive.
@w6wdh
@w6wdh 4 роки тому
Andreas Spiess No, you can connect the ground (negative power supply) of the op amp to the Arduino ground. You connect the (+) input of the op amp and the op amp negative power supply to the Arduino ground. You connect the op amp positive power supply to the high side power. You connect, say, a 10K ohm resistor between the power source low side and the op amp (-) input. You connect the same value (or larger, to scale up the output) resistor from the (-) input to the op amp output. This will invert the negative voltage across the 10 ohm resistor to a positive voltage at the op amp output. The op amp drives its output to make the voltages at its (-) and (+) inputs equal: both end up at zero volts (Arduino ground). Thus all the op amp input and output voltages are zero or positive - quite legal! Notes: I have built this circuit and used it in past projects to sense negative voltages with only a positive power supply for the op amp. It works. Carefully read prospective op amp data sheets to select one where the common mode input range includes zero or slightly negative input voltages. This will be true for most op amps that have “Rail-to-Rail” inputs. You also want an op amp with an output range that includes zero volts. This will be true for op amps with “Rail-to-Rail” outputs. Select an op amp that has clamp diodes on its inputs, thus guaranteeing the (-) input cannot go very far negative. The 10K ohm input resistor will limit any transient input currents to the op amp (-) input and its clamp diodes before the op amp output settles.
@TheXJ12
@TheXJ12 4 роки тому
@@w6wdh, Andreas Spiess and Juergen Schimmer : The Rail-to-Rail feature is not even mandatory as (+) input can be biased to say 1V and the program will cancel that out with a simple I=aX+b (b being negative here). Or did I miss something ?
@TheEmbeddedHobbyist
@TheEmbeddedHobbyist 4 роки тому
I like the high-side analogue types as you can feed the output voltage in to the uP analogue input as well as its comparator input. this give the circuit the ability to kill the power on overload without waiting for the software to notice. it's good on safety grounds as it removes the software from detecting the fault current and of course still works if the software has got stuck in a loop. Oh and is faster to act.
@AndreasSpiess
@AndreasSpiess 4 роки тому
I assume this is the reason for the INA226 which has such a pin. For safety, this is for sure a good thing. One other sensor also has a comparator on board for that reason.
@TheEmbeddedHobbyist
@TheEmbeddedHobbyist 4 роки тому
@@AndreasSpiess yes it's always better to remove software from detecting faults and acting on them, better at times to act then let the software know. i know you can use interrupts, but interrupts make it harder to demonstrate that the code will always work as you cant easy test your code being interrupted in every possible place. Thank for another thought provoking video.
@bobvincent5921
@bobvincent5921 4 роки тому
Thanks, well presented and useful.
@AndreasSpiess
@AndreasSpiess 4 роки тому
Glad it was helpful!
@dl8cy
@dl8cy 4 роки тому
It's a wonderful audience here - every small mistake is recognized immediately - awesome video btw.
@AndreasSpiess
@AndreasSpiess 4 роки тому
This is the fate of the guy who stands up and does something...
@dl8cy
@dl8cy 4 роки тому
@@AndreasSpiess wer viel macht , macht viele Fehler, wer wenig macht, mache wenig Fehler, wer nichts macht, macht keine Fehler und wer keine Fehler macht wird befördert.
@AndreasSpiess
@AndreasSpiess 4 роки тому
Da hast du recht. Wahrscheinlich sitze ich deswegen immer noch im Keller ;-) Aber ich bin zufrieden.
@kitamuram4389
@kitamuram4389 2 роки тому
Very comfortable to me to understand and also I think that things close to the camera on your hand will move too roughly to try to view., very sincerely
@PhG1961
@PhG1961 4 роки тому
Excellent video ! Also just in time as I'm working on a voltage/current/power project right now. I know what to do now as soon as the Corona restrictions are over... Stay healthy ! We want to see many more of your projects/videos. Who else is going to entertain and inform us on a Sunday morning... ?! Ok, my wife... maybe for entertainment... but for the rest... ;-)
@AndreasSpiess
@AndreasSpiess 4 роки тому
Pay attention. Maybe she wants to know what her husband is watching every sunday morning and reads the comment ;-) We all wait till the do-it-yourself shops are open again!
@jordig3412
@jordig3412 3 роки тому
really good video, thanks Andreas
@AndreasSpiess
@AndreasSpiess 3 роки тому
You are welcome!
@NotMarkKnopfler
@NotMarkKnopfler 4 роки тому
Very interesting video Andreas. Thank you. What would you recommend for measuring industrial current loops (4-20mA @ 24V)? I'm just using a simple resistor in my circuits and measuring the volt drop, but something a little more sophisticated would be desirable. Thank you again. Greets from Scotland 👍
@AndreasSpiess
@AndreasSpiess 4 роки тому
I assume all the "type 1" sensors would give you results. The hall sensors probably are not sensitive enough.
@irvingc4255
@irvingc4255 3 роки тому
Look at the RCV420 IC from Burr Brown/Ti, a much better solution, that converts 4-20mA to 0-5v. With an external 16bit ADC i2c such as ADS111x this is a robust solution. www.ti.com/lit/pdf/sbvs019
@Shim267
@Shim267 4 роки тому
I'm in the process of making a home brew DC load right now so videos like this are especially handy!
@AndreasSpiess
@AndreasSpiess 4 роки тому
Glad it was helpful!
@gacherumburu9958
@gacherumburu9958 4 роки тому
Thanks for the info!
@AndreasSpiess
@AndreasSpiess 4 роки тому
You are welcome!
@smokesmoker4301
@smokesmoker4301 2 роки тому
Vielen Dank! Genau der richtige input!
@AndreasSpiess
@AndreasSpiess 2 роки тому
Bitte, gern geschehen!
@stevensgarage6451
@stevensgarage6451 3 роки тому
I have an acs712 monitoring 110v for over/under current to my greenhouse. Been perfect
@AndreasSpiess
@AndreasSpiess 3 роки тому
Very good application. Thanks for the feedback!
@mutzbunny
@mutzbunny 4 роки тому
I watch your videos more and more, so I can get good with your accent... At the first time it was horrible, but your knowlage is huge! I build myself many cool projects. I like your and great Scott's videos, because its so great to Learn things. Ok sorry it's pretty late and my brain is already gone asleep, Im sorry for my bad English writing...
@AndreasSpiess
@AndreasSpiess 4 роки тому
Thank you!
@tatoute1
@tatoute1 4 роки тому
For alternative current, there is also clamps without hall effect, only transformer-like, for example SCT-013-000. And they can be clipsed around existing wire, perfect for measuring AC without even disconnecting anything. One may take precautions to over and under voltage if used with some arduino analog input. Combined with a small voltage transformer it can allow to measure power.
@AndreasSpiess
@AndreasSpiess 4 роки тому
Maybe I will make a video about AC current measurement in the future.
@chuxxsss
@chuxxsss 4 роки тому
Use to hate flowing earths myself. Hope you are well Stay safe.
@AndreasSpiess
@AndreasSpiess 4 роки тому
Here the worst seems to be manageable. The new infections are constant. The hospitals still have lots of capacity...
@manu808
@manu808 4 роки тому
Hi Andreas, do you know some chip option to measure current bidirectionally? I mean when a battery is charging and when the same battery is discharging. Thank you
@dubravkohubak5387
@dubravkohubak5387 2 роки тому
on esp32, you put adc reference to 1.1v. Then use a diode between adc input and ground, and 50k resistor between 3.3v and adc input. This will set the diode voltage drop (cca 0.5v) as your referent zero. Then you can use a shunt on battery negative side without the loss of resolution. With some noise cancelation and polynomial calibration coding, you get a pretty good +/- current meter. I'm using that on a solar system with 60A both ways ;)
@AndreasSpiess
@AndreasSpiess 2 роки тому
Interesting concept. Thank you for sharing!
@KirillStolyarov
@KirillStolyarov 4 роки тому
Andreas, i admire your videos. Here i would suggest to include Current transformers connected to builtin adc. Like the last one.
@AndreasSpiess
@AndreasSpiess 4 роки тому
I did not cover AC in this video. Maybe I will do one in the future...
@TheChaps83
@TheChaps83 4 роки тому
Thanks for the nice video ! However I have a few points about INA219 : - INA219 is bidirectional, it is in the title of the datasheet - It can do the power calculation itself, it has register to read it - It can be low side, but you loose voltage and power measurement (prefer INA220 to do this) - Two versions are available, A with 1% accuracy and B with 0.5% accuracy. By-ye :)
@AndreasSpiess
@AndreasSpiess 4 роки тому
You are right with the bi-directional. I did not know it and di not read the ".." manual. But I do not like to cut ground wires. That is probably why I did not even look at this possibility.
@TheChaps83
@TheChaps83 4 роки тому
@@AndreasSpiess I used to monitor charge and discharge so I remembered positive and negative currents. I prefer the High side measurement too. Thanks for the reply ;)
@andreauseche8189
@andreauseche8189 2 роки тому
This whole review is saving my solar cell project. Thank you so much for creating this content! I have a question: can the INA219 measure currents in the order of *micro* amp? (1.5uA is the reading I'm grtting on my multimeter from the solar cell I have)
@AndreasSpiess
@AndreasSpiess 2 роки тому
The INA219 does not measure current. It measures voltage across a shunt resistor. For small currents you can increase the resistor value. But then it has other disadvantages. Maybe you watch my videos about deep sleep (e.g. ukposts.info/have/v-deo/hIVzbIiOsbB9uJc.html ) Anyway, I do not think that uA in a typical solar project are important because you probably need at least mA to charge the battery. So you probably need more sun or a bigger panel.
@andreauseche8189
@andreauseche8189 2 роки тому
@@AndreasSpiess 1000 times thanks for the help!
@loupitou06fl
@loupitou06fl 4 роки тому
very informative video - one followup question, what sensor would you choose to measure the current delivered to a 3 phase motor from an inverter, should I use a hall voltage on the mains of the VFD or rather a hall or in-line sensor on one of the 3 legs (phase) from VFD to motor ?
@AndreasSpiess
@AndreasSpiess 4 роки тому
So far I have no experience with AC current measrurement. So I cannot help :-(
@nashaut7635
@nashaut7635 4 роки тому
Thanks for this interesting comparison, Andreas. On a side note, I have considered the ACSxxx sensors for use with a PC power supply that I would mod as an independent PS with voltage/current display. Since these puppies can deliver quite a high current, ACSxx sensor types might be useful. One possible drawback is they might be kind of "slow" if you're considering some form of overload protection. But I haven't verified that yet.
@AndreasSpiess
@AndreasSpiess 4 роки тому
These sensors are quite fast. They can transfer frequencies of a few kHz. Mabe you consult the datasheet?
@nashaut7635
@nashaut7635 4 роки тому
@@AndreasSpiess I've just checked again the ACS723 (one I have) and its response time lies between 5µs and 20µs (pages 6 and 21 in the datasheet @ www.digikey.com/en/datasheets/allegro-microsystems-llcacs723datasheetashx ). The response time depends on a bandwidth limiting voltage though. That might be a little too slow, IMHO. The protection I had in mind was a fuse-like surge protection, not some form of current limiting.
@manu808
@manu808 4 роки тому
Interesting topic. Thank you
@AndreasSpiess
@AndreasSpiess 4 роки тому
My pleasure!
@janoslano1371
@janoslano1371 4 роки тому
Thats a Video i really needed :)
@AndreasSpiess
@AndreasSpiess 4 роки тому
Good to hear!
@jamess1787
@jamess1787 4 роки тому
Last time a drill bit met my little finger, the outcome was not good. Glad to see that this isn't always the case! 😂👍🍻🇨🇦
@AndreasSpiess
@AndreasSpiess 4 роки тому
Drill bits and fingers are not a good team, you are right!
@MrPDawes
@MrPDawes 3 роки тому
Getting expensive watching these videos. I keep buying the stuff you show us Andreas. Loving it though so keep it up.
@AndreasSpiess
@AndreasSpiess 3 роки тому
As long as your wife does not intervene ;-)
@matsandersen6119
@matsandersen6119 4 роки тому
your videos are usually interesting, including this one
@AndreasSpiess
@AndreasSpiess 4 роки тому
Glad you like them!
@gertvbiljon
@gertvbiljon 4 роки тому
Herr Spiess! Vielen dank!! This is very timely info. I am looking at monitoring the 230VRMS mains supply to my borehole pump and have now changed my plans away from the ACS714 (which I can easily get at the local hobby shop in South Africa) to the WCS1800 which I didnt know of . . . .In terms of measuring mains Voltage and Isolating it from my little Infineon XMC4500 ARM processor I am looking at using the HCPL7510 which is optically isolated, is there something more appropriate that you know of?
@AndreasSpiess
@AndreasSpiess 4 роки тому
Maybe I will make a video about measuring AC. So far I do not have everything together. The HCPL7510/20 is for sure a candidate.
@letsfixit.542
@letsfixit.542 2 роки тому
LIKE YOUR POINTER SIR.NICE WORK KEEP IT ON,THANKS
@AndreasSpiess
@AndreasSpiess 2 роки тому
:-) You are welcome!
@AntonyCartwright
@AntonyCartwright 4 роки тому
Good video Mr Spiess! Those ACS sensors don't last. Even the more expensive 758. An even better way is a current shunt with ADC. :)
@AndreasSpiess
@AndreasSpiess 4 роки тому
Thanks for the info!
@danielegger6460
@danielegger6460 4 роки тому
I think most of the INAs can be used for high-side or low-side current sensing. Nevertheless I very much prefer the INA260 to any of the ones you presented not just because they have an I2C interface but also they can sense at ridiculous speeds with great accuracy and do not require a (potentially inaccurate) external sense resistor. They also work just fine with reversed current flow and will report the direction accordingly, so they can be used to monitor a rechargeable battery just fine.
@AndreasSpiess
@AndreasSpiess 4 роки тому
The INA260 seems to be very good, but also expensive :-(
@danielegger6460
@danielegger6460 4 роки тому
@@AndreasSpiess It's fine, especially considering the built-in laser trimmed resistor: A beefy (but lousy +/- 1%) 2mΩ alone does cost around 20% of the whole INA260 with it's 0.1% tolerance resistor. Not to mention that you can use it like that without additional external parts and thus a lot less design issues. Adafruit has a module with it for MSRP $9.95 which sounds very fair and maker friendly to me.
@Guru_Ingenieril
@Guru_Ingenieril 2 роки тому
Grandioso vídeo, mis felicitaciones, debería subir contenido también en español. ;) Saludos desde México.
@AndreasSpiess
@AndreasSpiess 2 роки тому
My newer videos get Spanish subtitles (made by an Argentinean Lady). I do not speak Spanish :-(
@connecticutaggie
@connecticutaggie 4 роки тому
The burden resistor can be changed with the scale; so, the bigger reason for the different connector is the fuse. Usually when there are two different connectors each connector has a different size fuse.
@AndreasSpiess
@AndreasSpiess 4 роки тому
You are right!
@AGHunter1992
@AGHunter1992 3 роки тому
Great video. I have a question about inline current sensing with a switched reluctance motor. I have a asc712 30A sensor and I'm not able to get measurements when I turn the power on and I'm not sure why. At the moment I think its because it does have pwm rejection. The motor has no magnets and only windings in the stator. I've also isolated the sensor and validated that there isn't any problem with my code.
@AGHunter1992
@AGHunter1992 3 роки тому
Also the power specs are 20v 13A
@AndreasSpiess
@AndreasSpiess 3 роки тому
Maybe you need an oscilloscope to look at the voltages to understand what happens
@oldestgamer
@oldestgamer 3 роки тому
Thanks for the video! I wanted to ask if any of these would be useful in building a 4-wire sensor for use with measuring outside coatings of pipes? Thanks
@AndreasSpiess
@AndreasSpiess 3 роки тому
4 wire sensors can always be done if you add an independent voltage sensor.
@albygnigni
@albygnigni 4 роки тому
Great video Andreas! You didn't include current transformers and those in the version of blue clamps are really popular on AliExpress. I think that maybe a little parenthesis on why this could not work for DC would be great for newbies.
@AndreasSpiess
@AndreasSpiess 4 роки тому
I mainly concentrated on DC. Maybe I will do once a video on AC. Unfortunately this is not my strength :-(
@MalagasOnFire
@MalagasOnFire 4 роки тому
Thank you for the good video. The WCS1800 looks good for AC but beware of its 9mm diameter hall sensor...
@marcrives279
@marcrives279 4 роки тому
Plus you cannot open this ring. So you had to detach then reattach wire somewhere. That’s precisely what we want to avoid on main!
@AndreasSpiess
@AndreasSpiess 4 роки тому
You are right. But at least you do not have to cut it. Cutting is a no go here. Removing and re-attaching is not easy to prove
@freedom2000
@freedom2000 4 роки тому
really good video. Thanks
@AndreasSpiess
@AndreasSpiess 4 роки тому
Glad you liked it!
Simmerstats: The genius old tech that controls your stovetop
36:31
Technology Connections
Переглядів 389 тис.
Connect ESP32 to WiFi - ESP32 Beginner's Guide
12:13
Enjoy Mechatronics
Переглядів 94 тис.
Військовослужбовці ЗСУ проводять оповіщення в Полтаві
00:32
ФОКУС С ЧИПСАМИ (секрет)
00:44
Masomka
Переглядів 921 тис.
Different Ways for Measuring Current With Arduino
13:32
Electronoobs
Переглядів 65 тис.
Use the very attractive new ATTINY chips for your projects
14:34
Andreas Spiess
Переглядів 187 тис.
INA231, Монитор мощности, аналог INA226
7:56
arduinoLab
Переглядів 12 тис.
463 Why most Arduino Soil Moisture Sensors suck (incl. solution)
10:59
Andreas Spiess
Переглядів 58 тис.
How to Make a Radar with Arduino |  Arduino Project | Indian LifeHacker
4:32
Indian LifeHacker
Переглядів 749 тис.
How to Make Custom ESP32 Board in 3 Hours | Full Tutorial
2:57:20
Robert Feranec
Переглядів 853 тис.
Linear DC Power Supplies - Designing & Building Custom DC Power Supplies
1:12:39
DroneBot Workshop
Переглядів 937 тис.
Что если бы Apple делала зубные щётки?
0:59
If you do wire soldering with paste, soldering can be done very easily
0:26
Tech Electronics BD
Переглядів 2,2 млн
GOOGLE СДЕЛАЛИ НЕВОЗМОЖНОЕ! Это круче любого Samsung, Apple и Xiaomi…
13:16
Thebox - о технике и гаджетах
Переглядів 61 тис.
#smartphone #screenprotection #tech #shorts #magicjohn
1:01
MagicJohn
Переглядів 6 млн
Распаковка айфона в воде😱 #shorts
0:25
НЭКС
Переглядів 15 тис.