Smalls dc motors in matrix with arduino, 74hc595 and tip120.

Discussion in 'The Projects Forum' started by carapocha, Jan 24, 2013.

  1. carapocha

    Thread Starter New Member

    Jan 24, 2013
    5
    0
    (sorry for my poor english)
    I need drive a lot of small dc motors(1.5v-5v), so I use a arduino with a 2 74hc595 in matrix for test. If I put there a led and a resistors, I can switch on and off each one without problem.
    (Its similar to this diagram, but with two 74hc595, one for rows and athother one for columns):
    [​IMG]

    Like I need drive the motors, not leds, I thinked about use a tip120, with a resistor beetwen and switch on/off each motor.
    So if I put a circuit like this in each led position:

    [​IMG]

    I put all the components but the motor don`t move. I put a multimeter and I can see 5v between the two motor´s conector.
    I go to try to make a better schematics, because I dont know if I can be understand well (my english not help).

    I need drive between 4000-5000 motors (yes, a lot, I know). Only a turn or a couple of turns each time. (8x8 or 9x9 74hc595 ).
    I would to use motors and no servos because it`s more cheaper.

    If someone knows a better way to do it, it would be highly appreciated.

    Thanks for your help.
     
  2. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    The 2.2k resistor reduces the base current to the TIP120 darlington to only about 1mA. Then its collector current is only about 250mA.
    How much current does the motor draw when it starts?

    EDIT: You have nothing to boost current to the ROWS if high current motors replace the low current LEDs.
     
  3. carapocha

    Thread Starter New Member

    Jan 24, 2013
    5
    0
    Sorry, I was at work and I haven`t the real schematics.
    Its the schema that I used:
    [​IMG]

    The resistor is 1K(Ohm).
    I would use a normal project for a led matrix, replacing the 220Ohm resistor and led by a motor.
    I can test the 5v(external input voltage) at this point if I put on this element on the matrix.
    The input voltage came from a atx power, and the the 5v selectioned has a max of 26A(read in the power).
    I can select any motor, I used this one:
    [​IMG]
    The dathasheet is:
    http://www.ariston.es/portals/0/doc/mov36.pdf
    I think is 0.14 A(no load) and max in stall 2.92. Its 3v and I put 5v but its only for test,and is a cheap motor, because I will need a lot.

    I cant understand completely your last sentence. Do you mean that I no need nothing and only replace the led+220o for a motor? I no need more current for use the motor?

    I havent experience about electronics,and Im very lost.
    I need drive a lot of motors. If you know a better method....
    Thanks for your help.

    This is a real picture:
    [​IMG]
     
  4. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    Your breadboard circuit is the messiest tangle of wires I have ever seen. You should make the wires shorter and neater.

    The 74HC595 MUST have a 0.1uF ceramic capacitor with short wires across its power supply pins but your circuit has NO capacitors.

    The diode MUST be across the motor but you connected it wrongly across the darlington transistor.

    The high value of the 1k base resistor reduces the base current to only about 2.3mA then the darlington can have a maximum output of 575mA. But your motor draws 2.93A when it starts to run and when it has a heavy load when it has a 3V supply. The motor current is higher when its supply is more than 3V.

    You cannot make a matrix of these high current motors (like the matrix of low current LEDs you showed) unless you boost the current for each row somehow.

    Why do you have a little 9V battery? It does not produce enough power to drive your motor unless it is brtand new and the motor has no load. It can spin the motor with no load for about half an hour then it is dead.
     
  5. John P

    AAC Fanatic!

    Oct 14, 2008
    1,634
    224
    Let's ask about what this system actually does.

    Are the motors running under no load, just (let's say) spinning a colored disk, or are they doing any mechanical work? It's important, because it affects how much current they draw.

    If you have a matrix as you've shown, there will be severe limitations on how many motors can run at a time. If you only ever want to run one of them, that's OK. But if it's an arbitrary selection, I think you'll have difficulties. And is there going to be any attempt to control speed, stop at a particular point, etc? Also of course, you can't reverse the motors. Forget that.

    9V batteries are good for radios and smoke detectors and not much else.
     
  6. carapocha

    Thread Starter New Member

    Jan 24, 2013
    5
    0
    First, I havent any experience in electronics. Logically, this project is very bad. Im here to learn and improve it.
    Second, thanks for your help. You are wasting your time for me, and I appreciate it a lot.
    Third, my english, when I must to write, is bad. I havent problem usually for read and understand it, but I experiment difficults when I must to comunicate a idea, and I need to use special words in electronics.

    Imagine a wardrobe with a lot of box, in each one a lightweigth element. I need move it with a motor. They will be very little, and I need move only one each time, with little power. Perhaps one or two turns(no metter if it turn a little more). I can`t use servos because one servo cost 10-12 $ and each motor 1-2 $. Perhaps 4000-5000 boxes, so its expensive and is better drive motors.

    I have think about a arduino, and I need more outpuns pins, so I have study the matrix led, driven by shift registers. I need drive more power, in each box, so I study the tip120.

    This is the situation. If someoneknows a better way to do it, it will be welcome.

    About my circuit, it works ok with the leds. I can select any that I wants in the matrix. When I connect the motor, it not work. I can test the output source for the motors when I put on the correct row and column, and its correct(5 v if I put 5v external power and 12 v if I put 12v with the external power), but I think its a problem with the current, or something so.
    Perhaps I must to change this part, but I no know how and what I must do.

    I use a atx power source from a computer, with the 5volts from the molex conector, not a battery. I cant do nothing till the next monday, with the circuit. I want put a scheme better than the real one, because it can helps, and there`s a lot of bad wires around.

    I will go to the shop for buy the capacitor(I buyed one but i have a mistake with a wrong value, and it worked without). I need one capacitor for each one 74HC595?

    The diode 1N4004 I think its ok,but It must be between the motor and not between the tip120 like the draw of the circuit ?

    I need to reduce the value for the resistor for the base from 1k? whats its the correct value? Perhaps I have a conceptual error. In the tip120, if I put in the base high signal, the collector`s voltage and collector`s current go exactly equal out for the emitter? The output voltage at the emitter and the output current for the emitter it is not equal at these values at collector? or it depends on the base`s current/voltage?

    If the solution is boost the current for each row, how I can do it?

    Its only a prototipe, so I can use others motors, or others components if its necessary.

    Again, thanks, Jhon P and Audiogurufor your help and your patiente, and note my poor skills with the language and electronic knowledge.
     
  7. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    Make sure you aren't trying to power the motor from the Arduino board. The maximum current it will supply is about 350mA, higher than 500mA, and you can blow your USB port (if the computer doesn't limit it, and the poly-fuse on the Arduino doesn't activate fast enough).

    You may have better luck using Logic Level Switching MOSFETs, less current needed to turn the motors on/off.

    When using an external power source to drive the motors, make sure the grounds (and only the grounds) are connected to both the Arduino ground and MOSFET reference ground. The positive side should only go through the transistor/mosfet.

    What are you intending to do?

    P.S. As audioguru stated, use the "breadboard jumper wire kits" made from different lengths of solid core wire. Only use the flexible wires for making connections between the breadboard and another board. You can get a lot of "breadboard wire" by getting a scrap of cat5 cable from an office installing a network system. A few dozen feet will keep you in jumpers for quite a while.
     
  8. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    The output voltage of a TIP120 goes low to about +1V, not 0V. Then if the positive wire of a motor is +5V it gets 4V.

    But your LED matrix has the positive wire of the LED or motor connected in series with a 220 ohm resistor from the low current output of a 74HC595 so the motor gets an extremely low current and it cannot run.

    You do not know the basics of electronics and I cannot spend a few days to teach you how to do it.
    Also, your English is pretty bad.
     
  9. John P

    AAC Fanatic!

    Oct 14, 2008
    1,634
    224
    Your English is good enough to be understandable, Carapocha. We get some people here who just can't be clear about what they want to do, especially the ones who make you think that computer keyboards don't have a shift key in their area of the world (i.e. they use no capital letters--I just hit the 'back' button when I see one of those).

    I think there are two things you need to do in order to make this matrix idea work. First, there must be a power transistor for each row and each column, probably a PNP and an NPN. You could eliminate concerns about base current versus motor current if you use MOSFETs instead.

    Secondly, I believe you will have to put a diode in series with each of your motors. If you don't, I can't see any way to prevent current flowing through multiple paths in your matrix, when you obviously want conduction at just one crosspoint. Your LED matrix was able to work because an LED is a diode, but motors need to have diodes added.

    The TIP120 is a Darlington transistor, which will always have a significant voltage drop. You might be able to use an ordinary transistor like a TIP31, but you would have to deal with the question of base current versus what the motor will draw. I really think MOSFETs are the right way to do this.
     
  10. carapocha

    Thread Starter New Member

    Jan 24, 2013
    5
    0
    Hello again.
    I've just arrived at home and I have made some test.
    I have the next circuit:
    [​IMG]
    The circuit base, has two shift registers. I use sr1 for select a row and sr2 for select a column. If I put High a pin in SR1 and LOW a pin in SR2 I can select a point in the matrix.
    If I connect A with A2 and B with B2, I can swith the led that I want. It works ok.
    If I connect A with A1 and B with B1, the motor don`t move. Between G1 and G2, 5v(correct) but 74 mA (too low).
    If I connect A with A3 and B3 with GND, the motor turn, but I can`t select only a element in the matrix. Between G1 and G2, 5v(correct) and 190-160 mA (I suppose the motor`s normal current while turn).

    So I think that you are right, it`s a problem with the current between A-B. Perhaps the problem is in the current that the shift registers can drive thru or the tip120.

    It`s better replace the tip120? Must I replace the shift registers? Which components must I use? Perhaps a MOSFET? Which?
    (I must buy a lot of this components, so is important the price of each one) If I know the component Mosfet I can to learn about and try another better way.

    I will have in my mind all your advices:
    - 0.1uF ceramic capacitor for the shift registers.
    - I think that the motor`s diode its ok.
    - I will look for a network wire, cat 5,to make better short wires.

    Thanks to everybody. I can`t improve here my english, but I hope improve my electronic`s knowledge.
     
  11. carapocha

    Thread Starter New Member

    Jan 24, 2013
    5
    0
    I have a mistake witht the scheme:
    - The A point is before the resistors, just at the end of SR1 pins.

    -The current`s value is in G1 or G3 point, not between G1 and G2 or G3 and G4 .

    Sorry.

    Thanks
     
Loading...