Close
0%
0%

3D Printed Hand-Following AI Task Light

An Arduino and Python powered task light that uses AI object detection to track and follow your hand.

Similar projects worth following
This project came out of my need for a new desk lamp. I couldn't find any I liked online, so I decided to design my own with all the extra time I had in quarantine. Once I got started, I more and more features until I ended up with a hilariously over-engineered task light. It is by no means convenient, but it was fun to make.

Most of the parts I used in this project were leftover parts from other projects, such as the Arduino, the motors, and the camera. The rest were either 3D printed or bought on Amazon.

The light is controlled by an Arduino Nano, and the object detection is coded in Python, which is run on a computer. The object detection data is sent from the computer to the Arduino through the serial port.

Features such as turning the light on/off can all be controlled in the Python program.

Code and 3D Files:

Github

Youtube Video (Demo and Assembly):

Design Process

The design of the light was inspired by this task light made by Dyson:

CSYS LED Task Lamp by Jake Dyson | 167364-01I thought the elegant and minimalist styling was really cool. 

This design reminded me of the structure of some 3D printers and laser engravers, so naturally, I wondered if I could attach motors to it and make it move on its own.

Then arose the issue of how I'd control it. I could've simply used knobs to control each motor, but I wanted to do something a little more challenging, so I decided to use machine learning to control the light. 

The process flow of the light goes like this:

A USB camera mounted on the light sends images to a computer. 

The computer is running a Python program that runs object detection on the images. Within this program, you can toggle the light on/off and you can tell the light whether or not to follow your hand.

If the hand-following mode is on, the computer sends instructions to the Arduino via the serial port.

The Arduino reads these instructions and moves the motors as needed.

Here is a simple diagram of the process:

I modeled the entire light in Rhinoceros 3D, and I made it using a combination of 3D printed parts and components I either bought online or already had at home.

Here are the final CAD drawings:

To drive the light, I used 2 28BYJ-48 stepper motors paired with ULN2003 driver boards. 

One of the motors uses a belt-pulley system to control the arm of the light, and the other was reduced to a 1:3 gear ratio and controls the rotation.

The base of the light is a simple clamp mechanism that allows you to clamp it onto most tables:

This is the menu screen of the Python program:

Before running the program, you have to plug both the USB camera and the Arduino into the USB ports of your computer. 

The Video Feed button toggles the video feed. 

In the Arduino Port space, type the port your Arduino is plugged into. If you just want to test the object detection without an Arduino attached, leave it blank.

This is the program while running:

From here you can toggle the light on and off and tell the light whether or not to follow your hand. It also displays the frames per second, which can vary depending on the capabilities of your computer.

View all 16 components

  • New Central Node

    Harry Gao07/16/2020 at 17:12 0 comments

  • Small Upgrade

    Harry Gao07/15/2020 at 11:04 0 comments

    I added an extra bearing to the roller system, so now there's 4 instead of 3. This should make it more secure, since the previous version was prone to getting knocked off. 

    I've updated the Github file to reflect this change (file name is node2.0.stl).

View all 2 project logs

  • 1
    Assembly instructions at the end of the video

View all instructions

Enjoy this project?

Share

Discussions

Dan Maloney wrote 07/13/2020 at 17:05 point

This looks pretty cool. Do you have any video of it in action?

  Are you sure? yes | no

Harry Gao wrote 07/15/2020 at 00:18 point

Posted!

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates