Shop OBEX P1 Docs P2 Docs Learn Events
10 Stamps connected in Series — Parallax Forums

10 Stamps connected in Series

faisalfaisal Posts: 14
edited 2008-01-19 18:01 in BASIC Stamp
Hi all,

I am connecting pin 1 of a stamp to Nine other pin 1's in series using just wires, and each pin will be an input and an output at some time in the program.

· In other posts I have read that connecting·a 220 ohm resistor·inline with the wires is recommended because·of a possible software error.· What is this·error?

Thanks in advance.

Cheers

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-01-18 07:24
    The problem is that you might have an error in your program(s) and two different I/O pins on the same Stamp or on different ones might both be set to output mode and might have different states (one HIGH and one LOW). This would cause a short circuit if the I/O pins were directly connected and might destroy the I/O pin or damage the Stamp in other ways. The 220 ohm resistor limits this short circuit current to about 20 mA which is within the rating of the I/O pin circuitry.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-01-18 08:20
    If you were to implement the series resistor scheme with your network of ten Stamps, I would connect a 220-ohm resistor from each to a common bus and pull the bus up, with a 4.7K resistor, to Vdd. That way each pair of pins will have 480 ohms between them, and any one pin pulling low will be able to pull the bus down adequately against the pullup resistor, assuming the other pins are floating.

    I assume all ten Stamps are proximally located? If they're widely separated, it might be better to use two 10K, or even 6.8K, pullups, one at each end of the network.

    -Phil
  • allanlane5allanlane5 Posts: 3,815
    edited 2008-01-18 17:47
    The "open" baud modes were made for this application. In the "open" baud mode, the 'party-line' you've created will be 'pulled low', but be allowed to 'float high'. Thus, you'll never have the "bad scenario" of two 'talkers' (drivers) on the same line at the same time, one driving high while the other drives low.

    It's a "bad scenario" because if there's no resistance in the line, one of the drivers will burn out. Meaning that BS2 will have physical damage on it.

    So, to be careful, it's a good idea to put a 220 ohm resistor in series with each I/O pin connected to the 'party-line'.
  • skylightskylight Posts: 1,915
    edited 2008-01-18 21:07
    If all the pin 1's are connected together surely thats a parallel connection not a series, or does the op mean input on pin 1 out on another pin to pin 1
    on the next stamp and so on?

    If on a party line(parallel connection) would that mean two 220 ohm resistor in series from pin 1 to pin 1? would 440 ohms cause problems with the input voltage signal?

    Post Edited (skylight) : 1/18/2008 9:18:00 PM GMT
  • Mike GreenMike Green Posts: 23,101
    edited 2008-01-18 21:20
    skylight,
    If all the pin 1's are connected together, it doesn't matter what pieces of wire you use to do it. Electrically, they're all connected to the same point. allenlane5 is talking about each Stamp having a 220 ohm resistor between pin 1 and the common connection point. Electrically, this forms a "party line" since any Stamp can electrically pull the common point to near ground or near Vdd and the other Stamps can determine the logic state (listen in). The pull-up resistor is mostly to establish a default logic state. If this is not provided and no Stamp is set to output mode, then the common point will have an undetermined logic state, mostly determined by electrical noise and static electrical potentials around the wiring ... not a desirable situation.
  • skylightskylight Posts: 1,915
    edited 2008-01-18 21:42
    Mike I understand what you say regarding pullup or pulldown resistors but in this case with a party line they are virtually in a star configuration ignoring the lengths of interconnecting wire which is a parallel connection and as each pin 1 has a series resistor connected then that makes two 220 ohm resistors in series between each pin 1 to pin1 ie pin 1 output talking to pin 1 input on another stamp, so my question was whether having a total resistance of 440 ohms between pins may cause problems with the voltage signals? Hope i'm making sense here smile.gif

    ok re read your post and I understand it to do with one stamp talking to many as opposed to one stamp talking to another and that talking to another and so on which is what I believed the op was implying by saying they were in series. What i would call daisychained.

    Post Edited (skylight) : 1/18/2008 9:53:15 PM GMT
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-01-18 22:35
    skylight said...
    ...my question was whether having a total resistance of 440 ohms between pins may cause problems with the voltage signals?
    No. The "low" voltage level that each pin input in the network sees will be that obtained from a Vdd:4.7K::220R:Gnd divider (i.e. 0.22V), feeding each input through it's 220-ohm series resistor. Since the inputs don't draw or source more than negligible current, there will be no voltage drop through the input resistor.

    In the case where all pins are floating, each will see a 5V "high" level, again because there's almost no current through the series resistors.

    The only thing that could be affected here by the additional series resistance is switching speed. But at BASIC Stamp serial I/O speeds, the effect is inconsequential.

    -Phil
  • skylightskylight Posts: 1,915
    edited 2008-01-19 14:53
    ok Phil understood, thanks for your reply.
  • Bill ChennaultBill Chennault Posts: 1,198
    edited 2008-01-19 18:01
    All--

    Ugly Buster is driven by five Stamps; a BS2p40 master and four OEM BS2s. The master communicates with the slaves pin to pin in a star configuration. The master has five pins dedicated to each slave for a total of 20 pins. Ten of the master's pins are dedicated outputs which give commands to two of the slaves.·Ten pins of the master are dedicated inputs, which receive data from the other two slaves. ALL pins--whether output or input--connected to other pins have a single 1 mega-ohm resistor in-line. In other words, pin-resistor-pin.

    Communication is initiated (from the master, for example) by bringing·certain pins of the group of five dedicated to a slave from their LOW state to their HIGH state. The slave input pins detect the change and interpret the five-bit pattern as a predefined command to do something. This avoids the delays involved in serial communication and thus ensures that a BS2 does not miss a beat (or encoder count).

    A serial communication scheme may work fine, as well. I have never tried it. Plus, a single Stamp may do ALL of this work quite well, especially if it were a BS2px. I do not know. I have never tried it.

    My next machine, probably a walker, will use the far faster SX chip. I will not implement the bit-signaling scheme described above in the SX environment, although there will doubtless be multiple SX processors. I believe I can use the faster baud rates available with the SX to do traditional serial communications between SX processors.

    I think.

    --Bill

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    You are what you write.
Sign In or Register to comment.