Shop OBEX P1 Docs P2 Docs Learn Events
Do I need two BS2p40's for this? Need Help. — Parallax Forums

Do I need two BS2p40's for this? Need Help.

logike30logike30 Posts: 4
edited 2007-05-15 02:59 in Learn with BlocklyProp
I am working on a project that does a simple task. It is for distribution of audio. I have a audio distribution device ithat uses +12v to trigger audio amplifiers on. The audio distributor has a capacity of 32 stereo output zones. Each amp has 4 zones (8 amps total) with a trigger input for each zone. The stamp will be used to route the triggering from distributor to amplifiers. The stamp is needed because the triggering isn't linear, Zone 1 from the audio distributor may need to turn on zones 5 and 6 of the amps.

So I need 32 inputs and 32 outputs to cover all triggering possibilities. I plan on using 4 ULN2803s to send the +12v to the amps. My thought is that I will use the stamp to sense when the audio distributor calls for zone x to turn on and in turn with programming have the stamp send a High to the appropriate input or inputs on the ULN2803 to then have the +12v sent to the amp or amps needed. Does my logic seem correct?

This is the first time I have ever used a basic stamp and I need a bit of help. How would I go about managing all these I/Os? What other ways can I go about doing this. Can I use two BS2p40s, one to receive the request from the distributor and one to call for the amps to turn on? How would the two stamps communicate with each other for this to work?

I appreciate any help

Thanks!

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-05-14 03:32
    1) The ULN2803 switches a pin to ground. If you want to provide switched +12V, you need what's called a "high side driver". Here's one possibility: delta.octopart.com/National_Semiconductor__LMD18400N!NOPB.pdf.

    2) You can use a 74HC595 serial to parallel shift register to connect to the high side driver. These can be cascaded, so 4 would give you 32 outputs and only require 2 Stamp I/O pins. You'd control the 74HC595 with a SHIFTOUT statement. Parallax sells them and has the datasheet on its webpage.

    3) You can use a 74HC165 parallel to serial shift register to provide the inputs. These are cascadable, so 4 would give you 32 inputs and only require 2 Stamp I/O pins. You'd control the 74HC165 with a SHIFTIN statement. There are articles in the Nuts and Volts series of columns on I/O expanders for the Stamps including these. Look in the Downloads section of the Parallax website and have a look at the Nuts and Volts columns. You may get other ideas from them as well.

    4) As you might guess, you don't need a BS2p40, any 24-pin Stamp will do just as well. The BS2p series have some advantages over the others in terms of features, but you could do what you want with just a plain BS2 and the I/O expander chips.
  • logike30logike30 Posts: 4
    edited 2007-05-14 03:44
    I will look into what you have mentioned. I really appreciate the assistance!
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-05-14 19:29
    As a note, there is an example of both the input and output expansion in the Stamp Works Manual and example code downloads on the same page, linked below. Take care.

    http://www.parallax.com/detail.asp?product_id=27297

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • logike30logike30 Posts: 4
    edited 2007-05-15 01:26
    I am a little confused. I may not be understanding this correctly. I looked at the 74CH165 and it seems to me that the inputs are activated by a push button or switch. How would I accomplish that when the unit is sending me +12v?

    Thanks
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-05-15 02:59
    Using the 74HC165 of the BASIC Stamp inputs you would be faced with the same issue. There are many ways to do this, but the one I recommend is to use opto-couplers. These provide optical isolation from the 12V source. Another option is a transistor input. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
Sign In or Register to comment.