Shop OBEX P1 Docs P2 Docs Learn Events
Output Question — Parallax Forums

Output Question

NickNick Posts: 11
edited 2005-04-11 02:44 in BASIC Stamp
I have a simple question for you guys.

Im trying to control a digital camera device with the Stamp. In order for the Camera to take a picture I have to short a lead from the cam to ground. How can i do that with the stamp? I really dont want to use a relay. Anyone have a Schmatic for using a transistor?


Thanks

Nick

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-04-02 05:42
    Nick,

    ·· Using an NPN transistor, such as a 2N2222 or 2N3904, you could tie the emitter to ground (Common to the Stamp ground).· The base will be connected to the Stamp pin via a resistor of 220 ohms to 1K.· And the collector will connect to the device pin that needs to be shorted to ground.· Presumably on the camera this line is already tied high somehow.· But you will need a common ground on both the camera and the Stamp.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • NickNick Posts: 11
    edited 2005-04-02 05:57
    thank you sir
  • NickNick Posts: 11
    edited 2005-04-06 03:24
    Could I use a darlington array to achive the same result if i needed to control 8 outputs the same way?


    Nick
  • allanlane5allanlane5 Posts: 3,815
    edited 2005-04-06 12:47
    Yes, you can easily use a Darlington array to achieve the same results.
  • NickNick Posts: 11
    edited 2005-04-06 14:40
    Can anyone suggest a part #??
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-04-06 14:58
    The ULN2803 has eight Darlington pairs, the ULN2003 has seven. Connect an active-high output pin from your BASIC Stamp to an input on the ULN. The output switches between open (collector) and ground, so you'll need a pull-up on the other side.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-04-06 16:40
    Let me clarify: the ULN2x03 wants to see a high on its input pin to activate an output pin. An activated output pin mean it is connected to ground via the Darlington pair.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • KenMKenM Posts: 657
    edited 2005-04-07 01:18
    Jon or anybody else who has used the ULN darlingtons.....

    What is a typical collector voltage with the device fully on? My experience with other darlintons is that even when saturated there may be almost a 1 volt CE drop, and that may cause a problem for some devices to recognize a "logic low."

    Any comments?

    K
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-04-07 01:31
    Depends on collector current, of course -- spec sheet shows 1.6v max (@ 350 mA collector current). I typically use the ULN for 12v and higher circuits, usually switching relays and other "heavy" loads.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • Jim S.Jim S. Posts: 13
    edited 2005-04-11 02:44
    Using a transistor runs some risk in interfering with camera's circuitry, including noise, surges, etc.

    Not sure why you're resisting a relay (perhaps size?).· May I suggest that you consider a reed relay.· It's small in size and requires very little power (few milliamps w/ 5V or 12V coil).· It provides complete isolation from the "outside world".

    Jim S.
Sign In or Register to comment.