Skip to content

Proximity Sensor Lab

For the application of the lab, I got over-ambitious and decided to do a personal safety sensor (more on that later).
I originally was just going to construct the whole thing, but after purchasing a proximity sensor and trying to figure it out to no avail, I met with one of the residents and she advised me to take it step by step and not try to bite of more than I could chew.
I’m so glad I listened. I wrestled with this thing for a while… both in the physical and programming aspect of it. I just can’t figure it out.
I had done all the math and the schematic for my original idea, but once I sat down to figure it out, I realized there where lots of steps and testing to be done before being able to get there and be happy with the result–and have a “happy” sensor.

The first pass at my schematic
The first pass at my schematic

So I decided to take a step back and try to figure how to work the proximity sensor first. I trying to figure out on my own and with the resident for a while, and after finding a tutorial of it on and looking at the description on tinkersphere (there was no data sheet) I hooked it up based on what they instructed (minus the LEDs):

wiring graphic by
wiring graphic by


my circuit setup
my circuit setup

I also grabbed the code they provided and paired it with the exercises we did in class to try and figure it out. I wrote what I thought was right but it wasn’t working. I fidgeted with it for a while and it still didn’t work.

Screen Shot 2015-09-22 at 8.37.10 PM
I slept on it and the next day came back ready to tackle it. I moved the digital pins to analog and back, I kept adding code, and I sat with a friend to help me get through the programming of it. Nothing worked. I copied/pasted the code provided in the tutorial to see if maybe the actual sensor wasn’t working, but that worked.
Slowly, we tried dissecting the code and figuring out what was wrong. We slowly moved forward by first just getting some sort of reading from the actual sensor…

Screen Shot 2015-09-23 at 4.07.19 PM


and finally after lots of tries, we actually got the sensor to work.

Screen Shot 2015-09-23 at 4.15.57 PM

Even though we got the sensor to work, I honestly have no idea how that happened. In hindsight I understand it, but while we were in the process of figuring that out, I had a hard time knowing what to do next. Is there a way to be able to figure out steps or a specific process to figure out how things work? My head is spinning with the thought that every new part I will need to troubleshoot this way… or maybe it just gets easier/faster?


Published inPhysComp

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *