Skip to content

matheusvps/resistor-wizard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Resistor Wizard Project 🧙‍♂️

Overview

This GitHub repository hosts the code for the Resistor Sorter project, developed as part of the Integration Workshops 1 subject. The system consists of a resistor sorting mechanism that allows users to insert indivual resistors into a small slit and select up to six resistance values to sort them into. It's implemented as a web application, with its frontend built using CSS, HTML, Javascript, and React framework. Both the server and subsequent backend processes are handled by a Raspberry Pi 3B running Flask in Python. The Pi photographs the resistors through a USB camera and extracts color and position data using Computer Vision (CV) to determine its resistance. To optimise the process of locating and classifying hue values under different lighting conditions, Machine Learning (ML) techniques were used.

Team Members

  • Matheus Passos - Frontend Development and Project Integration
  • Jhony Minetto - Backend Development, Algorithm Design and ML Training
  • Ricardo Marthus - Conception of 3D models and Image Labelling for the dataset

Project Components

Frontend

The frontend of the Resistor Wizard is composed of the web app user interface where resistance values can be selected and the hardware abd mechanical system controlled. The user interacts with the system primarily through this web interface.

Backend

The backend of the project runs on a Raspberry Pi 3B server and is implemented in Python using the Flask framework. It handles the following tasks:

  • Determining Resistor's position and color bands location using ML (YOLOv8 network trained on PyTorch ML framework)
  • Color recognition using OpenCV
  • Communication with the frontend

Machine-Learning Models

The ML models are a crucial component of this project. They have been trained by our dedicated team to recognize resistors and resistor color bands accurately. The data used to train the models themselves is majoritarily self-provided (meaning we created and labelled the data ourselves). The complete datasets can be visited at resistor dataset and resistor color bands dataset.

Getting Started

To run this project locally or on your own Raspberry Pi server, follow these steps:

  1. Clone this repository: git clone https://github.com/yourusername/resistor-sorter.git

  2. Set up the frontend environment and dependencies.

    • Navigate to the frontend directory.
    • Install dependencies using npm or yarn: npm install or yarn install.
    • Start the frontend application: npm start or yarn start.
  3. Set up the backend environment and dependencies on your Raspberry Pi.

    • Navigate to the backend directory.
    • Install Python dependencies: pip install -r requirements.txt.
    • Start the Flask server: python app.py.
  4. Ensure the necessary hardware components are connected and configured on your Raspberry Pi for resistor input.

  5. Access the web application in your browser and start using the Resistor Sorter.

Contributions

We welcome contributions and improvements from the community. If you'd like to contribute to this project, please fork the repository, make your changes, and submit a pull request. Your contributions will be greatly appreciated.

Feel free to contact us if you have any questions or need assistance with the project.

Happy sorting!

About

Resistor Sorter project with ML | Python | Javascript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published