Shop OBEX P1 Docs P2 Docs Learn Events
Ping errating on Activity Board with USB and 6V connected simultaneously — Parallax Forums

Ping errating on Activity Board with USB and 6V connected simultaneously

banjobanjo Posts: 447
edited 2015-01-10 10:02 in Accessories
I have a Ping breadboarded on my Activity Bot to pin 8 through a 2 KOhm resistor and to 5V. A XBee WiFi, the wheel servos and a ping bracket servo are connected but not in use by the software.
As software I'm using the "Test Ping.c" that is included in the Learn library.

I get correct AND stable measurements in the terminal window when powering only through the USB cable.
With both the USB cable and the external power connected (5 * 1.2V rechargeable batteries), the measurements shown in the terminal window are incorrect and not stable. On longer distances they are only ~50 % of what they should be, and as said not stable
I've also tried with USB cable and 5 fresh alkaline batteries with same erroneous results.

Is this an expected behavior?
Shouldn't I connect both USB and external power at the same time?

Comments

  • banjobanjo Posts: 447
    edited 2015-01-04 04:04
    To troubleshoot this I'm writing the Ping measurements to a SD card. When using only external power (batteries) I get much smaller distances compared to using only USB cable.
    My conclusion so far is that as soon as external power is connected, then the circuit is using that and not USB power. And with external power something is not working same as with USB power only.

    Any clues or tips what to try?
  • banjobanjo Posts: 447
    edited 2015-01-04 06:05
    Also tried to power Ping through servo port 16 with jumper set to 5V. Same result.

    Problems with the voltage regulator?

    This is the data when connected through USB cable only:
    362 cm
    362 cm
    362 cm
    362 cm
    362 cm
    362 cm
    362 cm
    362 cm
    362 cm
    362 cm
    362 cm
    362 cm
    362 cm
    362 cm
    362 cm
    362 cm
    362 cm
    362 cm
    362 cm
    362 cm
    362 cm
    362 cm
    362 cm
    362 cm
    362 cm
    362 cm
    362 cm
    362 cm
    362 cm
    362 cm
    362 cm
    362 cm
    362 cm
    362 cm
    362 cm
    362 cm
    362 cm
    362 cm
    362 cm
    362 cm
    362 cm
    362 cm
    362 cm
    362 cm
    362 cm
    362 cm
    362 cm
    362 cm
    362 cm
    362 cm
    

    ...and this with USB and 6V external power supply:
    137 cm
    98 cm
    97 cm
    131 cm
    130 cm
    128 cm
    102 cm
    132 cm
    134 cm
    136 cm
    133 cm
    96 cm
    131 cm
    138 cm
    96 cm
    132 cm
    131 cm
    130 cm
    134 cm
    120 cm
    131 cm
    94 cm
    132 cm
    98 cm
    135 cm
    117 cm
    133 cm
    131 cm
    131 cm
    131 cm
    134 cm
    132 cm
    130 cm
    134 cm
    134 cm
    132 cm
    93 cm
    97 cm
    131 cm
    127 cm
    132 cm
    131 cm
    130 cm
    131 cm
    130 cm
    114 cm
    131 cm
    135 cm
    129 cm
    131 cm
    

    BTW Every post I've done go through moderation which means it sometimes takes hours before they get visible. Not so easy to ask for or to provide help with the delays...
  • banjobanjo Posts: 447
    edited 2015-01-04 08:27
    After disconnecting everything and reconnecting one at a time I found out that the XBee 56B Wifi seems to be the culprit or at least involved.
    When it is in the socket I get the weird behavior but not after physically removing it. The XBee is functioning as I've used it together with my iPad.

    Perhaps XBee is drawing power or otherwise interfering with the Ping sensor even if it is not used in the program?
    Can anyone replicate or confirm this?
  • banjobanjo Posts: 447
    edited 2015-01-04 11:29
    Seems my own replies during the last 24 hours are lost in cyberspace (or because of the recent forum glitches)...

    As a summary: by removing the XBee 56B WiFi physically from the XBee socket I don't have any problems, when putting it back I get erroneous Ping measurements with external power. The XBee is not in use in the simple Ping test program.
    Is this a expected behavior, or is there something I can do to correct it?

    The XBee itself seems to work correctly in another program.
  • PublisonPublison Posts: 12,366
    edited 2015-01-04 11:53
    I am responding to this post because it was lost in the Moderated Category for the last day. I fixed i and wanted the bring it to the top.
  • banjobanjo Posts: 447
    edited 2015-01-08 11:38
    I marked this as solved as I got a reply with an explanation in this thread: http://forums.parallax.com/showthread.php/159620-Propeller-AB-Rev-A-and-Rev-B-with-XBee-S6B-giving-different-Ping-measurements?p=1310008&viewfull=1#post1310008
    Shortly, XBee WiFi is not supported with Activity Board rev A. It might or might not work, and in my case the XBee itself works, but the Ping doesn't behave correctly when the XBee and external power is connected.
    On another rev. A I didn't have any problem though.
  • ercoerco Posts: 20,256
    edited 2015-01-09 17:06
    Banjo: Way to work through your problem! As you know, this forum is a helpful place, it's unusual that you didn't have a few experts chiming in here, probably due to the moderation issue. Glad you persisted and "got it done" on your own terms.

    BTW your English is perfect. Are you an American living in Finland, Herra Vikstrom?
  • banjobanjo Posts: 447
    edited 2015-01-09 23:56
    Erco, thx for the feedback! Yeah, thanks to Parallax regular sales :-), I happen to have several Activity Boards and a lot of other Parallax stuff so was able to troubleshoot it mainly on my own.

    BTW
    I happen to belong to the 5-6 % Swedish-speaking minority living in Finland so English is only my 3rd language, native language is Swedish and 2nd language Finnish (Herr Vikstrom in Swedish = Herra Vikstrom in Finnish = Mr Vikstrom in English). In addition I understand some German and Vietnamese.
    In my daily work in a global company I'm speaking all three languages every day, but 99% of all writing is in English. So it is fairly easy to write English nowadays but sometimes I struggle with Swedish and Finnish instead... Same goes more or less with speaking.

    BTW #2 Your English is quite good also :-)
  • ercoerco Posts: 20,256
    edited 2015-01-10 10:02
    banjo wrote: »

    BTW #2 Your English is quite good also :-)

    Tack s
Sign In or Register to comment.