2015-04-08 (W) Self Contained Haptic Distance Sensor

A very simple program was written to take the place of the original program. The minimal version deals directly with the raw input and output of the ultrasonic distance sensor and the servo controller. The ultrasonic sensor uses microseconds to measure the time it takes sound to reflect off distant objects. The servo uses microsecond pulses over a 20millisecond envelope to determine rotation. Normally, as with the original program, the distance sensor output is converted to cm and the servo library translates the rotation into degrees from 0 to 180. This revised program directly maps the returned time from the ultrasonic sensor to the measured pulse for the servo and creates the servo envelope by structuring the whole program around it. For comparison the original program image, which scrolls to show the whole thing is shown next to the revised program which takes less than half the window.

Original program

Minimal program

A video was made showing the effectiveness of the revised program. The video doesn't show a problem where the program stalls if there is a sudden change in distance. Issues have been seen before but no reliable operation could be obtained so the issue could not be isolated. With the minimal program the problem was easier to see. Serial data was also used to confirm the halting program although the exact cause was unknown since there was a short timeout built into the distance sensor reading

Operation of Haptic Distance Sensor

Files for Self Contained Haptic Distance Sensor:
To do:
  • Design way for servo cam to push on user without rubbing
  • Debug program
    • Get reliable readings from distance sensor
    • Correspond distance readings to servo rotation
    • Using floating limits
  • Take rotating photo of device  
  • Write instructions

The rest of the posts for this project have been arranged by date.

Completed projects from year 1.
Completed projects from year 2.

This disclaimer must be intact and whole. This disclaimer must be included if a project is distributed.

All information in this blog, or linked by this blog, are not to be taken as advice or solicitation. Anyone attempting to replicate, in whole or in part, is responsible for the outcome and procedure. Any loss of functionality, money, property or similar, is the responsibility of those involved in the replication.

All digital communication regarding the email address 24hourengineer@gmail.com becomes the intellectual property of Brian McEvoy. Any information contained within these messages may be distributed or retained at the discretion of Brian McEvoy. Any email sent to this address, or any email account owned by Brian McEvoy, cannot be used to claim property or assets.

Comments to the blog may be utilized or erased at the discretion of the owner. No one posting may claim claim property or assets based on their post.

This blog, including pictures and text, is copyright to Brian McEvoy.

2015-04-06 (M)