Shop OBEX P1 Docs P2 Docs Learn Events
transistor and motor help [solved] — Parallax Forums

transistor and motor help [solved]

timeblade0timeblade0 Posts: 6
edited 2008-08-21 19:36 in BASIC Stamp
I am working on a motor controlled from a stamp homework board. Here is how I have it wired without the stamp board:
http://i514.photobucket.com/albums/t342/timeblade0/transistercircuit.jpg

I want to replace the 3v dc with the stamp pin 14. I know for the code I need to do High 14. How do I wire it up though?

I tried a wire from stamp pin 14 to transistor emitter, but it did nothing.
I tried a wire from stamp pin 14 to transistor emitter and a wire from transistor base to Vss, but that fried a transistor.

Can someone explain or make a diagram of how to wire it into the stamp board?

Post Edited (timeblade0) : 8/10/2008 8:54:55 PM GMT

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-08-09 20:53
    Look at the last page of Nuts and Volts Column #6 (www.parallax.com/Resources/NutsVoltsColumns/NutsVoltsVolume1/tabid/444/Default.aspx). There's a nice schematic and some sample code (for the BS1 ... but's it's similar for the BS2). The schematic shows a relay, but a motor works as well as long as you have a transistor that can handle the amount of current involved. A 2N2222 will handle about 1/2A.

    The emitter gets connected to ground (- supply voltage and Vss). The collector gets connected to the motor. The base gets connected through a small resistor (330 to 470 Ohms) to the Stamp I/O pin. Notice the diode connected across the relay coil (or motor) in the article. That's important to avoid damaging the transistor or Stamp.

    Post Edited (Mike Green) : 8/9/2008 8:59:00 PM GMT
  • timeblade0timeblade0 Posts: 6
    edited 2008-08-10 03:37
    I am still a little confused. I am using a 2n3906 pnp transistor. I might have switched the emmitor and collector in the diagram.

    I connect stamp pin 14 to where I had the 3v dc +. Where do I gound the stamp? I tried from base (top row) to Vss, but it is always on like that even with no power to the stamp. I do not understand the way you say to hook it up. can I have a diagram?

    Thanks for the help.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-08-10 04:07
    Look at the Nuts and Volts Column. It has a diagram.
  • timeblade0timeblade0 Posts: 6
    edited 2008-08-10 15:19
    I have looked at the nuts and volts column and tried to make my circuit based off it. Unfortunately it didn't work.
    http://i514.photobucket.com/albums/t342/timeblade0/transistorcircuit2.jpg

    I might have the transistor pins wrong in that diagram, but it is right in the real one. The real one works with a 3v battery, but I don't know how to ground the stamp. Vss does not seem to work for me. Sorry I need so much help, but I am new to this stuff and don't know much about it.

    My goal: power a motor by 12v and have the stamp pin turn it on or off by using a transistor.





    EDIT: I got it working. I was using a PNP transistor when I needed NPN. It works now.

    Post Edited (timeblade0) : 8/10/2008 8:54:40 PM GMT
  • pgamblinpgamblin Posts: 8
    edited 2008-08-21 19:36
    Nice to see perseverence pay off!
Sign In or Register to comment.