Modify Arduino ASCD 8x 18650 Smart Charger / Discharger for ESP8266 Hardware Serial

5,579

5

On PCB version 2.0 and bellow the ESP8266 Arduino Adapter has the wrong pins where you cannot use (communicate) with the ESP8266 for wireless communication to the Vortex It Battery Portal.

This modification connects the ESP8266 Arduino Adapter to Hardware Serial RX1 and TX1 on the Arduino Mega 2560

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Tools and Components

Tools Needed:

Soldering iron

Pliers or Wire Strippers

Hot glue gun (optional)

Parts Needed:

ESP8266 Arduino Adaptor ESP8266 ESP-01

AliExpress Link

eBay Link

ESP8266 ESP-01

AliExpress Link

eBay Link

Dupont Wire F-F

AliExpress Link

eBay Link

Step 2: Mount and Solder

Mount

Mount the ESP8266 Arduino Adapter with the 2.5mm brass stand off's

Measure

Measure the Dupont Female wires and cut to size according to the solder points. You can mount the ESP8266 Arduino Adapter on the allocated slot or the SD Card reader slot as they are the same size.

Strip

Strip the wire at the end of the Dupont Female wires about 1-2mm with pliers or wire strippers

Solder

Solder the wires refer to image:

GND ESP8266 Arduino Adapterto Ground Plane on PCB

VCC ESP8266 Arduino Adapterto 5V Arduino Mega 2560

TX ESP8266 Arduino Adapterto D19 (RX1) Arduino Mega 2560

RX ESP8266 Arduino Adapterto D18 (TX1) Arduino Mega 2560

Hot Glue (optional)

Hot glue all the solder points

Step 3: Upload the Arduino Mega Sketch

Before uploading the sketch check the 5V Voltage output from the Arduino's Voltage Regulator.

Edit the Arduino Sketch from github: arduino-mega-8x-charger-discharger 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

typedef struct
{ const float shuntResistor[8] = {3.3, 3.3, 3.3, 3.3, 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 MilliOhms const byte chargingTimeout = 8; // The timeout in Hours for charging const byte tempThreshold = 7; // Warning Threshold in degrees above initial Temperature const byte tempMaxThreshold = 10; //Maximum Threshold in degrees above initial Temperature - Considered Faulty const float batteryVolatgeLeak = 2.00; // On the initial screen "BATTERY CHECK" observe the highest voltage of each module and set this value slightly higher const byte moduleCount = 8; // 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 +/- } CustomSettings;

Connect up the Arduino Mega to your computer and load the ASCD_Mega.ino shetch

Select the correct COM port and upload the sketch

Note: you will need to also add in your Dallas sensor serials:

DeviceAddress tempSensorSerial[9] = {
{0x28, 0xFF, 0xF5, 0xF9, 0x40, 0x18, 0x03, 0x97}, {0x28, 0xFF, 0xB3, 0x9E, 0x42, 0x18, 0x01, 0x07}, {0x28, 0xFF, 0x29, 0xF5, 0x40, 0x18, 0x03, 0xFA}, {0x28, 0xFF, 0x51, 0xA1, 0x42, 0x18, 0x01, 0x8C}, {0x28, 0xFF, 0xA8, 0x91, 0x41, 0x18, 0x03, 0xC9}, {0x28, 0xFF, 0x03, 0xF6, 0x40, 0x18, 0x03, 0x37}, {0x28, 0xFF, 0xD7, 0x7B, 0x41, 0x18, 0x02, 0xC7}, {0x28, 0xFF, 0xAD, 0x9F, 0x42, 0x18, 0x01, 0x56}, {0x28, 0xFF, 0x81, 0x8F, 0x41, 0x18, 0x03, 0xEF}};

Step 4: 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.ino 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.ino to the ESP8266 with the switch on PROG

Be the First to Share

    Recommendations

    • CNC Contest

      CNC Contest
    • Make it Move

      Make it Move
    • Teacher Contest

      Teacher Contest

    Discussions