Accurately Read Battery Voltage with an Arduino and Voltage Divider | Pro Mini | 18650 | ATmega328p

Поделиться
HTML-код
  • Опубликовано: 16 апр 2023
  • Lets look at how to track Arduino VCC and accurately measure battery voltage using a voltage divider.
    Hope you learn something new. cheers!!!
    Libraries and Code Example:
    github.com/NerdBishop/Arduino...
    ~~~~ Tools and Parts Used in this Video (AliExpress Affiliate)~~~~
    RD6018W 60V 18A Bench Power Supply
    s.click.aliexpress.com/e/_Act4hO
    Breadboard
    s.click.aliexpress.com/e/_Dey...
    Alligator Clips
    s.click.aliexpress.com/e/_DmU...
    UT61E Plus Multimeter
    s.click.aliexpress.com/e/_AK3GEo
    Jumper Wires
    s.click.aliexpress.com/e/_DCH...
    Kindly support us on patreon here: / delali
    ----------------------------------------
    Other Channel Gear and Equipment's (Affiliate)
    AliExpress
    ~~~~ Multimeters ~~~~
    UT204 Plus Clamp Multimeter
    s.click.aliexpress.com/e/_9ihxKq
    ~~~~ Oscilloscope ~~~~
    DSO FNIRSI PRO Oscilloscope
    s.click.aliexpress.com/e/_ATrDZM
    ~~~~ Soldering and Welding Kit ~~~~
    DH30 Portable Battery Spot Welder Kit
    s.click.aliexpress.com/e/_A0BPSl
    KSGER T12 STM32 V3.1S Electric OLED Soldering Station
    s.click.aliexpress.com/e/_AFoQjw
    ~~~~ Testers ~~~~
    USB Adjustable Discharge Load
    s.click.aliexpress.com/e/_9HFFwe
    RD UM34C USB Tester
    s.click.aliexpress.com/e/_9H0yI0
    USB Tester with Current Voltage Indicator
    s.click.aliexpress.com/e/_9frmaK
    Qualcomm - QC2.0 & 3.0 9V / 12V / 20V Trip Simulator
    s.click.aliexpress.com/e/_ANg1iG
    ~~~~ Others Tools ~~~~
    Xiaomi Mijia Screw Driver Kit
    s.click.aliexpress.com/e/_AeEkhC
    Non-slip Metal Scalpel Knife Set with 40 Blades
    s.click.aliexpress.com/e/_AmSdJe
    All Channel Gear on Amazon
    Amazon : www.amazon.com/shop/nerdbishop
    ----------------------------------------
    Don't forget to LIKE, SHARE and SUBSCRIBE
    Follow us @diydelali on Facebook, Twitter and Instagram
    Channel Theme Song: Entire by Quincas Moreira
    #Arduino #VoltageDivider #ATmega328p #BatteryMonitoring
    #arduino #18650 #readvoltage #batterymeasurement #promini
    #arduinoprojects #voltagedivider #promini #atmega328p #arduinotutorial #arduinoprojectsforbeginners #arduinoprogramming #howtouseanarduinotoreadbatteryvoltage #howtousevoltagedividerandarduinotoreadbatteryvoltage #readvoltagewitharduino #delali
    arduino,arduino projects,18650,voltage divider,arduino voltage divider,pro mini,atmega328p,3.3v 8mhz,arduino tutorial,how to use an arduino to read battery voltage,how to use voltage divider and arduino to read battery voltage,read voltage,read voltage with arduino,Arduini Projects,delali,arduino project,how to,how to use an arduino and voltage divider to read battery voltage,how to monitor arduino battery voltage with voltage divider
  • ХоббиХобби

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

  • @gloriagbagbo-pf1of
    @gloriagbagbo-pf1of Год назад +3

    This is a beautiful channel

  • @woll757
    @woll757 10 месяцев назад +1

    You powered the pro mini with more than 3.3v in the beginning, but with a current limit. Is this why it didn’t break? Or Why is it ok to power 3.3v pro mini with ~4V? Great channel and vids btw keep it up!

    • @Delali
      @Delali  4 месяца назад

      I powered the pro mini with a current limit to ensure it doesnt get damaged incase i dont something wrong along the process of making the video. It was just a safety precaution.
      Thanks for the kind words too. I appreciate your feedback. Cheers!!

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

    question: would this problem exist if you used a separate power source for the arduino and not use the battery?

    • @Delali
      @Delali  4 месяца назад

      No it wont exist.
      If the power source never dips below the 3.3v output peg the microcontroller requires as reference then this problem goes away.

  • @andresmateo4281
    @andresmateo4281 9 месяцев назад +2

    Excuse me one question, why you didnt use the function "map" to get the battery percentage?

    • @jakesllama
      @jakesllama 8 месяцев назад +1

      It doesn't work I tried the same and couldn't find answer why online. So went to basics and divided the value against the total times 100. This worked for me atleast

    • @Delali
      @Delali  4 месяца назад +1

      I didnt use the map() function becuase there was no need for making the Atmega328p do more work. I wanted to keep the code simple.
      I believe this:
      ((batt_volt - lowBat )/ (fullBat - lowBat)) * 100
      is simpler than this:
      map(batt_volt - lowBat, batt_volt - lowBat, fullBat - lowBat, 0, 100)

  • @samithetechsavvy6485
    @samithetechsavvy6485 4 месяца назад

    Thank you very much

    • @Delali
      @Delali  4 месяца назад +1

      You are welcome.
      Please don't forget to subscribe. Cheers!!

    • @samithetechsavvy6485
      @samithetechsavvy6485 4 месяца назад

      @@Delali of course, already done , keep up

  • @iamfyrus
    @iamfyrus 7 месяцев назад +1

    Can I measure without DC power supply? Anyone done it with nano 5v?

    • @Delali
      @Delali  4 месяца назад

      Yes you can. The battery will be the power source and the entity being measured at the same time.
      Unless i've misunderstood your question.

  • @sivaforu2004
    @sivaforu2004 9 месяцев назад

    How about the same for esp32? i'm unable to use the program for esp32?

    • @Delali
      @Delali  4 месяца назад +1

      The code is meant for the Arduino line of boards. I belive the ESP has a different architecture.

  • @khaleef_hrm
    @khaleef_hrm Год назад +2

    Hello. Can i connect with you please. I just started learning Arduino and I'm all about 18650 battery. I want to do a lot with Arduino with 18650. If you don't mind.

    • @Delali
      @Delali  10 месяцев назад +1

      Please check the about page of this channel for my email.

  • @aherte1257
    @aherte1257 9 месяцев назад +1

    assuming battery level with just measuring the voltage is not a very correct approach. Because voltage discharge level is not linear. to calculate the exact power level you also have to measure the current.

    • @Delali
      @Delali  4 месяца назад

      In my case i'm just trying to measure the battery voltage, so the non linearity of battery discharge doesnt matter much. It might matter if i was trying to calculate and estimate how long before the battery gets to a fully discharged state.
      I hope you get what i mean.

  • @robotboy3525
    @robotboy3525 10 месяцев назад

    Mad respects brother! mad respects!

    • @Delali
      @Delali  4 месяца назад

      Thank you fam❤️
      Please dont forget to subscribe. Cheers!!

  • @autonoob
    @autonoob 5 месяцев назад +1

    Is this still a problem if you use two cells feeding a voltage regulator that then feeds the arduino?
    As I understand it the problem arises because a Lion cell drops below 3.3V as it discharges this messing with the analog ref. Correct?

    • @Delali
      @Delali  4 месяца назад +1

      Yes. Correct.
      If you use two cells in series, the good news is you have more time before the combined voltage dips below the voltage regulators desired input.