0% found this document useful (0 votes)
347 views51 pages

12 - BA - D1 - Mini - ESP32 (EN)

Uploaded by

Gabor
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
347 views51 pages

12 - BA - D1 - Mini - ESP32 (EN)

Uploaded by

Gabor
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 51

Machine Translated by Google

Operating instructions D1 mini ESP32

operating manual

AZ-Delivery D1 mini 32

1
Machine Translated by Google

Operating instructions D1 mini ESP32

This documentation contains general descriptions and/or technical characteristics of


the performance of the products contained herein. It is not intended to determine the
suitability or reliability of these products for any particular user application. It is the
duty of each user or integrator to perform the appropriate and complete risk analysis,
assessment and testing of the products in relation to their specific application or use.

Neither AZ-Delivery Vertriebs GmbH nor its affiliates or subsidiaries are responsible
or liable for any misuse of the information contained herein. If you have suggestions
for improvement or changes, or have found errors in this publication,

Please tell us that.

All pertinent state, provincial, and local safety regulations should be observed when
installing and using this product. For safety reasons and to ensure compliance with
the documented system data, only the manufacturer may carry out repairs on
components.

Failure to follow these instructions could result in personal injury or property damage.

2
Machine Translated by Google

Operating instructions D1 mini ESP32

copyright and copyright


Copyright © 2018-2019 AZ Delivery Vertriebs GmbH

All rights reserved. No part of this publication may be reproduced without prior written
permission of the publisher in any form or with any
means, including photocopy, recording or other electronic or
mechanical processes, reproduced, distributed or transmitted. For
For permission requests, please contact the publisher with the
inscription " For: Permissions Coordinator", at the address below.

AZ-Delivery Vertriebs GmbH, Bräugasse 9, 94469 Deggendorf


Web: www.az-delivery.de

Trademark

AZ-Delivery Vertriebs GmbH has made every effort to


trademark information about those mentioned in this manual
provide company names, products and services. The following
brands shown come from various sources. All brands are
property of their respective owners.

General notes: Some product names used in this manual


are used for identification purposes only and may be trademarks of

corresponding company.

product changes

Year Version modifications


2018 V1.0.0 Original draft

versions of this documentation

Datum Version changes


19-03-2018 1.0 First draft

1.1 Updating the screenshots

3
Machine Translated by Google

Operating instructions D1 mini ESP32

Table of Contents

copyright and copyright 3

foreword 6

Description of the target group 6

Conventions used in this manual 6

Explanation of the safety instructions 7

retention instructions 8

Procurement of documents and information 9

Internet 9

Other languages 9

Documentation feedback 9

support and customer service 9

Description of the product 10

Intended Use 10

Product description 10

scope of delivery 10

Dimensions 11

Technical specifications 12

Operating Environment Requirements 13

Power supply requirements 13

product elements 14

Pinout Diagram 15

functionality 15

ESP32 WROOM 32 16

CP2104 17

operator interface 17

control panels 17

Explanation of the visual signals 17

safety instructions 18

Safety instructions for handling microcontrollers 18

General safety instructions 18

Safety instructions for handling electrostatically sensitive components and groups 19

Safety instructions for soldering the pin strips 19

Explanation of the safety instructions on the packaging and the product 20

Instructions for safe operation 21

Installation 22

4
Machine Translated by Google

Operating instructions D1 mini ESP32

Soldering the pin or pin strips 22

Download and install the development environment 25

Obtaining the necessary software 25

driver installation 26

Installation of the development environment 26

Configuration of the Arduino IDE 30

Commissioning of the WiFi board 32

Die Arduino IDE 33

Choosing the right board 33

Programming procedure and language reference 34

Arduino core for ESP 35

Dealing with the pins of the D1 mini ESP32 36

Flashing the firmware 40

error table 41

disposal 42

Guarantee and warranty 42

License Information 43

Arduino-Core 43

Espressif Firmware 43

Espressif ESP32_NONOS_SDK 44

Appendix I - Terms and Conditions 45

1. Scope 2. Contractual 45

partner, conclusion of contract 3. Contract 45

language, contract text storage 74. Terms of delivery 5. 46

Payment 6. Retention of title 7. Transport damage 8. Warranty 47

rights and liability 9. Dispute settlement 47

48

48

49

49

5
Machine Translated by Google

Operating instructions D1 mini ESP32

1 Introduction
1.1. Description of the target group
This manual is intended for hardware and software developers with specialist knowledge in the field of
electrical engineering and for original equipment manufacturers (OEM).

1.2. Conventions used in this manual


The following formatting is used in this document:

bold

Names of product elements, commands, options, programs, processes, utilities


Services
Names of interface and windows,
elements (e.g. menus)dialog boxes, buttons, fields and

Interface elements that the user selects, clicks, presses, or types

Italic

Publication title referred to in the text Focus (e.g.


a new term)
variables

Mail

System output, such as error message or script


URLs, full paths, filenames, prompts, and syntax

6
Machine Translated by Google

Operating instructions D1 mini ESP32

1.3. Explanation of the safety instructions

The following warnings are used in these operating instructions:

personal injury:

ÿ DANGER
DANGER indicates an imminent danger. If not avoided, death or serious injury will result.

ÿ WARNING
WARNING indicates a potentially imminent danger. If not avoided, it can result in death or serious injury.

ÿ CAUTION
CAUTION indicates a potentially imminent danger. If not avoided, minor or minor injuries may result.

Product/machine/equipment damage (ANSI Z535 only):

A NOTICE
NOTICE indicates a potentially harmful situation. If not avoided, the plant or something in its vicinity may be
damaged.

7
Machine Translated by Google

Operating instructions D1 mini ESP32

1.4. retention instructions


Read and observe this manual and those contained in it
Safety precautions before using this product. Non-observance can lead to damage to
the product.
Follow all instructions. This will prevent fire, explosion, electric shock, or other hazards
that could result in property damage or personal injury.

The product may only be used by persons who have fully read and understood the
contents of these operating instructions.
Make sure that everyone using the product has read and followed these warnings and
instructions.
Retain all safety information and instructions for future reference and pass them on to
subsequent users of the product.
The manufacturer is not liable for damage to property or personal injury resulting from
improper handling or non-observance of the safety instructions. In such cases, the
warranty expires.

8
Machine Translated by Google

Operating instructions D1 mini ESP32

1.5. Procurement of documents and information


1.5.1. Internet

The latest version of the documentation is available at the following address: www.az-
delivery.de

1.5.2. Other languages

This is the German-language operating manual. Manuals in other languages will be


provided upon request where available.

1.5.3. Documentation feedback

Comments on AZ-Delivery documentation are welcome to be sent by email to


the following address: [email protected]

We welcome your comments.

1.5.4. support and customer service

For more questions, information, technical support or the


To order manuals, please contact the
Manufacturer:

AZ Delivery Vertriebs GmbH


Bräugasse 9
94469 Deggendorf

[email protected]

9
Machine Translated by Google

Operating instructions D1 mini ESP32

2. Description of the product


2.1. Intended Use
The AZ-Delivery D1 mini ESP32 was used as a test module or
Developed a prototyping platform to learn how to program microcontrollers. Any other use beyond this is
not intended. Never use the module for safety-relevant applications.

The AZ-Delivery D1 mini ESP32 may only be used with the following software, original accessories and
components:

• Espressif SDK
• Arduino-Core

• Micro USB cable, USB2.0 certified

2.2. Product description


The AZ-Delivery D1 mini ESP32 is a so-called "physical computing platform"
similar to the modules of the well-known Arduino family. Basically that is it

Module consisting of two components, a USB-serial converter (CP2104) and a microcontroller with a
highly integrated TCP/IP stack (ESP32). The module also has a micro-USB socket for power supply and
as a programming interface, a controllable LED and a fixed voltage regulator.

2.3. scope of delivery

• 1x AZ-Delivery D1 mini ESP32 WiFi Board • 2x socket


strip 8-pin short

• 2x socket connector 8-pin long • 2x


pin connector 8-pin

10
Machine Translated by Google

Operating instructions D1 mini ESP32

2.4. Dimensions

figure 2.4.1 - AZ-Delivery - D1 mini - Dimensions in mm

figure 2.4.2 - AZ-Delivery - D1 mini - Dimensions in mm

11
Machine Translated by Google

Operating instructions D1 mini ESP32

2.5. Technical specifications

Technical specifications
device name AZ-Delivery D1 mini ESP 32

model V3

processor ESP32-WROOM-32

Logical level 3.3V

Supply via USB interface: 5.1V


power supply
Supply via input pins: 3.0V - 3.6V

Max. loading capacity of the


Each 10mA, max. 50mA total
GPIO-Pins

power consumption Depending on the operating mode, up to a maximum of 500mA (peak)

frequency range ISM-Band bei 2,4Ghz: 2,412–2,472 GHz

Up to 17dBm (0.051W) (802.11b) @ 11Mbps

Maximum transmit power Up to 16dBm (0.039W) (802.11g)

Up to 16dBm (0.039W) (802.11n)

BT 4.2, BLE Class 2 (2,5mW)

interfaces UART / GPIO / ADC / PWM / SPI / I2C

Max. Baud Rate UART Up to 4608000 bps

I / O Pins 9

USB interface CP2104, MicroUSB

pitch 2.54 mm

requirements to the
Exclusively indoors
operating environment

Dimensions L = 34 mm, B = 26 mm, H = 8mm

weight 3g

12
Machine Translated by Google

Operating instructions D1 mini ESP32

2.6. Operating Environment Requirements


Only operate the product in a clean, dry and dust-free environment. Never expose the
product to water or moisture.

Note that the processor develops heat during operation and ensure adequate ventilation
to dissipate it.

Protect the module from conductive surfaces during operation to avoid short circuits.

2.7. Power supply requirements


A stabilized direct current source with appropriate protective devices is required to
supply the module via the input pins.

Each voltage source must comply with the country-specific relevant standards and
regulations. Use only a fused, stable DC power source rated at 5V and at least 500mA.

To supply the module via the USB interface: Only use a


power pack that corresponds to the USB specifications.

13
Machine Translated by Google

Operating instructions D1 mini ESP32

2.8. product elements

fig. 2.8.2 - AZ-Delivery - The mini ESP32 - Overhead

A. ESP32 Wroom 32 Chip B.

C. Reset Taster D. CP2104


E. Micro USB socket F. Power LED

14
Machine Translated by Google

Operating instructions D1 mini ESP32

2.9. Pinout Diagram

fig. 2.9.1 - AZ-Delivery - Di mini V3 - Pinout Diagram

3. Functionality
The AZ-Delivery D1 mini ESP32 was created from the requirement to provide
specialists on the European market with the cheapest possible WiFi development
board with the simplest possible wiring. The module essentially consists of the following
components:

15
Machine Translated by Google

Operating instructions D1 mini ESP32

3.1. ESP32 WROOM 32


The ESP32 series of Wi-Fi chips are manufactured by Espressif Systems. ESP32 WROOM 32
is an affordable Wi-Fi module suitable for DIY Internet of Things (IoT) projects. This module comes
with lots of GPIOs and support for a variety of protocols like SPI, I2C, I2S, UART and more.

The best part is that it comes with wireless networking, which makes it different from other
microcontrollers like the Arduino. This means it offers easy remote control and monitoring of devices
over Wi-Fi and Bluetooth® at an affordable price.

ESP32 WROOM-32 is a System-on-Chip (SoC) that combines a 32-bit Tensilica


microcontroller, standard digital peripheral interfaces, antenna switch, RF balun, power amplifier,
receive low-noise amplifier, filter, and power management modules in a small package.

It offers 2.4 GHz Wi-Fi (802.11 b/g/n, supports speeds up to 150MB/s), BLE and classic Bluetooth®
wireless communication, A total of 40 pins provide connectivity to GPIO pins to support PWM (Pulse
Width Modulation) , GPI pins (input only), capacitive touch sensors, I2C and I2S interfaces, ADC
(analog to digital) conversion), DAC (digital to analog conversion), SPI interface or UART

dedicated pins.

The processor core, called LX6 by Espressif, is based on the Xtensa®


Dual-core 32-bit LX6 processor controller and runs in the frequency range between 80-240MHz. It has
a 448kB boot ROM, 520kB on-chip SRAM and 4MB of external flash memory accessed through the
SPI interface
can.

16
Machine Translated by Google

Operating instructions D1 mini ESP32

3.2. CP2104
The CP2104 IC is a widely used USB to serial converter with TTL and UART

Compatibility. It serves as a cheap and reliable programming interface and can be found in many IoT
devices as well as in everyday hardware such as coffee machines, barcode scanners, children's toys or
vehicles.

fig 3.2.1 - CP2104 - Functionality

3.3. operator interface

The user interface depends on the programming environment used.


It can be used with the Arduino IDE or Eclipse. In chapter 6.2.3. you can find an installation guide for the
Arduino IDE.

3.4. control panels

The AZ-Delivery D1 mini ESP32 only offers a single button for operation.
Pressing the button triggers a reset of the ESP32 WROOM 32 by pulling pin 1 'RST' to 'LOW'.

3.5. Explanation of the visual signals


Visual signals can be output via an LED. This one is with the pin
GPIO2 of ESP32 WROOM 32 connected.

17
Machine Translated by Google

Operating instructions D1 mini ESP32

4. Safety Instructions

ÿ CAUTION
Read and understand this manual and its
Safety precautions before using this product.
Non-observance can lead to property damage.

4.1. Safety instructions for handling microcontrollers


When using electronic modules, some safety precautions must be observed to prevent injury, damage
and interference with other devices. Therefore, read these operating instructions and the safety
instructions carefully before using the device. Keep it safe so that this information is available to you at
all times. If you give the module to other people, please hand over these operating instructions/safety
instructions. We assume no liability for accidents or damage caused by non-observance of these
instructions and the safety instructions.

4.1.1. General safety instructions


• Stop using the module if it is damaged. • When handling products that come
into contact with electrical voltage, the applicable VDE regulations must be observed

will.
• In Schools, training institutions, Hobby- and
Self-help workshops are operated by trained personnel
to monitor responsibly.

• In commercial facilities, the accident prevention regulations of the association of


commercial trade associations for electrical systems and equipment must be
observed.
• Do not operate the product in an environment where flammable gases, vapors or dust
are present or
can be present.

• The product should not be dropped or subjected to strong mechanical pressure, as the
impact may damage it.

18
Machine Translated by Google

Operating instructions D1 mini ESP32

4.1.2. Safety instructions for handling electrostatically sensitive components and


The group

• In principle, microcontrollers are sensitive to electrostatic charges. When handling the


module, be sure to discharge electrostatic charges before touching the product to
avoid damaging the module. • Do not remove the product from the antistatic packaging
until you want to solder or program the product.

4.1.3. Safety instructions for soldering the pin strips

• Before starting work, check that soldering equipment is in good condition, especially
electrical soldering equipment and damaged cables and cable entries.

• Use a safe, non-flammable surface. workplace of


keep easily combustible substances free.

• The temperature of the hot soldering iron is over 300°C. There is a risk of burns if handled
improperly! • Do not inhale soldering fumes! They are hazardous to health. • Place
the soldering iron in the holder immediately after soldering, before you continue with further
work steps.

• Work calmly and with concentration!

19
Machine Translated by Google

Operating instructions D1 mini ESP32

4.1.4. Explanation of the safety instructions on the packaging and the product

Symbol meaning

The CE marking on the product


is the manufacturer's statement that that
product basic the
relevant requirementsthe
European health, safety and environmental
protection laws.

The symbol on the product, the


accessories or the packaging indicates
that this device is not considered unsorted
household waste may be treated, but
must be collected separately.

WEEE-Reg.-No.: DE 62624346

20
Machine Translated by Google

Operating instructions D1 mini ESP32

5. Instructions for safe operation


• Do not make any hardware changes! • Do not overclock
the product! • Only use the product with the software
recommended by us. • Only operate the module within the specifications
given by us. • Pay attention to the respective local general conditions for using
WiFi
(e.g. hospitals, petrol stations).
• Avoid handling the product with the power source connected. • The module was
designed to operate at room temperature, install it

no heat source after soldering.


• Avoid direct sunlight as this will damage the long term
circuit board can lead.
• Load the GPIO's only within the specifications stored in the data sheet

21
Machine Translated by Google

Operating instructions D1 mini ESP32

6. Commissioning
6.1. Soldering the pin or pin strips

During assembly, you have the option of using the pin strips. Alternatively, you can use the socket strips
with long pins or the socket strips with short ones
use pins.

To avoid moving the pins during the soldering process, it is recommended to place the headers in a
breadboard as shown below.

The long side of the pins should sit down in the breadboard.

figure 6.1.1 - Breadboard with pin headers

With the ESP32 WROOM 32 chip facing up, place the D1 mini ESP32 module over the headers so the
short pins protrude through the designated openings.

figure 6.1.2 - Top of D1 Mini on pin headers

22
Machine Translated by Google

Operating instructions D1 mini ESP32


During the soldering process, make sure that you create both a reliable mechanical and an electrically
conductive connection.

fig 6.1.3 - The soldering process

When using the female headers (either with long or short pins) you can place the female header on top
of the male headers in the breadboard for easier positioning during the soldering process.

fig 6.1.4 - Breadboard with pin headers on which the female headers have been placed

Now place the D1 mini ESP32 module over the socket strips and press it

module all the way down until it is flush. The pins should stick out as much as possible.

23
Machine Translated by Google

Operating instructions D1 mini ESP32

fig 6.1.5 - Breadboard with male headers on which female headers with long pins are placed,

with D1 mini module

figure 6.1.6 - Breadboard with male headers on which female headers with short pins have been

placed, with D1 mini module

24
Machine Translated by Google

Operating instructions D1 mini ESP32


Make sure the D1 mini is flush before beginning the soldering process.

figure 6.1.7 - The soldering process with female headers and long pins

6.2. Download and install the development environment


6.2.1. Obtaining the necessary software

Obtain the current version of the following software packages: •


Driver for the USB interface CP2104
https://www.silabs.com/interface/usb-bridges/ classic/device.cp2104

• Development environment and toolchain of Arduino compatible boards https://


www.arduino.cc/en/Main/Software

25
Machine Translated by Google

Operating instructions D1 mini ESP32

6.2.2. driver installation

The CP2104 USB to serial converter driver is automatically installed via Windows
Update when used with Windows 10. If you are using a different operating system, you
can obtain the corresponding driver directly from the manufacturer at the following
address:

https://www.silabs.com/products/development-tools/software/usb-to-uart
bridge-vcp-drivers

6.2.3. Installation of the development environment

Windows users are strongly advised to use one of the first two Arduino IDE download
options. The “Windows App”
Version from the Windows Store leads to connection problems, especially when using
third-party board definitions.

26
Machine Translated by Google

Operating instructions D1 mini ESP32

figure 6.2.3.1 - Download Arduino IDE with hint arrow for Windows
user

After starting the Arduino GOES installation file


“arduino-1.XX-windows.exe” must comply with the license terms of the
software can be read and accepted.

figure 6.2.3.2 - Arduino License Terms

In the next step you can choose different installation options


to be chosen.

27
Machine Translated by Google

Operating instructions D1 mini ESP32

figure 6.2.3.3 - Arduino installation options

Option Explanation

Install Arduino Installs the Arduino IDE - This option cannot be


Software deselected

Install USB Driver Installs USB drivers for various others


microcontroller. These are not required to use the software
with the D1 mini V3, but we strongly recommend installing
them if you also use other microcontrollers

Create Start Menu Creates a shortcut in the Windows Start menu


shortcut (Optional)

Create Desktop Creates a shortcut on My Computer (Optional)


shortcut

Associate .ino files Creates a filename extension for files ending in .ino and
associates it with the Arduino IDE

Finally, the target folder must be specified. The installation takes approx.
500MB free disk space.

28
Machine Translated by Google

Operating instructions D1 mini ESP32

figure 6.2.3.4 - Arduino Installation - Destination Folder

Click "Install" to start the installation.

fig. 6.2.3.5 - Arduino Installation - Installationsvorgang

After successful installation, the installation program can be closed with the
“Close” button .

29
Machine Translated by Google

Operating instructions D1 mini ESP32

figure 6.2.3.5 - Arduino installation completed successfully

1.1. Configuration of the Arduino IDE


After the drivers and the development environment have been installed, the necessary board information
and the tool chain for the ESP must be entered: Start the development environment that has just been
installed. For this

30
Machine Translated by Google

Operating instructions D1 mini ESP32

figure 6.3.1 - Arduino IDE - The first start

The D1 mini 32 is not part of the standard Arduino IDE repertoire. Therefore, additional
board definitions must be installed via the board manager. So that
If the board manager has access to the definitions, the board manager URL must first
be specified in the Arduino IDE preferences.

This setting is found in the File -> Preferences menu. The following URL must be
entered in the "Additional board manager URLs:" input field:

https://dl.espressif.com/dl/package_esp32_index.json

figure 6.3.2 - Arduino IDE - “File” -> “Preferences” -> “Additional Board Manager URLs”

31
Machine Translated by Google

Operating instructions D1 mini ESP32


Confirm your entry by clicking on the “OK” button.
The corresponding board definitions are downloaded and installed in the board manager
of the Arduino IDE. Via the menu "Tools" -> "Board:" -> "Board manager..." you get
to the corresponding dialog.
As soon as “32” is entered in the search field, the package “esp32 by Espressif Systems”
appears. With a click on the "Install" button , the required components are downloaded
and are immediately available within the Arduino IDE.

figure 6.3.3 - Arduino IDE - “Tools” -> “Board:” -> “Board Manager …” -> “ESP32”

1.2. Commissioning of the WiFi board

After assembling the module and installing the software, you can connect the module to
your PC. If a new USB device is detected, the typical signal tone can be heard in
Windows. To check whether the module is recognized correctly and the driver installation
was successful, the interface can be displayed in the device manager.

The easiest way to open the device manager is to open the command prompt using the
key combination WIN+R . Then enter “devmgmt.msc” and confirm with the Enter key or
with the
OK button.

figure 6.4.1 - Run Dialog Box

32
Machine Translated by Google

Operating instructions D1 mini ESP32


The device appears in the device manager under the “Ports (COM &
LPT)” as “USB-SERIAL CP2104 (COMX)”, replacing X with the appropriate
Port number is replaced.

figure 6.4.2 - View in Windows Device Manager

6.3. Die Arduino IDE


6.3.1. Choosing the right board
In order to be able to load the sample code onto your controller, it is necessary to specify the
board in the IDE with the associated serial port (COMX).
The Com port is only displayed after the board is connected. Apply all settings as shown in
the screenshot:

figure 6.5.1 Choosing the right board with the associated port

33
Machine Translated by Google

Operating instructions D1 mini ESP32

6.3.2. Programming procedure and language reference

The “Arduino programming language is closely related to C and C++. A complete overview and
explanation in German can be found directly on the Arduino website under the following link:

https://www.arduino.cc/reference/de/

In order to be able to program the board, many included examples are available. You can find these
directly in the development environment under File -> Examples. You will also find examples specifically
for boards with an ESP8266 processor.

figure 6.5.2.1 Supplied examples for the board with ESP32

To start the programming process, connect your controller to the PC, select the correct board definitions
and the relevant COM port.
By then clicking on the “Upload” button, the

Program code compiled with all necessary libraries and sent via serial
Transfer connection (COM port) to the controller:

34
Machine Translated by Google

Operating instructions D1 mini ESP32

figure 6.5.2.2 Start the process of compiling and transferring the code to the controller

6.3.3. Arduino core for ESP

The language reference mentioned in chapter 6.5.2 can be used without significant restrictions.
However, for boards with an ESP processor, a variety of functionalities have been added that cannot
be found in the Arduino documentation. An up-to-date version of the Arduino core documentation for

Boards with an ESP processor can be accessed at any time via the following link:

https://arduino-esp32.readthedocs.io/en/latest/

35
Machine Translated by Google

Operating instructions D1 mini ESP32

7. Dealing with the pins of the D1 mini ESP32


Just like a normal Arduino board, the D1 Mini ESP32 has a digital input/output pins (GPIO
pins - General Purpose Input/Output pins). These digital inputs/outputs work with 3.3V.

5V voltage must not be connected to any ESP32 chip pins!


The pins are not 5V tolerant, applying more than 3.3V to any pin will destroy the
chip.
GPIO pins 34 through 39 are GPIs - input pins only. These pins have no
internal pull-ups or pull-down resistors. They cannot be used as outputs, so use these pins
only as inputs: GPIO34, GPIO35, GPIO36, GPIO39 There is an onboard SPI flash on the ESP-
WROOM-32 chip. Pins GPIO6 through GPIO11 are exposed in certain ESP32 development
boards.

These pins: GPIO6(SCK/CLK), GPIO7(SDO/SD0),GPIO8(SDI/


SD1), GPIO9(SHD/SD2), GPIO10(SWP/SD3), GPIO11(CSC/CMD) are
connected to the onboard SPI -Flash on chip and will not be used for other
uses.

7.1. Capacitive touch sensor pins


The ESP32 has 10 internal capacitive touch sensors. The capacitive touch pins can
also be used to wake the ESP32 out of deep sleep

wake up. This

Internal touch sensors are connected to these GPIOs: T0(GPIO4),


T1(GPIO0), T2(GPIO2), T3(GPIO15), T4(GPIO13), T5(GPIO12),
T6(GPIO14), T7(GPIO27), T8( GPIO33), T9(GPIO32).

7.2. Analog to Digital converter pins The ESP32 has


18x12 bit ADC (analog to digital converter) input channels (while the
ESP8266 only has 1x10bits ADC). These are the GPIOs used as ADC
and corresponding channels: ADC1_CH0(GPIO36), ADC1_CH3(GPIO39),
ADC1_CH4(GPIO32), ADC1_CH5(GPIO33), ADC1_CH6(GPIO34),
ADC1_CH7(GPIO35), ADC2_CH0(GPIO4), ADC2_CH1 (GPIO0),
ADC2_CH2(GPIO2), ADC2_CH3(GPIO15), ADC2_CH4(GPIO13),
ADC2_CH5(GPIO12), ADC2_CH6(GPIO14), ADC2_CH7(GPIO27),
ADC2_CH8(GPIO25), ADC2_CH9(GPIO26).

36
Machine Translated by Google

Operating instructions D1 mini ESP32

7.3. Digital to Analog converter pins


There are 2x8-bit DAC (Digital to Analog Converter) channels on the ESP32 to convert
digital signals to analog voltage signal outputs. These are the DAC channels:
DAC1(GPIO25), DAC2(GPIO26).

7.4. Real Time Clock GPIO pins


There is RTC (Real time clock) GPIO support on the ESP32. The GPIOs
routed to the low power RTC subsystem can be used when the ESP32 is in deep sleep.
These RTC GPIOs can be used to wake up the ESP32 from deep sleep.

Deep sleep when the Ultra Low Power (ULP) co-processor is running.
The following GPIOs can be used as external wake-up source:
RTC_GPIO0(GPIO36), RTC_GPIO3(GPIO39), RTC_GPIO4(GPIO34),
RTC_GPIO5(GPIO35), RTC_GPIO6(GPIO25), RTC_GPIO7(GPIO26),
RTC_GPIO8(GPIO33), RTC_GPIO9 (GPIO32), RTC_GPIO10(GPIO4),
RTC_GPIO11(GPIO0), RTC_GPIO12(GPIO2), RTC_GPIO13(GPIO15),
RTC_GPIO14(GPIO13), RTC_GPIO15(GPIO12), RTC_GPIO16(GPIO14),
RTC_GPIO17(GPIO27).

7.5. PWM (Pulse Width Modulation) pins


The ESP32 LED PWM (Pulse Width Modulation) Controller has 16 independent channels
that can be configured to generate PWM signals with different characteristics. All pins that
can act as outputs can be used as PWM. Pins (the GPIOs 34 to 39 cannot generate
PWM). To set a PWM signal, parameters need to be defined in the code: frequency of the
signal, duty cycle, PWM channel, GPIO, where to output the signal.

7.6. I2C interface pins


The ESP32 has two I2C channels and each pin can be set as SDA or SCL. When using
the ESP32 with the Arduino IDE, the standard I2C pins are GPIO21(SDA), GPIO22(SCL).

7.7. SPI interface pins


By default, the pin mapping for SPI pins is:

37
Machine Translated by Google

Operating instructions D1 mini ESP32

7.8. Strapping Pins


The following pins are used to put the ESP32 into bootloader
or blinking mode:
GPIO0, GPIO2, GPIO4, GPIO5 (must be HIGH during boot), GPIO12 (must
be LOW during boot), GPIO15 (must be HIGH during boot).

Most development boards set pins in the correct state for flashing or booting

Mode. If some peripherals are connected to the strapping pins and the IDE is unable
to upload the code or flash the ESP32, it may be because those peripherals are
preventing the ESP32 from entering the correct mode. After a reset, blink, or boot,
these pins work as expected. There is

Boot
Mode selection documentation guide at the following link. Further and more
detailed explanations are beyond the scope of this eBook, so please refer to the
data sheet.

7.9. Pins HIGH at Boot


Some GPIOs change their state to HIGH or output PWM signals or reset when booting
up. This means that if outputs are connected to these GPIOs, this can

Unexpected results when resetting or booting the ESP32.


GPIO1, GPIO3, GPIO5, GPIO6 to GPIO11 (connected to the ESP32
onboard SPI flash memory), GPIO14, GPIO15.

38
Machine Translated by Google

Operating instructions D1 mini ESP32

8. Using the pins in the Arduino IDE

8.1. Digital IO Pins


Just like a regular Arduino board, the pin function can be configured using the

following line of code: pinMode(pin,


mode)

where “pin” is the GPIO pin name and the 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. To enable the pulldown resistor for GPIO16 use

INPUT_PULLDOWN_16.

To set an output pin HIGH (3.3V) or LOW (0V), use the following line of
code: digitalWrite(pin, value)

where pin is the name of the GPIO pin and the value is either 1 or 0 (or HIGH and
LOW).

To read an input, use the following line of code: digitalRead(pin)

To enable PWM on a specific pin use the following


Codezeile:

analogWrite(pin, value) where pin is


the name of the GPIO pin and the value is a number between 0 and
1023.

The range of the PWM output can be changed using the following line of code:

analogWriteRange(new_range)

The frequency of the PWM can be changed using the following line of code:
analogWriteFreq(new_frequency) where new_frequency
should be between 100Hz and 1000Hz.

39
Machine Translated by Google

Operating instructions D1 mini ESP32

9. Flashing the firmware


9.1. Restoring the firmware
To reset the module to the delivery state, open the Arduino IDE
under File > Examples > WIFI > WIFI Scan
The sketch shown in the screenshot:

figure 7.3.2 Opening the WiFi example

Now select the board and load the example onto the board.

40
Machine Translated by Google

Operating instructions D1 mini ESP32

9.2. error table

Disturbance Possible Cause debugging

No function Missing power supply voltage source


(brief flash check
the LED at
connect to Check USB cable
voltage source
Module Defect customer service
does not take place)
to contact

COM port is not available No connection to PC Connect that


to disposal module with your PC

Check driver installation driver new


to install

USB-Kabel Please use


only certified
USB2.0 cable

Module Defect customer service


to contact

programming process Wrong COM port selected selection of


not possible correct COM ports
as in fig. 6.5.1
pictured

Wrong board selection board information


check as in fig.
6.5.1 shown

USB-Kabel Please use


only certified
USB2.0 cable

Firmware defect Restoration


of the

delivery condition
as in chap. 7
described

Module Defect customer service


to contact

Code can not exit status 1 expected ’;’ Please check


compile Their
exit status 1 missing termination program code

41
Machine Translated by Google

Operating instructions D1 mini ESP32

exit status 1 No such file or dir Include library

10. Disposal
Do not discard with household waste! Your microcontroller must be disposed of in an environmentally friendly
manner in accordance with European Directive 2012/19/EG on waste electrical and electronic equipment.
The valuable raw materials it contains can thus be recycled. The application of this guideline contributes to
environmental and health protection.
Use the collection point set up by your municipality to return and recycle old electrical and electronic equipment.
WEEE Reg. No.: DE 62624346

11. Guarantee and Warranty


The statutory warranty regulations apply, unless otherwise agreed in our terms and conditions. You can find the
terms and conditions on our website at:

http://www.az-delivery.de/pages/agb

as well as in Appendix I of this documentation. The terms and conditions apply in the version at the time the
contract was concluded between the buyer and AZ-Delivery Vertriebs GmbH.

42
Machine Translated by Google

Operating instructions D1 mini ESP32

12. License Information


12.1. Arduino-Core

Arduino IDE is developed and maintained by the Arduino team. The IDE is licensed
under GPL.

ESP8266 core includes an xtensa gcc toolchain, which is also under GPL.

Esptool written by Christian Klippel is licensed under GPLv2, currently


maintained by Ivan Grokhotkov: https://github.com/igrr/esptool-ck.

Espressif SDK included in this build is under Espressif MIT License.

ESP8266 core files are licensed under LGPL.

SPI Flash File System (SPIFFS) written by Peter Andersson is used in this
project. It is distributed under the MIT license.

umm_malloc memory management library written by Ralph Hempel is used


in this project. It is distributed under the MIT license.

SoftwareSerial library and examples written by Peter Lerup. Distributed under


LGPL 2.1.

axTLS library written by Cameron Rich, built from https://github.com/


igrr/axtls-8266, is used in this project. It is distributed under BSD license.

BearSSL library built from


written
https://github.com/earlephilhower/bearssl-esp8266,
by Thomas Pornin, is
used in this project. It is distributed under the MIT License.

LittleFS library written by ARM Limited and released under the BSD 3-clause
license.

12.2. Espressif Firmware

The MIT License (MIT)

Copyright (c) 2014 zeroday nodemcu.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Software"), to deal in the
Software without restriction, including without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the following conditions:

43
Machine Translated by Google

Operating instructions D1 mini ESP32

The above copyright notice and this permission notice shall be included in all copies or substantial portions of
the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES
OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

12.3. Espressif ESP32_NONOS_SDK


ESPRESSIF MIT License

Copyright (c) 2017 <ESPRESSIF SYSTEMS (SHANGHAI) PTE LTD>

Permission is hereby granted for use on ESPRESSIF SYSTEMS ESP32 only, in which case, it is free of
charge, to any person obtaining a copy of this software and associated documentation files (the “Software”),
to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of
the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY

CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,


TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

44
Machine Translated by Google

Operating instructions D1 mini ESP32

Appendix I - Terms and Conditions


1. Scope

The following terms and conditions apply to all orders via our online shop by
consumers and entrepreneurs.

A consumer is any natural person who enters into a legal transaction for purposes
that are predominantly neither commercial nor self-employed. Entrepreneur is a
natural or legal person or a partnership with legal capacity who, when concluding a
legal transaction, acts in the exercise of their commercial or independent professional
activity.

these GTC without


Future business relationships apply to entrepreneurs also applyus
to having to refer to

them again.
If the entrepreneur uses conflicting or supplementary general terms and conditions,
their validity is hereby contradicted; they only become part of the contract if we have
expressly agreed to this.

2. Contractual partner, conclusion of contract

The purchase contract is concluded with AZ-Delivery Vertriebs GmbH.

The presentation of the products in the online shop does not represent a legally
binding offer, but a non-binding online catalogue. You can initially place our products
in the shopping cart without obligation and correct your entries at any time before
sending your binding order by using the steps provided for this purpose in the
ordering process and use the explained correction aids. By clicking the order button,
you place a binding order for the goods contained in the shopping cart. The receipt
of your order will be confirmed by e-mail immediately after the order has been sent.

When the contract is concluded with us depends on the payment method you have
chosen:

invoice

We accept your order by sending a declaration of acceptance in a separate email or


by delivering the goods within two days.

45
Machine Translated by Google

Operating instructions D1 mini ESP32


Credit card

When you place your order, you send us your credit card details at the same time.
After your legitimation as the legitimate cardholder, we will request your credit card company
to initiate the payment transaction and thereby accept your offer.

PayPal Express

During the ordering process, you will be redirected to the website of the online provider
PayPal. There you can enter your payment details and confirm the payment order to PayPal.
After placing the order in the shop, we request PayPal to initiate the payment transaction and
thereby accept your offer.

Instantly

After placing the order, you will be redirected to the website of the online provider Sofort
GmbH, where you can confirm the payment order. This creates the contract with us.

Cash on pickup

We accept your order by sending a declaration of acceptance in a separate email within two
days.

Payment by SEPA direct debit

The buyer can issue a SEPA basic mandate to AZ-Delivery Vertriebs GmbH.
The period for the advance notice (pre-notification) is reduced to one day.
The buyer undertakes to ensure that the account is covered. Costs incurred as a result of non-
payment or reversal of the direct debit are borne by the buyer, provided the non-payment or
reversal was not caused by AZ-Delivery Vertriebs GmbH.

3. Contract language, contract text storage

The languages available for the conclusion of the contract are German and English.

We save the text of the contract and send you the order data and our terms and conditions by
email. For security reasons, the text of the contract is no longer accessible via the Internet.

46
Machine Translated by Google

Operating instructions D1 mini ESP32


74. Terms of Delivery

Shipping costs are added to the stated product prices.


You can find out more about the amount of shipping costs in the offers.

In principle, you have the option of collecting the goods from AZ-Delivery Vertriebs GmbH, Plattlinger
Straße 5, 94469 Deggendorf, Germany
, (Monday
during the
to Saturday).
following business hours: 8:00 a.m. to 6:00 p.m.

5. Payment

The following payment methods are generally available in our shop


Disposal:

Credit card

When you place your order, you send us your credit card details at the same time.

After your legitimation as the legitimate cardholder, we will request your credit card company to initiate
the payment transaction immediately after the order has been placed.
The Payment transaction will through that

credit card company carried out automatically and charged to your card.

PayPal Express

During the ordering process, you will be redirected to the website of the online provider PayPal. In order
to be able to pay the invoice amount via PayPal, you must be registered there or register first, identify
yourself with your access data and confirm the payment order to us. After placing the order in the shop,
we ask PayPal to initiate the payment transaction.

Instantly

After placing the order, you will be redirected to the website of the online provider Sofort GmbH. In order
to be able to pay the invoice amount via Sofort, you must have an activated online banking account with
PIN/TAN procedure for participation in Sofort, identify yourself accordingly and confirm the payment
order to us. You'll get more information during the ordering process. The payment transaction will be
carried out immediately afterwards by Sofort and your account will be debited.

47
Machine Translated by Google

Operating instructions D1 mini ESP32


invoice

You pay the invoice amount after receipt of the goods and the invoice by bank transfer
to our bank account. We reserve the right to offer purchase on account only after a
successful credit check.

Cash on pickup

You pay the invoice amount in cash upon collection.

6. Retention of Title

The goods remain our property until full payment.

The following also applies to entrepreneurs: We reserve title to the goods until all
claims from an ongoing business relationship have been settled in full. You may
the resell
reserved goods in the ordinary course of business; You assign all claims arising from
this resale to us in advance - regardless of whether the reserved goods are combined
or mixed with a new item - in the amount of the invoice amount, and we accept this
assignment. You remain authorized to collect the claims, but we may also collect
claims ourselves if you do not meet your payment obligations.

7. Damage in transit

The following applies to consumers:

If goods are delivered with obvious transport damage, please report such defects to
the deliverer as soon as possible and contact us immediately. The omission of a
complaint or contact has no consequences for your legal claims and their enforcement,
in particular your warranty rights. However, they help us to be able to assert our own
claims against the carrier or the transport insurance.

The following applies to entrepreneurs:

The risk of accidental loss and accidental deterioration passes to you as soon as we
have delivered the item to the forwarding agent, carrier or other person or institution
responsible for carrying out the shipment.
The obligation to examine and give notice of defects regulated in Section 377 of the German Commercial Code (HGB) applies to merchants.

If you omit the notification regulated there, the goods are deemed to have been
approved, unless there is a defect that was not recognizable during the inspection.
This does not apply if we have fraudulently concealed a defect.

48
Machine Translated by Google

Operating instructions D1 mini ESP32

8. Warranty Rights and Liability

Unless otherwise stated in these General Terms and Conditions, including the following provisions, we
are liable in the event of a breach of contractual and non-contractual obligations in accordance with the
statutory provisions.

We are liable for damages - for whatever legal reason - within the framework of fault-based liability in
the event of intent and gross negligence. In the case of simple negligence, we are liable, subject to
statutory limitations of liability (e.g
diligence in one's own affairs; insignificant breach of duty), only

A. for damage resulting from injury to life, limb or health, B. for damage resulting from the breach
of a material contractual obligation (obligation, the fulfillment of which is essential for the proper execution
of the contract and on the observance of which the contractual partner regularly relies and may rely );
in this case, however, our liability is limited to compensation for the foreseeable, typically occurring
damage.

The limitations of liability set out above also apply to breaches of duty by or in favor of persons whose
fault we are responsible for according to statutory provisions. They do not apply if we have fraudulently
concealed a defect or have assumed a guarantee for the quality of the goods and for claims under the
Product Liability Act.

9. Dispute Resolution

The European Commission provides a platform for online dispute resolution (OS),
which you can find here https://ec.europa.eu/consumers/odr/.

To the participation an one Dispute settlement procedure before one

consumer arbitration board we are not obliged and not willing.

10. Final Provisions

If you are an entrepreneur, then German law applies to the exclusion of the UN Sales Convention.

If you are a merchant within the meaning of the Commercial Code, a legal entity under public law or a
special fund under public law, the exclusive place of jurisdiction for all disputes arising from contractual
relationships between us and you is our place of business.

49
Machine Translated by Google

Operating instructions D1 mini ESP32


Conditions created with Trusted Shops Legal copywriter in cooperation with Wilde Beuger
Solmecke Rechtsanwälte.

Please note that we use the following to create our website


Use licenses: Licensing

50
Machine Translated by Google

Operating instructions D1 mini ESP32

Appendix II - Contact Details

AZ Delivery Vertriebs GmbH


Bräugasse 9
94469 Deggendorf
Germany

Phone: +49 991 999 27 8 27

Email: [email protected]

51

You might also like