Shop OBEX P1 Docs P2 Docs Learn Events
How to connect /network 2 or more BS2 stamps ? — Parallax Forums

How to connect /network 2 or more BS2 stamps ?

koehn29koehn29 Posts: 6
edited 2005-03-27 06:42 in BASIC Stamp
I'm very new to this hobby, and the reason that i'm interested is that I need to build a machine control system. I need to build a system that has 20 output pins, and 20 input pins. (or about)


·My question is: can I setup a communication system where I can input a high signal on pin 1 stamp 1, and
specify that if (pin1,stamp1) is high,· then (pin 14, stamp3) is high. and so on...
welcome any suggestions!· smile.gif Ken

P.S. How can I amplify the stamp output signal to run a electrohydralic porportional·valve coil that peaks at 12v,3amps ?

Comments

  • stamptrolstamptrol Posts: 1,731
    edited 2005-03-25 13:44
    ·· The short answer is Yes, you can do the things you've asked about.

    ·· Suggestions?·Your project covers several of the fuzzier areas of control projects. In order to make any headway at all, you're going to have to break your project into bite sized pieces. I'd suggest the following approach ( with the Stamp Help files firmly in hand!):

    ··· 1. Take Stamp 1 and program it so it uses serial output to send some data to a PC or laptop. It will reinforce your understanding of baud rate, transmit parameters and string manipulation.

    ··· 2. Take Stamp 1 and set it up to receive a few characters from a PC running either the stamp debug screen or Hyperterminal. Experiment with getting the stamp to receive a certain character then turn on a particular output. Again, this will increase your understanding of the serial communications.

    ··· 3. Now, get stamp 2 to receive some data from stamp 1. Use the Stamp help file description of the Serin/Serout commands. There are some good examples there that will get you to a working example quickly.

    ··· 4. Controlling the valve will require some understanding of PulseWidth Modulation. I've used the stamp PWM control to operate the control valve for a 2000 Ton marine railway. To get the·stamp output current up to the usable range, I used an IRL520 transistor. Note that if there is a lot of code running on the stamp, you may have to use an external PWM controller in order to get smooth control. Parallax offers an add-on module.

    ···5. To get more inputs/outputs you could consider some of the addressable chips like the '595 and similar ones.

    Cheers and Good Luck.

    Tom Sisk
  • PaulPaul Posts: 263
    edited 2005-03-25 13:46
    Ken,
    Use one Stamp and two 74LS165 (IN) and two 74LS595 (OUT). The shift registers will use 3 of the Stamp pins for serial I/O. This give you 16 IN from the '165, 16 OUT from the '595 and 13 IN or OUT from the Stamp.
    Sorry, I dont know about driving valves but if a Stamp can drive servos Im sure the solution is available.
    -Paul
  • allanlane5allanlane5 Posts: 3,815
    edited 2005-03-25 15:22
    ULN2803 Darlington Array IC can be used to switch larger currents. A TIP120 device can handle 5 amps at 60 volts, if the ULN2803 maxes out. There are lots of driver circuits for relay coils in the Parallax documentation.

    You can easily use a couple of I/O pins for one stamp to signal another what the first BS2's state is, if the second BS2 needs to do something based on the first BS2's state. A more flexible, but slower, interface is to use SERIN/SEROUT messages. Concievably you can even use a '595 to '164 pair to implement a single byte 'register' for storing state.
  • koehn29koehn29 Posts: 6
    edited 2005-03-26 05:14
    Thanks, Everyone!
    I just got back to check on this post. Y'all have given me a lot to work on.
    Now, Do you think I could find someone in Houston, TX that understands all this well, and would consider helping me build this for say,..
    $35,or $40 an hour?· Just wishing...
    If wishes were horses, beggars would ride...
    So, I'll go to work.
    Thanks again
    ···· Ken············ wink.gif·
  • Philip GamblinPhilip Gamblin Posts: 202
    edited 2005-03-27 06:42
    Sounds like an interesting project. While I am not a design engineer, I am in the Hobby area in southeast Houston and I'd like to help. I know of a gentleman in the Clear Lake area who is an EE who, I believe does this type of work for a living. Switches, transistors, relays, timing and sequencing are isues I understand. Advanced control issues like PID control take more finesse than I have.
Sign In or Register to comment.