Skip to content
This repository has been archived by the owner on Dec 26, 2024. It is now read-only.

cakraawijaya/RPI-Basic-Line-Follower-Robot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Open Source Love License: MIT GitHub last commit Project Type

RPI-Basic-Line-Follower-Robot

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. The purpose of this project is to get a robot that can recognize lines. This project has been implemented and took approximately 3 days. This robot has been equipped with an infrared sensor of the TCRT5000 type. In the process, this sensor works based on the principle of light reflection obtained from the object which is then forwarded to the phototransistor to determine the output value. If the light reflection on a dark or black object is considered inadequate, the sensor module will provide a LOW output, in which case the LED indicator will not light up. If the light reflection on a bright or white surface is considered adequate, the sensor module will provide a HIGH output, in which case the LED indicator will light up. The benefit of making this project is none other than to add insight. The results showed that the system made can function properly.



Project Requirements

Part Description
Development Board Raspberry Pi Pico
Code Editor Thonny IDE
Bootloader MicroPython UF2
Programming Language MicroPython
Packages • machine (default)
• utime (default)
Actuators Gear Motor / Motor DC (x2)
Sensor KR08200: 3 Way Line Tracking IR Sensor - Brand: Funduino (x1)
Other Components • Micro 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)



Download & Install

  1. Thonny IDE

    https://bit.ly/ThonnyIDE_Installer
    

  2. MicroPython UF2

    https://bit.ly/UF2_RPIpico_Bootloader
    



Project Designs

Block Diagram Pictorial Diagram
block-diagram pictorial-diagram
Wiring
wiring



MicroPython Bootloader Setup

  1. Upload the firmware :

    • Press and hold the BOOTSEL button on the Raspberry Pi Pico board while connecting to the computer via a micro USB cable.

    • After the Raspberry Pi Pico is recognized by the computer (connected), then immediately release the BOOTSEL button.

    • When successfully connected, a new drive called RPI-RP2 will open.

    • Drag -> Drop or Copy -> Paste the MicroPython UF2 firmware file into the RPI-RP2 drive.


  2. After the process is successful, the RPI-RP2 drive will automatically close.

  3. In general, the firmware upload only needs to be done once when you first use the Raspberry Pi Pico board.



Thonny IDE Setup

  1. Open Thonny IDE first.

  2. Click Tools -> then select Options... -> then select :

    Interpreter Menu, then change the part :

    • Interpreter -> MicroPython (Raspberry Pi Pico)

    • Port -> Board CDC @ COM...

    • Restart interpreter before running a script -> uncheck

    Editor Menu, then check all the options except: Indent with tab characters.

  3. If the file view does not exist in Thonny IDE, then please click the View -> section and select Files to display it.

  4. Then look for a file called main.py in directory: Raspberry-Pi-Pico-based-Line-Follower-Robot/Src.

  5. Right click on the file -> select Upload to /.

  6. Open the file main.py which is in the Raspberry Pi Pico storage -> then click Run current script (F5).

  7. Program code executed successfully -> sign: %run -c $EDITOR_CONTENT.

  8. If there is still a problem when uploading the program, then try to check the interpreter / port / others section.



Get Started

  1. Download and extract this repository.

  2. Make sure you have the necessary electronic components.

  3. Make sure your components are designed according to the diagram.

  4. Configure your device according to the settings above.

  5. Please enjoy [Done].



Highlights

robot-line-follower



Notes

Important

The test results show that the motor movement is still not smooth enough. In the future, it is better to use intelligent algorithms such as PID to improve the precision and stability of motor movement.



Appreciation

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.



LICENSE

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.