Arduino Nano 4x 18650 Smart Charger / Discharger

1,405

13

This is my Arduino Nano 4x 18650 Smart Charger / Discharger Open Source Project.

This unit is powered by 12V 5A. It can be powered by a computer power supply.

Links

Battery Portal: https://portal.vortexit.co.nz/

Parts List: http://www.vortexit.co.nz/parts-list-nano-4x/

Schematic: https://easyeda.com/brettwatty/arduino-nano-4x-ch...

PCB Gerber Files: https://www.pcbway.com/project/shareproject/Brett...

Source Code: https://github.com/brettwatty/arduino-nano-4x-cha...

Facebook Group: https://www.facebook.com/groups/DIYbatterycharger...

Forum: https://secondlifestorage.com/t-Brett-s-Arduino-8...

Checkout my database stats page of all currently processed batteries: http://www.vortexit.co.nz/batteries-recycled/

Donate: http://www.vortexit.co.nz/donate/

The History

I wanted to make a smart Arduino powered charger, discharger battery tester that could have a barcode scanner that scanned barcodes on batteries and input all the data into an Online Database Portal. This would allow me to correctly sort and analyze trends in all my reclaimed lithium batteries.

Version 1: I originally started out using a single sided PCB milled out with my CNC. This unit only had one cell and could charge ,discharge and test milli ohms.

Version 2.2: I moved onto using smaller PCB's that were etched then I had two cell modules on a Arduino UNO.

Version 3.2: I used the same smaller PCB's but I used an Arduino Mega and mounted it all on a Acrylic stand. I had originally planned to have 16 modules but ended up only using 8 cell modules as I would of needed to use analog signal multiplexers and the wiring was already very messy.

Arduino Mega 8x Charger / Discharger 1.1: I designed a PCB in easy EDA for an Arduino Mega 8x Charger / Discharger. This has a 20x4 LCD, Rotary Encoder, SD Card reader (never used), Ethernet, USB Host for a barcode scanning direct into the Arduino.

Arduino Mega 8x Charger / Discharger 1.2+: Later I made some small changes and added a ESP8266 Adaptor for WIFI communication.

Arduino Nano 4x 18650 Smart Charger / Discharger 1.0: I started designing a 4x version to make it much cheaper and easier to build. This version does not have a barcode scanner but it communicated with the Vortex IT Battery Portal to send and receive data via the internet.

Arduino Nano 4x 18650 Smart Charger / Discharger 1.1: This has some small amendments from Version 1.0 as it had some small bugs in the design and this version was released to the public.

Step 1: Get the Components

PCB Gerber Files

PCB Gerber Files: https://www.pcbway.com/project/shareproject/Brett_s_Arduino_4x_ASCD_18650_Smart_Charger_Discharger_1_11.html

Main Components

    THT (Through Hole) Component Option

    SMD (Surface Mount) Component Option

    Tools

    For an updated list go to my website: http://www.vortexit.co.nz/parts-list-nano-4x/

    Step 2: Solder Resistors, Transistors and MOSFETs

    Either SMD or THT solder (not both) the 1K, 4.7K, 10K, P-Channel, N-Channel and NPN components

    Step 3: Solder in the Headers and DIP Socket

    Solder the Nano's two 15 pin female headers, 16x CD74HC4067 Multiplexers 8 pin and 16 pin female headers, ESP8266 adaptors 4 pin female, LCD 4 pin female and the 74HC595N Shift registers 16 pin DIP IC socket.

    Note: solder all components on the silk screen side.

    Step 4: Solder Basic Components

    Solder and install the 5.5mm DC Jack, Arduino Nano 328p, CD74HC4067 multiplexer and 74HC595N shift register.

    When soldering the Arduino Nano and the Multiplexer I recommend first placing the male header pins in the female header pins then solder the component in place.

    Step 5: Solder the Dallas DS18B20 Temperature

    First place two 3mm x 7mm x 0.8mm Insulating Washers on each Dallas Sensor (This is used to create a space off the PCB so you don't measure the PCB temperature)

    Solder the 4x Dallas Sensors on the top layer for each cell module plus the ambient sensor on the bottom layer.

    Be careful not to bridge the solder joints on the TO-92 solder pads. Once soldered measure in diode mode on your multi-meter between each leg on any Dallas Sensor (they are all connected in parallel)

    Solder the 5V Active Buzzer on the top layer where the + (positive) pin is facing the Arduino Nano

    Step 6: Solder in the Diode

    Solder in the Diode under the CD74HC4067 multiplexer

    It is good practice to clean the flux with isopropyl alcohol.

    Step 7: Test and Adjust the LCD Screen Contrast / Serial Jumpers

    LCD Contrast

    Connect the LCD Serial 4 pin female to a 4 pin Male -> Female Dupont Jumper wires. Make sure you connect you connect exactly:

    GND -> GND

    VCC -> 5V

    SDA -> SDA

    SCL -> SCL

    Load the Arduino Sketch from github: ASCD_Nano_Test_LCD_Screen

    Unplug the USB cord and use a 12V power cord in the 5.5 mm DC Jack (+ positive center / - negative outer)

    Adjust the potentiometer on serial adaptor at back of the LCD Screen CC or CW until you see the text displayed.

    Once you are happy with the contrast remove the Dupont Jumper wires.

    Serial Jumpers

    Connect 2x 2.54 mm jumpers on pins 1-2 for software serial communication with the ESP8266

    Step 8: PWM Fan

    Components

    Solder the following components:

    JST 2.0 PH 2pin connector (Note: the silk screen is backwards on the PCB version 1.11)

    100uF 16V Electrolytic Capacitor

    BD139 NPN Transistor

    Diode

    Test

    Load the Arduino Sketch from github: ASCD_Nano_Test_Fan

    Unplug the USB cord and use a 12V power cord in the 5.5 mm DC Jack (+ positive center / - negative outer)

    Plug in the 30mm Fan

    The Fan should speed up then stop

    Step 9: Testing the MOSFETs

    Testing N-Channel Resistor Discharge MOSFETs

    Load the Arduino Sketch from github: ASCD_Nano_Test_Charge_Discharge_Mosfets

    Unplug the USB cord and use a 12V power cord in the 5.5 mm DC Jack (+ positive center / - negative outer)

    With the PCB facing the bottom layer set your multi-meter to diode / continuity mode.

    Place the negative probe on a GND source and the positive probe on the 1st modules load resistors connectors right side (as shown in the images).

    Your multi-meter should beep for 1 second then no beep for 1 second.

    Repeat this for each module.

    Testing P-Channel TP5100 Charge MOSFETs

    Load the Arduino Sketch from github: ASCD_Nano_Test_Charge_Discharge_Mosfets (Same as above you can use this sketch for both tests)

    Unplug the USB cord and use a 12V power cord in the 5.5 mm DC Jack (+ positive center / - negative outer)

    With the PCB facing the bottom layer set your multi-meter to DC voltage mode (usually 20V range).

    Place the negative probe on a GND source and the positive probe on the 1st modules TP5100 right side + positive connector (as shown in the images).
    Your multi-meter should show 12V for 1 second then a low voltage for 1 second. Repeat this for each module.

    Step 10: Get the Dallas DS18B20 Temperature Sensor Serials

    Load the Arduino Sketch from github: ASCD_Nano_Get_DS18B20_Serials

    Leave in the USB cable. Do not connect the Fan or 12V Power.

    Open the Serial monitor in Arduino IDE at 115200 baud rate.

    It should detect / locate 5x devices.

    Heat up the 1st DS18B20 Temperature Sensor with the upper tip of your soldering iron for a short period of time.

    Note: Module number are from left to right with the PCB facing upright on the top layer

    It should print "Detected Battery: 1" then "Heat Up Battery Sensor: 2"

    This will sequentially go through each 4 x modules until it says "Detected Ambient Sensor Completed"

    It will display the Hexadecimal Serial numbers of all the DS18B20 Temperature Sensors at the bottom.

    Copy the 5x Serial numbers and then paste them into "Temp_Sensor_Serials.h" within the "ASCD_Nano_1-0-0" sketch. Make sure you emit the last comma (shown in the image)

    Note: If you get 99 degrees Celsius temperature reading it means that there is an error reading that sensor. Either the serial is wrong or the device is faulty.

    Step 11: Install and Test the TP5100 Charging Modules

    Install

    With a knife or some diagonal pliers cut 20x single Male 2.54 mm headers.

    Place 5x Male headers per TP5100 module on the bottom layer on the PCB. I recommend putting the long side down through the hole.

    Place a TP5100 module on each module and solder it in place. Use some tweezers to manipulate the Male headers if they won't align.

    On the top layer of the PCB solder the connectors as flush with the PCB as you can. (You will need to fit the plastic Battery holder on top so the less stick out the better)

    Note: Make sure you connect the Charge Pin on the TP5100. It is the closest pin next to the VCC in GND above the P-Channel MOSFET

    Test

    Load the Arduino Sketch from github: ASCD_Nano_Test_Charge_Discharge_Mosfets (Same as above you can use this sketch for both tests)

    Unplug the USB cord and use a 12V power cord in the 5.5 mm DC Jack (+ positive center / - negative outer)

    All the TP5100 modules should turn on for 1 second the turn off for 1 second.

    Step 12: Drill DS18B20 Temperature Sensor Clearance Holes

    Tools required

    • 0.7mm Drill bit or Scribe
    • 3mm Drill bit (optional)
    • 6.5mm - 7mm Drill bit

    Drill

    Get a spare blank PCB and a 4x 18650 Battery Holder

    Mount the 4x 18650 Battery Holder with the + marking facing the top of the board

    Mark the hole positions with a 0.7mm Drill bit or a Scribe via the center pin on each of the TO-92 DS18B20 Temperature Sensors

    Remove the 4x 18650 Battery Holder and drill a 6.5mm - 7mm hole. I recommend using a smaller drill bit first.

    Test fit the 4x 18650 Battery Holder and see if the DS18B20 Temperature Sensor have sufficient clearance.

    Note: Do not solder the 4x 18650 Battery Holder until all other components have been soldered.

    Step 13: Mount the Discharge Resistors

    Mount and Solder Headers

    First mount the headers. You can either use the 5.08mm Screw Terminal or JST 2.54mm Male Header.

    Note: I use some blu tack to hold the header / terminal in place while soldering.

    Solder them in.

    Measure Ohms of Resistors (Optional)

    Measure, number and log the resistance of each resistor.

    I use my LCR-T4 Tester for this. You could use a quality multi-meter (this is not 100% accurate but is a good base measurement)

    Edit the Arduino Sketch from github: ASCD_Nano_1-0-0 add in the amended resistor values.

    Mount the Resistors

    In this example I am using the 5.08mm Screw Terminals and I am staggering each wire wound resistor. Later I will add steps for aluminium clad resistors on a heat-sink.

    Step 14: Solder the Final Components

    Solder in the 4x 18650 Battery Holder.

    Note: You may need to trim some contacts down with some flush / diagonal pliers.

    Solder the 6mm push button.


    Step 15: Mount All the Hardware

    Arduino ESP8266 Adapter

    4x Use M2.5 stand-offs M-F or F-F

    8x M2.5 Screws or 4x M2.5 screws and 4x M2.5 nuts depending if you use M-F or F-F stand-offs

    Use a right angle 4pin 2.54mm connector to connect the Female to Male connectors.

    Note: you may need to tin the connector to get a good connection if it is loose.

    LCD

    4x M3 Standoff 18mm Brass F-F and 8x M3 x 12mm Screws for the LCD

    Fan

    3D Printed case only: Thread some M3 x 18mm screws the Fan screw holes add the Fan.

    Step 16: Upload the Arduino Nano Sketch

    Before uploading the sketch check the 5V Voltage output from the Arduino's Voltage Regulator. There are two probe points about the LCD screen.

    Edit the Arduino Sketch from github: ASCD_Nano_1-0-0 Change this line in the Arduino Sketch to your voltage reading

    const float referenceVoltage = 5.01;		   // 5V Output of Arduino

    You can also change some other custom setting for your testing needs

    const float shuntResistor[4] = {3.3, 3.3, 3.3, 3.3};
    const float referenceVoltage = 5.01;		   // 5V Output of Arduino
    const float defaultBatteryCutOffVoltage = 2.8;	   // Voltage that the discharge stops
    const byte restTimeMinutes = 1;			   // The time in Minutes to rest the battery after charge. 0-59 are valid
    const int lowMilliamps = 1000;			   // This is the value of Milli Amps that is considered low and does not get recharged because it is considered faulty
    const int highMilliOhms = 500;			   // This is the value of Milli Ohms that is considered high and the battery is considered faulty
    const int offsetMilliOhms = 0;			   // Offset calibration for Milli Ohms
    const byte chargingTimeout = 8;			   // The timeout in Hours for charging
    const byte tempThreshold = 7;			   // Warning Threshold in degrees above initial Temperature
    const byte tempMaxThreshold = 20;		   // Maximum Threshold in degrees above initial Temperature - Considered Faulty
    const float batteryVolatgeLeak = 0.50;		   // On the initial screen "BATTERY CHECK" observe the highest voltage of each module and set this value slightly higher
    const byte moduleCount = 4;			   // Number of Modules
    const byte screenTime = 4;			   // Time in Seconds (Cycles) per Active Screen
    const int dischargeReadInterval = 5000;		   // Time intervals between Discharge readings. Adjust for mAh +/

    Connect up the Arduino Nano to your computer and load the ASCD_Nano_1-0-0 sketch

    You may need to use ATmega328P (Old boot loader) as the processor in Arduino IDE

    Select the correct COM port and upload the sketch

    Step 17: Upload the ESP8266 Sketch

    If you have not already registered your Vortex It - Battery Portal Account go to the next step.

    You need to install the ESP8266 Arduino Addon in your Arduino IDE use this guide:
    https://learn.sparkfun.com/tutorials/esp8266-thing...

    Change the following in the ESP8266_Wifi_Client_1-0-0 Arduino Sketch

    const char ssid[] = ""; -> to your WIFI routers 
    SSID const char password[] = ""; -> to your WIFI routers Password
    const char userHash[] = ""; -> to your UserHash (Get this from "Charger / Discharger Menu -> View" in the Vortex It Battery Portal) 
    const byte CDUnitID = ; -> to your CDUnitID (Get this from "Charger / Discharger Menu -> View -> Select your Charger / Discharger" in the Vortex It Battery Portal) 

    Use USB to ESP8266 ESP-01 Programmer to upload sketch ESP8266_Wifi_Client_01.ino to the ESP8266 with the switch on PROG

    Step 18: Setup Your Vortex It - Battery Portal Account

    Go to https://portal.vortexit.co.nz

    If you have not already register for an account.

    Login with your credentials

    On the menu click "Charger / Discharger" -> "New"

    Select from the drop down list "Arduino 4x C/D"

    Click "New Charger / Discharger"

    On the menu click "Charger / Discharger" -> "View"

    Select from the drop down list "xx - Arduino 4x C/D" (where xx is the CDUnitID)

    Make not of your "UserHash" and "CDUnitID"

    Click "Live View Module" to view you Charger / Discharger online

    Step 19: Optional - Make a 3D Printed Enclosure

    If you have a 3D printer you can print an enclosure that I have designed. Feel free to make your on style of enclosure and share it:

    Fusion 360

    https://gallery.autodesk.com/fusion360/projects/asdc-nano-4x-arduino-charger--discharger-enclosure

    Thingiverse STL

    https://www.thingiverse.com/thing:3502094

    Step 20: Start Testing 18650 Cells

    Insert some batteries into the Cell Modules and go to the "Live View Module" page scan in your barcodes and you are off.

    Check out the Facebook group for updates, information, help and discussions.
    https://www.facebook.com/groups/DIYbatterychargerdischargertesters/

    Arduino Contest 2019

    This is an entry in the
    Arduino Contest 2019

    Share

      Recommendations

      • Arduino Contest 2019

        Arduino Contest 2019
      • Tape Contest

        Tape Contest
      • Trash to Treasure

        Trash to Treasure

      Discussions