DC 24v motor contol by pic16f877a

Discussion in 'General Electronics Chat' started by LeeSengTang, Dec 25, 2014.

  1. LeeSengTang

    Thread Starter New Member

    Dec 25, 2014
    6
    0
    Hi All! Im beginner @ circuit field.
    I hav a problem with control dc 24v motor by pic16f877a.
    My circuit is as follows.
    upload_2014-12-26_9-38-17.png
    Pic16f877a output pin drive mosfet bss138 & bss138 drive relay coil.
    Pic control dc motors rotate direction according to IR sensor signal.
    Im using 24v switching power by TOP245,7812,7805.
    It works well without motor, but with motor 12v power dropped to 6v,5v power dropped 2v & IR sensor short & pic16f877a short.
    Whats th reason?
    Pls help me!
     
  2. #12

    Expert

    Nov 30, 2010
    16,298
    6,810
    First guess is that your power supply is not large enough.
    What current does the motor need?
    Does the motor start to move at all?
    Do you understand that motors use a lot more current in the first millisecond than they use 1 second later?
     
  3. LeeSengTang

    Thread Starter New Member

    Dec 25, 2014
    6
    0
    My DC 24v motor needs 400mA currrent.
    Sometimes motor works for 1s and later motor stops, sometimes motor doesnt work at all.
     
  4. #12

    Expert

    Nov 30, 2010
    16,298
    6,810
    Good. That covers the basics, and so, we are left with the idea that your 12V power supply dropped to 6V. If your measurements are correct and your communication has been effective, I can only say, "Look to the power supply".
     
  5. LeeSengTang

    Thread Starter New Member

    Dec 25, 2014
    6
    0
    Whats ur opinion to Back EMF of motor and relay coil ?
    This circuit seems to be perform to protect back emf?
     
  6. #12

    Expert

    Nov 30, 2010
    16,298
    6,810
    You have shown proper consideration for the relay coil so I did not name that as a problem. You have shown no parts on the schematic to address the inductance of the motor, but relay contacts are mostly immune to that problem and they would not load the 12V supply to 6 volts, even if they were damaged.
     
  7. LeeSengTang

    Thread Starter New Member

    Dec 25, 2014
    6
    0
    Thank you for ur trouble.
    I exchange th power 24v & 12v, 5v separately.
    If I common its ground, pic16f877 stop to work and still power is 5v.
    So I separate 24v ground and 12,5v ground ,then my circuit works well.
    But it is too expensive and size is too large.
    I hope it by switching power by TOP245 & 7812 & 7805.
    I think it is fully possible.
    Pls advice me!
     
  8. #12

    Expert

    Nov 30, 2010
    16,298
    6,810
    This seems to indicate that separating the 24V supply from the 12V supply has eliminated a ground loop problem where the motor was sending bad pulses along the ground wire and disturbing the PIC.

    As for expense and size, You have provided very little for me to advise you.
     
  9. LeeSengTang

    Thread Starter New Member

    Dec 25, 2014
    6
    0
    Ur said is motor is problem?
    Else pcb design problem?
    Else switching transform dosent couple ground?
    Th same board works well, but I realize myself same cirduit & my board dosent work.
    Refernce board is not different from mine but whats th reason?
    What do u think of that?
     
  10. LeeSengTang

    Thread Starter New Member

    Dec 25, 2014
    6
    0
    Hi, #12!

    I found new thing.

    I exchange th motor direction switching.

    Originally according to th IR signal, motor direction decided.

    PIC16f877a RB7 is sensor input & I use PORTB interruption over change, RB2, RB3 is motor drive output.

    I input th 0, 5v signal manufactually instead of IR signal to RB7, my project works well.

    But with the IR signal , my pic circuit shorted and IR sensor TSOP1838 damaged.

    Pls let me know my fault!
     
Loading...