Coder Social home page Coder Social logo

gunarakulangunaretnam / ai-automotor-controller-system Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 14.44 MB

An AI-powered motor controller system that utilizes Arduino, Computer Vision, and gesture detection technology to automate the PWM process.

License: Apache License 2.0

Python 100.00%
mediapipe opencv pyfirmata python

ai-automotor-controller-system's Introduction

AI AutoMotor Contoller System

Repo Structure

    ├── docs                                   # Contains documents.
    ├── research                               # Contains pre-research experiments.
    ├── source                                 # Contains project source code.
    │   ├── modules                                # Contains custom dependencies.  
    │   ├── main.py                                # main file.
    └── README.MD                              # Readme Content.

01 Introduction

This system uses Arduino, Computer Vision, and gesture detection technology to automate the Pulse Width Modulation (PWM) process. It combines the capabilities of these technologies to offer a seamless and intuitive control experience.

The MediaPipe library accurately detects hand gestures and calculates the distance between the THUMB_TIP and INDEX_FINGER_TIP. This estimated distance is then used to adjust the motor speed dynamically, resulting in precise and accurate control.

Circuit Diagram

02 Technology Stack

2.1 Hardware Stack

  • Arduino UNO
  • DC Motor (1)
  • L298N Motor Controller (1)
  • 9V Battery
  • Jumper Wires

2.2 Software Stack

  • Python 3.8.5 (Recommended)
  • Arduino IDE (Framework)
  • OpenCV
  • MediaPipe
  • PyFirmata

2.3 MediaPipe Hand Landmarks

Mediapipe Diagram

03 Setup

3.1 Hardware Setup

Circuit Diagram

Connections Pin No
PWM Enable Pin: 10
Motor IN 1 Pin: 9
Motor IN 2 Pin: 8

3.2 Firmware Setup

Setting up the Arduino firmware is necessary to enable communication between Python and Arduino. The Firmata protocol establishes serial communication between a Python script and an Arduino.

To upload Firmata, open Arduino IDE and choose the correct COM port and File -> Examples -> Firmata -> StandardFirmata -> Upload to Arduino UNO Board.

Firmware Setup

Note: After uploading StandardFirmata to the Arduino Board, Python can be used to program it.

3.3 Setup Software

We will now install the necessary tools to gain access to the Arduino Board. This project utilizes essential libraries, including MediaPipe and PyFirmata. We need to install all the required dependencies on the development computer.

  • Step 01: Install Python

    Ver: 3.8.5 is Recommended (www.python.org)
    
  • Step 02: Navigate to the specified location in CMD/Terminal.

    ai-automotor-contoller-system/docs/requirements.txt
    
  • Step 03: Execute the given command to install all dependencies.

    pip install -r requirements.txt
    

04 Usage

  • Source Directory:

    ai-automotor-contoller-system\source\main.py
    

4.1 Setps to run

  • Step 01: Connect the Arduino to the development computer.

  • Step 02: Modify the script to reflect the appropriate COM port.

    Change COM Port

  • Step 03: Run app.

    python source/main.py
    

4.2 Output

4-demo-video.webm

Social Links

ai-automotor-controller-system's People

Contributors

gunarakulangunaretnam avatar

Watchers

Kostas Georgiou avatar  avatar

ai-automotor-controller-system's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.