Smart Contact Lens Dispenser

2,606

5

About: Just a guy who likes to build stuff. Please consider subscribing to my YouTube Channel for more awesome projects. https://www.youtube.com/channel/UCDkYnToaY_G0-O_aQo3GrYA

In this instructable I will be showing you how to make your own Smart Contact Dispenser!

Step 1: Intro

Step 2: Background

If you wear contacts then you are probably familiar with the boxes that they come in. Most people I know, including myself, use these boxes as permanent storage and we take out our contacts as needed every day. This resulted in a stack of boxes in my bathroom that was driving me crazy. I knew there had to be a better way to organize these contacts so I went searching on the internet. After only finding a contact storage dispenser that someone was trying to sell for $25, I designed up some basic ones which can be found here.

They worked pretty great, but I couldn't help but feel annoyed that I had to pull each contact out individually so I looked into ways to have each contact automatically dispense into my hand. Since I had a ESP8266 laying around, I decided to order an OLED display so I could display the weather forecast while I am getting ready in the morning.

If you want to see more of the design process and them in action check out the video above. Please consider subscribing to my YouTube channel to support me and see more videos.

Step 3: Items Needed

For this project the items needed are the following:

1. 5V Power Supply

2. IR LED and Photodiode Pair

3. 220 Ohm Resistor (2)

4. 10K Resistor

5. 10K Potentiometer

5. LM358 Op-Amp

6. 3.3V Zener Diode

7. Basic LED

8. OLED Display 0.96"

9. 470 uF Capacitor (2)

10. 2 FS90R Servos (Or Mod SG90 Servos)

11. Node MCU ESP8266

12. Access to 3D Printer (Check your local library!)

Step 4: Electronics

Now that you have gathered all of the required components, it is time to start assembling everything together. I would recommend wiring everything up on a breadboard first and then once everything is functioning properly go ahead and solder everything up on a perf board.

For those that are unfamiliar with electronics or unsure of some of the components, trust me this circuit is not too bad. I will attempt to break it down below, and if you want to know more, check out the video linked.

On the left we have our IR Led and Photodiode which is connected to a LM358 operational amplifier. This is our proximity circuit which detects our hand underneath to let the controller know we want our contacts dispensed. The distance you want your hand to be detected can be adjusted using a 10K potentiometer. The output from this circuit is brought into our ESP8266 microcontroller which we will program using the Arduino IDE setup for the NodeMCU ESP8266. The program will wait for the input from the proximity circuit, then trigger the right servo, wait a second to allow you to move your hand to the left dispenser, and then trigger the left servo. This way both contacts will be dispensed into your hand. The ESP8266 will also be connected over WiFi which will enable us to use a weather API to display the weather forecast for the next few days on the OLED display. I started with just a weather forecast display but over time I will definitely be adding more features.

Step 5: 3D Design and Print

Since the electronics consisted of a servo, a few LEDs, power supply, and the rest of the circuit I went ahead and designed up our auto contact dispenser. I made it in several parts that will need to be glued or taped together because I didn't feel like possibly failing a super long print.

The base of our contact dispensor had two holes for out 5mm IR and Photodiode Leds, a cutout for a 5V power supply, and a cutout to allow the servos to be placed sideways as they are used to dispense contacts.

The contact storage remained similar to my previous design but I cutout a slot at the bottom for out servo wheel to turn freely. I also increased the size to allow more contacts to be stored getting rid of those stupid boxes once and for all.

The case for the OLED display and the electronics is pretty basic but since I used a standard 50 x 70 mm perf board, I designed a a slot for it to slide right into place.

The designs can be found on Thingiverse here.

Step 6: Programming

In this step, I will show you how to program the ESP8266. The code is just a simple modification of the awesome ThingPulse esp8266 weather station (Github Link) weather example. You will also need to download the following packages to the Arduino IDE:

1. ESPWifi

2. ESPHTTPClient

3. JsonListener

Once the libraries are installed, download the program below.

You will need to fill in you Wifi SSID, Wifi Password, signup for weather underground and receive your API key, and also find your location ID. Once all of these are entered into the code, go ahead an upload to your NodeMCU.

Step 7: Putting It All Together

In this step, we will put all of the components together.

This includes placing the servos in their slots, pushing the IR Led and Photodiodes into their holes, soldering up everything on a perf board, inserting the perf board into the printed slot, and connect all of the other components up.

Step 8: Test It Out!

After you have connected all the 3D printed parts together and mounted it to the wall, it is time to put it to the test. Fill up the left and right side contact containers, plug in power, and after waiting for the OLED screen to boot up with your local weather and test it out!

Check out the video for it in action!

Share

    Recommendations

    • Trash to Treasure

      Trash to Treasure
    • Tape Contest

      Tape Contest
    • Arduino Contest 2019

      Arduino Contest 2019

    Discussions