Main Content

Machine Learning Powered Color Detector (On Any Microcontroller!)

Today I’ll be showing you how to create a color detector using cheap parts you (probably) already have! This project would be useful for automation in warehouses and factories where you simply need to know if something is red, yellow, or some other color.
As you’ve read from the title, we use machine learning to categorize what color the detector is looking at… but don’t worry! We aren’t using special boards, TensorFlow, or anything complicated. This project can be done with any microcontroller, and the machine learning part is only one function!

You’ll need these to make your own Color Detector

- 1” Conduit Body from a hardware store
- Arduino Nano (or any other microcontroller)
- A phototransistor
- Red, green, blue, and yellow LEDs
- Seven Segment Display
- A Button
- Linear Potentiometer (Any resistance)
- Toggle Switch (Make sure it’s durable! I had to replace my rocker switch!)
- A micro SD card module
- A micro SD card (Any modern one will have more than enough space)
- Protoboards
- PCB standoffs (Make sure they fit your protoboards)
- LED Holders (We’re not using them conventionally)
- Female header pins (Not required but nice if you want to reuse your microcontroller for another project)

You’ll also need

- Jumper wires (I used the kind with male and female ends)
- Soldering iron
- Hot glue (Not necessary, but nice to keep the wires in place)
- A Drill
- File/Sandpaper
- Clamps/Vice
- A Permanent marker
- Cutting pliers”

Link to article