Shop OBEX P1 Docs P2 Docs Learn Events
frustrated with transistor circuit — Parallax Forums

frustrated with transistor circuit

BritannicusBritannicus Posts: 98
edited 2011-02-09 02:09 in BASIC Stamp
I'm doing something terribly wrong and being a total dummy with my BS2 circuit.

I have a 0.5 amp 6v motor (ultimately I want to use 2 in skid steering a robot). It won't run direct from my Stamp - not enough current.

What I want to do is to switch an NPN transistor and figured the diagram attached should do it - looked simple enough.

I hooked up a more powerful 6V battery and in a straight connection to the motor it then ran fine.

next
I then created a pulse on / off from a BOE board with my stamp, and proved it worked with an LED linked from the BOE Vdd to Vss being switched to an fro with the output from port 11 switching on the circuit from vdd to vss connecting the LED and flashing it successfully .

next -

1/ I connected the motor terminal to the +ve terminal along with the parallel diode

2/ connected the other terminal of the motor to the collector of the transistor I'd used earlier

3/ left the base connected to the BOE output terminal (no connections to Vdd or Vss now)

4/ connected the emmittor to the -ve terminal of the external battery.


I've used a transistor rated at 1 amp, and the base signal is over the threshold (or circuit 1 won't work)

I know this is wrong somehow, but just can't work out how - should there be a connection to the vdd somewhere ?? - if so how is that rigged up - I'm really stumped.

Hope you can enlighten me from being such a dummy !
NPN query.JPG
720 x 450 - 23K

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2011-01-10 08:17
    The grounds have to be connected together. Otherwise the base current from the Stamp doesn't have anywhere to flow to.

    The diode is not optional. When the pulse stops, the collapsing magnetic field in the motor windings will produce a voltage spike that may destroy or damage the transistor. The diode dissipates the voltage spike.
  • BritannicusBritannicus Posts: 98
    edited 2011-01-10 08:52
    Ah ! thanks - yes I've installed the diode - the picture I stole from elswhere which just described a load - once again you've been most helpful - so just connect the two grounds and I should be there - thank you so much
  • ercoerco Posts: 20,256
    edited 2011-01-10 10:09
    When in doubt, a 5V reed relay is easy to use. Complete isolation, and you can drive it directly without a transistor (current<20 mA), but keep the flyback diode. See http://www.kronosrobotics.com/Anotes/Relays.pdf and http://www.radioshack.com/product/index.jsp?productId=2062478
  • TomatoTomato Posts: 23
    edited 2011-01-14 22:47
    Thought it may not be strictly necessary, a pulldown resistor on the base will improve switching. Try 10 or 100k between the base and ground. A small capacitor (100nF? Not really critical) across R_b in your diagram will also improve switching speed. Neither of these are necessary, but I'd stick in that pulldown resistor.

    -Tomato
  • BritannicusBritannicus Posts: 98
    edited 2011-02-07 12:44
    Particularly useful responses chaps.

    After a bit of jiggery-pokery I've tried the solution with the micro relay - tried the following from maplins in the end - it's specified at 6V for switch, bu tseems to work just fine on the 5V from the BOE Vdd although the pin spacings make it a bit of a pain to fit on the breadboard.

    http://www.maplin.co.uk/2a-6v-spdt-ultra-miniature-relay-218089.

    The Maplin Ref is N99CZ
  • skylightskylight Posts: 1,915
    edited 2011-02-07 13:10
    Think that relay may be too much load for a I/O pin
  • BritannicusBritannicus Posts: 98
    edited 2011-02-08 03:47
    seems to be working at the moment - could I be storing up trouble in the future ? -
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-02-08 04:58
    It's like a lot of stuff around here, we have putative English teachers who can't spell or use that/which in a sentence dispensing electronics advice: if you're happy with it, it's effecting the result you desire, then go with it - find your bliss.
  • skylightskylight Posts: 1,915
    edited 2011-02-08 06:43
    Have replied to your private message Britannicus
  • TomatoTomato Posts: 23
    edited 2011-02-08 19:26
    it's like if you are using an exacto-knife to cut lots and lots of steel cables. It'll work. But you reduce the life of your tool. exacto-knives are cheap and replaceable, BASIC Stamps are not...

    -Tomato
  • BritannicusBritannicus Posts: 98
    edited 2011-02-09 02:09
    Cheers Tomato - ordered a few reeds - not worth trashing my STAMP for £1.59 ! -
Sign In or Register to comment.