Shop OBEX P1 Docs P2 Docs Learn Events
Propeller Rx Tx Communication under Battery Power — Parallax Forums

Propeller Rx Tx Communication under Battery Power

hylee101001hylee101001 Posts: 48
edited 2016-07-28 22:04 in Propeller 1
Hello,

I tried some communication test between two propeller chips. I just used full duplex library with two rx, tx wires and 1K resistors. Anyway, when the chips are connected to the usb without battery, it works just well. But, when I hit F11 for one of the chips and monitor another chip that is connected to a computer, the error rate is ridiculously high. Also, the larger amount of bytes, the more likely to have error. I first thought it's may be because I used 6.25MHz oscillator - but it should have not working when they are powered by usb. Can anyone make a suggestion for this case?

To wrap: the communication between two prop works very well regardless of the amount of information when they are powered by usb ports. The communication has lots of error when they are powered by battery alone.

The chips I used: Two prop ASC with all pins are soldered to bypass the protector resistors. And just simple two of wires and two 1K resistors.
The batteries I tried:
1)9v battery connected to power jack on ASC
2)a portable battery that has 5V (4 A max) usb output power and the usb wire is connected to the usb pin on the ASC.


Please share your ideas~!

Comments

  • ElectrodudeElectrodude Posts: 1,657
    edited 2016-07-28 22:41
    Are you connecting the grounds of the two boards together? You need to do this to complete the circuit. It works when it's powered by USB because then the grounds are connected through USB, but when it's on battery, there's no circuit - just a wire going one way. The reason it sort of works with no ground is probably because the data line going the other way acts as a very weak ground (this is probably bad for your Propeller).

    EDIT: I would want to connect the grounds together even if I knew the ground was also connected through USB, but this is probably a bad idea in some cases because it can cause ground loops. Hopefully someone more experienced with ground loops than I am can give some advice on this.
  • PaulRowntreePaulRowntree Posts: 150
    edited 2016-07-28 23:11
    EDIT: I would want to connect the grounds together even if I knew the ground was also connected through USB, but this is probably a bad idea in some cases because it can cause ground loops. Hopefully someone more experienced with ground loops than I am can give some advice on this.

    Not sure if I have more experience, but an instrumentation trick is to connect grounds through a small (eg 20-100 ohm) resistor. A few millivolts diference of ground potential is not likely to cause a problem (esp for digital signals), and very little current flows through the resistor. A direct wire bridge between grounds can run several amps of ground current with even a few mV delta-V.
  • kwinnkwinn Posts: 8,697
    A battery can be considered to be a "floating" or "isolated" power supply so the the two propeller boards need a common connection as well as the rx/tx connections for reliable comms. This is normally done by connecting the Vss (negative) of the two batteries together.
  • It looks it's working now. Thank you all!
  • hylee,
    What suggestion did you use to make it work?
    Jim
  • kwinnkwinn Posts: 8,697
    RS_Jim wrote: »
    hylee,
    What suggestion did you use to make it work?
    Jim

    All the suggestions amount to making a common (ground) connection between the two boards.
  • I just connected the gnd to each other as suggested..
  • kwinnkwinn Posts: 8,697
    I just connected the gnd to each other as suggested..

    For the sake of clarity, two circuits powered by separate battery or isolated power supply circuits to communicate by a wired connection need a two wire connection. This can be a common and signal connection or a two wire differential signal connection. The common connection does not have to be a ground connection, although it often is. A common connection is just a wire that connects two circuits together, and is usually (but not always) between the negative sides of the power supplies. A true ground connection ultimately goes to a metal pipe or post embedded in the ground.
Sign In or Register to comment.