460 Seven Sensors tested: Measuring Current with Microcontrollers (Arduino, ESP32, ESP8266)

Поділитися
Вставка
  • Опубліковано 22 лип 2023
  • During my summer break, I reupload successful videos of the past (for your rainy Sundays). This one aired on April 5th, 2020.
    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?
    Video about AC sensors: • #347 Measuring Mains V...
    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/...
    As an Amazon Associate, I earn from qualifying purchases
  • Наука та технологія

КОМЕНТАРІ • 285

  • @AndreasSpiess
    @AndreasSpiess  10 місяців тому +13

    Corrections and additions:
    . Ohms law was used wrongly (ua-cam.com/video/Cg-4GjLeeAI/v-deo.html )
    - This video is about DC sensors (albeit some of them measure current in both directions).
    - The video about AC sensors is here: ua-cam.com/video/Vb9-pbLdsfQ/v-deo.html
    - The INA219 can measure currents in both directions

    • @-Gadget-
      @-Gadget- 10 місяців тому +1

      Just came to check if you corrected that the Ina219 can measure in both directions, and was pleased to see it 👍🏻
      I have what I call a "Micro Solar Setup" that runs 4 of these modules for 2 solar panels charging 2 x 12v on each panel/solar charge controller, which I then series'd up to give me 24v. I did it this way so that I could have "Roughly" 24v on a rather long, but flimsy power cable, that supplies all the routers, fibre and switches which have buck converters down to their applicable voltages.
      Works like an absolute charm, although currently I may have to add another set of panels, as, I am drawing as much as I put back daily 😔
      I suppose this is what happens when you get carried away with IOT, and just keep adding more stuff to the already burdened system 😂😂😂
      I love those INA219's by the way, they are super useful, easy to use and their accuracy just blows my tiny little mind most of the time 👍🏻

    • @NikitaOlenets
      @NikitaOlenets 10 місяців тому

      I second this. I have micro solar mppt charger for my garden measurements. Using INA3221 I had no issues with current flows in both directions (charge/discharge cycles)

    • @NathanSweet
      @NathanSweet 10 місяців тому

      18:04 "mA per mA" -> "mV per mA" :)

    • @PolarisLP
      @PolarisLP 10 місяців тому

      At 3:05 the current is wrong. It should be 10A instead of 100A. Narration is correct, shown equation is incorrect. Calculated result is correct if 10A is considered. (ua-cam.com/video/Cg-4GjLeeAI/v-deo.html)

  • @johnwest7993
    @johnwest7993 10 місяців тому +41

    Thank you Andreas. You often save me from wading through the datasheets of inappropriate devices and board modules, and wasting my time looking for what I need. A 22 minute video brings me up to speed on the commonly available sensors, and their pros and cons. This is one such occasion.

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому +4

      Glad you liked the content. And thank you for your kind words!

  • @bubbaganoosh1387
    @bubbaganoosh1387 Місяць тому +1

    Thanks again Andreas! Bought the INA3221 for my solar project. Was originally going to design myself. But you saved me so much time. You're the best!

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому

      Thank you. Glad the video was helpful.

  • @CNCKitchen
    @CNCKitchen 10 місяців тому +5

    Perfect timing and great overview and explanation! Exactly what I need for my smart home water level sensor 👍

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому +1

      Maybe you also watch my videos about water level sensors? BTW: I like your channel a lot!

  • @mahudson3547
    @mahudson3547 10 місяців тому +8

    The INA219 sketch you used does have the voltages back to front. Your rant at 13:35 - the 219 allows the difference between bus and load to be both positive and negative, so it can measure current in both directions - very useful. I think your comment at 15:26 is therefore not accurate. It’s one of my favourites.

  • @636Swiss
    @636Swiss 10 місяців тому +9

    Detailed instructions and specifications don't get any better than what Andreas presents!

  • @wktodd
    @wktodd 10 місяців тому +18

    Watch out for a catch with the hall sensors - magnetised screws! I chased around for ages trying to find and null drift , only to find that every time I tightened the screws my magnetised screwdriver was changing the field around the screw and effecting the hall sensor

    • @edinfific2576
      @edinfific2576 10 місяців тому

      You could try plastic screws.

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому +1

      Thanks for the tip. A mistake that takes some effort to discover. But I am sure you learned something ;-)

    • @wktodd
      @wktodd 10 місяців тому +1

      @@edinfific2576 or Brass , which was what I expected in a terminal block

    • @marcseclecticstuff9497
      @marcseclecticstuff9497 10 місяців тому +1

      I'm using a handfull of them on my boat to monitor the currents of the alternators, battery charger, solar panels, and house buss. My solution to the stray magnetic field issue was to incorporate a calibration screen that allows me to change the error offset values for each on the fly. I measure the current with a DMM, then jump to the calibrate screen, select the appropriate source, and simply change the value until it matches the measured value. I'm in the middle of developing my battery management system for my boat so I haven't done much testing on long term stability nor accuracy of them over the range. The accuracy issue isn't a big deal. I've got 20A, 50A, and 100A sensors to improve precision/resolution on the smaller ranges where it's more important. In the end, it's not a big deal as I'm using a microcontroller so I can easily expand my simple error offset value to a table with as many offsets as I need. In my case high precision isn't really needed. If I find there's a stability issue over relatively short periods then I'll design a method of auto-calibration.
      FWIW, I had a similar issue with measuring voltages with the Arduino Mega that I'm using for this project. They too were very unstable, I found I was constantly chasing them around over the space of an hour or two. Finally tracked it down to the fact the Mega was running off the boat batteries, as the battery voltage dropped it caused the 5v supply change. Since the ADC of the Mega defaults to the 5v supply as a reference, it constantly changed as a result causing the instability. I solved the issue by incorporating a precision voltage regulator and fed the Mega VRef pin with it.

  • @rickharold7884
    @rickharold7884 10 місяців тому

    Beautiful. I had in the past looked at all these types of sensors, and it’s always very difficult to determine which ones are appropriate. Thanks for sharing

  • @mathom1000
    @mathom1000 3 місяці тому +1

    French new embedded engineer here. I just discover your channel Andreas. I must have listien to this video 6 times by replaying back some portion of it. Great content. Subcribed!

    • @mathom1000
      @mathom1000 3 місяці тому

      I am so enjoying the content of this video that I needed to say it back again! Thank you!

    • @AndreasSpiess
      @AndreasSpiess  2 місяці тому

      Welcome aboard the channel!

  • @taoufikbadri6959
    @taoufikbadri6959 10 місяців тому

    As always, interesting subject, explained precisely, maximum informations popularized with tact and generosity while remaining short and precise. Thank you Mr.

  • @kierancampbell3322
    @kierancampbell3322 10 місяців тому +5

    Good catch on the variants of the INA3221 breakout board available from circuit designers with strange ideas. I agree with other comments though that some of the TI shunt sensors can handle reverse current sensing. From the datasheet: "VIN+ and VIN- can have a differential voltage of -26 V to +26 V; however, the voltage at these pins must not exceed the range of -0.3 V to +26 V". The datasheet shows an example of reading a -80mV shunt voltage from the CH1 shunt-voltage register.

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому +2

      You are right. The INA3221 can measure both directions. My mistake!

  • @Some11
    @Some11 10 місяців тому +4

    The ACS712 is a wonderful chip and it helped me in a big project. I was measuring mains at 230 Vrms in up to 20 Amps (tested). The inner resistance of the ACS was so small (

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому +1

      Thank you for sharing your experience! This video is focused on measuring DC, and I left a link to a video about AC sensors. There, as you describe, some other problems have to be solved...

    • @2meters2
      @2meters2 10 місяців тому +1

      I have similar good experience with these little Hall devices for my (kW range) power boards.
      They are remarkably reliable, pretty accurate, bi-directional, fast and fully isolated.
      Those properties solve a lot of issue in the design of power converters.
      I most often use the TMCS1107 devices (op to +/- 22 A) which are very similar to the ACS712 series, but a bit more accurate.

  • @OmarMekkawy
    @OmarMekkawy 10 місяців тому +5

    I think that the INA219 and all similar modules can measure bi-directional current without any problem.

    • @BeercanSailOr
      @BeercanSailOr 10 місяців тому +1

      Correct. It can measure both charging and discharging of a load, i.e. current either way

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      You are right. My mistake!

  • @marcmillecam613
    @marcmillecam613 10 місяців тому +7

    Ohms Law is I=U/R and not I=UxR as said in your video at 1:42

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      You are right. My mistake!

    • @tpoky
      @tpoky 6 місяців тому

      Das sollte/darf nicht passieren!!!!
      Schulnote 6!!

  • @stevejagger8602
    @stevejagger8602 10 місяців тому

    Danke viel mal Andreas
    This video came at precisely the right moment as I am trying to implement overcurrent sensing on a 2 cell lithium ion powered project.

  • @sarahjanegray
    @sarahjanegray 10 місяців тому +1

    Your a wizard, Andreas. I've been playing with the idea of using a current sensor with LIFEPOv4 batteries to power and possibly then shutdown a Pi and been looking at creating a circuit to create an effective UPS with a couple of cells. So your video is very timely. I had already purchased a couple of the INA219 boards as this was what was used on a Pi UPS board that I managed to fry! So was particularly at using this chip. Thanks for your info and cross-sections of boards out there. I think may have chosen the right option! Thanks, as ever for your useful info.

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому +1

      I am sure the INA219 is a good choice. Other than I said, it can also measure negative currents. So you could even measure battery charging ...

  • @bm830810
    @bm830810 10 місяців тому +8

    6:00 you dont need negative opamp for this, you can use a divider and bias input of the opamp with a positive voltage, then the negative voltage would add to that and the resulting voltag could always be poisitive

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      Also a good possibility if you pay attention to the ground of the MCU.

  • @critical_always
    @critical_always 10 місяців тому

    After being educated as an electrical engineer in the eighties I ended up in IT and now more low level stuff and Robotics.
    Obviously my knowledge is stale. Your back to basics with a modern twist is exactly what I need.

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      Cool. Similar here. Trained in the 80s and returned after the age of 55...

  • @jeffro.
    @jeffro. 10 місяців тому

    Thanks for addressing all those points in the beginning, like implementation issues, high/low side monitoring, etc.
    Unfortunately, I think most of the viewers missed a lot of it, or just didn't understand. (Judging by comments)
    I thought you did a great job explaining it!
    Maybe they just need to watch again, or even a few more times?
    Good stuff. Thanks for the comparison of all these sensors. And for pointing out a couple that have "gotchas." I might not have noticed that before buying, because I would assume they made sense, like not having 3 sensors measuring the same load!

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому +1

      Thank you for your feedback. I like people who watch my videos not understanding all. They are ambitious and want to learn ;-)

  • @dennisfahey2379
    @dennisfahey2379 10 місяців тому +2

    Very well done. One must also keep in mind temperature stability and drift and the concept of dithering in quantization. Resistors must all be 1% and for really important accurate measurement, consider a precision, temperature compensated voltage reference. Finally be sure to characterize the wiring/connector drops on any voltage measurement.

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      I agree with all your additions!

  • @avejst
    @avejst 10 місяців тому

    Another great video
    Impressive and interesting test as always 😊

  • @NathanSweet
    @NathanSweet 10 місяців тому

    I work for a long time on a project (so far: ESP32 I2S MCLK and current sensing), figure out some things, and only afterward do I come across your excellent videos on the exact same topic. One of these days I will look for a video from you first!
    FWIW, I appreciate the reviews of the ICs specifically. I make PCBs so don't need breakout boards, though they can be useful to test and dissect.
    I ended up with a hall sensor for isolation (TMCS1101-A4, 5V version for max sensitivity, my load is ~100-200mA, 24VAC). Also had to figure out an RC filter (R1K, 300nF) and a better ADC than the ESP32. Hall sensors have a lot of HF noise, the RC filter is required to make any use of it.
    I don't think being inline means a hall sensor has a burden voltage. It's just how the IC routes the trace under test very close to the hall sensor.
    High amp ICs require special consideration for thermal dissipation. I found many users on the TI forums talking about their burnt ICs. It should be possible to do it right though.
    Anyway, nice video! Thanks!

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      Searching UA-cam is always a good choice if I start a new project ;-)

  • @fir3w4lk3r
    @fir3w4lk3r 10 місяців тому +5

    One advantage of sensors with analog output is that you can use them in a analog closed loop.

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      I agree.

    • @shodanxx
      @shodanxx 10 місяців тому

      Is the response time fast enough ? For instance for current limiting a high power (10W) LED at 500khz ?

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      @@shodanxx You have to consult the datasheet.

  • @knussieisbar317
    @knussieisbar317 10 місяців тому

    Voll cool, danke Andreas,
    Ich bin seit zeiten auf der suche nach einem guten Modul, ein guter Vergleich hat mit noch gefehlt.

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому +1

      Dann hoffe ich, dass du das richtige findest!

  • @helmuthbecker7636
    @helmuthbecker7636 10 місяців тому

    Hi, my teacher always recommend your vídeos

  • @cccmmm1234
    @cccmmm1234 10 місяців тому

    Very fortunate for me, I was just researching this.

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      So maybe you saved some time ;-)

    • @cccmmm1234
      @cccmmm1234 10 місяців тому

      @@AndreasSpiess it helpedms avoid researching some things that would not have helped.
      Ina226 fits my needs perfectly. I am using it with a 1khz loop.

  • @toastrecon
    @toastrecon 10 місяців тому +12

    Interesting - I was just thinking that if you were measuring small currents, and you wanted to use the inductive clamp method, maybe you could wrap the wire 10x around the lead and then just divide the measured current by 10? (Or however many loops)
    Also, this is awesome! I’ve tried measuring voltage and current with an Arduino in the past, and have had mixed results. This should help.

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому +4

      Yes, you can wrap the cable around the measuring loop and do the division. I do this often to increase sensitivity.

  • @InssiAjaton
    @InssiAjaton 10 місяців тому

    I seem to remember one old application note describing use of a floating differential sampling and storing front end. In principle, it had a 2-pole, 2-throw relay and a capacitor that stored the sample, then delivered the stored voltage to the amplifier input, when the relay changed state. Of course the relays are not a favored thing in the era of all solid state systems. Yet, an interesting addition to the collection of different topologies.

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      Most of the current ADC have such a "Sample and hold" architecture built in. So the learnings of the past are used in a different implementation

  • @TheMason76
    @TheMason76 10 місяців тому

    Schöne Übersicht über Stromsensoren ..... Weiter so ... Auch mit dem Akzent 😉😉😉 Echt tolle Videos

  • @MikesCarInfo
    @MikesCarInfo 10 місяців тому

    Nice Pointer!

  • @Lampoonlongtails
    @Lampoonlongtails 10 місяців тому

    I've always enjoyed your presentations, and occasional jokes.
    A critique/recommendation. When mentioning the shunt resistor in the multimeter being "smaller", while I understand exactly what you meant, "smaller" may have been interpreted by some, as a physically reduced size, and not, reduced resistance. Perhaps, "of less resistance" or "lower resistance", would have been better.
    As always, great presentations! You're someone, I wish to emulate. Inspirational!

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      You are right. However, "smaller" resistor is a common expression in electronics. The answer of ChatGPT: When someone mentions a "smaller resistor," they are indicating that it has a lower resistance value, which means it allows more electric current to flow through it compared to a resistor with a higher resistance value. Conversely, a "larger resistor" would have a higher resistance value, impeding the flow of electric current to a greater extent.

    • @Lampoonlongtails
      @Lampoonlongtails 10 місяців тому

      @@AndreasSpiess
      I have learnt something important. Don't rely in advice from ChatGPT! 🙄 It's obvious, a 100k surface mount resistor, MUST be bigger, than a 10 ohm 1/4 watt through hole resistor. 😏
      Regardless, your presentations are excellent! 👌

  • @qchatgreg
    @qchatgreg 10 місяців тому +2

    informative and accurate as always.
    i would have liked to see a little more explanation of “high side” & “low side” measurements.. and when /why you might use each…. also a slightly better explanation of “common mode” voltage specs and where/why this is V important if using it on high side.
    ive heard a lot of users on forums burning up chips because they used a “low side” spec chip for high side measurements…. not realising that its NOt the shunt voltage thats critical when spec’ing it for high side..
    i use a lot of INA226 (in “24V systems”) … a lot of users “forget” that a 24V system will commonly see 29V when batteries are charging … (similarly for 12V systems … 14.5V ++)

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      The most important word of a (good) UA-camr is "no" to keep the videos short enough ;-)
      The mistakes you mention can be avoided by my favorite word: RTFM. And: Sometimes, smoke from a defective part is good for learning (I know what I am talking about).

  • @bascomnextion5639
    @bascomnextion5639 10 місяців тому

    The INA228 and INA229 are very nice sensors measuring current in both directions also having voltage , current , power , energy and temperature registers working up to 85v.

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      Good to know. Thanks. Unfortunately, I did not see them on breakout boards :-(

    • @bascomnextion5639
      @bascomnextion5639 10 місяців тому

      @@AndreasSpiess The INA226 is on break out boards but only 36v but same pin out as the INA228 so can be swapped on the board if you have a hot air station. I have designed a board to take them with 200amp shunt , 48v to 5v isolated converter and I2C isolator for my 48v off grid. Stuart Pittaway has boards and code for Arduino .

  • @jameswkirk
    @jameswkirk 10 місяців тому

    Another good choice is the Texas Instruments AMC1302. It's a galvanically isolated op amp designed to sense current through a resistor with ±50 mV burden voltage. It needs two power supplies, one isolated, but that can be done with a small transformer, a square wave (Arduino TONE using a spare pin) diode and capacitor. Working isolation voltage 1500 VRMS.
    They also have an AMC1311, with a 2 volt high impedance input designed to measure voltage with the same galvanic isolation. Both have ~100kHz frequency response. I've used them to make efficiency measurements on high power audio amplifiers by monitoring the voltage and currents of the mains supply and amplifier output.

  • @ArgusRosenhaim
    @ArgusRosenhaim 10 місяців тому +1

    Hello, nice video and very well explained as always. Just to confirm, you mention that the sensor doesn’t support reverse current, but at least for for INA219 I know that it does measure both directions. I have a setup where I use a solar charger to a Li-ion, where the sensor is in series to the battery, and I can see positive current values when it’s charging, and negative when it’s discharging the battery.

  • @johnmoser1162
    @johnmoser1162 10 місяців тому

    Great stuff ... Andreas do you care to present some longer distance radars (100-200m) like used for collision avoidance in cars ?

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому +1

      So far I did not see them in a reasonable price range :-(

  • @pldaniels
    @pldaniels 10 місяців тому

    After going over a lot of options I ended up going with the INA237 due to availabilty, cost and simplicity. Coupled with an Attiny212 and i2c LCD made a nice USB-C volt/current meter with PC data link.
    It's a nice chip and only a small programming change from the INA219 but with greater common mode and resolution. Worth having a look at.

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      You are right; the newer "models" of the INA family are attractive. And some seem pin-compatible. You can use the same Chinese boards and change the chip...

    • @pldaniels
      @pldaniels 10 місяців тому

      @@AndreasSpiess when I saw Apple was moving to 28V USB-C modes I had to move from the INA219, that basically was the only reason I did the redesign and move to the 237; the 219 certainly provided a perfectly good platform and still does.

  • @Wayde-VA3NCA
    @Wayde-VA3NCA 10 місяців тому

    Thanks Andreas! A great overview on current monitoring modules and very timely too! I'm looking at a project to remotely monitor and control some 12V(nominal) fused circuits for an amateur radio setup. Are you aware of any modules that can reliably/safely switch 12VDC up to 50A for the main, and as much as 25A for a branch that may have a 100W transceiver on it? I might just have to go with automotive relays and a driver circuit, or figure out a suitable high side MOSFET switch circuit, but I was hoping for a nice easy to use module! 😂

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому +1

      For my new remote station (Flex6600), I use DC solid-state relays (shown in one of my last mailbags, if I remember right). I do not want to have a mechanical relay on 24/7. For the current measurement, I use the BMS function.

  • @Fernando_S
    @Fernando_S 10 місяців тому

    Around year 2000 I had to measure current in a project and I used a similar approach shown between 5:00 and 6:00. Back then I didn't have the option to buy a INA219 module. After the rectification and filtering of the power supply, only the op-amp was powered. Then I put a diode on the negative rail creating a voltage step (0.6 - 0.65 V) to the remaining circuit. This way I created a negative supply for the op-amp. It was not a symmetrical supply, since the positive rail is the same for the entire circuit, and the negative rail was only a diode drop from the main circuit. But it worked since the voltage drop on the shunt resistor "fitted" inside the voltage drop of the diode.

  • @brendandelear1145
    @brendandelear1145 10 місяців тому

    Yaay i was wanting an update on this :)

  • @willgilliam9053
    @willgilliam9053 10 місяців тому

    for clarification, the INA219 can be used to measure current in both directions. I have used it before to measure positive amps (discharging battery) and negative amps ( charging battery) in a project before. Measuring the current is a matter of identifying which side the voltage is lower... thats the direction of flow.

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      You are right. My mistake (I pinned a comment with the correction)

  • @danielymilva
    @danielymilva 10 місяців тому

    Thank you Andrea.
    There is also the INA226 which can handle voltages up to 36V against 26V for the INA 219 (usefull for my Oscar 100 final PA...)
    73 de HB9IIU

  • @rastikw
    @rastikw 10 місяців тому +2

    I'd add SCT013 clamp sensor, it's easy to use and you can choose from many versions, depending on the current and precision.

    • @smaroukis
      @smaroukis 10 місяців тому +1

      looks like this is a current transformer based sensor so that will only work on AC, I think this video was specifically directed at DC (using hall effect and shunt resistors)

    • @rastikw
      @rastikw 10 місяців тому

      You're right, I didn't realize that DC was the goal. I always used it for AC and actually never thought this method cannot work on DC. Good catch, thanks.

  • @andamodeming274
    @andamodeming274 9 місяців тому

    Thanks!

  • @kareemumanami3075
    @kareemumanami3075 7 місяців тому

    Hello. Awesome video. Please what sensor would you recommend for a large scale use, say for instance measuring all appliances in a house

    • @AndreasSpiess
      @AndreasSpiess  7 місяців тому

      This question cannot be answered in a UA-cam comment because it depends on your situation.

  • @dwagner6
    @dwagner6 10 місяців тому +1

    If you use a very small Rsense, the first three chips are very capable at higher currents. It is very common to use 0.1 or 0.01 ohm Rsense.

  • @PFBruno3
    @PFBruno3 10 місяців тому

    Thanks for the great video and explanation as usual. I'm still not clear about AC... do these sensors measure AC? Obviously if you used an analog input, you might measure varying voltage based on the AC sine wave timing. I assume the ACS7xx chips do measure AC since they can measure mains.

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      This video is about DC sensors. I made another video about AC sensors. Some of the DC sensors can measure currents in both directions.

  • @thomasblock3117
    @thomasblock3117 10 місяців тому

    Hi Andreas, very good overview, also you use Hall sensors, but I'm missing XMR sensors like TMR sensors. They are much more accurate. Any Plans for TMR? Best regards Thomas

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому +1

      I never heard of these sensors. They seem to be interesting for high-accuracy applications. Are they already available for the Maker budget?

  • @5Komma5
    @5Komma5 10 місяців тому

    So that's where I messed up. I tested the shunt version but did not like the accuracy. I am not 100% sure but I probably did not connect to both GNDs. Learned something. Thank you.

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      Indeed, these ground problems are not easy to discover!

  • @MaxintRD
    @MaxintRD 10 місяців тому +1

    Right on time! I'm on a project where I want to measure voltage and current of a 90V solar panel. The INA219 only goes up to 26V, so I'm curious to see what alternatives you're reviewing. Going to watch it now!

    • @greekstraycats
      @greekstraycats 10 місяців тому

      I am also used to INA219. 26V is good for my purposes. But also curious now about alternatives.

    • @piotrswiatkiewicz3259
      @piotrswiatkiewicz3259 10 місяців тому +2

      Use a voltage divider and multiply the result. It should work very nicely.

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      90V is a high voltage! And a big panel;-) The solution of piotrswiatkiewicz3259 might work (you need 2 quite stable voltage dividers)

    • @MaxintRD
      @MaxintRD 10 місяців тому

      Hello@@AndreasSpiess The panel is actually not that big. It is a used GS-55 by GS-Solar. It's some sort of copper based thin-film PV in a glass panel. It originally promised 55 Wp and has a Vo of 86V, relatively high compared to traditional silicon based PV's. I intend to make a power monitor to see what it actually delivers and to see what can be improved. Your video came just at the right time! Thank you and thanks to @piotrswiatkiewicz3259 for the great suggestion.

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому +1

      @@MaxintRD BTW: I still remember your music library ;-)

  • @BerndFelsche
    @BerndFelsche 10 місяців тому

    I've used a current transformer to measure AC .
    That clips a ferrite core over a power cable of an external device and provides an AC voltage signal with amplitude proportional to the current... Usually DC biased so that no negative voltage is seen as the microcontroller. It's instantaneous current so the AC has to be measured rapidly to determine the average current.
    With some software trickery, and assuming that the load is sinusoidal, you can play software tricks to measure the voltage at a certain angle after zero crossing. That avoids lots of number crunching. One can adapt to AC frequency at startup and any drift in phase offset over time by monitoring the zero crossing voltage at the expected time... Sort of phase-lock.
    If you need true RMS then it's calculation intensive. Most of the time you don't need it for control purposes where you wish to avoid damage through over-current.
    The phase-point measurement could be sufficient in many application where it can react at 4 times the AC frequency, if you choose.

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      The sensors shown here are mainly for DC. I made a video about AC sensors and put a link in the description. Usually, you do not only want to measure current but, as you describe, also want voltage and phase shift for AC sensors...

  • @danilodelconsole800
    @danilodelconsole800 10 місяців тому

    Hi Andreas..very interesting. What IC would you use to check if a smartphone is charging or not (an IC in the middle between charger and smartphone)?

    • @AndreasSpiess
      @AndreasSpiess  9 місяців тому

      Any DC current or power meter should do.

  • @guatagel2454
    @guatagel2454 10 місяців тому

    Thank you, Andreas. Have you ever used a Rogowski coil to measure alternating current?

  • @dougcox835
    @dougcox835 10 місяців тому +1

    Something you did not address here is frequency response. Normally all you need to measure is low frequency like 50/60 Hz, but sometimes you need to measure much higher frequencies and the resistor types are the only ones with any real higher frequency response. And the stuff I was measuring was only in the kHz range. Not really RF frequencies.

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      I agree. These sensors are mainly used for DC. I left a link to a video where I covered AC sensors. So far, I did not cover higher frequency measurements as this is not mainstream business...

  • @twr4641
    @twr4641 Місяць тому

    This episode is awesome as always - many thanks. Would you mind covering the *new* INA3221 that you just mentioned in this video (since you did not have it back then)? It seems to be a great fix over the old INA3221 design and capable of measuring different voltages. I searched all day but just found „mods“ to fix the old design yet no docs about the new board design and the mysterious two GND pins. The new INA3221 seems to be perfect for monitoring solar charger systems and apparently is used for this purpose already. Covering it would be of great interest to many, especially since this topic seems not be covered yet anywhere, and INA3221 are both readily available and cheap. I simply can’t wrap my head around how to wire up the new version (lacking your experience). Any hint greatly appreciated. Many thx!

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому +1

      This is just another board, not a differenct chip. So no stuff for a video :-(

    • @twr4641
      @twr4641 Місяць тому

      @@AndreasSpiess ok I understand. Thanks!

  • @yancymuu4977
    @yancymuu4977 10 місяців тому

    Measuring current on my solar system has been a recurring interest for me for several years. This year I have implemented a circuit based on Stuart Pittaway's excellent UA-cam channel. I'm using 3 INA229 chips (charge controller load, and battery current) on a custom PCB. The chip uses an SPI interface. Current measurement are by directional, with very low zero offset. Therefore coulomb counting for battery charge level is extremely accurate and repeatable from day to day. I show the board in a short overview UA-cam Video if interested.

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      Impressive project! I had a similar problem (8x300Ah battery) but went the easy way: I bought a Daly BMS and interfaced it using an ESP8266 to node-red. So far, I do not have experience with how accurate the ampere-counting is.

  • @WilliamDudley
    @WilliamDudley 10 місяців тому

    The Hall effect sensors like the ACS721 also have the problem of hysteresis, in other words, the "zero current" output voltage changes
    depending on what was the last current you measured. Measure +1A, then note the "zero" voltage (nominal Vcc/2). Now measure -1A. Now check the "zero" voltage, and it will have changed by several % of full scale.

  • @pochuanhsing2466
    @pochuanhsing2466 9 місяців тому

    Nice video for current sensor, I am from ME major. I don’t understand why I need to measure a current linked to arduino? Why can’t they separate in two loops? Say I want to measure if my water pump is turned on from line voltage I could use hulls sensor in it’s loop and don’t bother my low DC supply to Arduino.
    Even for the shunt sensor at 5 A range, can’t design them in a different loops? Like you have example with resistors? Also if I use a transformer to supply say 7 and 5 volts DC then I have more choices to handle my application in a different loop and don’t bother normal working voltage for Arduino? Thanks

    • @AndreasSpiess
      @AndreasSpiess  9 місяців тому

      This was just an example load. Most people will measure the currents of other loads.

  • @yannkitson116
    @yannkitson116 10 місяців тому

    Working with a Raspberry Pi Pico W I had issues with the fluctuation from a voltage divider as well, but I stabilised it in the software by using the average of the last 10 measurements as the value for decision making. It worked well and produced a value that was very stable in comparison with a bench multimeter. The example is in python:
    # Calculate the average of the last 10 Batv values
    batv_average = sum(batv_values) / len(batv_values)

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      Good idea! BTW: If you want to save some RAM space, there is even an easier formula where you do not need to store all 10 values (moving average).

    • @yannkitson116
      @yannkitson116 10 місяців тому

      @@AndreasSpiess Oh I didn't know, I will look into that. I know moving averages but I didn't know that there was a specific function for it. Thank you for letting me know.

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      @@yannkitson116 No function, just the normal formula.

  • @jesjames
    @jesjames 10 місяців тому +2

    Very nice test. For ACS712 you must change those green connectors, they melt after 10A. Plus a smoothing algorithm will give you a great improvement👍

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому +1

      Thank you for sharing your experience!

  • @OldCurmudgeon3DP
    @OldCurmudgeon3DP 10 місяців тому

    I would expect that when measuring mains, being AC, you would been some code and a bit of bandwidth on the mcu to calculate the RMS equivalent current value? It looked like all your tests were done with a DC source.

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому +1

      These are mainly DC sensors (some can measure currents in both directions). I made a separate video about AC sensors and added the link in the description

  • @tinygriffy
    @tinygriffy 10 місяців тому

    Very interesting ! Will you make a video where you explain how to program the esp with grafana and co to give a nice current reading over time in a webbrowser ?? ;) Or is there already one ?😅

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      I made one or two videos about MQTT, node-red, influxDB, and Grafana. Search for IOTstack

    • @tinygriffy
      @tinygriffy 10 місяців тому

      @@AndreasSpiess I knew it ! :D Thanks :)

  • @shodanxx
    @shodanxx 10 місяців тому

    Which of these sensors are appropriate to measure reactance, the phase difference between voltage and current, to differentiate apparent power versus real power in inductive loads such as motors, solenoids, coils, antenna and to perform power factor correction of digital devices power supplies ?
    Soaking of power supplies, what happened to the "super power" power supply ?

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      This video is mainly about DC. I made a video about AC msensors.

  • @edvardfranke
    @edvardfranke 10 місяців тому

    Thx

  • @lasersbee
    @lasersbee 10 місяців тому

    Good info... BTW...There in no 'W' in "circuit". The 'U' is silent....😉

  • @Rob_65
    @Rob_65 10 місяців тому

    The INA226 has one advantage over the INA219 that you did not mention: it can also be used to measure current on the low side (placed in the ground wire) because it has a separate Vbus input to measure the supply current. By the way, both chips state "bidirectional" in the datasheet so you can place one INA226 in the wire to the battery and measure both charge and discharge currents

    • @sunilgeorgethomas9071
      @sunilgeorgethomas9071 10 місяців тому

      it can also measure voltage

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      You are right (I made an error about the direction). However, I do not like that the load is not connected to the same ground as the INA if used on the low side. This will fool a lor of people, I think...

    • @Rob_65
      @Rob_65 10 місяців тому

      @@AndreasSpiess I also prefer high side current measuring but sometimes I do not have that option. My 36V battery charger for example outputs 42V of charging voltage which is too high even for the INA226 to allow current measuring in the positive voltage wire.

  • @DIYtechie
    @DIYtechie 10 місяців тому

    @AndreasSpiess Have you considered making a video about how to program an ESP32 C6 with zigbee to make your own zigbee-devices, such as plant sensors, remotes and other sensors? This would be a game changer for DIY smarthome.

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      As soon as Espressif supports Zigbee in the Arduino IDE...

    • @DIYtechie
      @DIYtechie 10 місяців тому

      @@AndreasSpiess Why not ESPHome? 😊🤷‍♂️ Easier in my experience and integrates directly to Home Assistant.

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому +1

      @@DIYtechie I use ESPhome whenever possible...

  • @ffoska
    @ffoska 10 місяців тому

    Could we get a video on powering microcontrolers with redundant power supplies? What type of powersupply is the most reliable? What makes power supplies fail, which component fails first from heat, cold, moisture etc. How to protect board from the elements and lightning etc.
    Kinda obscure toppic, but I think it would be interesting for people making IOT stuff that is a royal pain to get to when needs replacing.

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      IOT devices usually are extremely low power. So the reliability of power supplies was never a particular problem for me. Most of the time, they run on batteries or on a 5V USB power brick.

  • @VIJJAPUSAIMUKUNDAMOGH
    @VIJJAPUSAIMUKUNDAMOGH Місяць тому

    Thank you Andreas, But i have one question, could you please give information regarding AC current sensing that which sensor is best for 85khz Ac current application and it should be connected to MCU, how can I achieve it ?

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому

      This is a very special thing. So google is the better way to find answers. I do not know :-(

  • @czhusky
    @czhusky 10 місяців тому

    What would be the best of these to measure an AC or DC ground fault detect or current leak to ground down to 1M?

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      I assume the same rules apply. The shunt has to be quite big if you want to measure very low currents. But I never tried it.

  • @timmiller7524
    @timmiller7524 10 місяців тому

    I=UxR isn't right Andreas! U/R is what you meant! A neat video is so much more human with the odd slip-up. We know we're not being bamboozled by AI!

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      You are right! (I put the correction in a pinned comment).

  • @username9774
    @username9774 10 місяців тому

    Wouldn't it be possible to just use a hall effect sensor and measure the magnetic field induced by the current? Would propably work better with a small coil

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      Yes. Some of the sensors do that.

  • @arnebirkeland6249
    @arnebirkeland6249 10 місяців тому

    The ina226 can be used both on high and low side.

  • @cccmmm1234
    @cccmmm1234 10 місяців тому

    Ina226 can be used high side or low side, but it does still add a burden voltage.

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      I agree. But on the low side, the GND of the load is no more GND of the sensor. Not easy for many designs...

    • @cccmmm1234
      @cccmmm1234 10 місяців тому

      @@AndreasSpiess yes I agree. I am using top side for my designs.

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      @@cccmmm1234 Me too...

  • @MikesAllotment
    @MikesAllotment 10 місяців тому

    I've been battling with this current monitoring problem for a while now and still don't really have a solution after watching your excellent video. The INA219 can measure current in both directions, and operates at VCC 3.3v (even lower actually), however it is limited to max 3A current measurement. The ACS712 can measure higher currents, but only operates at VCC 5V, which is no use for ESP8266 projects. What I need is a current sensor that operates at 3.3v and is capable of measuring 5A or more bi-directional - so I can see when current is being drained from the battery or fed into the battery from the solar panel. Is there anything out there that can fulfill this?

    • @mahudson3547
      @mahudson3547 10 місяців тому +1

      The INA219 will measure any current you want. It measures the voltage drop across a shunt resistor up to 320mV. The fitted one is 0.1ohm , hence 3.2A. If you solder a second 0.1 on top of the existing, it will be .05 ohm and then will measure up to 6.4 A.

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      I agree with mahudson3547. Maybe you have to create your own PCB to accommodate higher currents

    • @mahudson3547
      @mahudson3547 10 місяців тому

      @AnreasSpiess If you remove the 0.1ohm resistor, the two terminals are just measuring voltage (high inpedance). So put high current terminals and shunt off the board and connect the two terminals with hookup wire to either side of the shunt. Almost any current you like and no new circuit board.

    • @mahudson3547
      @mahudson3547 10 місяців тому

      @AndreasSpiess - just thinking… If you take the shunt off the INA219 board so it becomes a voltmeter, you could also use matched voltage dividers on the terminals to allow for more than 26V. The current would be multiplied by the divider ratio? Calibration in the micro would be easy.

  • @cccmmm1234
    @cccmmm1234 10 місяців тому +1

    INA226 can measure negative shunt voltages ie negative current.

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      You are right. My mistake!

    • @cccmmm1234
      @cccmmm1234 10 місяців тому

      @@AndreasSpiess no problem. Everyone makes mistakes unless they do nothing!

  • @hedleyfurio
    @hedleyfurio 10 місяців тому

    Many thanks - please consider an episode on how an MPPT controller dynamically changes the impedance that is ‘seen’ by a solar panel depending on the load, where load seems to be a combo of battery charging needs , and the inverter input . I have looked on the internet for months and still can’t find a clear technical explanation . The question arose when my inverter showed 400 watts solar panel output on a sunny day with a 4.6 Kw array - the battery was fully charged and most appliances turned off.

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      MPPT controllers are switching buck converters. They can adjust the voltage ratio between the input and the output voltage to match the MPP of the panel(s). Input power is always similar to the output power. This is why your converter only consumed 400W from the solar panel when the battery was full.

    • @hedleyfurio
      @hedleyfurio 10 місяців тому

      @@AndreasSpiess thank you - I’m trying to build a small test unit or simulate on ltspice so the “ penny drops “ as reading vs understanding something are often worlds apart .

    • @hedleyfurio
      @hedleyfurio 10 місяців тому

      @@AndreasSpiess The "all in one inverter" appears to have inputs from the 1. utility , 2. solar panels , 3. battery - The outputs are- 4. the load , and 5. the battery charging . I was trying to correctly position the panels both azimuth and angle by measuring what came out of the panels to input(2) . This is where the confusion started as the displayed, or measured value depended on the load (5) . A collogue suggested I switch on a reflow over to ensure that load was more that the inverter could deliver and then measure but that caused inverter to shutdown - Perhaps I am asking the wrong question, and there is a better way to measure the output of the solar panels , ideally measured every 5 minutes over a day ? If I get this to work the plan is to install a slew drive to track azimuth daily and I will adjust the angle every 2 months manually between seasons .

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      @@hedleyfurio Think of the buck converter as a transformer for DC with an adjustable turn ratio. The turn ratio is used to shift the working point on the curve of the solar panel to match the power needs of the output.

    • @hedleyfurio
      @hedleyfurio 10 місяців тому

      @@AndreasSpiess Thanks again : so summary could be : The buck converter is like an inductor,( viewed from the solar panel output) , with an input impedance of 2PifL , where by varying the frequency / duty cycle (f) , the input impedance changes which thereby allows more or less current to flow from the solar panel . The MPPT controller ' seeks ' for the optimum impedance point to then matches that to allow maximum output . If you have a situation where the load requirements are LESS than the solar panel output then the input impedance is increased to match the instantaneous load requirements , meaning the excess energy in the solar panel , that is not supplied to the inverter/mttp charger will be dissipated as heat .

  • @marcus3d
    @marcus3d 10 місяців тому

    In future videos like this, could you include the approximate prices for the alternatives, please?

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      I leave links in the description to the source I bought them. Prices vary by country and by supplier.

    • @marcus3d
      @marcus3d 10 місяців тому

      @@AndreasSpiess Yes, and I can look them up myself, but it would be very useful seeing the price on the screen when you introduce each.

  • @userou-ig1ze
    @userou-ig1ze 10 місяців тому

    what would you use for 2x 100W solar panels with 20V (running parallel)? I get max 10A. Can I use a i2c board???

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      You have to use a shunt resistor that is compatible with your needs. Maybe a custom PCB?

    • @userou-ig1ze
      @userou-ig1ze 10 місяців тому

      @@AndreasSpiess but as a newbie a custom pcb is so hard to do - or rather (too) easy to make mistakes

  • @BenMitro
    @BenMitro 10 місяців тому

    I want to measure mains current and direction. I've been told I need to put two inductors in quadrature to determine...what does that mean? Possibly a future video?

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому +1

      I put a link to my video on AC sensors in the video description.

    • @BenMitro
      @BenMitro 10 місяців тому

      @@AndreasSpiess Thank you Andreas.

  • @TheTweakerTweaks
    @TheTweakerTweaks 10 місяців тому +1

    Use piecewise linear interpolation to calibrate your values.
    //used on esp32
    // Coefficients for the piecewise linear interpolation
    //Raw ADC value's
    float coefficients_ADCread[] = {2 ,149,270 ,363 ,452 ,550,637, /* Add other ADCread values here */};
    // corosponing mA measured externally
    float coefficients_mA[] = {3.2,8.3,12.3,15.3,18.3,21.4,24, /* Add other mA values here */};
    float convertToMilliAmps() { // Read ADC and convert to mA
    adccounter=0;
    ADCread=0;
    //take 1000 mesurements for more avarige value
    while (adccounter coefficients_ADCread[index]) {
    index++;
    }
    if (index == 0) { // Ensure the index is within bounds
    index = 1;
    }
    else if (index == sizeof(coefficients_ADCread)) {
    index = sizeof(coefficients_ADCread) - 1;
    }
    // Perform linear interpolation within the segment
    float mA = coefficients_mA[index - 1] + (ADCread - coefficients_ADCread[index - 1]) * (coefficients_mA[index] - coefficients_mA[index - 1]) / (coefficients_ADCread[index] - coefficients_ADCread[index - 1]);
    return mA;
    }
    void setup(){
    analogSetClockDiv(255);
    analogSetPinAttenuation(35,ADC_11db);
    adcAttachPin(35); //Analog read pin (pin 7 IO35)
    }
    void loop(){
    Serial.print(convertToMilliAmps());
    }

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      This is a very sophisticated program! Thanks.

  • @george12121979
    @george12121979 10 місяців тому

    in my opinion one more chip( ADS1115) can use as currert meter in positine or negative power cable.
    General this I2C chip include
    1)4 positive analog inputs with PGA in 16 bit ADC
    In PGA have 6 range
    A)PGA: +/-6144 mV Resoultion: +/-187.5uV
    B)PGA: +/-4096 mV Resoultion: +/-125uV
    C)PGA: +/-2048 mV Resoultion: +/-62.5uV
    D) PGA: +/-1024 mV Resoultion:+/- 31.25uV
    E)PGA: +/- 512 mV Resoultion: +/-15.625uV
    F) PGA: +/-256 mV Resoultion: +/-7.8125uV
    2) alert output pin for high voltage in analog input
    3) differential mode convert 4 Analog input in 2 differential channels
    channel 1 (ADC 0-1)
    channel 2 (ADC 2-3)
    ================================================================
    Then use differential mode
    ADS1115 analog input MUST be between 0 and the ADS1115 supply voltage
    ================================================================
    if connect in posstive power supply cable the max range is the power supply of ADS115
    if connect in negatige power supply( ground point) the range is larger because the voltage in
    resiston is very smail.
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    My design i use 2 differential Channel with R0.05/10W connect to "negative"( ground point)
    to get resoultion in six range's
    1)PGA: +/-6144 mV Resoultion: +/-7.5mA => 245 A
    2)PGA: +/-4096 mV Resoultion: +/-5mA => 163 A
    3)PGA: +/-2048 mV Resoultion: +/-2.5mA => 81.62 Α
    4) PGA: +/-1024 mV Resoultion: +/- 1.25mA => 40.96 Α
    5)PGA: +/- 512 mV Resoultion: +/-625uA => 20.48 Α
    6) PGA: +/-256 mV Resoultion: +/-312.5uA => 10.24 Α
    keep mind with 10W resistor max current is about 14.14 A
    so for safety limit is 10A.
    with 50mV MAX loss of Voltage in resistor
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      I agree. You can use all ADCs to measure current using a shunt (as you did).

  • @arnebirkeland6249
    @arnebirkeland6249 10 місяців тому

    The ina3221 realisation is not good. The channels has crossover error.

  • @chuxxsss
    @chuxxsss 10 місяців тому

    Evening Andreas, summer holidays I know. It is freezing here.

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому +1

      Here it is ok. Not too hot and not too cold. Lots of cycling ;-)

  • @1kreature
    @1kreature 10 місяців тому

    The big hall sensor board is bad for mains as it has copper fills up along the side of the chip. This reduces insulation.

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      This video is about DC sensors. I made another one about AC sensors

  • @klassichd10
    @klassichd10 10 місяців тому

    Thanks again, I am looking for affordable DC current clamps for the PV strings, to integrate it in my home automation system.

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      I hope you find an appropriate one.

    • @klassichd10
      @klassichd10 10 місяців тому

      @@AndreasSpiess up to now unfortunately not. For sporadic tests I am using the Voltcraft branded UT210, but I have nothing to integrate in the PV system and in my automation system. At least nothing which is not too expensive.

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      @@klassichd10Maybe you try a WCS1800?

    • @klassichd10
      @klassichd10 10 місяців тому

      @@AndreasSpiess Thank you for the hint. I though about that, but I had to open the inverter and to remove the string cables to feed them through the hole. I want to avoid to lose warranty,
      I am still hoping, that there will be a variant to clip on.

    • @klassichd10
      @klassichd10 10 місяців тому

      @@AndreasSpiess We might come closer: "Hall split core" seem to be the keywords. 30A DC ca, 40 EUR. Expensive for nice to have. I will still wait a bit. The inverter also transmits values, but I have 2 strings in parallel at one of two MPPT trackers.

  • @frogandspanner
    @frogandspanner 10 місяців тому

    2:54 Do you like your multimeter? Have you reviewed it previously?

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      Yes, I like it, and I have it for a few years now. I do not do reviews on multimeters (not so important for me).

  • @AJB2K3
    @AJB2K3 10 місяців тому

    I have several INA219 boards but they are only rated @3.2A making them unusable for solar which can run up to 10Amps (in my basic setup case).
    I am a bit confused over that issue.

    • @mahudson3547
      @mahudson3547 10 місяців тому +1

      You can change the shunt resistor…

    • @piotrswiatkiewicz3259
      @piotrswiatkiewicz3259 10 місяців тому

      ​@@mahudson3547Stronger: one must do that. The data sheet states the bit size for shunt voltage measurement is 10 μV. Also, the ADC resolution is given (12-bit ADC). Also, the full scale voltage range for the current sense input is ±320mV (at the PGA /8 setting). So, you can derive all the parameters needed for the shunt to be able to measure the current in your range of interest.

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      I agree with piotrswiatkiewicz3259. You probably need a custom PCB to deal with higher currents.

    • @piotrswiatkiewicz3259
      @piotrswiatkiewicz3259 10 місяців тому

      @@AndreasSpiess Dear Andreas! What does PC mean in your response? Oh... possibly, a custom PCB. That would make a lot of sense :)

    • @piotrswiatkiewicz3259
      @piotrswiatkiewicz3259 10 місяців тому

      By the way: @zyghom below proposed another of the TIs products: INA260. It has a built-in shunt ..... only 2 mΩ(!) which is nicely manufactured to work well with the rest of the circuitry (I am deliberately holding short of saying: calibrated). The chip is rated up to 15A.

  • @ronaldronald8819
    @ronaldronald8819 10 місяців тому

    I missed the popular PZEM 004T in your lineup. For anyone using this sensors i am interested in your experiences. Cheers.

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      These sensors (and explanations) are mainly for DC. I left a link to a video where I covered AC sensors.

  • @sammin5764
    @sammin5764 10 місяців тому

    🌟🌷🌟

  • @Richardincancale
    @Richardincancale 10 місяців тому

    Does anyone know of an open source equivalent to the Emporia energy monitor? It has up to 16 clamp-on current transformers to monitor home energy usage. It must use an analogue multiplexor to service so many inputs rather than multiple ADCs - but I have no experience with analogue muxes…

    • @dave00011
      @dave00011 10 місяців тому +1

      open energy monitor

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому +1

      I also put a link to my video about AC sensors in the description.

    • @Richardincancale
      @Richardincancale 10 місяців тому

      @@AndreasSpiess Thanks!

  • @NicksStuff
    @NicksStuff 5 місяців тому

    Why is there a potentiometer on the board of the WCS1800?

    • @AndreasSpiess
      @AndreasSpiess  5 місяців тому

      It can change the threasold level for a digital pin

    • @NicksStuff
      @NicksStuff 5 місяців тому

      @@AndreasSpiess Thank you

  • @pedrosimoes8590
    @pedrosimoes8590 10 місяців тому

    Isn't there a Hall sensor in the ESP32 also?

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      Yes. But how would you use it for this purpose?

    • @pedrosimoes8590
      @pedrosimoes8590 10 місяців тому

      @@AndreasSpiess You're the teacher. Just here to learn ;-)
      I once took a look at it but just for current detection, not measurement.
      I think it was even possible but not straightforward to wake up the esp32 from sleep in response to changes in the field.

  • @dougcox835
    @dougcox835 10 місяців тому

    You put your restisor divider in the beginning of the video on the wrong side of the sense resistor. The divider would only measure the supply voltage which should remain constant. I got what you were trying to show though but it should have been on the other side of the sense resistor so you would be measuring the drop rather than the supply.

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      I agree. My drawing is misleading. You need to measure a second time on the right side of the resistor to get the difference (as mentioned in my text).

  • @jensschroder8214
    @jensschroder8214 10 місяців тому

    Analog measuring devices measure currents and then the voltage via the internal resistance.
    Digital measuring devices measure the voltage and then the current via the shunt.
    Others measure the magnetic field and thus the current.
    The analogue input of the ESP8266 is not very good and is disturbed by the WLAN.

  • @martinvollderpro
    @martinvollderpro 10 місяців тому

    15:27 wrong. some of them can measure reverse currents, for example ina219/ina226.

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      You are right. See my pinned comment

  • @Jacklsovakia1
    @Jacklsovakia1 10 місяців тому

    Nothing appeared in the top right corner for me

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому +1

      Thank you for the input. Indeed, I forgot to add the link :-(

  • @BadZocker13
    @BadZocker13 10 місяців тому

    Why the Reupload?

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому

      Because it is summer break (as said in my last video)

  • @Filip_Visnjic
    @Filip_Visnjic 10 місяців тому

    Why this old video again?

    • @AndreasSpiess
      @AndreasSpiess  10 місяців тому +1

      As written in the comment and announced in my last video, I always show old videos during my summer break. Viewers asked for that, and according to the many comments here, a lot of newer viewers did not see the initial version. You seem to be a longtime viewer, though.

  • @techno_mesh
    @techno_mesh 10 місяців тому

    There is a typo at 1:40