Posts Tagged ‘ ultrasonic

BAT Hat

You always need a good  acronym when developing a new project.  BAT = “Blind Assistance Technology”.

I came up with an idea… sometime last year while working on my “Ponar” tech, to make a device that would help one navigate blindly, by sonar.  It’s been a really slow process to get this prototype off the ground:  Work\life\learning all take their time.  But I finally got something functional.  During development, other similar items have appeared on the web (a Ping\servo glove-based solution, for example).  And they’re great!  But I’ll just start out by saying this idea came to me on its own, not that others haven’t already envisioned it\implemented it (better) elsewhere.

Conceptually, it’s a device you wear on your head that can sense the world around you via ultrasonic sensors.  Based on a certain distance, motors attached to the device will vibrate, tactually telling you you’re getting close to something.  There are a total of three sensors\motors mounted on the front, and each side.

The brains are an Arduino (Uno).  Parallax Ping))) sensors are used for the ultrasonic distance readings, and vibrating DC motors from Xbox 360 controllers are used to convey the distances to the user.  The framework I used to hook everything up was an old hat, using shapelock to form brackets for the motors, Ping))) sensors, & battery pack, and zipties to hold everything else.  Originally I had a single 9v battery powering it,… but…. it made the device was unreliable.  I switched to 6xAA batteries (still 9v total), and it’s much happier now.

Parts List:

Video of my boy wearing the hat, walking around his room:
More info below the pics:

Here is a Fritzing image of how the whole thing was wired together:

And here’s a link to the Arduino code.

Project Notes:

  • After some research online, I figured out that the rumble motors I received from a friends Xbox 360 controllers only need 2v:  Originally I had a system setup with transistors driving them from the battery directly, but this realization simplified the process.  Furthermore, my multimeter claims they draw less than 20 mA, which makes them safe to be driven off the Arduino’s pins.
  • The motors are driven off PMW Arduino pins so I can vary the voltage as distance changes.  In the current configuration, they’ll start to spin as they approach items 1.5m away, and are at full velocity at 1m.
  • If I can, I’m going to pick up some pager-motors:  They shouldn’t vibrate one’s head as much as those rumble-motors 😉
  • I also have three servos:  It would be interesting to see how well one’s head could ‘detect’ their pressure.
  • I had originally powered the system with a single 9v battery.  But the Ping))) sensors and motors wouldn’t behave properly.  When connecting the Arduino over USB for debugging purposes everything worked fine… which didn’t make sense to my limited electrical knowledge:  USB is only 5v, while the battery pack was 9v.  However, my guess is that the 9v battery wasn’t providing enough current for the whole system, while the USB was.  So I switched out for a 6xAA battery pack (equaling 9v total) and everything started working properly.  Presumably however, since the Arduino/Ping only needs 5v, and the motors only 2v, a 4xAA battery system (6v) should work fine.
Final Thought:
  • Honestly, it doesn’t work as well as I envisioned when starting.  But that was a pretty high bar I set myself.  Don’t get me wrong, it works fine.  But in my head I’d have this robust system of navigating blindly.  However, with only three motors, that detect obstacles at eye level front, left, and right, you’ll still run into problems with items at knee height.  And with ultrasonic sensors, ‘fuzzy’ items like pillows don’t reflect well, and the less perpendicular you are to a surface the less likely it is to reflect the sound back.  Doubling the number of sensors\motors would be a good start.  Or additional systems hooked up to one’s waist, and knees, or even feet.
  • I’d be very interested to have someone who is actually blind give this a try.  If you know anyone in the San Francisco peninsula who is blind and would be up for it, let me know.

 

Ponar

While at the last Maker Faire, I picked up a 4wd robot kit.

My thought is to hook an ultrasonic sensor to it, to do some simple obstacle avoidance.  Since I’ve never worked with any of these components before (servo’s, ultrasonic sensors, motor-drivers, etc), I want to break down each step so I can really grasp how this stuff works.

I was looking at my bucket of parts and it dawned on me:  I have a servo, I have a Ping))) sensor, a spare Arduino Uno, a bunch of Erector Set parts, and knowledge of Processing programming:  I could (should!) make a simple sonar system.  So the “Ponar” was born:  Ping))) + Arduino + Servo + Processing = Ponar.

How it works:

The Arduino program sweeps the servo back and forth over a 90deg arc.  At each degree, the Ping))) sensor returns back a distance reading.  The degrees and distance values are passed over the serial port to the PC, where the Processing application turns them into a ‘traditional looking’ (in my head at least) sonar read-out.

See it in action:

Want to make one too?  Here’s the steps I went through:

Parts List:

Software List:

Hardware setup:

  • Assemble the servo, bracket, ping, and erector set into a pleasing arrangement.
  • Connect the Arduino’s 5v and ground pins to the mini beadboard with the jumpers.
  • Use jumpers to connect the Vin of the Ping))) and the servo to the Arduino powered row on the mini breadboard.
  • Use jumpers to connect the ground of the Ping))) and the servo to the Arduino grounded row on the mini breadboard.
  • Use a jumper to connect the signal line of the Ping))) to the Arduino’s digital pin 7.
  • Use a jumper to connect the signal line of the servo to the Arduino’s digital pin 9.
  • Connect the Arduino to the PC with the usb cable.
  • Upload the Arduino sketch to the Arduino:  It should start sweeping left and right.
  • Run the Processing sketch:  It should sample the serial stream being passed from the Arduino, and display the sonar view on-screen.

For a couple days work, it was really informative, and actually pretty fun.

Ponar sees beer