arduno robot?

Quote from: jaredpi on May 30, 2012, 07:23:19 PM
... the emitter to the motor (with the other lead attached to ground), the collector to the 5v output on the arduino. ...

I've always understood that the load should be upstream of the transistor, between the collector and the +ve supply.

http://www.danielsoltis.com/notdatasheets/BC547.pdf

But I have no idea why it should be so.... what's wrong (if anything) with having the load downstream, on the emitter to ground?

Because the common emitter configuration of an NPN transistor has a higher current gain than the common collector configuration. This means that the base draws less current for a given amount of load current in the common emitter configuration. By placing the load on the collector side, you are increasing the load on the Arduino output driving the transistor.

There are a couple of problems here.

  1. you should never power your motors with "the 5v output on the arduino". Use a
    separate battery for the motors. The Arduino 5V pin cannot really drive a lot
    of current and probably not deal with noisy devices attached either.

  2. loads can be attached either in the collector lead [eg, NPN inverter configuration]
    or in the emitter lead [emitter follower config]. The former has the advantage
    that you can use any voltage, as required, on the motor, eg 12V battery. The latter
    has the disadvantage that the maximum voltage that can be applied to the
    motor is the signal voltage [eg, 5V from the Arduino I/O pin] minus approx
    Vbe = 0.7V, so at best you'd get only 4.3V on the motor, no matter what
    voltage is connected to the collector.

In both cases, the transistor base current is (motor current / NPN current gain),
so the Arduino I/O pin actually must pump that much current, so you cannot really
drive very big motors this way. A better way is to use an N-channel logic-level
MOSFET wired in the inverting configuration.