benjibst / Maturaprojekt

A machine that uses image processing to find magnetic parts and automatically removes them

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Maturaprojekt

A machine that uses image processing to find magnetic objects and automatically remove them from an area.

A video of the machine operating can be downloaded from here

The magnetic objects might look something like this, they are iron washers with a piece of coloured paper attached to them:

First, we use the DroidCam app to send an image of this area to a desktop software I developed, which processes it to find the locations of the objects:

The image processing is quite the procedure, but the most important steps can be seen here:

The area that has been found on the image is perspective-transformed into an upright square with side length 256, and the coordinates of the metal objects within this square are sent to a microcontroller. The X and Y coordinates of the objects use 1 byte each, as more precision is unnecessary for a small area like this, and makes data transfer using UART very easy. Upon receiving the coordinates of the objects, the microcontroller (Atmega328p) starts controlling 2 stepper motors to approach each object individually and pick it up using an electromagnet. To achieve this, we built the following machine:

We made a circuit diagram containing a microcontroller, 2 TMC2226 stepper drivers on custom PCBs that we designed and an electromagnet. Then we designed a PCB for it and ordered it from china:

The assembled PCB inside a 3D printed case, together with 2 power supplies and a PC fan:

About

A machine that uses image processing to find magnetic parts and automatically removes them


Languages

Language:C 63.3%Language:C++ 31.6%Language:C# 5.2%