Heltec ESP32 LoRa DevKit | LoRa Controlled Robot Car | Tutorial & Project

About: Tutorials & Projects on Arduino, Raspberry Pi, ESP32, ESP8266, Sensors, Shields, Internet of Things, DIY Electronics, Robotics and much more

Intro: Heltec ESP32 LoRa DevKit | LoRa Controlled Robot Car | Tutorial & Project

Heltec ESP32 LoRa DevKit | LoRa Controlled Robot Car | Tutorial & Project

Step 1: GETTING STARTED

LoRa Controlled Robot Car is built with Heltec ESP32 LoRa DevKit. It contains ESP32‑D0WDQ6 Wi-Fi System-on-a-Chip (SoC) and Semtech SX1276 LoRa Transceiver chip. The board also has an 0.96" OLED display for displaying text, graphics and images. LoRa is a spread spectrum modulation technique derived from Chirp Spread Spectrum (CSS) technology. The Semtech SX1276 LoRa Transceiver chip feature the LoRa long range modem that provides ultra-long range spread spectrum communication and high interference immunity whilst minimizing current consumption. It uses license-free sub-gigahertz radio frequency bands like 433MHz, 868MHz and 915MHz. LoRa enables very-long range transmissions with low power consumption. LoRa Controlled Robot Car consists of a transmitter and receiver.

The transmitter uses a Heltec ESP32 LoRa DevKit and 5-Way Tactile Switch. The 5-Way Tactile Switch has five different positions like Up, Down, Right, Left and Centre. Heltec ESP32 LoRa DevKit which contains the LoRa Transceiver chip, transmits the respective signal according to the position of the 5-Way Tactile Switch.

The receiver uses a Heltec ESP32 LoRa DevKit and L298N H-Bridge Dual Motor Driver. The L298N H-Bridge Dual Motor Driver is used to drive and control the direction of rotation of the DC Motors. Heltec ESP32 LoRa DevKit which contains the LoRa Transceiver chip, receives the respective signal from the transmitter and gives instructions to the L298N H-Bridge Dual Motor Driver to drive the DC Motors.

In this tutorial, we will show you how you can control the Robot Car using the Transmitter.

When the switch is pushed upward, the Robot Car moves in forward direction.

When the switch is pushed downward, the Robot Car moves in backward direction.

When the switch is pushed to the right, the Robot Car turns to the right direction.

When the switch is pushed to the left, the Robot Car turns to the left direction.

Step 2: COMPONENTS REQUIRED

Components that are required:

- Heltec ESP32 LoRa DevKit: http://s.click.aliexpress.com/e/MCeHjCM

- 4WD Robot Car Chassis: http://s.click.aliexpress.com/e/ccqFUnkk

- L298N H-Bridge Dual Motor Driver: http://s.click.aliexpress.com/e/bierp6z6

- 5-Way Tactile Switch: http://s.click.aliexpress.com/e/BTHMTGk

- Li-ion 18650 3.7V Battery: http://s.click.aliexpress.com/e/c3pkCqp6

- Li-ion 18650 3.7V Battery Shield: http://s.click.aliexpress.com/e/myMpjNI

- Dual Li-ion 18650 3.7V Battery Holder: http://s.click.aliexpress.com/e/blNd0wfe

- 400 Tie-Points Breadboard: http://s.click.aliexpress.com/e/b9Q3KNu8

- Jumper Wire: http://s.click.aliexpress.com/e/bsT7DpA0

- Type-A to Type-Micro B USB Cable: http://s.click.aliexpress.com/e/cjMhrDOo

Step 3: CONNECTIONS

Now, let’s see the connections of the Transmitter.

- Connect the UP Pin of 5-Way Tactile Switch to the Digital Pin 36 of Heltec ESP32 LoRa DevKit.

- Connect the DOWN Pin of 5-Way Tactile Switch to the Digital Pin 37 of Heltec ESP32 LoRa DevKit.

- Connect the RIGHT Pin of 5-Way Tactile Switch to the Digital Pin 38 of Heltec ESP32 LoRa DevKit.

- Connect the LEFT Pin of 5-Way Tactile Switch to the Digital Pin 39 of Heltec ESP32 LoRa DevKit.

- Connect the VCC Pin of 5-Way Tactile Switch to the 5V Pin of Heltec ESP32 LoRa DevKit.

- Connect the GND Pin of 5-Way Tactile Switch to the GND Pin of Heltec ESP32 LoRa DevKit.

- Connect the 5V Pin of Battery Shield to the 5V Pin of Heltec ESP32 LoRa DevKit.

- Connect the GND Pin of Battery Shield to the GND Pin of Heltec ESP32 LoRa DevKit.

- Connect the one end of USB cable to the Heltec ESP32 LoRa DevKit, and another end to the Computer.

Now, let’s see the connections of the Receiver.

- Connect the Motors to the L298N H-Bridge Dual Motor Driver.

- Connect the IN1 Pin of L298N H-Bridge Dual Motor Driver to the Digital Pin 12 of Heltec ESP32 LoRa DevKit.

- Connect the IN2 Pin of L298N H-Bridge Dual Motor Driver to the Digital Pin 13 of Heltec ESP32 LoRa DevKit.

- Connect the IN3 Pin of L298N H-Bridge Dual Motor Driver to the Digital Pin 17 of Heltec ESP32 LoRa DevKit.

- Connect the IN4 Pin of L298N H-Bridge Dual Motor Driver to the Digital Pin 23 of Heltec ESP32 LoRa DevKit.

- Connect the 5V Pin of L298N H-Bridge Dual Motor Driver to the 5V Pin of Heltec ESP32 LoRa DevKit.

- Connect the GND Pin of L298N H-Bridge Dual Motor Driver to the GND Pin of Heltec ESP32 LoRa DevKit.

- Connect the Positive Terminal of Battery Holder to the 12V Pin of L298N H-Bridge Dual Motor Driver.

- Connect the Negative Terminal of Battery Holder to the GND Pin of L298N H-Bridge Dual Motor Driver.

- Connect the one end of USB cable to the Heltec ESP32 LoRa DevKit, and another end to the Computer.

Step 4: PROGRAMMING

In this tutorial, we will use Arduino IDE to program the board. Software and Source Code that are required:

https://www.learnarduinoraspberrypi.com/2018/08/he...

Now, let’s program the Transmitter board.

- Open the sketch in the Arduino IDE.

- Select the proper Board from the Tools menu of Arduino IDE.

- Select the proper Serial Port from the Tools menu of Arduino IDE.

- Include the required Library from the Sketch menu of Arduino IDE.

- Click on the Upload button to upload the sketch to the board.

If the upload is successful, the message "Done uploading" will appear in the status bar of Arduino IDE.

Now, let’s program the Receiver board.

- Open the sketch in the Arduino IDE.

- Select the proper Board from the Tools menu of Arduino IDE.

- Select the proper Serial Port from the Tools menu of Arduino IDE.

- Include the required Library from the Sketch menu of Arduino IDE.

- Click on the Upload button to upload the sketch to the board.

If the upload is successful, the message "Done uploading" will appear in the status bar of Arduino IDE. After a few seconds, you should able to control the Robot Car using the transmitter.

Share

    Recommendations

    • Tiny Home Contest

      Tiny Home Contest
    • Fix It! Contest

      Fix It! Contest
    • Audio Contest 2018

      Audio Contest 2018

    Discussions