Taillieu.Info

More Than a Hobby..

How to Use Wemos ESP-Wroom-02 D1 Mini WiFi Module ESP8266 + 18650 by Using Blynk

Specification:

  • Compatible with nodemcu 18650 charging system integration
  • The indicator LED (green means full red means charging) can be used while charging
  • Switch control power supply
  • SMT connector can be used for sleep mode · 1 additional LED programmable (gpio16)
  • 0.5a charging current
  • 1A output
  • Overcharge protection
  • Over discharge protection
  • 10 digital pin read/write/interrupt/PWM/I2C/line support (except D0)
  • If the battery is in the wrong direction, the charging chip will be destroyed.

Features :

  • One AD inputs.
  • Micro USB inputs.
  • One programmable LED (D0).
  • AUTO PROGRAM circuit.ESP8266 (ESP-WROOM-02 With TELEC) is equivalent to the NodeMCU.
  • Analog Input (AD): Built-in dividing resistor (AD = 220K – ADC – 100K = GND).
  • There is a SOLDER terminal for SLEEP MODE.
  • Compatible With Arduino and NodeMCU.
  • Operation and charging are possible at the same time.
  • 18650 charging circuit including the 5V boosting circuit with TP5410.
  • Overcharge protection, over-discharge protection built in.
  • LED: Red = Charging, Green = Full charging.
  • 3000 mA 18650 It is possible to operate for more than 17 hours on a battery.
  • Integrated 18650 battery charging and discharging system.
  • One switch controls whether the 18650 battery is powered or not.
  • OLED’s SDA and SCL connected to the D1 pin and the D2 pin respectively.
  • The five buttons are controlled by FLASH, RESET, D5, D6, and D7 respectively.
  • The 5 Digital pins can configure the write/read/interrupt/PWM/I2C/one-wire supported separately.
  • Operation and NodeMCU consistent, adding a programmable LED, you can use GPIO16 to control, display 8266 running status and other functions.
  • Integrated OLED and five buttons, more convenient for development.
  • The design concept originates from the open source project NodeMCU, and the development board integrates 18650 charging and discharging systems with charging and discharging protection.
  • At the same time, an OLED and five directional buttons are integrated to facilitate the development.

Step 1: Material Preparation

In this tutorial we need:

  1. Wemos ESP-Wroom-02 D1 Mini Wifi Module ESP8266 + 18650 Battery Cover
  2. Micro USB cable

In this tutorial, we'll use an application from smartphone "Blynk" to control the Arduino Wemos D1 (ESP8266) with LED Traffic Light Module.


Before we begin, prepare all the item needed:

  • Breadboard
  • Wemos ESP-Wroom-02 D1 Mini Wifi Module ESP8266 + 18650 Battery Cover
  • Jumper wires male to female
  • LED Traffic Light Module ( you can also use base LEDs )
  • micro USB
  • Smartphone (You need to download "Blynk" from Play Store/iStore)
  • Ultrafire 3.7V 1100mAh Li-Ion Battery (if needed

 

Step 2: Pin Connection

Picture of Pin Connection

Follow the connection as shown above.


 

tep 3: Board Installation

Picture of Board Installation
Picture of Board Installation
Picture of Board Installation

Next, open Arduino IDE and go to [File => Preferences]. A dialog box appears. In this box, an additional board manager URL text box is present.

  • Copy and paste the following URL into the box and click OK to download the packages.
  • http://arduino.esp8266.com/stable/package_esp8266com_index.json

  • Step 4: Find Out in Board Manager

    Picture of Find Out in Board Manager
    Picture of Find Out in Board Manager

    Next, go to [Tools => Board => Board Manager] in your Arduino IDE. The Boards Manager window appears as below. Scroll down the boards in the board manager to select ESP8266 from the list of available boards. Click on install to begin the installation.


     

    Step 5: Select Board

    Picture of Select Board

    Next, uploading your first program select the type of "LOLIN(WEMOS) D1 R2 & mini" board from the [Tools => Boards] section in your Arduino IDE. 


 

Step 6: Example Code

Picture of Example Code
Picture of Example Code
Picture of Example Code
5 More Images

To get the example code from the Blynk you need to download the library from Blynk website.

https://www.blynk.cc/getting-started/

Follow these steps:

  1. Select "Download Blynk Library".
  2. Select to "Blynk_Release_v0.5.4.zip".
  3. Extract the files and copy both of the files (libraries, tools).
  4. Open Arduino IDE go to [Files => Preferences] find the files that appears on the "Sketchbooks location".
  5. Open the Arduino file and paste both of the files you've copied.
  6. Then, open your Arduino IDE, go to [Files => Examples => Blynk => Boards Wifi =>Standalone] for the example code.
  7. Step 7: Blynk Setup

    Picture of Blynk Setup
    Picture of Blynk Setup
    Picture of Blynk Setup
    Picture of Blynk Setup
    6 More Images

    Next, you need to set up your "Blynk" from your smartphone.

    Follow these steps:

    1. Download "Blynk" at Play Store/iStore.
    2. Sign up using your email.
    3. Go to "New Project" Enter your project name (if needed).
    4. Choose device "WeMos D1 mini".
    5. Connection type "Wifi" then "Create". (After create you will receive Auth Token from your email).
    6. Slide to the left to open "Widget Box".
    7. Select "Button" to add button.
    8. Touch the button for "Button Settings".
    9. Select [Output => Digital => D2,D3,D4] to choose pin connection.
    10. Mode turn into "Switch".

    11. Step 8: Uploading

      Picture of Uploading
      Picture of Uploading

      Now you need to check out your email inbox and copy the Auth token code.

      Insert the Auth Token, Network name, and Password to your programming. Now upload the code to your WeMos D1 mini through micro USB. Make sure you use the right port by select at [Tools => Port].


       

      Step 9: Try Out Blynk Button

      Picture of Try Out Blynk Button

      Select the play button from the upper right side and turn on the pin button.