Wemos D1 mini: ESP8266 multi-purpose IoT development board less than $5

Share on facebook
Share on twitter
Share on linkedin
Share on pinterest
Share on email
Share on whatsapp
Table of Contents

The Wemos D1 Mini is a board based on the ESP8266 ESP-12E module developed by the Wemos CC company. You can buy it between $3.50 and $5. As with all Arduino boards, you will also find many clones that works perfectly.

New Wemos to discover: D1 Mini Pro, Wemos XI, Shield SHT30

This small board is really very convenient to program and use. The programming can be done directly from the IDE Arduino or in Lua (using ESPlorer already presented in this article) by connecting it to the computer using a USB cable. On Mac OS X, it is recognized immediately on the port /dev/cu.wchusbserialfaxxxx . If you encounter any problems, you can manually install the CH340 drivers. You can retrieve it here. For Windows, you will also find the CH340 drivers here if needed.

Wemos D1 mini shields

Wemos (and other manufacturers) also developed learning / prototyping shields that connect to the board (the solder terminals are delivered with the board. You can choose the one you need at the time of the welding).

Check shipping cost before buyingPIN
esp8266 Wemos D1 miniESP8266 Wemos D1 Mini board

From $3.50 to $5

chargeur raspbery pi 3 5v 3000ma5V/3A micro-usb power supply

The ESP8266 is sensitive to the quality of the power supply (risk of crash). A good quality power supply is recommended.

wemos d1 mini shield batterie lipoLiPo battery charger with micro USB connector.

About $2.20

wemos d1 mini relai shieldRelai (1 output)

About $1.20

D1
wemos d1 mini one button shield1-Button

About $0.60

wemos d1 mini dht11 shieldDHT11 (not official shield): temperature / humidity sensor (read this tutorial)

About $2.70

Adafruit library : https://github.com/adafruit/DHT-sensor-library

D4
wemos d1 mini dht22 shieldDHT22 (not official shield): temperature / humidity sensor. Tutorial : presentation of the shield, how to use with ESP Easy and Arduino code

About $2.80

Adafruit library : https://github.com/adafruit/DHT-sensor-library.

D4
wemos shield sht30 sensirion temperature himidite 1SHT30: temperature and humidity sensor on I2C bus

About $2.3

Librairy and example on GitHub

D1 – SCL

D2 – SDA

wemos d1 mini oled shieldI2C SSD1306 monochrome OLED Display. How to use SSD1306 OLED display

About $4

D1 – SCL

D2 – SDA

wemos d1 mini microsd shieldMicro SD board reader (ideal for making a mini data logger)

About $1

wemos d1 mini proto shieldBreadboard

About $0.90

wemos d1 mini dual baseDouble base. Lets you install a Wemos on a slot (and overlay a shields). A 2nd location allows to install a 2nd shields.

About $1

wemos d1 mini motor shield i2cI2C Driver to drive 2 motors (15 VDC max.)

About $2.50 (without shipping cost)

D1 – SCL

D2 – SDA

wemos d1 mini shield dc powerDC Power 7-24VDC (1A max)

About $1,4

wemos shield rbg led ws2812b adafruit neopixel libraryD2

All specials for Wemos official shields

ProtoBoard Shield for WEMOS D1 mini double sided perf board
$0.30
Buy this item
aliexpress.com Aliexpress
1-Button Shield for WeMos D1 mini button
$0.60
Buy this item
aliexpress.com Aliexpress
Micro SD Shield for WeMos D1 mini TF
$0.90
Buy this item
aliexpress.com Aliexpress
Buzzer Shield V1.0.0 for WEMOS D1 mini
$0.90
Buy this item
aliexpress.com Aliexpress
Tripler Base V1.0.0 for WEMOS D1 mini
$0.90
Buy this item
aliexpress.com Aliexpress
WS2812B RGB SHIELD for WeMos D1 mini
$1.00
Buy this item
aliexpress.com Aliexpress
Dual Base for WeMos D1 mini
$1.00
Buy this item
aliexpress.com Aliexpress
Relay Shield V2 for WEMOS D1 mini
$1.20
Buy this item
aliexpress.com Aliexpress
DC Power Shield V1.1.0 for WEMOS D1 mini
$1.40
Buy this item
aliexpress.com Aliexpress
Matrix LED Shield V1.0.0 for WEMOS D1 mini
$1.90
Buy this item
aliexpress.com Aliexpress
DHT Shield V2.0.0 for WEMOS D1 mini DHT12 I2C digital temperature and...
$2.00
Buy this item
aliexpress.com Aliexpress
Battery Shield V1.2.0 For WEMOS D1 mini single lithium battery charging &...
$2.20
Buy this item
aliexpress.com Aliexpress
SHT30 Shield for WeMos D1 mini SHT30 I2C digital temperature and humidity...
$2.30
Buy this item
aliexpress.com Aliexpress
Motor Shield For WeMos D1 mini I2C Dual Motor Driver TB6612FNG (1A)...
$2.50
Buy this item
aliexpress.com Aliexpress
OLED Shield V2.0.0 for WeMos D1 mini 0.66
$4.50
Buy this item
aliexpress.com Aliexpress

Characteristics of the board

all technical documentation

  • 11 digital I/O
  • Interruption/PWM/I2C/one-wire: available on all pins except the D0
  • 1 analog input, limited to a voltage of 3.2V Max
  • 4 Mbytes memory Flash
  • CPU frequency : 80 MHz / 160 MHz
  • Dimensions: 34.2 mm x 25.6 mm
  • Weight: 10 g

Pins

Pin (on the board)FunctionESP8266 correspondence
TXTXDTXD
RXRXDRXD
A0Analog input, max 3.3V inputA0
D0IOGPIO16
D1IO, SCLGPIO5
D2IO, SDAGPIO4
D3IO, 10k Pull-upGPIO0
D4IO, 10k Pull-up, BUILTIN_LEDGPIO2
D5IO, SCKGPIO14
D6IO, MISOGPIO12
D7IO, MOSIGPIO13
D8IO, 10k Pull-down, SSGPIO15
GGNDGND
5V5V
3V33.3V3.3V
RSTResetRST

 

Correspondance Pins GPIO WeMos D1 mini

Wemos D1 Mini pinout (source : wemos.cc)

Attention, like all ESP8266 modules, do not exceed a voltage of 3.3V on the IO.

All pins support interrupts, PWM, I2C communication and One-Wire except pin D0.

Warning. Do not exceed 3.3 Volts to power the board on pin 3V is worth destroying the board

Use the Wemos D1 mini with the Arduino IDE

The Wemos D1 Mini is used like all ESP8266 boards. First, configure the Arduino IDE. Open Preferences and add the repository to the esp8266 library.

http://arduino.esp8266.com/stable/package_esp8266com_index.json

IDE Arduino 1.6.8 esp8266 package

Go to the board manager and look for esp8266, then click install.

IDE Arduino 1.6.x ajouter carte esp8266

In the list of boards, choose WeMos D1 R2 & Mini from the ESP8266 Modules list.

For my part I had to opt for an upload speed of 115200 baud. If you encounter problems, here are some ways:

  • Make a Reset,
  • Unplug and then reconnect the board,
  • Remove the board from the mounting (especially when first used).

This board comes with a series of examples that you can download on github here. Place the directory in your Arduino folder and restart the IDE to refresh the list of examples. A section is dedicated to shields:

  • 1 Button: Connected button
  • DHT pro: for the DHT22
  • DHT: for the DHT11
  • Micro SD: SD board reader
  • Relay: relay control 10A – 230V (alternating current) or 10A – 30V (direct current)
  • WS2812B: driver for RGB LED headband

wemos d1 mini exemples github

With regard to pin marking in the Arduino code, the reference of the pin indicated on the board can be used directly in the Arduino program (eg D2 instead of 4). If you want your program to work on either an Arduino or an ESP, it is best to continue using the Arduino references.

How to use interrupts

Compared to an Arduino Uno that has only 2 interrupts, an interrupt can be connected to all Wemos D1 Mini pins, except for pin D0 which is reserved for sleep mode.

Using the Arduino IDE, use the attachInterrupt and detachInterrupt functions as usual.

To attach an interrupt: attachInterrupt (interrupt, function, mode)

  • Interrupt: Indicate the pin on which the interrupt is connected, for example 4 for pin D4 of the Wemos.
  • Function: The function called when the interrupt is triggered
  • Modes :
    • LOW: Interrupt is triggered when the spindle is at the LOW level
    • CHANGE: Interrupt triggers when the spindle changes state LOW / HIGH
    • RISING: Interrupt is triggered when the spindle changes from LOW to UP (rising edge)
    • FALLING: the interrupt is triggered when the spindle changes from the UP state to the LOW state (falling edge)

Detach an interrupt: detachInterrupt (pin or interrupt number).

Programming the Wemos D1 Mini in Lua

For those who prefer the Lua and NodeMCU, you can program the Wemos in this language. I advise you to use ESPlorer, a program written in Java that I have already presented to you in this article. To reinstall the original firmware, follow this article.

Develop without programming with ESP Easy

Finally, the Wemos lends itself very well to the use of the firmware ESP Easy. ESP Easy makes it possible to make measurements, to order actuators, to communicate with a home automation server or an online service very simply. To learn more about ESP Easy, follow this comprehensive guide.

Click to rate this post!
[Total: 0 Average: 0]

Thanks for your reading

Did you like this project ? Don't miss any more projects by subscribing to our weekly newsletter!

Share on facebook
Share on twitter
Share on linkedin
Share on pinterest
Share on email
Share on whatsapp

Are you having a problem with this topic?

Maybe someone has already found the solution, visit the forum before asking your question
We will be happy to hear your thoughts

      Leave a Reply

      Ads
      Read more
      Recent posts on the Forum
      DIY Projects
      DIY Projects