15 Minute Arduino Project: OLED Ammeter INA219

Поделиться
HTML-код
  • Опубликовано: 19 мар 2017
  • Another Arduino sandwich - this time the INA219 current sensor module, an Arduino Pro Mini and a 128x32 OLED. Part of my 18650 current monitoring project.
    Arduino Code: hastebin.com/papifoyota.cpp
  • НаукаНаука

Комментарии • 251

  • @justoneofthesheep
    @justoneofthesheep 7 лет назад +19

    your pin unsoldering technique at 4:50 is genius and leaves such clean results ! Nice work man !

  • @BoomBrush
    @BoomBrush 7 лет назад +9

    I love these 15 minute arduino projects, keep it up!

  • @richardboyce4921
    @richardboyce4921 7 лет назад +1

    Definitely missed you! Love these short little projects, great work.

  • @aemvasconcelos
    @aemvasconcelos 7 лет назад +34

    I have just learned something very useful here, how to remove that headers without friyng the board, thank you Sir. 😊

    • @HeltonMoraes
      @HeltonMoraes 5 лет назад +2

      This was a REALLY useful thing to learn!

    • @MrBobWareham
      @MrBobWareham 4 года назад

      Yes I have been doing that for years it works well just make sure your iron is hot and tined well then when you see the solder melt bang it down and the pin or wire will come out and a bit of practice and it works its all in the timing

    • @MCircuits
      @MCircuits 3 года назад

      The hidden technique...unveiled...been using it for decades. :)

  • @VolthausLabElectronics
    @VolthausLabElectronics 7 лет назад

    I certainly continued your tradition of 'mucking about' even with every single solution pre-provided. So much fun! Now I too have a handy ammeter. Thank you very much Julian and as always thank you for the entertaining video. Cheers.

  • @ricktremmel
    @ricktremmel 7 лет назад +1

    Enjoyed your video. Very cool how you connected the 3 modules. Keep up the excellent videos.

  • @jeffbeck6501
    @jeffbeck6501 7 лет назад

    Awesome as usual Julian. Lots of fun. I like the OLED.

  • @Metroid1890
    @Metroid1890 4 года назад

    The power of soldering techniques are strong within this man

  • @austinskylines
    @austinskylines 7 лет назад

    I hope you had a good weeked Julian! Thanks for the video!!!

  • @RyanStone143
    @RyanStone143 7 лет назад

    The cutouts on the solder sponge are great!

  • @MrBobWareham
    @MrBobWareham 4 года назад

    Nice small project with cut and past code you make it look so easy bending all the wires very nice thank you

  • @nelsnelsen6741
    @nelsnelsen6741 7 лет назад +1

    Thank you very much, looking fwd to the development of the next proj

  • @michaelc3693
    @michaelc3693 7 лет назад

    This was an awesome video. My first of yours, but now I shall seek out the rest of the series... Right... Cheerio!

  • @stephanc7192
    @stephanc7192 7 лет назад

    Very nice and useful little project!

  • @vangelis.gavalakis
    @vangelis.gavalakis 5 лет назад

    Best soldering sponge ever. Laughed a lot :P

  • @mmejiam
    @mmejiam 3 года назад

    And to think i had to struggle with third hand tool and all it takes is shaking the board, great tip thanks!!

  • @nrdesign1991
    @nrdesign1991 7 лет назад +1

    This video encouraged me to try Full Page Buffer mode in u8g2. Despite the RAM being used, it is really very easy to port stuff made with U8X8 to U8g2 in full buffer mode. My weather datalogger project is now running happily on a Nokia 3110 display (I used a small OLED before, but that ate too much power). A 300mAh lipo should now last for at least a week (ideally calculated 9 days).

  • @ChrisSavageEngineer
    @ChrisSavageEngineer Год назад

    Love the Smiley Face you cut into your sponge!

  • @Hackvlog
    @Hackvlog 7 лет назад

    Cool project and the future project idea sound interesting.

  • @sv3glx
    @sv3glx 7 лет назад +1

    Very nice video. Good work!

  • @miodice3
    @miodice3 6 лет назад

    Love the clay, great tip

  • @pfsmith007
    @pfsmith007 7 лет назад +1

    Nice trick with the pins homie!

  • @FullSendPrecision
    @FullSendPrecision 7 лет назад

    Upvote for the putty idea! Love that!

  • @AdamWelchUK
    @AdamWelchUK 7 лет назад +2

    Yay - been on holiday Julian? Nice little project. Looking forward to the lithium test.

    • @JulianIlett
      @JulianIlett  7 лет назад +3

      Yeah, 1 week in the sunshine! Cheers Adam :)

  • @MCsCreations
    @MCsCreations 7 лет назад

    Really great project! :D

  • @Dingbat217
    @Dingbat217 7 лет назад

    Neat trick with the bluetack! :-)

  • @dalenassar9152
    @dalenassar9152 6 лет назад

    You should add a short bit of stripped (hollow) wire insulation (fallen on your table) over those 'closely' placed/crossed bare wires. Another tip I learned over the years: When soldering something like an 8-pin DIP socket onto a PCB, first solder diagonal pines (ie pins 1 & 5) than while putting slight pressure on the top of the socket, wet the solder at one of those diagonals--you will hear a slight 'click' as the pin fully jumps into the hole--repeat for the other diagonal. Now solder the remaining pins and all will be flush! You may want to slightly re-wet the diagonals. This works for all size DIPs including the big 40-pinners as well as with SIPs!

  • @DJDevon3
    @DJDevon3 5 лет назад +3

    INA219 Specs (26V ±3.2A).
    As of 2018 Adafruit recommends the Metro Mini 328 instead of the Pro Mini or Trinket boards due to FTDI bootloader, driver issues, and other issues. Metro Mini costs less than purchasing both the Pro Mini & CP2012 (required to program a Pro Mini). So if you were to replicate this project in 2019 you'd want a Metro Mini, INA219, and 128X32 OLED. It would be more powerful, more efficient, and actually cost a few dollars less than in 2017. :)
    There is an INA169 which has much higher range but after research, that one is analog only to be measured with a multimeter or separate data logger, it does not have I2C communication which is needed in this project. INA219 is still best for this project. The Metro Mini can communicate through I2C or SPI so it's compatible with the INA219.
    In the code you can set the screen to flip between displaying voltage and amperage. You only show it monitoring amperage in this video but it will do voltage too. You did actually show that in your other video (I paused to go watch it). Great job with the info card links. You make quality content. Very easy to watch and follow along. I was going to comment about improving the code for mA, A, and watts but I found you have another video where you address that. :) ruclips.net/video/zvcTUMBGO24/видео.html
    Awesome monitor for little projects. Will fit into a tiny project box. I actually don't have one of these but because of your video I'll probably pick one up to play with. Thanks for the great video!

  • @toshio609
    @toshio609 5 лет назад

    It was very helpful. Thank you!

  • @MegaScott
    @MegaScott 2 года назад

    Right. My experience with the INA219 pre-built boards is that the 0.1ohm shunt resistor is not exact and varies allot with temperature. Also, some noise can be filtered with a .1m capacitor across the shunt. These boards seem to work well as intended to get you up and running in a short amount of time. The Max rated current you can measure with this 0.1m resistor is only 3.2A, but you can reduce the shunt resistance to get a bigger current reading, of course some modification to the INA219 library is required, or you can scale the reading from the sensor using a bit of math, and if you're feeling a bit more ambitious you can make a routine to scale the current based on the temperature of the Shunt resistor. Adafruit has a good write-up about this sensor, but probably this kind of accuracy is probably not required for most people. Good vidjeo. Love that there is an actual voice Behind the Mic versus some kind of computer driven synthesis . I have done some looking around, and if you want to make your own board with the INA219 chip it comes in two sizes, the very small SOT-23-8 and the SIOC-8, the SOIC-8 is more widely available and for the hobbyist, much easier to solder onto your own board as compared to the SOT-23. Thanks!

  • @zaidhussain5206
    @zaidhussain5206 7 лет назад

    Thank you for sharing this project

  • @deangreenhough3479
    @deangreenhough3479 7 лет назад

    Ohh I like it👍 nice build. I'm
    Going to have to give it a go. Very interested in the follow up project please Julian😀😀

  • @haydenc2742
    @haydenc2742 7 лет назад

    Program in an average of say 3-5 readings per display refresh so it is more stable instead of jumping around
    Very cool build!!!!

  • @vitriolix
    @vitriolix 7 лет назад

    cool, I like the pin twist method

  • @sb57965
    @sb57965 7 лет назад

    I like the sponge for the soldering iron :)

  • @riazaslam2163
    @riazaslam2163 7 лет назад

    thank you for the cross over been solved. when they don't line up . and also i can choose two different voltages to work correctly

  • @weirdscix
    @weirdscix 7 лет назад +1

    Oh good, you're still alive :-)

  • @JamesFraley
    @JamesFraley 4 года назад

    Great video. I would love to see you turn this into a complete process. IE: put insulation around the wires, put it into a case and maybe eve order a PCB and make it a more permanent build.

  • @TuttleScott
    @TuttleScott 7 лет назад +4

    I'd add a little software smoothing too, average the mA over a second maybe and then display it.

  • @_who_cares_1123
    @_who_cares_1123 7 лет назад

    You dont even need that right angled header for programming ...
    Your programmer fits perfectly. Even the Layout is the same

    • @pfeerick
      @pfeerick 7 лет назад

      Not quite... the 5V and GND wires are crossed over... you can see the blue wire is on the top pin on the USB to serial, but the purple one is on the top on the Arduino. Otherwise it would have been perfect, and the right-angle pin header could have been replaced with a right angle female socket for direct plug-in!

  • @Hasitier
    @Hasitier 7 лет назад

    Great to know that the ina219 also works as a stand alone current Sensor. I always thought that you need to wire up the voltage measurement also to get it running. If you ask why is that a Problem for me: well it can only measure up to 26V. That might be a Bit low for some applications like a Self made bench power supply.
    Greetings from Germany. Michael

  • @qzorn4440
    @qzorn4440 2 года назад

    a very enjoyable arduino project... i will use the esp32 with the built-in oled and see what happens... 👍 👍 👍 thanks , or cheery-O... 😀 time for tea Mrs. Peel

  • @MattOGormanSmith
    @MattOGormanSmith 7 лет назад +1

    You could add a 2nd current board to the same setup if you have enough screen space for both numbers.

  • @MarkHopewell
    @MarkHopewell 2 года назад

    I plan to use this device to sense a current signal transmitted from a wind vain sensor so as to be able to transmit the converted current values via I2C to an Arduino Nano in my weather station project. Fingers crossed the device is able to sense currents down to 4mA!

  • @davidwebb2318
    @davidwebb2318 7 лет назад

    My word of the day - MUNGE !

  • @juliusvalentinas
    @juliusvalentinas 7 лет назад

    I'm looking for making a cap discharger with indication, this polarity swapping seems what I need. There will be voltage divider obviously and this sensor is very nice :)

  • @TheTrashcutter
    @TheTrashcutter 7 лет назад

    nice hell of a sandwich

  • @KX36
    @KX36 7 лет назад +14

    That hundredths digit that's always zero but still displayed (implying more precision than there actually is) bothers me far more than it should.

    • @nrdesign1991
      @nrdesign1991 7 лет назад

      Also, the numbers are shifting around slightly

    • @pfeerick
      @pfeerick 7 лет назад +2

      Yeah, there is no averaging or multiple sampling in the code whatsoever, so you only get the instantaneous reading from the INS219, rather than a more sane averaged reading. Doing something like five or 10 samples and averaging them before display should smooth things about a bit, and can be done without adding too much overhead time. However, that is outside the scope of a 15 minute project... especially when you need to explain how to calculate running averages in code, etc ;)

  • @thorbennielsen3845
    @thorbennielsen3845 7 лет назад

    Very good video.

  • @JerryEricsson
    @JerryEricsson 7 лет назад

    I think I would have used some shrink tubing on those between the things, bare wires make me nervous in such situations but your way may work well also.

  • @lhxperimental
    @lhxperimental 7 лет назад

    When connected in series, current through all batteries will be the same. You don't need multiple sensors.

  • @virmontisfbg
    @virmontisfbg 7 лет назад +2

    Nice project! How about dropping the decimal places?

  • @BeetleJuice1980
    @BeetleJuice1980 7 лет назад +10

    check the accuracy with a calibrated multimeter please

  • @aragao23
    @aragao23 7 лет назад +2

    where did you get the tinned copper wire?

  • @californiakayaker
    @californiakayaker 7 лет назад

    I have seen one video where the tech used two toroid with a few windings each and then went to the hall effect sensor for a type of clamp. and another where the guy cut a toroid. Interesting stuff.

    • @californiakayaker
      @californiakayaker 7 лет назад

      Apparently the individual sensors can have 3 different sensitivity ratings.

  • @tablatronix
    @tablatronix 7 лет назад

    The wire library lets you change the pin assignments, no need to cross

  • @azyfloof
    @azyfloof 7 лет назад

    A wild Jules appears!
    Happy Monday fella! :D Neat little project! Could you code in a trimmer potentiometer to zero offset the reading? It's odd the offset was present on both positive and negative current readings.

  • @harryohanson
    @harryohanson 3 года назад

    Thank you, Julian! I’ve wanted to make a small OLED infotainment for my bike with showing voltage, ammeter, coolant temperature, fuel level, time and speed. This would help me a bit.
    What is the reason for using u8g and can that be mixed with other libraries?

  • @user-jq1ml7yx4t
    @user-jq1ml7yx4t 3 года назад

    Coool!

  • @yokonunz
    @yokonunz 7 лет назад +3

    Hi! Where have you bought that "tinned copper wire" ? Thanks

    • @JulianIlett
      @JulianIlett  7 лет назад +2

      That came from Rapid Electronics Ltd.

  • @stevesm2010
    @stevesm2010 7 лет назад

    Ah! The minus makes sense now - Great little project :D

  • @IGBeTix-Electronique
    @IGBeTix-Electronique 7 лет назад

    Hi from la france, thank's for your video and your code. Do you know a module but to measure largers currents (ex : with the alternative 230V) ?

  • @WayneJohnsonZastil
    @WayneJohnsonZastil 7 лет назад +2

    Did you not have any heatshrink small enough for the wires instead of bending them!

  • @soufelectronicsandengineer7472
    @soufelectronicsandengineer7472 3 года назад

    Thank you so much, but how can reduce or remove all that fluctuations of the current?

  • @avejst
    @avejst 7 лет назад +1

    Nice project. Why is the SPI.h in the code?

  • @sirkristoferTV
    @sirkristoferTV 7 лет назад +24

    Take a drink every time Julian says 'right' ;-P

    • @JulianIlett
      @JulianIlett  7 лет назад +19

      Right :)

    • @paulsengupta971
      @paulsengupta971 7 лет назад +1

      Now need more coffee.
      Sorry, was this not supposed to be coffee?

    • @tbbw
      @tbbw 7 лет назад +2

      We would get plasterd if we did something like that.

    • @adrianwilliams763
      @adrianwilliams763 7 лет назад +3

      I'm not as thunk as you dink I am.

    • @tbbw
      @tbbw 7 лет назад +2

      @Adrian Williams you made my day.

  • @Electromaniaworld
    @Electromaniaworld 6 лет назад

    i am trying to make current meter using this sensor and esp module. thanks. i am wondering how much current your oled is drawing... ?

  • @zedd81
    @zedd81 7 лет назад

    Hey Julian. Would it be possible to use two push buttons to do two different things, like one is pulsating an LED the other button would flash a different LED for 10 second with the arduino?

  • @FretsNirvana
    @FretsNirvana 6 лет назад

    What is maximum current this could handle? And do you know of a way to have logging ....or better yet a peak hold function that shows the maximum current under load and have it hold that value?

  • @Ziplock9000
    @Ziplock9000 6 лет назад

    I've read in a few places that the FT232RL (and FTDI in general) is better than the CP2102 CH340 chips due to them being more stable and drivers are easier to get?

  • @dalenassar9152
    @dalenassar9152 6 лет назад

    Julian, As a quick demo of bi-directional current reading capability Wouldn't just flipping the 9V batt. work?

  • @jej5957
    @jej5957 5 лет назад

    its it possible to use the oled 128x32 with a sht-31 on a nano? I'm stuck trying to use a 12C expander got the sht to send temps to serial monitor but not the oled.

  • @vladhristov2316
    @vladhristov2316 6 лет назад

    Can we use any 2 random Digital or Analog pins, not only those A4/A5 and SDA/SCL sets on the board? Thank you!

  • @Rattlus
    @Rattlus 7 лет назад

    What's the quiescent current of this OLED Meter? Could it run with less than 9V? For ex. some CR2032s in series placed in between boards (unused space)?

  • @DiyintheGhetto
    @DiyintheGhetto 7 лет назад

    hello Jillian I have a question. the pro mini and the ch340 which pins goes to which to program them?

  • @shivakumar-lv6wr
    @shivakumar-lv6wr 7 лет назад

    can the ina219 measure heavy currents in the range of 20a DC current. i need to measure the current flowing out of a pd-acid battery of an inverter.

  • @SatyajitRoy2048
    @SatyajitRoy2048 7 лет назад

    Its neat

  • @himselfe
    @himselfe 7 лет назад

    I feel like perhaps you could save a lot of bodge wiring by getting yourself some small adaptor PCBs printed for various combinations of I2C pin layouts. Just make them double sided so you can sandwich the crossover PCBs in between the pro-mini and display/whatever.

    • @himselfe
      @himselfe 7 лет назад

      or of course you could just use ribbon cable! :P

  • @perboye7390
    @perboye7390 7 лет назад

    enjoy your videos.
    how about a voltmeter with the same display?

  • @muh1h1
    @muh1h1 7 лет назад +10

    Why no heatshrink on one of the SDA/SCL lines to keep them from touching for good? :)

    • @-yeme-
      @-yeme- 7 лет назад +5

      or just insulated wire....

    • @KX36
      @KX36 7 лет назад

      or blu-tack

    • @bornach
      @bornach 7 лет назад +1

      muh1h1 but seriously, if you were really worried about the crossovers shorting, a drop of acrylic glue would be good insulation. Nail polish would work.

    • @muh1h1
      @muh1h1 7 лет назад

      Anything would be better than nothing honestly, heatshrink would probably the least hassle, or glue if you have it handy

    • @nrdesign1991
      @nrdesign1991 7 лет назад +3

      Hotglue the stuff together and be done with it

  • @allanshapiro
    @allanshapiro 4 года назад

    i cannot locate the arduino pro mini with the two rows of pins , as you have used.
    i could use some sources to purchase it.

  • @eddyfontaineyoutu100
    @eddyfontaineyoutu100 7 лет назад

    Did you compare the INA current value with a DVM ampmeter ?

  • @DAVIDGREGORYKERR
    @DAVIDGREGORYKERR 7 лет назад

    What happened to the function int main(int argc,char grgv[],char env[]) which calls loop().

  • @bluephreakr
    @bluephreakr 7 лет назад +2

    Why no shrinkwrap over one of the two leads at each intersection? Sure it would had looked weird but it would had prevented the need to re-spread those connections.
    Also, I would had replaced the screw terminals with bare wires and used a two-wire wego adapter to clip things together.

    • @pfeerick
      @pfeerick 7 лет назад

      Indeed... a short length of 1 mm clear heatshrink would have fixed that problem up nicely... and you'd never even know it was there! www.ebay.com/itm/1M-Tube-Heat-Shrink-Tubing-Wire-Assortment-Wrap-1-2-3-5-10-20-30-40-50-mm-/322136663421?var=511052190275&hash=item4b00d7657d:g:jMwAAOSwNSxVSwbs

  • @taranagnew436
    @taranagnew436 6 лет назад

    you should build a clock with the date

  • @sighyawn54
    @sighyawn54 Год назад

    is it possible to fit a whole program similar to the menu options on a 3d printer, on an Arduino?

  • @jeffv2074
    @jeffv2074 4 года назад

    good video, can you build a using that same tiny OLED a tiny GPS enabled speedometer ? that would be intersting

  • @kaspariito
    @kaspariito 5 лет назад

    what is this light green / blue paste thing called that is holding em components in place? btw, i really love your content! started out with arduino a few months ago, still going strong :D:D

  • @PacoOtaktay
    @PacoOtaktay 7 лет назад +1

    Julian, on the I2C devices did you remove the pull up resistors off of all, but one of the I2C boards so they aren't all trying to pull up SDA and SCL?
    I just found out over the last few days of debugging my project found that to many I2C devices with pull ups cause I2C hangups.

    • @JulianIlett
      @JulianIlett  7 лет назад +1

      No, I left them in. I think they're 10k on each board, so 5k total pullup. That's fine for I2C.

    • @PacoOtaktay
      @PacoOtaktay 7 лет назад +1

      Well that is what I thought, but after sending lots of data to two of these:
      www.ebay.com/itm/201539843593?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT
      The Arduino kept locking up when sending data to the DAC's. After looking at another version of the board here:
      www.ebay.com/itm/311517881751?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT
      This one states if you are using more than one the pull ups can be disabled.
      So after the problems I have been having & I saw your project I just thought I would say something.
      Plus these pull up resistors remind me so much of the old termination blocks you had to remove from 5.25" floppy drives when you used more than 2 drives on a system or even multiple SCSI drives.

    • @paulsengupta971
      @paulsengupta971 7 лет назад

      Can you have a load of ammeter modules all connected into one Arduino, with everything displayed on one display? Can you change the I2C address on the modules?

  • @bradleylomas7525
    @bradleylomas7525 8 месяцев назад

    Im having a hard time watching this because of your skills

  • @coxsj
    @coxsj 4 года назад

    +1 for munge!! ;-)

  • @TheAlasFelatio
    @TheAlasFelatio 7 лет назад +1

    Is this a 5v or a 3v and why?

  • @technikmitben
    @technikmitben 7 лет назад

    How about OLED Display in assembler on the PIC?

  • @tartrazine
    @tartrazine 7 лет назад

    Another of Julian's Arduino Sandwiches. Hey!

  • @SgtScourge
    @SgtScourge 7 лет назад

    Where'd you get your INA219 board? It looks like it was fabbed at OSH Park.

  • @electricfieldtv709
    @electricfieldtv709 6 лет назад +2

    How max amp it can read

  • @KX36
    @KX36 7 лет назад

    2:11 to 2:17, proof that you can jinx something by saying the wrong thing.
    On the rare occasions when my equipment at work is behaving, I try not to say a word within earshot.

  • @Jhinsydney
    @Jhinsydney 7 лет назад +1

    How much current does this ammeter use?

  • @housemusic325
    @housemusic325 7 лет назад

    where did you get the pro mini ?

  • @donaldfilbert4832
    @donaldfilbert4832 7 лет назад

    Hi !! Great video. Quick Q. When you use the CP2102 device to upload the program - do you just use the standard "upload" button? Or do you use the "Upload using programmer" function - and if so - what do you set the programmer to?

    • @tin2001
      @tin2001 7 лет назад

      Donald Filbert
      Not sure what he does, but Arduino's IDE triggers the bootloader mode by setting DTR on the serial port. So adapters that don't implement DTR (like the ones I use) don't automatically put the Arduino into bootloader.
      The trick with these adapters is to hold reset, click the upload button, wait for it to say "uploading...." in the status bar, then release the reset button. Since 90% of the time I want to be pressing a button or connecting something immediately after, I don't mind the extra button press.

    • @donaldfilbert4832
      @donaldfilbert4832 7 лет назад

      Thanks for the info tin2001 ... I'll give that a try !! ;)