1

I have this basic circuit of how to drive a motor using a 2N2222 transistor and it all makes sense to me.

enter image description here

I found a bunch of cheap ULN2803APG darlington drivers. I am a bit confused on how to wire 4 motors to this. I think the common part is confusing me. If I try to follow the logic as on the circuit above it seems I might fry my MCU I/O by doing this?

enter image description here enter image description here

The DC Motors need to run of 6Volts and draw a MAX of 200mA each at full load. I don't need speed control or anything like that really.I want to use this because its cheaper than getting L239 H-Bridge driver.(My counting is that I can get 25 of these vs 1~2 L239 for same price)

In my head I have it that I wire:

  • MCU I/O pins to the I1-I4 Ranges (The "Base")
  • Common "Emmiter" to Ground
  • O1-O4 "Collector" to Motor -
  • Motor + to my Motor supply voltage
  • Motor supply voltage - to common ground?

Is this correct? I tried to follow it analogically as possible but I have a bad feeling about this?

Left - My original thoughts

Right - As per comments m.Alin

enter image description here

Piotr Kula
  • 2,134
  • 4
  • 21
  • 44
  • 2
    Just connect COMMON to MOTOR+/+9V BAT... The driver includes the [flyback diodes](http://electronics.stackexchange.com/questions/31014/where-should-i-put-the-kickback-diode-in-a-transistor-switch) needded to protect the transistors. – m.Alin Aug 22 '13 at 11:57
  • Your R1 is in the wrong place: it should be connected between the GPIO pin and the base, not in the ground lines. – pjc50 Aug 22 '13 at 13:10

1 Answers1

4

I'd use up all the gates by doubling them up. The COM pin is connected to the + supply and not ground.

enter image description here

JIm Dearden
  • 18,926
  • 30
  • 40
  • Doubling them up will just mean I have more power to work with? Per motor or is there another reason? One gate can handle 500mA. These motors are specced 250mA max. Thanks for your answer – Piotr Kula Aug 22 '13 at 12:11
  • 2
    @ppumkin the motors will only draw the same total power as before but doubling up means that the power dissipated by each gate will be halved and so it will run cooler. Doubling up the gates doesn't increase the amount of power to the motor. – JIm Dearden Aug 22 '13 at 12:19
  • 1
    You might want to mention that the input current requirements will increase when doubling-up, although there appears to be plenty of current available from Arduino outputs (as long as the high-level output voltage is >=2.5V specified by the ULN2803APG). – Tut Aug 22 '13 at 12:43
  • Thanks guys. I understand now how this IC works and is pretty awesome :) Thanks for your explanations. This will make my robot happy :) +beer – Piotr Kula Aug 22 '13 at 12:46
  • PS- What I meant by doubling up is that if by doubling up you can then get a max amp of 1000mA (2 x 500mA) Correct? That is why using both will be cooler as less current flows through each gate but means it can drive a bigger motor if needed on the other hand. – Piotr Kula Aug 22 '13 at 12:49
  • 1
    @ppumkin I totally agree with Passerby (+1) - you must stay within the total current/power limits of the chip and not see doubling up as a means of getting more current. Running the 4 motors from one chip is pushing the limit anyway (it will get warm!). If you do need more current use a second chip and use 4 gates per motor. – JIm Dearden Aug 22 '13 at 18:32
  • 1
    @JImDearden I don't think doubling the outputs will make anything "run cooler" for the reason you give. The same amount of power is dissipated on a tiny silicon die either way and all of the gates are close to the same temperature, since the thermal resistance across the die will be less than the thermal resistance through the IC package. – Joe Hass Aug 22 '13 at 20:11
  • Oh right the datasheet says `Output current (single output) 500 mA (max) ` doesn't that mean per single `O`utput pin? if it means the whole IC then surely the wording is misleading. I would have thought running a 800ma motors doubled up on outputs would be ok? – Piotr Kula Aug 23 '13 at 08:01
  • May I ask what the common is for? It does not seem to serve any purpose in this circuit.(added diagram to my post) There is a diode that prevents power to flow inwards. So in my understanding it may just as well be disconnected as the Output pin will be enough to "switch" the motors individually. – Piotr Kula Aug 23 '13 at 08:37
  • 2
    @ppumkin Re - COMMON. The motor is an **inductive load** and so needs a snubber diode connected across it to prevent back emf (spiky negative voltage) from destroying the transistor. Far from 'not serving a purpose' it serves a vital purpose (protecting the transistors) and saves on you having to add a separate diode across the motor. – JIm Dearden Aug 23 '13 at 10:08