Making: EVA Foam Handheld Yellow Light Detector

by leablijebij in Circuits > Arduino

73 Views, 0 Favorites, 0 Comments

Making: EVA Foam Handheld Yellow Light Detector

Screenshot 2024-06-30 124033.png

On a trip to Berlin a few months ago I started to notice the color yellow everywhere. I basically psyched myself into reacting to the color yellow. So that's why i have made a handy handheld detector to warn me of this dangerous color's presence! Simply point into any direction and the sensors will tell you how yellow it is.

Supplies

20240626_232047.jpg
Screenshot 2024-06-30 195445.png

Electronics:

Components:

  • Arduino UNO R3
  • Adafruit TCS34725 I2C color sensor
  • Waveshare 1.54inch 200x200 e-paper display
  • 2.5mm JST XH 8-pin connector (this should come along with the e-paper module)
  • 3x 1.5v penlite AA battery holder
  • 3x 1.5v penlite AA batteries
  • 39x20 hole Protoboard with traces running parallel to the width
  • Insulated copper wire
  • Male headers

Tools:

  • Soldering supplies (iron, sponge, tin, tin sucker)
  • Wire stripper or cutter
  • Third Hand (optional)
  • Boxcutter / Stanley knife


Casing:

Materials:

  • EVA foam sheet 5mm thick

Tools:

  • A printer
  • Boxcutter / Stanley knife
  • Hot glue gun (with ~6 glue sticks)
  • Cutting mat

Preparing the Protoboard

Break the protoboard into two pieces that are about 13 rows wide, 10 holes long. You can do this by etching a groove into both sides of the board with your boxcutter (creating a weak point), then snapping it off with your fingers.

You should have a remaining larger piece, which we will use in the next step.

Attaching the Color Sensor

20240628_154234.jpg
20240628_155837.jpg
20240628_133802.jpg
20240628_155913.jpg

Solder male headers to the color sensor, then onto the larger protoboard piece. Solder wires connecting from the VIN, GND, SCL and SDA pins.

Take one of the smaller protoboard pieces, and solder male headers under it aligning with the following pins on your Arduino:

  • A5
  • A4
  • GND
  • 5V
  • 3.3V

Make sure to solder the male headers with the long side going into the arduino. (I had to learn this one the hard way after having resoldered everything)

Connect the color sensor wires to the corresponding pins on the shield, using the new shield:

  • GND to common ground
  • VIN to 3.3V
  • SCL to Analog 5
  • SDA to Analog 4

Attaching the E-paper Module

20240628_201220.jpg
20240628_201209.jpg

Take the remaining smaller protoboard piece, and solder male headers under it aligning with the following pins on your Arduino:

  • D13
  • D11
  • D10
  • D9
  • D8
  • D7

Attach the JST cable to the e-paper module. Then, solder the other ends to the corresponding pins:

  • VCC to 5V
  • GND to common ground
  • DIN to D11
  • CLK to D13
  • CS to D10
  • DC to D9
  • RST to D8
  • BUSY to D7

Testing

20240628_203635.jpg

Download the TCS34726 arduino library from: https://github.com/adafruit/Adafruit_TCS34725/tree/master.

Then, download this sketch, and upload to the arduino: https://drive.google.com/file/d/12p_6t0D6mcpsg6vyUmIckVdAn741UjCJ/view?usp=sharing.

In summarry: the code just sets up the display, then continuously reads the color sensor data and updates the display with a "yellowness" score. If the yellowness is over about 78% it'll pop up the "PANIC!" text. The yellowness is calculated based on a sine curve matching the yellow part of the color temperature spectrum, although this is not super accurate, it appears to work more reliably than using the RGB values.

If all is well, the LED on the light sensor will be lit, and the display will flash.

Attach the Batteries

Screenshot 2024-06-30 114343.png

Solder the black wire of the battery holder to common ground, and the red wire to the 5V pins. (not VIN, as the voltage is too low for the voltage regulator). Don't put the batteries in when the Arduino is still connected via USB.

This is the last electronics step, so do your final testing!

Cutting the Foam

yellowGunStencilSimple.png
20240629_190142.jpg
20240629_214532.jpg

Make cutouts of the EVA foam using the provided stencil. The total amount is 44 cutouts, but the amount of B and E type cutouts can be reduced for a smaller device

Stacking the Foam

20240629_233610.jpg
20240629_233603.jpg

Glue together the cutouts in a stack with your glue gun. Make sure to keep the hole inside relatively straight while you do.

Putting It Together

20240630_000152.jpg
20240630_000200.jpg

Pull the color sensor through to the front of the device, along with the arduino. If your protoboard is just the right size (about 7x7 cm) you can just keep it jammed at the end. If it's not, glue/attach the board to a square cutout from earlier and use that to cover the hole.

Put the batteries in the battery casing, and put them into the device as well.

Pull out the display until its barely poking out of the rear end, then cover the hole with another square foam cutout.

Finished!

I finally know what the color yellow looks like!

And now you're done! Remember to keep the device away from water. I don't know what'll happen but it probably won't survive!

If I were to repeat this project I would likely choose a thicker foam (8-10mm) and cut out the side panels directly. I was not very confident it would hold together with the 5mm foam, so i decided on this stacking method. (I also think it looks kind of funny)

I would likely also choose a different type of display, as i find the refreshing speed leaves a lot to be desired.

(demo video: https://youtu.be/ncul3wU_nuw)