Robots are tools that can ease the burden on humans. Robots can be controlled by humans directly, but actually robots can also make their own decisions if given an intelligent algorithm. The type of robot that is often used in school activities is a wheeled robot. A wheeled robot is a robot that moves by using wheels. This project was made basically to provide education to the wider community on how to make a simple wheeled robot. This project has been implemented and took approximately 3 days. UART communication protocol is used as a medium for data exchange between Bluetooth and STM32 board. While the type of UART used is Hardware Serial. The benefit of making this project is none other than to add insight. The results of this study show that the robot can move according to user commands.
Part | Description |
---|---|
Development Board | STM32F103C8T6 |
Code Editor | Arduino IDE |
Programmer Tools | FTDI USB |
Driver | CDM FTDI USB Driver |
Communications Protocol | Universal Asynchronous Receiver-Transmitter (UART) |
IoT Architecture | 3 Layer |
Application Support | • STM32CubeProgrammer • Bluetooth RC Controller |
Programming Language | C/C++ |
Actuators | Gear Motor / Motor DC (x2) |
Sensor | JDY-31 SPP-C: Bluetooth Module (x1) |
Other Components | • Mini USB cable - USB type A (x1) • Micro USB cable - 2 pin JST (x1) • Jumper cable (1 set) • KCD11: Rocker Switch SPST (x1) • Li-ion battery 18650 (x2) • 2-Slot series battery holder (x1) • Robot wheels (x2) • Caster wheel (x1) • Motor driver L298N (x1) • Car robot frame (x1) • Spicer bolts (1 set) • Bolts plus (1 set) • Nuts (1 set) |
-
Arduino IDE
https://bit.ly/ArduinoIDE_Installer
-
CDM FTDI USB Driver
https://bit.ly/CDM_FTDI_USB_Driver
-
STM32CubeProgrammer
https://bit.ly/STM32_Cube_Programmer_Installer
Block Diagram | Pictorial Diagram |
---|---|
Wiring |
---|
Basically, a device can be communicated with other devices either wirelessly or by cable. Communication between commonly used hardware is Serial Communication
. It can be known that there are three types of Serial Communication
, which include: UART (Universal Asynchronous Receiver-Transmitter)
, SPI (Serial Peripheral Interface)
, and I2C (Inter Integrated Circuit)
. There are two kinds of UART Serial Communication
, namely Hardware Serial
and Software Serial
. Hardware serial communication
can be done by connecting the TX
and RX
pins crosswise
on each development board, for example: RX-TX
, then TX-RX
. The TX
pin is for sending data
, while the RX
pin is for receiving data
. Serial Software Communication
is more or less the same as Serial Hardware Communication
in terms of cabling, but there are differences in terms of coding. By using this Serial Software
you can overcome the constraints of the limitations of RX
and TX
pins on the development board. To communicate with this Serial Software
is quite easy, namely by using certain Digital Pins
as a substitute for TX pins and RX pins
.
-
Open the
Arduino IDE
first, then open this project by clickingFile
->Open
:stm32_btrobot.ino
-
Fill in the
Additional Board Manager URLs
in Arduino IDEClick
File
->Preferences
-> enter theBoards Manager Url
by copying the following link :https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json
-
Board Setup
in Arduino IDEHow to setup the
STM32F103C8T6
board• Click
Tools
->Board
->Boards Manager
-> InstallSTM32 MCU based boards
.• Then click
Tools
->Board
->STM32 boards groups
->Generic STM32F1 series
.
-
Change Board Part Number
in Arduino IDEClick
Tools
->Board part number
->BluePill F103C8
-
Change U(S)ART Support
in Arduino IDEClick
Tools
->U(S)ART Support
->Enabled (generic 'Serial')
-
Change Upload Method
in Arduino IDEClick
Tools
->Upload method
->STM32CubeProgrammer (Serial)
-
Port Setup
in Arduino IDEClick
Port
-> Choose according to your device port(you can see in device manager)
-
Before uploading the program please click:
Verify
. -
If there is no error in the program code, the next step is to use the
STM32
programming tool according to the procedure. Then click:Upload
. -
If there is still a problem when uploading the program, then try checking the
driver
/port
/programmer tool
/others
section.
-
Programming Mode
:• Make sure you haven't uploaded the program.
• Make sure the
BOOT0 jumper
position on theSTM32F1
is at position1
.• Make sure the
BOOT1 jumper
position on theSTM32F1
is at position0
.• Make sure the
Vout jumper
position on theFTDI
is at position3.3V
.• Connect this
STM32F103C8T6 board
toFTDI
.• Then connect the
FTDI
to yourPC/Laptop
with aMini USB - USB type A
cable.• Press the
Reset
button so that all programs embedded in thisSTM32 board
become clean (ready to be reprogrammed).• Compile and upload your program through a code editor, in this case the
Arduino IDE
. -
Operating Mode
:• Make sure to upload the program.
• Remove the
FTDI
from the device.• Make sure the
BOOT0 & BOOT1 jumper
position on theSTM32F1
is at position0
.• The program code that has been embedded in this
STM32 board
is ready for operation (no more programming activities).• To power up this
STM32F1 board
, you can use an external power supply such as a battery or something else.
Notes :
• To upload programs, in addition to using the • Based on experience, I admit that using the |
-
Go to
Assets/APK
directory to get the app calledBluetooth RC Controller
-> then install the app on your gadget. -
Open
Bluetooth RC Controller
app. -
Turn on
bluetooth
. -
Click
gear
button -> selectConnect to car
. -
Click
Scan for devices
button -> selectJDY-31-SPP
. -
Then
pairing device
by entering the password:0000
or1234
. -
The user interface is ready to use. This is as seen in the following image.
-
Download and extract this repository.
-
Make sure you have the necessary electronic components.
-
Make sure your components are designed according to the diagram.
-
Configure your device according to the settings above.
-
Please enjoy [Done].
If this work is useful to you, then support this work as a form of appreciation to the author by clicking the ⭐Star
button at the top of the repository.
MIT License - Copyright © 2023 - Devan C. M. Wijaya, S.Kom
Permission is hereby granted without charge to any person obtaining a copy of this software and the software-related documentation files to deal in them without restriction, including without limitation the right to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons receiving the Software to be furnished therewith on the following terms:
The above copyright notice and this permission notice must accompany all copies or substantial portions of the Software.
IN ANY EVENT, THE AUTHOR OR COPYRIGHT HOLDER HEREIN RETAINS FULL OWNERSHIP RIGHTS. THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, THEREFORE IF ANY DAMAGE, LOSS, OR OTHERWISE ARISES FROM THE USE OR OTHER DEALINGS IN THE SOFTWARE, THE AUTHOR OR COPYRIGHT HOLDER SHALL NOT BE LIABLE, AS THE USE OF THE SOFTWARE IS NOT COMPELLED AT ALL, SO THE RISK IS YOUR OWN.