ESP32

XIAO ESP32C3 Getting started tutorial with Projects, ESP32 C3

XIAO ESP32C3:

 

XIAO ESP32C3 Getting started tutorial with Projects- As usual Seeed Studios has surprised everyone by launching the smallest ESP32C3 WiFi + Bluetooth development board. XIAO means small in Chinese. Previously, they launched Seeeduino XIAO the smallest Arduino, and this time the XIAO ESP32C3

XIAO ESP32

These are the ESP32 WiFi + Bluetooth modules I have been using for a long time and this is the XIAO ESP32C3 WiFi + Bluetooth module. Just look at the size difference. The SEEED Studio’s ESP32C3 is extremely small in size. Anyway, since this is a getting started tutorial, I will try my level best to explain each and every detail including,

  1. Technical specifications.
  2. Pinout
  3. ESP32C3 board installation using Arduino IDE.
  4. Writing our first program to control any LED.
  5. I will also use it with the Adafruit IO for monitoring the Temperature and Humidity.

So, without any further delay, let’s get started!!!



Altium Designer + Altium 365 + Octopart:

Arduino LoRa Free SMS

Altium 365 lets you hold the fastest design reviews ever. Share your designs from anywhere and with anyone with a single click. it’s easy, leave a comment tagging your teammate and they’ll instantly receive an email with a link to the design. Anyone you invite can open the design using a web browser. Using the browser interface, you’re able to comment, markup, cross probe, inspect, and more. Comments are attached directly to the project, making them viewable within Altium designer as well as through the browser interface. Design, share, and manufacture, all in the same space with nothing extra to install or configure. Connect to the platform directly from Altium Designer without changing how you already design electronics. Altium 365 requires no additional licenses and comes included with your subscription plan.

Get real-time component insights as you design with Octopart built into Altium 365. Octopart is the fastest search engine for electronic parts and gives you the most up-to-date part data like specs, datasheets, cad models, and how much the part costs at different amounts etc. Right in the design environment so you can focus on your designs. Start with Altium Designer and Activate Altium 365. Search for electronic parts on Octopart.

Amazon Links:

XIAO ESP32C3

DHT11 Temperature and Humidity

Other Tools and Components:

Arduino Nano USB-C Type (Recommended)

ESP32 with More GPIOS and Battery Port (Recommended)

Super Starter kit for Beginners

Digital Oscilloscopes

Variable Supply

Digital Multimeter

Soldering iron kits

PCB small portable drill machines

*Please Note: These are affiliate links. I may make a commission if you buy the components through these links. I would appreciate your support in this way!


XIAO ESP32C3 Specifications:

XIAO ESP32

Here is the Seeed Studio’s XIAO ESP32C3 which is an IoT “Internet of things” mini development board based on the Espressif ESP32-C3 WiFi and Bluetooth dual-mode chip. You might be wondering what is C3? Well, actually ESP32 has a number of variants; for example ESP32 S2, S3, C3, C5, C6, and H2.

The ESP32C3 type is a single-core 32-bit RISC-V CPU, up to 160 MHz. It has excellent radio frequency performance, supporting IEEE 802.11 b/g/n WiFi 2.4 GHz, and Bluetooth 5 (low energy) protocols. The board has this IPEX connector which is used to connect the WiFi/Bluetooth Antenna to increase the signal strength for your wireless applications. I have a detailed tutorial on the XIAO ESP32C3 onboard Bluetooth module; in which I performed the Bluetooth range test, and i also built a smart home automation project using XIAO ESP32C3 and an android application. This is an Ultra-Low power module that consumes only 43uA when in Deep Sleep mode. This board also has the battery charging chip that can be used to charge the lithium battery. It has 400KB of SRAM and 4MB of on-board Flash memory. Now, let’s take a look at the Pinout diagram.

XIAO ESP32C3 Pinout Diagram:

XIAO ESP32

Apart from the 5V, GND, and 3.3V pins. It has got a total of 11 GPIO pins. These are multi-purpose pins. All these 11 GPIO pins can be used as digital pins.

GPIO’s 2, 3, 4, and 5 can also be used as analog pins for interfacing analog sensors.

GPIO’s 6 and 7 can be used as i2c pins for connecting i2c-supported sensors and display modules.

GPIO’s 21 and 20 can also be used as TX and RX. And finally,

GPIO’s 8, 9, and 10 can be used as the SPI pins.

Now, let’s take a look at the Onboard components.


ESP32C3 Components Overview:

XIAO ESP32

It has the USB type-C Interface, charge LED, the ESP32-C3 itself, a Reset button,  WiFi/Bluetooth Antenna Connector, and a BOOT Button.

XIAO ESP32

On the bottom side, we have got JTAG PADS, Battery Connector, and a Thermal PAD.

Power Pins:

  • 5V – This is 5v out from the USB port. You can also use this as a voltage input but you must have some sort of diode (schottky, signal, power) between your external power source and this pin with anode to battery, cathode to 5V pin.
  • 3V3 – This is the regulated output from the onboard regulator. You can draw 700mA
  • GND – Power/data/signal ground

Now, I am going to solder male headers so that I can easily use it on a breadboard.

XIAO ESP32

As you can see I have soldered the male headers.


Arduino IDE setup:

Now, to use the ESP32C3 with the Arduino IDE, you will need to install the latest ESP32 board manager URL link.

https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json

Copy the above link. Then open the Arduino IDE > Click on the File Menu > Click on the Preferences > And paste the link in the Additional Boards Manager URL’s.

XIAO ESP32

As you can see, I have already added the link. If you already have some URLs then simply put a comma and past the URL. Finally, click on the OK button.

This time click on the Tools Menu > Go to Board and click on the Boards Manager.

XIAO ESP32

Search for the ESP32 and install the latest version.

XIAO ESP32

As you can see, I have already installed the latest version of the ESP32 board.

Now, Go to the boards and check if you can find the XIAO_ESP32C3.

XIAO ESP32

If it’s available in the list then congrats, you are done with the hard part. Now, I am going to start with a simple LED project.



LED with ESP32C3 Circuit:

XIAO ESP32

Connect the Cathode leg of the LED with the GND pin on the ESP32C3. Connect the Anode leg of the LED with the digital pin 9 through a current limiting resistor of 330 ohms. I connected the LED with the ESP32C3 as per the circuit diagram. And now let’s take a look at the programming.

ESP32C3 Led Code:

Here, I have this very simple code. You can see LED is connected to D9. Inside the setup() function I set the LED as output. Inside the loop() function, I am simply turning ON and turning OFF the LED. I am using a delay of 1 second.

Now, to upload the code, select the XIAO_ESP32C3. Make sure the correct communication port is selected. Finally, click on the upload button and wait for a while.

XIAO ESP32

The LED is blinking which means we have done everything correctly.


XIAO ESP32C3 with DHT11 Sensor:

Now, in this next example, I am going to use ESP32C3 with Adafruit IO for monitoring Temperature and Humidity using DHT11 sensor. You can run your previously designed projects without changing the code. You will only need to change the pin numbers.

XIAO ESP32

To practically explain this, I am going to use my previously designed Adafruit IO Dashboard. If you want to learn how to make the same IoT dashboard using Adafruit IO then I highly recommend read my article on Adafruit IO and ESP8266. Now, Let’s take a look at the circuit diagram.

DHT11 Sensor Interfacing with ESP32C3:

XIAO ESP32

The Data pin or the S pin of the DHT11 sensor is connected with the D6 pin. While the voltage and ground pins of the DHT11 sensor are connected with the 3.3V and GND pins. I connected the DHT11 sensor as per the circuit diagram. Now, let’s take a look at the programming.


ESP32C3 DHT11 Code:

I have already explained this code in my previous video on the Adafruit IO and ESP8266. As this time I am using ESP32C3 so I changed the ESP8266WiFi to WiFi. And I only changed the DHT11 pin. This time I am using digital pin D6. There was some code for the buzzer and Oled, which I removed. While everything else remains exactly the same. You can copy this modified code from my article. I will provide a link in the description. Upload this code the same way as we did in the LED example.

XIAO ESP32

Right now the XIAO ESP32C3 and Laptop both are connected to the WiFi. You can use the same WiFi network or different WiFi networks. Anyway, you can see the Temperature and Humidity values on the Gauges. Let me apply some heat and you will see an increase in the temperature.

XIAO ESP32


Check the Seeed Studio Xiao ESP32C6.

Watch Video Tutorial

 

Engr Fahad

My name is Shahzada Fahad and I am an Electrical Engineer. I have been doing Job in UAE as a site engineer in an Electrical Construction Company. Currently, I am running my own YouTube channel "Electronic Clinic", and managing this Website. My Hobbies are * Watching Movies * Music * Martial Arts * Photography * Travelling * Make Sketches and so on...

Related Articles

5 Comments

  1. Thanks for all the very useful info.
    Can you tell me how to awake Xiao ESP32C3 from deep sleep with gpio?

  2. For the ESP32, there is no need to use the F macro in lines like
    Serial.println(F(“Failed”));
    String constants are always stored in flash by the IDE.

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button