Current spiking from 3ma to 2 Amp Help!

Discussion in 'General Electronics Chat' started by redacejr, Jun 5, 2008.

  1. redacejr

    Thread Starter Active Member

    Apr 22, 2008
    85
    0
    i made this circuit for an l293 h-bridge which originally regulates current with a programmable microprocessor.... and because i dont have this board... the circuit is giving the motors about 50mA of current which is good but sometimes i goes up to 2A:eek:!! you can hear the motor freaking out and i pull the plug immediately... im afraid to burn the thing... the motors are rated at 1.2A and its a miracle thgey still work.... is there some sort of current limiting circuit... even if the excess current becomes to heat im alright with that
     
  2. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    You might be experiencing "shoot-through" - that's when you have both the high and low side of 1/2 of an H-bridge on at one time.

    You can limit the total current through your H-bridge by using a resistor, but that will waste a lot of power. You could also use an incandescent lightbulb of a suitable voltage and power rating. The lightbulb is nice, because it is a non-linear device; when the filament is cold it has very low resistance, as it gets hot it's resistance greatly increases. It will also serve as a visual indicator to show you when there's a problem.
     
  3. redacejr

    Thread Starter Active Member

    Apr 22, 2008
    85
    0
    thanks as always sgt!! ill try the bulb idea tonight and if it helps ill tell you tomorrow.

    Redacejr
     
  4. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    OK.
    Keep in mind that you have to turn off one side and then wait a bit before turning on the other side. You can't just use an inverter, as they have "propagation delays" - ie; when you put a signal level on the input, it takes a period of time to show up on the output.

    Also, it's typical for MOSFET H-bridges to take longer to turn OFF than to turn ON. Unless you take all of this into account, you will wind up with the dreaded "shoot-through" condition; basically your H-bridge makes a dead short across the power supply. This is obviously a situation that you must plan for and avoid.
     
  5. redacejr

    Thread Starter Active Member

    Apr 22, 2008
    85
    0
    no offense sarge but i did not understand a word in your last reply :(

    i tried the bulb thing you told me yesterday but with the bulb attached nothing worked. attached you may find the schematic of what i presently have breadboarded... can you tell me the easyest way to control the current spikes and tell me where it should be attached to??:confused:

    redacejr
     
  6. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    Your circuit does not have the very important diodes that stop the voltage spikes from the motor from destroying the IC.

    Your circuit opens pins 2 and 7 or connects them to 0V (-). The pins must be (+) or 0V and one must be (+) and the other must be (-) for the motor to run. When you reverse them then the motor will run in the backwards direction.
     
  7. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    If you are using an L293, you need the diodes like Audioguru said.
    If you are using an L293D, the diodes are incorporated.
    Forget what I said about propagation delays, etc. The L293x has built-in inverters; you don't have to worry about that.

    What you are doing wrong is that you are using a SPST switch with no pull-up resistor, and you have 3Y and 4Y enabled with no input signals on 3A and 4A. The L293 inputs then "floats" to a random voltage rather than going right to the supply voltage. This is very bad for the L293.

    Ideally, you should be using a de-bounced switch. When mechanical switches change positions, they don't instantly disconnect or connect; they "bounce", causing their output to fluctuate wildly for a period of time.

    The best de-bounce circuit uses a SPDT (Single Pole Double Throw) switch, and a pair of Schmitt-trigger NAND gates. It will not bounce.

    See the attached schematics.
    Note that Vdd and Vss pin connections are not shown for the CMOS 4093 IC.
    Note that if you are using an L293D, you don't need D1 through D4.

    The first version uses the CMOS 4093 NAND gate that has Schmitt-trigger inputs, and it needs SPDT switches to work properly. It won't bounce.

    The 2nd version adds pull-up resistors to what you already have, and D1-D4 to take care of voltage spikes in case you're not using an L293D.
     
    Last edited: Jun 7, 2008
  8. redacejr

    Thread Starter Active Member

    Apr 22, 2008
    85
    0
    Thanks Both of you... i fixed it with diodes XD
     
  9. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    OK, I hope you went by a schematic offered in the datasheet; I was tired when I drew the schematics up and had the diodes to VCC backwards. :eek: That would lead to a toasty situation.
     
  10. redacejr

    Thread Starter Active Member

    Apr 22, 2008
    85
    0
    yea actually i burned 2 silicon diodes but its fine... they were salvaged ones anyways XD:p
     
Loading...