Do you have a question about the D1 Mini V3 and is the answer not in the manual?
Questions and answers
Summary of Contents for AZ-Delivery D1 Mini V3
Page 1
Welcome! Thank you for purchasing our AZ-Delivery D1 Mini V3. On the following pages, we will introduce you to how to use and set-up this handy device. Have fun!
Analog input ..................... 8 Serial ports ....................8 I2C ......................9 SPI ......................9 D1 Mini V3 module - Software ..............10 Digital I/O pins ..................10 Analog input pin ..................11 Serial communication ................12 Sharing CPU time with the RF part ............13 How to set-up Arduino IDE .................
It supports network protocols like Wi-Fi, TCP, UDP, HTTP, DNS, etc. The D1 Mini V3 module is a development board based on the ESP8266 chip. It has 11 digital input/output pins and one analog input pin. All digital I/O pins have interrupt, PWM, I2C and 1-wire capabilities in software.
Specifications Operating voltage 3.3V Main chip ESP8266-12F Clock speed 80MHz / 160MHz Flash Digital I/O pins Analog input pins Analog input voltage range from 0V to 3.3V USB port microUSB USB chip CH340C Antenna Ceramic (on-board), External connector Dimensions 25x35x6mm [0.98x1.4x0.24in] The D1 Mini Pro module has an on-board LED.
Page 7
The pin headers The D1 Mini V3 module comes unsoldered with one pair of eight pin male headers, one pair of eight pin female headers and a pair of eight pin female headers with extra long legs (so-called stacking headers).
The pinout The D1 Mini V3 module has two rows of eight pins (sixteen pins in total). The pinout is shown on the following image: Note: The D1 Mini V3 module has a 5V voltage output pin to power the external electronic devices connected to it, but it is not 5V tolerant! The 5V pin is power output pin, which outputs power from the microUSB port.
0V or 3.3V. The D1 Mini V3 module has a microcontroller that operates in voltage range of 0V-3.3V. The maximum current that can be drawn from a single GPIO pin is 12mA! NOTE: The pins of the D1 Mini V3 module are not 5V tolerant, applying more than 3.3V on any pin could damage the chip!
The default PWM range is 10bits at 1kHz. Analog input The D1 Mini V3 module has a single analog input, with an input voltage range of 0V-3.3V. If more than 3.3V is applied, the chip could be damaged. The analog to digital converter (ADC) has a resolution of 10bits.
The I2C interface The D1 Mini V3 module does not have a hardware I2C (TWI - Two Wire Interface), but it is implemented in software. This means that any two digital pins can be used as the I2C pins. By default, the I2C library uses GPIO4 as SDA and GPIO5 as SCL.
Digital I/O pins Just like with a regular Atmega328p board, the pin function can be set using the following line of code: pinMode(pin, mode) where pin is the name of GPIO pin, and mode can be either INPUT (which is the default), or OUTPUT, or INPUT_PULLUP to enable the built-in pull-up resistors for pins GPIO0-15.
(0 = 0V, 1023 = 1.0V). The D1 Mini V3 module can also use the ADC to measure the supply voltage (VCC). To do this, include ADC_MODE(ADC_VCC) at the top of the sketch, and use ESP.getVcc() to actually get the voltage.
Serial communication To use UART0 (TX=GPIO1, RX=GPIO3), use the Serial object, just like on an Atmega328p board: Serial.begin(baud_rate) To use the alternative pins (TX=GPIO15, RX=GPIO13), use the following line of code: Serial.swap() after Serial.begin() To use UART1 (TX=GPIO2), use the Serial1 object. NOTE: All Atmega328p stream functions, like read(), write(), print(), println(), etc.
Sharing CPU time with the RF part One thing to keep in mind while writing programs for the D1 Mini V3 module (ESP8266) is that the sketch has to share resources (CPU time and memory) with the Wi-Fi and TCP-stacks (the software that runs in the background and handles all Wi-Fi and IP connections).
How to set-up Arduino IDE If the Arduino IDE is not installed, follow the and download the installation link file for the operating system of choice. The Arduino IDE version used for this eBook is 1.8.13. For Windows users, double click on the downloaded .exe file and follow the instructions in the installation window.
Page 18
For Linux users, download a file with the extension .tar.xz, which has to be extracted. When it is extracted, go to the extracted directory and open the terminal in that directory. Two .sh scripts have to be executed, the first called arduino-linux-setup.sh and the second called install.sh.
Page 19
Almost all operating systems come with a text editor preinstalled (for example, Windows comes with Notepad, Linux Ubuntu comes with Gedit, Linux Raspbian comes with Leafpad, etc.). All of these text editors are perfectly fine for the purpose of the eBook. Next thing is to check, if your PC can detect an Atmega328p board.
Page 20
If the Arduino IDE is used on Windows, port names are as follows: For Linux users, for example port name is /dev/ttyUSBx, where x represents integer number between 0 and 9. - 18 -...
Additional setup In order to use D1 Mini V3 with Arduino IDE, follow few easy steps. Before setting the Arduino IDE, the driver for the USB to Serial communication has to be installed. If the driver is not installed automatically, there is a support page that contains the drivers for Windows/Mac or Linux and can be chosen depending on which one is used.
Page 22
To select D1 Board board, go to: Tools > Board > ESP8266 Boards > Generic ESP8266 Module To upload the sketch code to the D1 Mini V3, first select port to which the board is connected. Go to: Tools > Port > {port name}...
HIGH); delay(1000); For the D1 Mini V3 module, LED_BUILTIN is equal to a number 2, which means that on-board LED is connected to the GPIO2 pin. To turn ON the LED the GPIO2 pin has to be put in the LOW state, and to turn it OFF the GPIO2 pin has to be put in the HIGH state, thus alternating with an external LED attached to GPIO2.
{ Serial.println("D1 Mini V3 Serial Communication"); delay(1000); Upload the sketch to the D1 Mini V3 module and open the Serial Monitor (Tools > Serial Monitor). The result should look like the on the following image: - 23 -...
Page 26
Internet. If you are looking for the high quality microelectronics and accessories, AZ-Delivery Vertriebs GmbH is the right company to get them from. You will be provided with numerous application examples, full installation guides, eBooks, libraries and assistance from our technical experts.
Need help?
Do you have a question about the D1 Mini V3 and is the answer not in the manual?
Questions and answers