Shop OBEX P1 Docs P2 Docs Learn Events
IO Line Distance — Parallax Forums

IO Line Distance

lboucherlboucher Posts: 139
edited 2008-12-29 15:38 in General Discussion
Hi all

Plan on doing an experiment but thought i would ask firt.
What is the max cable distance a bs2 or sx chip drive a 2n222 transistor.

I want to use a 20 IO sx chip to drive my christmas lights.
But i want to seperate it into modules.
Each Module having 4-5 IO's and spaced up to 10 meters away from the microcontrollers.

Thoughts??

Comments

  • pwillardpwillard Posts: 321
    edited 2008-12-29 15:26
    You need to know your wire size (so you can look up the data) and the current budget (In this case determined by the 2N2222. For starters, the 2N2222 is a 0.8 amp, 50 volt, 500 milliwatt device.

    The "Ohms per 1000ft" can be looked up for your wire size based on National Electrical Code tables.


    For You will find a table like this:

    AWG Dia-mils TPI Dia-mm Circ-mils Ohms/Kft Ft/Ohm Ft/Lb Ohms/Lb Lb/Kft *Amps MaxAmps

    20 31.961 31.288 0.8118 1021.5 10.153 98.496 323.41 3.2832 3.0921 1.3620 2.0430
    21 28.462 35.134 0.7229 810.10 12.802 78.111 407.81 5.2205 2.4521 1.0801 1.6202
    22 25.346 39.453 0.6438 642.44 16.143 61.945 514.23 8.3009 1.9446 0.8566 1.2849
    23 22.572 44.304 0.5733 509.48 20.356 49.125 648.44 13.199 1.5422 0.6793 1.0190
    24 20.101 49.750 0.5106 404.03 25.669 38.958 817.66 20.987 1.2230 0.5387 0.8081
    25 17.900 55.866 0.4547 320.41 32.368 30.895 1031.1 33.371 0.9699 0.4272 0.6408
    26 15.940 62.733 0.4049 254.10 40.815 24.501 1300.1 53.061 0.7692 0.3388 0.5082
    27 14.195 70.445 0.3606 201.51 51.467 19.430 1639.4 84.371 0.6100 0.2687 0.4030
    28 12.641 79.105 0.3211 159.80 64.898 15.409 2067.3 134.15 0.4837 0.2131 0.3196
    29 11.257 88.830 0.2859 126.73 81.835 12.220 2606.8 213.31 0.3836 0.1690 0.2535


    Lets say you used 22 AWG Phone Hookup Wire... from the table, at a 1000ft that would be 16.143 ohms.

    Lets say you are being nice to your 2N2222 and using a max of 500Ma, 33ft at 5.0V

    Vd = 2*R*L*I/1000

    where:
    Vd = Voltage drop
    R = DC Resistance from NEC® Chapter 9 Table 8 (see above)
    L = Distance
    I = Current in amperes (A)

    At 33Ft, the voltage drop is close to 0.55 volts, resulting in 4.45V where you expect 5.0.

    Pete

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    There's nothing like a new idea and a warm soldering iron.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-12-29 15:38
    You're probably just fine. I'm assuming that you plan to put the 2N2222 transistor in the remote module. You'll need a base resistor to set the base current for the transistor. I suggest that you put the resistor next to the SX and only the transistor would be remote. The resistor would probably be 470 Ohm for a base current of 10mA. The resistor would help protect the I/O pin if there was some kind of short in the wiring. Consider adding a 10K resistor from base to ground at the transistor to keep it off if the SX wire gets disconnected.
Sign In or Register to comment.