Shop OBEX P1 Docs P2 Docs Learn Events
Jumpy Ping Readings — Parallax Forums

Jumpy Ping Readings

IratenateIratenate Posts: 7
edited 2011-02-27 18:20 in Propeller 1
Hi all!

I'm transitioning from a Stamp 2 to the prop and I'm having some problems with my ping sensor. It is jumpy. VERY jumpy. I am using the ping object in conjunction with serial terminal (both from Obex) and when I got everything up and running, the distances being spit out are all over the place. On seldom occasions and for no apparent reason the sensor seems to read decently, but without any apparent external influence, falls back into chaos.

I am using a Propeller Platform USB from gadget gangster with the power wired to +5v, and a 1k resistor from the data to the IO pin as shown in the Ping object file. I modified the ping demo to use the serial terminal instead of the LCD display. The board is powered by 4 fresh AA batteries.

For troubleshooting, I have tried:
1) completely removing the serial terminal portion of the code and replacing it with a 10 segment led bar read out with extremely simple code (still very jumpy).
2) testing the ping sensor on my old Stamp 2 setup (works perfectly).
3) rewriting the ping communication portion of the code in PASM (still very jumpy).
4) Checking and rechecking for proper voltages, shorts, etc (every seems good).
5) Using different IO ports

One thing I noticed different between the Stamp 2 and the Prop is that the sensor activity indicator LED turns off during the down time on the Stamp 2, but Prop its on constantly. I suspect this may point towards the problem.

Any help would be much appreciated!

-Iratenate

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2011-02-27 16:16
    The PING))) works very nicely with the Propeller. BoeBotBasic is a version of FemtoBasic that works with a Prop-based BoeBot originally using a SpinStamp and a standard BoeBot with 1K resistors in the leads to the servos and the PING))). Since this works fine, there must be something about your setup that's different that makes your PING))) readings jumpy. How about posting the source code you're using (as an attachment). Also give a complete description or schematic of how you have things connected.
  • IratenateIratenate Posts: 7
    edited 2011-02-27 18:20
    Thanks for the quick response Mike. Turns out that continuous LED did point to a problem. After a bit more testing, I determined the 4 IO pins I tried using (0-3) were stuck in a high output state. I must have smoked em a few months back when I first got my Prop :(...

    Everything is working fine. Thanks!

    -Iratenate
Sign In or Register to comment.