BS2SX Timing Problems with the Devantech SRF04
Archiver
Posts: 46,084
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
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
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