problem with driving dc motor via L298

Discussion in 'The Projects Forum' started by eric_s88, Aug 14, 2013.

  1. eric_s88

    Thread Starter Member

    Apr 20, 2011
    157
    1
    Hi everyone :)

    I'm planning to drive a dc motor with high rmp ( an armchair ) via L298 driver. at first I didn't used any freewheel diodes , and the uController was reseting, and when I placed diodes ( 1n4148 - as shown in the schematic ) the motion of the motor got better , but still I have resetting uController problem.. althogh it gets reseted in long periods of time , but its annoying for the main code ..:(

    [​IMG]

    do you think if I replace 1n4148 with 1n5819 ( shottkey diodes ) the problem will be solved ?? :confused:

    thank you
     
  2. #12

    Expert

    Nov 30, 2010
    16,278
    6,791
    It depends on the amount of current. The 1N4148 diodes are rated at 200ma and the 1N5819 diodes are rated at 1 amp.
     
    eric_s88 likes this.
  3. ScottWang

    Moderator

    Aug 23, 2012
    4,853
    767
    Does th uC and dc motor using the same power?
    How about the v/i of dc motor ?
    I'm wondering the reset of uC was affected by the dc motor noise, if really like that then you may try to connecting two 0.01uf from OUT1,OUT2 to the shell of DC Motor.
     
    eric_s88 and #12 like this.
  4. eric_s88

    Thread Starter Member

    Apr 20, 2011
    157
    1
    the highest current that motor needs is a little bit more than 1 Amps
     
  5. eric_s88

    Thread Starter Member

    Apr 20, 2011
    157
    1
    yes the dc motor and uC are using the same power..

    connect 100nF caps from OUT1,OUT2 to shell of motor or the GND ?

    I didng get what you exactly mean from ' shell of motor ' .. :confused:
     
  6. #12

    Expert

    Nov 30, 2010
    16,278
    6,791
    So...try a 3 amp diode like 1N5821.
     
    eric_s88 likes this.
  7. #12

    Expert

    Nov 30, 2010
    16,278
    6,791
    If the motor doesn't have an outer casing, connect capacitors to ground.
     
    ScottWang and eric_s88 like this.
  8. eric_s88

    Thread Starter Member

    Apr 20, 2011
    157
    1
    is it fast enough to handle the reverse voltage ?? :)
     
  9. eric_s88

    Thread Starter Member

    Apr 20, 2011
    157
    1
    I have connected a 100nF capacitor between 2 leads of the motor, and it works really better, but I think it should be a little more reliable
     
  10. ScottWang

    Moderator

    Aug 23, 2012
    4,853
    767
    If you have O'scope then you can measuring the +V, Gnd, Out1,Out2 to see the waveform.
     
    eric_s88 likes this.
  11. eric_s88

    Thread Starter Member

    Apr 20, 2011
    157
    1
    how it will help ?? :confused:
     
  12. eric_s88

    Thread Starter Member

    Apr 20, 2011
    157
    1
    and what about the frequency of PWM signal for this kind of motors ??

    thanks
     
  13. ScottWang

    Moderator

    Aug 23, 2012
    4,853
    767
    You can using this way to find out the source of noise.

    The Max Commutation Frequency of L298 are 40Khz, so treat it's max frequency of PWM as 40Khz, then the frequency of PWM of motor should check the spec of motor.
     
    eric_s88 likes this.
  14. eric_s88

    Thread Starter Member

    Apr 20, 2011
    157
    1
    Hi guys , I used the solutions mentioned in this topic , and they helped. but when I turn on 2 motors at the same time, the problem comes back.. and uC starts to reset .. :(

    what have to do :( ?
     
  15. ScottWang

    Moderator

    Aug 23, 2012
    4,853
    767
    I'm afraid of the surge or noise will affecting uC by the Motors(it should be using the O'scope to measure the uC of power).

    You could try this:
    1. Seperate the power of uC from motor.
    2. From +V inseries with a 5 Ω to uC and the power of uC in parallel with a 220uf ~470uf/16V to GND, the walts of 5 Ω depends on the current of uC, this is one kind of RC filters, so you could increasing the 5Ω to reducing the surge or noise from motors.

    3. If the above way still can't solve your problem, then maybe you can using the core and coil, you can using 22uH to replace the 5Ω, sometimes the magnetic noise will producing a negtive voltage, that is not easy to isolated just using RC filter.
     
    eric_s88 likes this.
  16. eric_s88

    Thread Starter Member

    Apr 20, 2011
    157
    1
    Hi , thanks for your reply.

    you mean a 5Ω resistor in series with +V >> the logic supply of uC ???
     
  17. ScottWang

    Moderator

    Aug 23, 2012
    4,853
    767
    +V → inseries with 5Ω → in parallel with 220uf~470uf to GND → the Power of uC
    5Ω and 220uf~470uf became a RC filter.
    You can increasing the 5Ω, but if the values of 5Ω too high then it will reducing the current of uC.
     
    eric_s88 likes this.
Loading...