Introduction: Eyesight Guardian - Protect Your Eyes With Arduino

About: Where's the tea?

How often have you used a screen for hours, only to find your eyes feeling strained, tired, and sore? Especially with the pandemic we're all working and studying using our computers more than ever before, and because of this eye care is even more important than normal. To protect your eyes when using screens, you may have heard of the 20-20-20 rule. What this means, is that you should look away from your screen for 20 seconds every 20 minutes, to a distance of 20 feet or more. This helps relax your eyes, and helps ward off eye strain.

Remembering to do this every 20 minutes sounds difficult, right? That's what the Arduino Eyesight Guardian is for! This unobtrusive little gizmo clips over the top of your monitor, and every 20 minutes gives you a reminder to look away for those recommended 20 seconds. It takes USB power from your computer, and has a tiny push button for you to register when you've looked away, so it'll reset the clock and sleep until the next reminder is due.

You can see the whole project summarised in this video, but also please read on for the full details!

Safety: This project is quite straightforward, but some risk is posed by heat from the 3D printer and soldering iron that is required. Make sure you solder in a well ventilated environment, and also exercise care when using the wire cutters/scalpel that you will need for trimming wires and cleaning up the printed parts. Electrically, only 5V USB power is used.

Step 1: What You Will Need

Eyesight Guardian

  • Arduino Pro Mini
  • Adafruit 1.14" 240x135 Color TFT Display + MicroSD Breakout - ST7789
  • Adafruit CP2104 Friend - USB to Serial Converter(or another FTDI programmer)
  • Tactile Switch Button (6mm x 3.5mm)
  • USB Noodle Cable
  • MicroSD Card
  • Male and Female Header Pins
  • Hookup Wire
  • PLA Filament

Consumables

  • Lead-free Solder
  • Electrical Insulative Tape
  • Glue (for gluing plastic printed parts together)

Software

  • A PC, running;
  • Arduino IDE
  • Slicing Software - as you use to set up files for your 3D printer
  • Graphics Editor, e.g. Paint.net - if you want to make your own graphics to display

Tools

  • 3D Printer
  • Soldering Iron, Wire Strippers
  • Scalpel/Craft Knife, File, Side Cutters

Step 2: Design & Inspiration

I always do the first bit of a design on paper as it's easier to play around with the rough shape before committing to CAD. This time I also did this concept sketch too ...

I knew I'd need to make some graphics to display on the Guardian's tiny screen, and felt inspired by old-school games, so I got out my Gameboy and spent some time studying the fonts and colours used in some of these classics (ok, I spent a lot more time playing the games too, but I still managed to finish this Instructable...!). I also thought that this tied into the idea of 'gamification' - this means where everyday tasks are 'gamified' to enhance people's interaction and enthusiasm for them by adding game-like elements. Realistically, I'd never remember or care to look away from my computer monitor if I was just watching the built-in Windows clock and timing 20 minute invervals, I'd forget about that before I'd done it once! By adding a little device, with a screen and some fun graphics and a button that needs pushing, I thought I could 'gamify' this idea and turn it into something that could be more engaging!

Edit: I've been using the Guardian for a day now, whilst finishing this Instructable, and it did help me - every 20 minutes it reminded me to look away from the screen, and the device made it more engaging and easy to remember. Hopefully I'll still find it fun in a month's time and not annoying, but we'll see!

Step 3: 3D Files & 3D Printing

Please see this folder on Grabcad for the full project 3D files. This folder includes:

  • STL files - ready to slice and print!
  • STEP files - if you want to modify the parts using CAD software.
  • Spare Parts - these are the pink highlighted ones in the image, that will allow you to adapt the size of the device to fit on your own screen or monitor. I have uploaded STEP and STL formats of these too.
  • BMP Images - don't worry about these now, we'll need these when we get to Step 8.

So because the Guardian is designed to neatly sit over the top of your monitor, I've uploaded it with a big selection of 'spare parts' - the pink ones in the first image above. The default 'bridge' part is 15mm, which suits my own monitor, but substitute that one for one of the other bridge sizes if you need to. You can also use the optional 'spacer' part that adds a 3.5mm wedge as well, if you need it.

Printing
I printed all the parts on my venerable Anet A6, with 0.1mm layer height, 40mm/s, in white PLA, but you can choose any colour you like of course. As they're such small parts you can keep the layer height and print speed as low as possible to ensure the quality is as good as it can be. I had to re-print the arduino_cover1 part as it peeled slightly, but apart from that I was lucky and all the other prints turned out well. In the third picture you can see the Raspberry Pi camera I use to record the printing timelapses that you can see in the project video.

When you've printed your parts you can test fit them; they should all fit neatly together, with a firm friction fit, except the two thin covers, which should only sit lightly in place as they will be glued later. You may need to use sandpaper/file/craft knife/scalpel to clean up the prints and ensure they all fit together nicely. When this is done and you've test-fitted all the parts, we're ready to move onto the next step!

Step 4: Assembly Step 1

Electrical Connections
This table should make it easy for you to replicate the correct wiring scheme. The only thing to note is that you should join the GND wire from the push button and the TFT screen, as they need to go to the same GND pad on the Arduino. Other than that it's pretty simple!

Arduino Pro Mini FTDI Headers
The Arduino Pro Mini doesn't have any kind of USB interface, so we need to program it using FTDI instead. This was the first time I've used this method too, but it turned out to be really straightforward so don't worry. Firstly, solder on thesesix header pins onto the FTDI pins of the Arduino as shown in the picture.

FTDI Programmer
Now you'll need to solder corresponding female header pins onto your FTDI programmer. I used the Adafruit CP2104 Friend, but it doesn't matter exactly which programmer you use (if you choose another one, make sure you double-check your connections are correct as it may differ from my instructions here!).

Programming Test
At this point, you should check the Arduino and programmer are functioning correctly. Connect the two, and plug in the programmer to your PC via a USB cable. Let's open up the Arduino IDE, and try uploading the 'Blink' example sketch to check all's well. Do have a look at the official Arduino guide to programming the Pro Mini. One aspect to note is that you need to select the board type, and choose; "For the 5V versions of the Arduino Pro Mini, select Arduino Duemilanove or Nano w/ ATmega328P or Arduino Diecimila, Duemilanove, or Nano w/ ATmega168." If everything is fine you should see the Pro Mini's onboard LED blink on and off. If so, hooray!

USB Cable
Next you need to take the flat USB cable, and cut off the connector from one end, exposing the bare wires. Among the data wires will be a blackish and reddish wire, these are your GND and +5V wires. Trim back the insulation until these are exposed as in the picture, and pass it through the slot in the arduino_cover1 part. Use a little insulation tape to bulk up the cable on the inside face so it can't pass back through. These two wires we'll solder directly to the GND and RAW pads of the Arduino Pro Mini. Leave the USB connector attached to the other end of the cable, you'll need this to plug into your PC to power the Guardian.

Step 5: Assembly Step 2

Push Button and Bridge
Here you'll need your tiny push button. Trim the size of the legs down until just a little of the contact is exposed on each side, and solder on a few inches of hookup wire to each leg. Now fit the switch into the bridge printed part - you may need to wrap it in tape a little to ensure a snug and tight fit which will keep it lodged in place. At this stage you can also attach the bridge to the arduino_back1 part, as shown in the first picture.

Display Preparation
The display (1.14" 240x135 Color TFT Display + MicroSD Breakout - ST7789) comes with two lugs on one edge of the PCB to give it two screw holes for mounting purposes. We don't want these, but luckily they come with a perforated side so you can quite easily trim the lugs off with some side cutters or pliers.

Display Wires
Now cut 11 lengths of hookup wire, strip the ends so a few mm of copper is exposed, and solder these through the back of the display PCB as shown, to the contacts as listed in the connection table in the previous step. So far, so good!

Step 6: Assembly Step 3

Assemble With arduino_back1
Now add the printed arduino_back1 to the other side of the bridge. You shouldn't need glue, it should be a good friction fit by itself.

Display Wiring Through Bridge
Offer up the display to its place, and tease the wires through the bridge and out of the other side, ready for where the Arduino will be mounted. Don't push the display in tightly yet however, as we'll need to access the MicroSD card slot later to load the graphics.

Arduino Wiring
Check back to Step 4 for the specific wiring guide, and start to now solder the connections from the display and the push button to the Arduino Pro Mini itself. You should allow a little spare length in the wires as shown to make it easy for you to connect everything, but not too much - if I had left any more spare wire I wouldn't have been able to cram it all in and get the covers glued on! Don't glue those on yet though, in the next couple of steps we'll load the graphics and program, and give it a test before we making the finishing touches.

Step 7: Graphics

Now this is the bit I really enjoyed! Here's your chance to give the project your own spin, as you can change the graphics to whatever you like, or download and use mine. You can download the images from this step of the Instructables, but to make sure they come out exactly the right resolution, please download them from the BMP Images folder of the Grabcad project folder.

The official Adafruit guide to the 1.14" screen is definitely worth your time to read, as it explains how to connect and program for the display. The page that describes how to display images is the most useful. Your images need to be in BMP format, 240x135 pixels, and be saved in 24-bit format for compatibility. Also bear in mind that the image names must be 8 characters or less.

I decided to use the Instructables robot in mine, with a retro 8-bit style font for all the text.

MicroSD Card
With all your images made or downloaded, save them to the MicroSD card, and go ahead and insert this into the card holder of the mini display. This done, and we're ready to program, so let's move onto the next step ...

Step 8: Programming

Arduino Program
Please download the sketch attached to this step, and using the FTDI programmer technique explained (and tested!) in Step 4, upload this to the Arduino Pro Mini. The program is an adaptation of the Adafruit example sketch for displaying bitmap images, and I've added extra annotations to show the Eyesight Guardian relevant bits. It's actually pretty simple, as the Adafruit sketch does all the hard parts already. Don't forget to change the names of the bitmap images if you are adding your own graphics, so the program looks for the correct files on the MicroSD card.

The delay() function used to count the 20 minute interval can be changed to 10 seconds for instance for testing so you can test the whole program cycle without needing to wait so long, just make sure that you change it back to 20 minutes before you upload the final version of the code and go to the next step.

Last Step - Glue the Display and Arduino Covers
When you're satisfied that it works as you expect, it's time to glue the front and rear covers in place. If you use a glue like this poly-cement I chose it'll be enough to fix them, but you could probably remove them again with the edge of a scalpel if you needed to re-access the MicroSD card one day. If you choose a CA superglue for instance, I don't think it'll ever be open again, so bear this in mind when you choose the glue. With these glued in place, we're all done. All you need to do is plug the cable into a USB port, place it on top of your monitor, and there we have it!

Step 9: Conclusions

This was a fun little device to make, it was my first time using a display like this with Arduino, and I'll definitely want to incorporate one into future projects. Don't forget that when you build yours you can customise the graphics as much as you want, to truly make it your own! I'm now going to be building a second one as a present for someone, so I think I'll redo the graphics to suit them.

My prototype that you saw me build here is now clipped onto the top of my PC screen, where it'll help me look after my eyes. Hopefully in a few week's time I'll be able to let you know how I found using it over a long period.

As always, thank you very much for reading, I hope you enjoyed following the build, and if you've got any comments or suggestions I look forward to hearing from you!

Self-Care Challenge

Grand Prize in the
Self-Care Challenge