Shop OBEX P1 Docs P2 Docs Learn Events
BS 1 to SRF04 interface - anyone already done this? — Parallax Forums

BS 1 to SRF04 interface - anyone already done this?

ArchiverArchiver Posts: 46,084
edited 2004-04-22 02:52 in General Discussion
Looked thru the archives and did not see anything for the BS1.
Plenty on the BS2.

I was playing with some sensors and tried this, but it looks like the
BS1 is a little slow and does not see the positive going leading edge
of the output from the SRF04.

Is that the issue and has someone done a work-around? I am thinking
a short delay of the trigger with a 555 should work.

Rick

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2004-04-22 02:52
    OK. Figured it out. Had to break out the dual trace scope and see
    what was going on. Major issue is speed. The BS1 is too slow to
    issue the trigger and then look for the leading positive edge of the
    pulse.

    Solution was simple and cheap. First invert the pulse out with a 7400
    or what ever you have on hand. Then trigger a 555 timer set to about
    1 millisecond. Use the output of the 555 to trigger the SRF04
    ultrasonic sensor. The sensor starts on the negative edge of the
    pulse so the BS1 has plenty of time to look for the leading edge.
    The range pulse reads perfectly and gives readings from about 12 to
    1100 in my house.

    The cool thing is that the delay does not affect the accuracy of the
    reading because it doesn't change the results of the range pulse. It
    only changes when the process is initiated.
Sign In or Register to comment.