Shop OBEX P1 Docs P2 Docs Learn Events
BS2px PULSOUT Ouput question on signal degradation. — Parallax Forums

BS2px PULSOUT Ouput question on signal degradation.

T&E EngineerT&E Engineer Posts: 1,396
edited 2006-01-31 23:30 in BASIC Stamp
Short and sweet...

I·want·to send a·PULSOUT signal out of a BS2px to possibly 80-100 other ICs but wondering if I need to buffer the output·pin first.

Thanks

Post Edited (tdg8934) : 1/6/2006 8:34:55 PM GMT

Comments

  • allanlane5allanlane5 Posts: 3,815
    edited 2006-01-06 20:35
    Hmm. The PIC inside the BS2 can drive like 20 mA. This is a LOT of TTL loads -- but probably not 100 of them.

    It would certainly be good engineering practice to re-drive the signal.
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-01-06 20:52
    If I remember correctly (it been a few years) true ttl has a fanout of ~15, I believe the actual fanout of CMOS acting like TTL (as the stamp does) is lower than that, either way you should buffer it. To get an idea, add the total input capacitance of all loads and add the expected capacitance of the traces, then use the 20mA figure to calculate the rise/fall time of the signal, this should be roughly 10x the speed of the signal, if not youll need buffering.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2006-01-06 22:32
    I dont' mind the buffering so I'm thinking something like a 7407 Hex Buffer should do it.

    Since I don't have·any 7407's·handy, I was also thinking about using a ULN2003A with a 7404 inverter on its output to make it positive again. (Or even 2 7404's? "+- -+")

    Any problems with these approaches?

    Thanks
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-01-07 03:23
    2003s are open-collector outputs.· I advocate using transistors, you can really honk some current (get great "fan out") using emitter-followers.
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2006-01-07 03:55
    Care to provide an example transistor emitter follower circuits?

    If not, I'm sure I can come up with something. I have some PN200 High current PNP transistors, 2N3906 PNP and 2N3904 NPN transistors.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-01-07 04:12
    Here's a typical emitter-follower used as a voltage regulator.· Instead of the base being biased by a zener voltage, you would instead use the pulled-up output of the STAMP.

    ****
    Post edit -- I've added another circuit, a real "how-to-do-it".· Use 2N3904s.· There's an inverter which will produce solid 0 & 5V outputs for the driver.· The output cap is more for voltage regulators, it's not really appropriate for any speedy switching (it'll act like a smoothing cap.)· Use a 1K to ground as a sort-of "pre-load".

    Post Edited (PJ Allen) : 1/7/2006 4:32:49 AM GMT
    157 x 261 - 9K
    636 x 328 - 31K
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2006-01-07 13:56
    PJ Allen,

    Thanks for the circuit. However, in the mean time I did a search and found a buffer circuit posted by Beau.

    http://forums.parallax.com/showthread.php?p=560954

    I would assume the LOAD should be replaced by a 4.7K resistor and the output should be taken off of the collector of the 2n3904.

    The circuits you provided are a bit·confusing to follow although well appreciated.·The second hand drawn circuit leaves the output inverted so that means I need to repeat the circuit twice to un-invert them? Also it uses 12v in the 2nd stage and I will only use 5v in my design. A problem?

    Does a transistor emitter follower buffer circuit really provide superior fanout over an IC solution? What I mean is there any reason I would not want to use a 74HC07 or a CD4050 buffers (as it may just be a bit more convient to use [noparse][[/noparse]less solder connections]?

    I want to make sure I can send a HIGH and LOW signal and also a PULSOUT signal to as many as 100 IC's.

    Thanks.




    Post Edited (Lead Test Engineer) : 1/7/2006 2:41:21 PM GMT
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-01-07 16:09
    ·
    Lead Test Engineer said...
    The second hand drawn circuit leaves the output inverted so that means I need to repeat the circuit twice to un-invert them?
    You would amend for this in your programming.· If you need to have a HI pulseout result then you would program the STAMP to do LO-going PULSOUT.
    Lead Test Engineer said...
    Also it uses 12v in the 2nd stage and I will only use 5v in my design. A problem?· Does a transistor emitter follower buffer circuit really provide superior fanout over an IC solution?
    The source voltage (on the Collector) must be greater than the output voltage (from the Emitter.)· The output will be appx. 4.3V, so VCE will be 0.7V, I reckon it should work well.· A 2N3904 is good for at least 100 mA, waste it and replace a transistor; 4050s are good for (?)/gate, waste it and you replace an IC (there is also a pkg. dissipation consideration.)· The best way to look at the emitter-follower, here, is to see it as a voltage regulator (not unlike·a 7805.)
    So, given that, why not rig it up on your protoboard?· That shouldn't take more than 10 minutes.· You mentioned you have parts enough for it.· If you have an o-scope, then more the better.· Then plug in more and more load (load resistors, don't use a POT) to increase the current draw from it -- test it out.· Not exactly the Labours of Hercules.
    With regard to the circuit you mention in the previous post, it's like a ULN2003.· I thought you needed "fan-out" to a great many ICs, and I don't see how it will get you where you want to go (?).


    Post Edited (PJ Allen) : 1/7/2006 4:12:16 PM GMT
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-01-07 20:37
    Lead Test Engineer said...(trimmed)
    Short and sweet...
    I·want·to send a·PULSOUT signal out of a BS2px to possibly 80-100 other ICs but wondering if I need to buffer the output·pin first.
    Since the BS2px uses an SX48 as its interpreter, you could use the SX48 datasheet to determine the load driving capability.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com


    Post Edited (Chris Savage (Parallax)) : 1/7/2006 11:36:13 PM GMT
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-01-07 22:05
    max. allowable sink/source current per I/O pin = 45mA
    max. allowable sink/source current per group of I/O between Vdd pins = 50mA

    I guess "per group of I/O between Vdd pins" means the sum total of sink/source for any one group (i.e. RA0-3 &·RB0-7; RC0-7 & RD0-3; and RD4-7 & RE0-7).· Meaning --·you can't have it all, all at once.



    [noparse][[/noparse] Number of EEPROM write cycles = 10,000. ]

    Post Edited (PJ Allen) : 1/7/2006 10:08:30 PM GMT
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-01-07 23:37
    PJ,

    ·· Correct, having all the pins sourcing/sinking their maximum would cause the chip to disspate more power than it is capable.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2006-01-08 00:15
    If a 2n3904 is good for ~100 mA and the outputs combined are good for ~45 mA does this mean you add them together to get 145 mA or something like that.



    What I am using is·1 BS2px output going to 80+·CD4017 "Clock"·inputs using a PULSOUT command. I'm not using any SEROUT command or anything like that for 595's.

    I have another BS2px output going to the 1st IC and the last IC only·(should not be a problem there).

    I have another BS2px output going to a serial LCD.

    I have the last BS2px output going to an SX28 (which acts as a matrix keyboard driver - see SX-Key Help examples).

    The outputs are P15, 14, 13 and 12. P0 to P12 are not used.

    I believe all I should be concerned with is the 1 BS2px output going out to all of the 80+ "Clock" inputs.

    Do you believe a simple 2N3906 / 2N3904 type buffer will provide enough fan out to the +80 CD4017's (and also using +20 CD4081 AND gates for cascading the CD4017 ICs together)(100+ IC's)?

    Thanks.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-01-08 02:33
    Hello,

    ·· No, that's not how it works...If the 2N3904 can handle 100mA, then based on its hfe, it will require a certain amount from the I/O pin to deliver that current.· Beau Schwabe had a really nice write-up on transistor operation not too long ago.· Perhaps he could post a link to it or you could search Google for some information on using transistors.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-01-08 02:46
    Lead Test Engineer said...
    If a 2n3904 is good for ~100 mA and the outputs combined are good for ~45 mA does this mean you add them together to get 145 mA or something like that.
    I figure the current demand from an SX Pin would, with my second circuit, be no greater than 3mA.· Since an emitter-follower is a power amplifier, its voltage gain is always <1.· Ideally, it would = 1, but·VOUT =·VB·- VBE.· All·the current comes from the +V supply.· The current drive ability is solely the transistor's deal, you don't add the SX's max to the transistor's max; it's just the transistor (IE =·IB* hfe [noparse][[/noparse]beta]).
    Anyway, Lead Test Engineer, I think you need to estimate your current demand, come up with a·current budget.· What's the current drawn from a 4017 Clock In X 80, etc.?· That's the key.· Get out the DMM, rig up 3-4 4017s and drive them with a DC Hi-Lo·and find out, plan for worst-case X 2.
    Maybe there's nothing to worry about, maybe the cruncher will be the practicalities of routing 80 wires.
  • T&amp;E EngineerT&amp;E Engineer Posts: 1,396
    edited 2006-01-16 03:24
    So far so good.

    I have used a CD4050 hex buffer on (2 buffers on 2 pins) on the BS2px sending PULSOUT on one pin and HIGH and LOW commands on the other. I have about 1/2 of the circuit wired up and working (40 4017 and 10 4081 ICs). I am testing the outputs at random points. I have soldered about 800 wire connections·now (next time I will build mini PCBs I can connect together).

    I very happy I am still maintaining 4.93 vdc regulated down through the professional development board (using a 7.5 vdc 1 am wall transformer by Parallax).

    I had no idea the CD4050 could handle 50 ICs for fan out.

    I wire up 10 ICs at a time and test to make sure the CD4050 has not blown. All is working well with no overheating or any signs of problems. However, I did have to do some troubleshooting of some pinouts as 800 connections is bound to have a problem or two. I am taking my time (very time consuming) and checking and rechecking my connections.

    If the CD4050 has a problem I may switch over to a transistor buffer solution or (can I double up on the buffers (e.g. 1 into another)?)

    Thanks.
  • T&amp;E EngineerT&amp;E Engineer Posts: 1,396
    edited 2006-01-31 00:50
    Well everything worked and the finished product·with 712 outputs for resistor/LEDs had no problems. I used a CD4050 with 2 serial buffers each (may not have needed to) out of 2 BS2px outputs (sending out HIGH and LOW signals and PULSOUT signals). It provided enough fan out to over (110) 4017 and 4081 ICs (cascaded 4017 circuit on 15 solderless breadboards). I was amazed!

    What a fan out from a buffer and a BS2px. I·read that·the 4xxx series ICs can handle up to 50 chips for fan out but it worked to over 100.

    I have provided a work in progress picture showing about 800 feet of wire used. The end product used over 1200 feet of 22 and 20 AWG wire. It was wired to CAT-5 networking pushblocks with 100 terminal per pushblock. There are 400 connections per side with a total of 800 possible (circuit only goes to 712 outputs) (picture shows only 600 wired outputs) that are individually addressable with my BS2px software.

    Finally this project is finished!

    Post Edited (Lead Test Engineer) : 1/31/2006 1:25:17 AM GMT
    1536 x 2048 - 1M
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-01-31 01:13
    Holy cow, them's alot of wires, must have been fun routing all that.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • pjvpjv Posts: 1,903
    edited 2006-01-31 17:13
    Hi Timothy;

    Well, you say your project is finished, and I see you did not heed the advice of using circuit boards instead of bread boards for the finished products delivered to your customer.

    As a "Lead Test Engineer" you should be ashamed of yourself, and I believe your customer is in for the ride of his life when one of the connections intermittently becomes a little "loose".......boy try and trouble shoot THAT mess!

    By your own admission you were "amazed" it worked. Me too! Instead, by using proper design procedures you should have been amazed if it had NOT worked.

    Other than for a test-bed.... very unprofessional. Now that it's working, go and get the boards made and do it right!

    Otherwise I hope my well-being never needs to rely on whatever "testing" you are "leading", and I'm sorry to say you're fired!

    Cheers,

    Peter (pjv)
  • T&amp;E EngineerT&amp;E Engineer Posts: 1,396
    edited 2006-01-31 17:25
    As this is a prototype unit of possibly more units to build in the future, I will come up with a printed circuit modular approach in the future. This approach was easy to produce and also tests the design. The customer is very happy with the results and has been shown how to troubleshoot the wire harnesses to spot any possible problems. I will·may also find another chipset to use to reduce the amount of fan out. He will also press plexiglass over the top of the wires and keep them secure. It will then go inside of another enclosed box not being exposed to the public. There are many factors and constraints such as budget and deadlines that allowed for this customer approved approach.
  • allanlane5allanlane5 Posts: 3,815
    edited 2006-01-31 17:57
    I believe Radio Shack does manufacture circuit cards that are the same form-factor as the bread-board units. Cheaper, too, even adding the IC sockets. These would have better reliability over time than the bread-boards, if everything was soldered in.

    As a proof of concept, your project is amazing, though.
  • pjvpjv Posts: 1,903
    edited 2006-01-31 23:30
    Hi Timothy;

    You may think I've been overly hard on you, but believe me you have been a very frustating fellow to help.......you seem to pick the approaches opposite of the advice from the "seniors" in the forum. I suppose that is your right, but then you ought not ask for help or validation.

    On Jan 1 you asked for assistance to reduce component/wire count, and the suggestions put forward would have made your project much simpler to design and build (provided you can write or copy and modify some assembler code), and you chose not to follow the recommendations.

    Then you ask about the "legitimacy" of using bread-boards in a final product to be delivered to a customer, and again you do the opposite of the recommendations by not building a product that way.

    Now that you have delivered this monster, again you are suggesting simplification; in other word re-doing a bunch of your work that could have been very much simplified (total chip count of 2 or 3 SX28, or just one SX48/52), and now you cite customer budgets and timelines as your reason for doing it the way you implemented it............the "hard" way.

    Your whole project could have been implemented with just a single SX48/52 instead of that mess you created.

    And as far as "customer approved" approach is concerned, you should not improperly let your client influence your design to become inferior just because it may save him some up-front dollars, which I believe in this instance was the exact opposite. I suspect the work could have been done in much less time with a single SX48/52.

    I just can't figure you out.

    Cheers,

    Peter (pjv)

    Post Edited (pjv) : 1/31/2006 11:34:56 PM GMT
Sign In or Register to comment.