Shop OBEX P1 Docs P2 Docs Learn Events
BS2SX Timing Problems with the Devantech SRF04. — Parallax Forums

BS2SX Timing Problems with the Devantech SRF04.

ArchiverArchiver Posts: 46,084
edited 2002-01-01 05:44 in General Discussion
Hi..

I've been working on a robotic project for about a month now..
Everything was going great until I upgraded my BS2 to the SX. I've
worked
out most of the timing issues.. The SRF04 is causing me problems
with unstable results. I've followed the program example in the
manual and
have increased my convfac to 183 and my pulsout to 13. The results
are unstable and make it tough to rely on this data for
navigation.. If someone
could offer and words of advise, I'd greatly appreciate it..

V/R
Doug
dpervine@s...

'{$STAMP BS2sx}

'SETUP SRF
convf con 183
init con 0
echo con 1
range var word

MAIN:

gosub SRF
debug DEC range,cr
pause 250
goto MAIN

SRF:
pulsout init,13
pulsin echo,1,range
pulsout init,13
pulsin echo,1,range
range=range/convf
pause 10
return

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2002-01-01 00:39
    Beats me -- it works on my BS2SX 'bot with the code right out of the
    Acroname document. I did have to double the CONVF value if I remember right.
    Ocassionally you will get a false measurement of zero and this will throw
    things off -- I always averaged three measurements to be sure things were
    kosher.

    Original Message

    > I've been working on a robotic project for about a month now..
    > Everything was going great until I upgraded my BS2 to the SX. I've
    > worked
    > out most of the timing issues.. The SRF04 is causing me problems
    > with unstable results. I've followed the program example in the
    > manual and
    > have increased my convfac to 183 and my pulsout to 13. The results
    > are unstable and make it tough to rely on this data for
    > navigation.. If someone
    > could offer and words of advise, I'd greatly appreciate it..
  • ArchiverArchiver Posts: 46,084
    edited 2002-01-01 03:12
    Doug:

    This may solve your problem

    http://www.robot-electronics.co.uk/htm/srf04_er1.shtml

    Later
    Dan


    --- In basicstamps@y..., "dmpervine" <dmpervine@y...> wrote:
    > Hi..
    >
    > I've been working on a robotic project for about a month now..
    > Everything was going great until I upgraded my BS2 to the SX. I've
    > worked
    > out most of the timing issues.. The SRF04 is causing me problems
    > with unstable results. I've followed the program example in the
    > manual and
    > have increased my convfac to 183 and my pulsout to 13. The results
    > are unstable and make it tough to rely on this data for
    > navigation.. If someone
    > could offer and words of advise, I'd greatly appreciate it..
    >
    > V/R
    > Doug
    > dpervine@s...
    >
    > '{$STAMP BS2sx}
    >
    > 'SETUP SRF
    > convf con 183
    > init con 0
    > echo con 1
    > range var word
    >
    > MAIN:
    >
    > gosub SRF
    > debug DEC range,cr
    > pause 250
    > goto MAIN
    >
    > SRF:
    > pulsout init,13
    > pulsin echo,1,range
    > pulsout init,13
    > pulsin echo,1,range
    > range=range/convf
    > pause 10
    > return
  • ArchiverArchiver Posts: 46,084
    edited 2002-01-01 05:44
    The CAP is properly installed...

    The SRF04 worked perfectly when it was with the BS2. Now that
    my timing is roughly 2.5 times faster (was 2uS now .8uS).. It
    creates a few problems.

    --- In basicstamps@y..., "drchiodo" <dchiodo@m...> wrote:
    > Doug:
    >
    > This may solve your problem
    >
    > http://www.robot-electronics.co.uk/htm/srf04_er1.shtml
    >
    > Later
    > Dan
Sign In or Register to comment.