Shop OBEX P1 Docs P2 Docs Learn Events
switch? — Parallax Forums

switch?

tweektweek Posts: 14
edited 2007-12-03 03:09 in BASIC Stamp
Can the basic stamp homework board be used as a switch?, to switch an external device. High (on) low (off) pause...etc.? To switch·said device on and off intermittently set by the commands?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-12-01 06:21
    Yes.

    There are several tutorials you can download from Parallax (here: www.parallax.com/tabid/181/List/0/CategoryID/66/Level/a/Default.aspx?SortField=ProductName,ProductName). You can buy them in printed form with or without kits of associated parts or you can download them for free from the same web store page. Both the "Industrial Control" and the "Stampworks" tutorial cover switching external devices using a Stamp.

    There are also Nuts and Volts columns that cover similar topics (here:www.parallax.com/Resources/NutsVoltsColumns/tabid/272/Default.aspx).
  • tweektweek Posts: 14
    edited 2007-12-01 06:24
    Thanks Mike,... I'll check those sites now.
  • tweektweek Posts: 14
    edited 2007-12-01 07:35
    yeh,....dont think those places helped,... guess I dont know what Im looking for sad.gif
  • Rory StormRory Storm Banned Posts: 16
    edited 2007-12-01 16:19
    External devices?· What external devices?· For example...?
  • RDL2004RDL2004 Posts: 2,554
    edited 2007-12-01 16:45
    Nuts and Volts 6: How to use transistors as switches with the Basic Stamp

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Rick
  • tweektweek Posts: 14
    edited 2007-12-02 09:46
    external devices such as,....
    I modified a disposable camera, to use the flash. I replaced the capacitor, with a much smaller one, to speed up the charge time,and lessen the flash. Then ran two wires off the trigger. So when they connect, is a small flash. The smaller cap charges quickly, and is ready to be triggered again. So what Im trying to do is quickly connect and disconnect the two trigger wires and use the stamp to do this. Possibly to simulate lightning, (not like a strobe light with a constant on off cycle) but more like a flash, then quickly followed by two more.
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2007-12-02 10:45
    tweek -

    Microcontrollers weren't intended to act like switch per se, however they can act to trigger a switching device like a transistor or relay. If this is a low voltage, low current situation, then an appropriate transistor might work perfectly for this application. The transistor will act like the switch you need, and the microcontroller can trigger the switch as often as you choose to have it operated, and with whatever delays you want incorporated.

    If you provide the voltage and current requirements, I'm sure one of the electronics gurus here can provide you with an appropriate transistor type, and possibly a schematic as well.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • Mike GreenMike Green Posts: 23,101
    edited 2007-12-02 15:43
    For something like this where there's the potential for voltage spikes, I'd suggest the use of an optocoupler. The input side of these is an LED and any of the examples in the tutorials for lighting an LED would work. The output side usually is a transistor. Here's one example that Mouser carries: www.fairchildsemi.com/ds/MO/MOC8050.pdf.
  • tweektweek Posts: 14
    edited 2007-12-03 03:09
    Thanks again Mike,...and everyone else. I tried using an optocoupler on a breadboard (so I dont fry another stamp :P), I found, that and a relay seem to work so far. On a bread board. Guess I'll knuckle up, and try it on the stamp now. Thanks again.
Sign In or Register to comment.