E V Forum
Sign up

  Author   Comment  

Junior Member
Posts: 2
Reply with quote  #1 
I've been controlling a DC motor with the CCP module of my PIC18F4550. The general functioning of the system is:
-Get ADC voltage in AN1
-Compare with a threshold
-If voltage is greater than the threshold start PWM1 during a time T clockwise.
-Once time T is over, open PWM2 during T seconds to get the DC motor to spin counterclockwise. (in other words, to get it back to its initial position).
The motor is isolated from the pic using optocouplers and the sense of spining is given by an H-bridge (L293D).
PIC18F4550-I2fPT_606744.jpg http://www.kynix.com/Detail/567778/PIC18F4550-I%2FPT.html 

Everything was fine yesterday, it was going up and down really good. But then out of the sudden, I started to see that the signals from one PWM were going out of both outputs of the H-bridge (which obviously wouldn't allow the motor to spin). Why? I don't know. But if I remove the motor and check the outputs of the H-bridge, the signals are just ok. So what I guess is that the motor, due to its low resistance, is alowwing the signal to get to both nodes. So I changed the motor...same thing.

I am thinking it's more of a hardware problem, but could you please tell me what's worng? or if it may be something on the pic?


Avatar / Picture

Posts: 96
Reply with quote  #2 
How big is the DC motor and what is the task you are using it for?
Previous Topic | Next Topic

Create your own forum with Website Toolbox!