loading

Imagine waking up next to a light sleeper and you have to get to the bathroom but you're in an pitch black hotel room. Even a flashlight will wake him or her up but you can't hold it for the next three hours when the alarm goes off. What if you could navigate a hotel room like a bat navigates a cave?

With a vibrating distance sensor you can "feel" walls up to fifteen feet away rather than groping blindly.

The vibrating distance sensor gives you sonar vision with no training. The flashlight enclosure is easy to build and intuitive to use. Feedback is a vibrating motor that vibrates strongly when an object is close then vibrates weakly when an object is far away. Kids have picked this up and automatically began testing the range of walls and ceilings with no one telling them how to operate it. Just point it where you want to look/feel and you sense if there is something in the way.

This project involves soldering, cutting, drilling, sanding, measuring, and downloading a program to an Arduino.

Step 1: Shopping List

Flashlight.* Rayovac Economy 2D 9 Lumen model. Get the red model with the black bezel. Amazon link.
Ultrasonic distance sensor
9V Connector
9V battery
Attiny85 Arduino
Tactile switch
Vibrator motor
STL Model for flashlight adapter

3/4" #10 bolt*
#10 end nut *
Super glue
Hot glue stick
1" Schedule PVC * White plumbing pipe
Wire
* These items are cheaper to purchase from a hardware store than order online.


While we're gathering everything I want share the files for this project. The necessary one is the Arduino code.

There is an .stl file but if you don't have a 3D printer you can move to the next step after downloading the Arduino code. If you can print that you won't have to cut the adapter in the next step.

For the hackers who want to see all the inner workings of the 3D models I have the OpenSCAD files on my blog. They're freely available so if you want to use a different flashlight you can easily tweak things and make a model to fit lots of different flashlights. There are also .dwg files for people with laser cutters or CNC machines.

Downloadable files for Vibrating Distance Sensor:

Step 2: Flashlight Adapter

By the end of this step we will end up with an adapter to hold a distance sensor in a flashlight. This part is visible so I recommend doing a neat job. The yellow and green image is animated so expand it to get a good idea of what we're making.

If you printed the .stl file from the previous step you can skip this step now.

This part is small so it is easy to print off a template on a standard paper printer. Download the .pdf and print it at 100% scaling. Don't worry if some of the borders are cut off. When printed at 100% the scale at the bottom will align with a ruler exactly. Cut out the templates from wood or plastic. Your material should be at least 2mm thick but less than 13mm thick. Hole sizes and positions are printed right on the file.

When the part it done it should fit easily into the black flashlight bezel and not stick in place. It is fine if the piece rattles a little bit, don't worry, it won't rattle once it's assembled.

Step 3: Electrical

This is the step with soldering.

I've included a schematic image above. On my blog I even provide a .dwg of the schematic if that's your thing. If not, that's cool too. The rest of the pictures go in order of what to do if you would rather have a step-by-step pictorial of the soldering steps.

Soldering the thin wires of the vibrator can be tricky so once you get it I recommend gluing the vibrator to the Arduino. Hot glue works well but so does double sided foam tape.

Once everything is soldered, adhere the distance sensor to the adapter made in the previous step. Hot glue and double-sided tape work well for this too. It is not necessary to use special glue since the distance sensor will be held in place once the flashlight bezel is tightened onto it.

If you apply power to the Arduino now the vibrator motor should pulse in time with the LED. This is a good way to test the power and vibrator circuit.

Step 4: Program the Arduino

If you haven't already downloaded the project's Arduino code please do so now.

If you have used a DigiSpark then you know the ropes. If not please follow the steps shown by DigiStump, the people who make the DigiSpark.

The difference will be adding an Additional Board Manager URL at:
http://digistump.com/package_digistump_index.json

Step 5: PVC Cutting and Drilling

I wrestled with different method of using the switch built into the flashlight. I even considered ripping it out and putting in a brand new switch but the elegance of using the original switch was too much. With that said, some of you hackers will have no problem changing this step around to suit yourself. Some ideas would be to use a LiPo battery pack instead of the 9V battery or a high capacity 12V battery. A lighted switch would look pretty cool, just saying.

1" PVC, the cheap plumbing kind, is roughly the same diameter as a D-cell. This works well to fill the space where the bulky batteries would normally go.

  1. Cut a 5 3/4" (145mm) length of the pipe.
  2. Cut out a space for the 9V battery. This could be cut with a saw or router. It should be secure but easy to remove
  3. Place the pipe inside the flashlight and push it to the bottom of the handle
  4. Align the pipe so there is plenty of pipe right under the switch.
  5. Drill a 3/16" (4mm) hole though the flashlight and pipe
  6. Put a #10 (4mm) bolt through this hole.

This pipe serves two purposes. The first reason is to hold a small, inexpensive tactile switch under the flashlight's switch. Secondly the pipe will hold the 9V from rattling around and tugging on wires. You want it to feel sturdy, don't you?

Step 6: Last Step and It Is Easy

We want to position that little black button under the flashlight's switch so when it is pushed forward the button is held down. The button will be glued in place and that's about it.

To align the switch:

  1. Install the PVC pipe and position it with a bolt. There is not need for a nut yet.
  2. Make sure the flashlight switch is in the OFF position.
  3. Use tweezers or thin pliers to position the button where it will be pressed when the flashlight switch is fully forward.
  4. Use a hot glue gun to temporarily hold the switch in position.
  5. Switch the flashlight off.
  6. Remove bolt
  7. Remove PVC from flashlight handle.
  8. Use a marker or pencil to outline the switch position.
  9. Break the hot glue away from the PVC and switch.
  10. Use plastic glue or super glue to hold the switch in place.

Once the glue has dried reinstall the PVC and bolt like you did in the previous step. Switch the flashlight on so the button is pressed. There should be a small click. Add the nut while the button is held and do not over tighten the nut.

If everything has been done correctly you can start using your handheld sonar unit!

Step 7:

I hope you enjoyed reading or building this project.

This device was developed over the course of months and I documented every step. Some of those steps were fruitless and some were amazing breakthroughs. If you enjoy getting into the mind of someone who creates things like this please visit me.

I run a blog where I talk incessantly about the things I build, including an unabridged versionof this project. There are also other neat projects like a device which converts temperature to sound. You can also see how this project started as a servo feedback device which became a different Instructable first.

24hourengineer.com

<p>can you make a tutorial on how to use two ultrasonic sensor to control a vibration motor? What spec is your vibration motor.</p>
<p>What kinds of readings do you expect from two ultrasonic sensors and how do you want to output that to a single vibrating motor? With the current project, a single sensor outputs to a single motor but having a second sensor makes this a different project. Can you tell me how you envision using this?<br>The vibration motor was a 10mm diameter 3.3v cell phone vibrator motor. Anything small enough to be driven by the Arduino should be acceptable. A 5V vibrator will also work.</p>
<p>Thanks for the reply, I intend to build a detecter for blind people which help them avoid obstacle above their abdomen. So there will be two arduino board, each with 2 ultrasonic sensor (provide wider range) and one vibration motor. So they will be 4 sensor.</p>
<p>I think I see what you're trying to do and it's entirely possible but using two distance sensor means that you can't get constant feedback like this project does. It sounds like what you want to use your project to act as a proximity alarm. A proximity alarm could trigger a vibrator whenever something is a few cm away. If you picked the right one, you might not even need programming, it could simply power the vibrator directly from the proximity sensor's output.<br>I'll add an eBay link so you can see the kinds of devices I'm talking about. If I have the wrong idea let me know.</p><p><a href="http://www.ebay.com/sch/i.html?_odkw=proximity+sensor+infrared&_sop=15&_osacat=0&_from=R40&_trksid=m570.l1313&_nkw=proximity+sensor+infrared+adjustable&_sacat=0">eBay Proximity Sensors</a></p>
<p>But proximity sensor can only detect really short range, i need somehow 1.5-2 metre range.</p>
<p>I see. Then you are correct, a proximity sensor would not be a good choice. If you are only planning to build one of these devices it may be easiest to build multiple copies of this project according to the directions. If you are planning to build many copies it would be cheaper to build them your way. Even then, it may be best to build one according to the directions so you can see the intended operation. How many do you plan to make?</p>
<p>can you help me to review this? </p>
<p>Issue 1: The GND for each of the HC-SR04 modules doesn't seem to be connected to the same ground as the Arduino and this would be important. </p><p>Issue 2:Everything was connected to Analog input pins, which will work but most people don't do this.</p><p>Issue 3: The motor was connected to Vcc and a pin which can cause problems or at least confusion when turning it on. It should have the (+) connected to an Arduino pin capable of analog output and the (-) connected to ground. On an Arduino Nano, like you have shown, the analog output pins are 3,5,6,9,10, and 11.</p>
<p>Thanks for advice. I will change it.</p>
I love this instructable! I have two questions 1. Can you give a range of cost for the total project? 2. Do I have to use the flashlight to house everything? Could I build my own housing? What other parts would I need if I wanted to do that?
<p>This project should cost less than $10USD if you can buy the small hardware pieces at a hardware store. If you don't mind waiting for shipping from China the electronic parts are very inexpensive.</p><p>The flashlight housing isn't necessary and it actually has a lot of empty space. If you're going to build a new enclosure the sky is the limit. I do recommend a <a href="http://www.ebay.com/sch/i.html?_odkw=hc-sr04&_sop=15&LH_BIN=1&_osacat=0&_from=R40&_trksid=m570.l1313&_nkw=hc-sr04+mount&_sacat=0" rel="nofollow">mount for the distance sensor</a> so it will be easy to bolt down. Have fun with the design and post a picture when you finish!</p>
<p>Any recommendations for how best to modify the circuit to allow for audio AND OR vibration output; my blind friend thinks it might be educational in group settings, and when his neuropathy is acting up.</p>
<p>This thing is freaking awesome! Believe it or not, I didn't have to change the pinout configuration. This will really help my buddy get around the house with a little more ease. (he is pretty much completely blind) Thanks for coming up with this!</p>
<p>I was thinking this could be great for camping out doors run a remote -or extention wire to the vibrate function to alert of a bear or other wild life threats .Ps The blind useing for shooting was just a joke . Thank You keep the wheals turning!!</p>
Hey, in a tactical mount on a shotgun! Zombies wouldn't stand a chance.
<p>be great for blind gun owners in self defense .Stopping an intruder the blind just mount it on there shot gun .When it vibrates just pull the trigger. </p>
<p>So awesome if it works well. I can see far better applications for this than getting to the toilet at night LOL</p>
<p>Agreed. What would you use it for?</p>
<p>Navigating anywhere I can't see clearly. Would be an enormous help if stealth is desirable. Can't think of anything at present but perhaps some apocalyptic day soon it will come in handy. Thanks for sharing will check out your other posts soon ;)</p>
<p>Could you use the arduino uno rev 3 if the pinout numbers where changed? I would love to try this one</p>
<p>Technically, yes you can use an Arduino UNO Rev 3. To do so you will need to do the following: </p><p>1. Change the code to specify the pins you've chosen. (This is usually the easy part, so start here.) Why? This is because the pin numbers are not the same (as you point out in your question)</p><p>2. Change the way things are physically contained (Larger flashlight, home built...etc.). Why? An ATTINY85 Arduino is very small allowing it to easily fit into the flashlight housing. An Arduino UNO Rev 3 will not fit into the size of flashlight used for this instructable. So if you wish to have a handheld device, even just temporarily, you will need to find a way to hold the pieces together long enough to use it.</p>
<p>Exactly! Thank you, JasonD1.<br>Make sure the vibrator motor is connected to a pin capable of analog (PWM) output and you are good to go.</p>
<p>No problem. Cool instructable, by the way. I've bookmarked it. :-)</p>
<p>Nice! The cyborg tag is really fitting. I need to make this.</p>
<p>Earlier this year I even made a version which worked with an implanted magnet so the user had to be a cyborg. This version needed no moving parts.</p><p>http://www.24hourengineer.com/2015/05/2015-05-01-sa-cyborg-distance-sensor.html</p>
<p>Would this not be incredibly useful for actual blind people? I think you should patent this before somebody steals your idea!</p>
<p>I really hope this can be adopted by vision-impaired people. I wouldn't patent the idea because that might literally keep it out of the hands of people who need it.</p><p>One of my early prototypes was sent to a blind person in NC for exactly that purpose.</p>
<p>Amazing, that just jumped to the top of my electronics project list!</p>
<p>Sweet! Let us know how it turns out.</p>
<p>You left out the distance sensor from the shopping list. </p><p>Here's a link to help others: <a href="http://www.ebay.com/sch/i.html?_nkw=hc-sr04" rel="nofollow">http://www.ebay.com/sch/i.html?_nkw=hc-sr04</a></p>
<p>Thank you! I added that to the list.</p>
<p>Awesome!</p>
<p>haha, reminds me of the motion tracker from the aliens anthology.</p>
Cool project! Great instructions. I will put this on my list. Thanks!

About This Instructable

33,811views

518favorites

License:

More by 24Eng:Power Drill to Belt Sander Conversion Topographical Lake 3D Print Acetone Vapor Bathing ABS Parts 
Add instructable to: