Proximity Drawer

by pantherman594 in Circuits > Art

1108 Views, 9 Favorites, 0 Comments

Proximity Drawer

Proximiy Drawer Demo

Proximity Drawer is a hands-free Etch A Sketch-like drawer, using nothing but the distance between your hands and the two sensors to move the arm left, right, up, and down!

This was created for my #BCPhysComp "Make Art" project, where I didn't want to just make a piece of art, I wanted to make something that could create art.

Supplies

  • Access to a 3D printer to print the following (see attachments):
  • 1x frame.stl (optional)
  • 1x arm_a.stl
  • 1x arm_b.stl
  • 1x Arduino Nano RP2040 Connect running CircuitPython
  • 2x 28BYJ-48 stepper motors with drivers
  • 1x 5V power supply (separate from the Arduino)
  • 2x VL53L1X TOF distance sensors
  • 1x STEMMA QT to jumper cable
  • 1x STEMMA QT to STEMMA QT cable for daisy chaining
  • 1x counterweight. I used a rectangular magnet
  • Breadboard and jumper wires to connect all the components
  • Tape
  • Paper
  • 1x Sharpie
  • 2 screws (or zipties)

For the optional wheel attachment to reduce friction on the second stepper motor, I used:

  • 3D printed:
  • 2x wheel_housing.stl
  • 1x wheel_axle.stl
  • The bearing from an Ender 3 extruder (13 mm diameter)

Place the Arduino Onto the Breadboard

PXL_20220329_142757536.jpg

I like to place it with the usb port sticking out the end, so that the first pin is on number 1 of the breadboard.

Connect the Motor and Jumper Wires to the Stepper Motor Drivers

PXL_20220329_142908361.jpg

Connect the Stepper Motor Drivers to the Breadboard

PXL_20220329_143721680.jpg

Connect IN1-IN4 of stepper motor A to pins D9-D12 (numbers 4-1on the left of the Arduino) on the breadboard, and IN1-IN4 of stepper motor B to pins D5-D8 (numbers 8-5). Make sure the wires maintain the same order (IN1 to D9, IN2 to D10, etc). Connect the positive and negative terminals of the driver to the power rails on the breadboard.

Connect the Distance Sensors to the Breadboard

PXL_20220329_144138434.jpg
PXL_20220329_144133146.jpg
PXL_20220329_144324102.jpg

Following the breadboard numbering, red should go to #2, blue to #8, yellow to #9, black to #14, to the right of the Arduino. Use the other STEMMA QT cable to daisy chain the distance sensors together.

To be able to read from both distance sensors, we also need to make use of the "XSHUT" pin. Connect the left distance sensor to D2 (#11 on the left) and the right sensor to D3 (#10 on the left). To connect it to the distance sensors, I bent the pins to a 90° angle and taped it to the bottom of the distance sensor, but you can also solder them in.

(optional) Place the Breadboard, Stepper Motor A, Both Drivers, and the Counterweight Into the Frame

PXL_20220329_144427799.jpg

(optional) Attach the Wheel to Arm A

PXL_20220329_144541205.jpg

Slide the two housings down the shaft, place the wheel on the axle, and snap it into place. This lifts stepper motor B from the paper, reducing friction and making it easier for stepper A to move.

Attach the Arms to the Stepper Motor

PXL_20220329_144715854.jpg
  1. Place arm A onto stepper motor A.
  2. Attach Stepper motor B to the end of arm A, with screws or zipties.
  3. Place arm B onto stepper motor B

Connect the Power Supply to the Breadboard Power Rails

Use a 5V power supply separate from the Arduino's power, so that movement in the steppers don't damage the Arduino.

Reset the Position of Arms a and B

PXL_20220329_145308313.jpg

Place them so that arm A and arm B overlap, with the end of arm B sitting just past stepper A.

Tape a Sheet of Paper Next to Stepper A

PXL_20220329_151448520.jpg

Place it so that the end of arm b is just above the left middle edge of the paper.

Upload the Code Onto the Arduino

Upload code.py from https://github.com/pantherman594/proximity-drawer. Install all needed libraries (adafruit_motor and adafruit_vl53l1x) as well. Feel free to make any configuration changes in the top if needed.

Wait for the Steppers to Move the End of Arm B to the Center of the Paper

mpv-shot0001.jpg

Once the Arduino is powered, the steppers will automatically move until the end is right over the center of the page.

Insert a Sharpie Into the End of Arm B, and Start Drawing!

mpv-shot0002.jpg

Move your hand up and down above the left distance sensor to make the arm move left and right. The right sensor controls down and up.