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 16:41 in General Discussion
Doug-

Maybe just a typo, but this looks wrong:

> SRF:
> pulsout init,13
> pulsin echo,1,range
> pulsout init,13
> pulsin echo,1,range

I think you want only one pulsout-pulsin sequence per sample. The
timing specs disallow a follow-on init pulse within 10 msec of the
trailing edge of the echo pulse. That may be mucking things up.
See http://www.robot-electronics.co.uk/htm/srf04_timing.shtml

Your BS2SX also sucks up a lot more power than your BS2--about 60 mA
vs 8 mA for the BS2. Make sure your power supply can handle the
combined current requirements of your Stamp and SRF04.

Regards,

Steve

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2002-01-01 16:41
    No, it's not a typo. I have to ping twice in order to get a return.
    It was like this using the BS2 and it's still needed with the BS2SX.
    If I don't do it, I get a "0" for a return.

    My robot is using a 9.6v/1600mA battery into a LM2940 (5v Reg)
    powersupply. The SRF04 is the only load on the system right now.

    --- In basicstamps@y..., "S Parkis" <parkiss@e...> wrote:
    > Doug-
    >
    > Maybe just a typo, but this looks wrong:
    >
    > > SRF:
    > > pulsout init,13
    > > pulsin echo,1,range
    > > pulsout init,13
    > > pulsin echo,1,range
    >
    > I think you want only one pulsout-pulsin sequence per sample. The
    > timing specs disallow a follow-on init pulse within 10 msec of the
    > trailing edge of the echo pulse. That may be mucking things up.
    > See http://www.robot-electronics.co.uk/htm/srf04_timing.shtml
    >
    > Your BS2SX also sucks up a lot more power than your BS2--about 60
    mA
    > vs 8 mA for the BS2. Make sure your power supply can handle the
    > combined current requirements of your Stamp and SRF04.
    >
    > Regards,
    >
    > Steve
Sign In or Register to comment.