go_away

Author Topic: motor causing unknown pulses...HELP!!!  (Read 1941 times)

0 Members and 1 Guest are viewing this topic.

Offline sambhavTopic starter

  • Jr. Member
  • **
  • Posts: 20
  • Helpful? 0
motor causing unknown pulses...HELP!!!
« on: May 11, 2007, 11:37:56 AM »

Hiiii frnds...
i hv designed a ckt for obstacle detection using ultrasonic sensors...
This is a part of my final yr project...
The ckt when tested gives high pulses at the o/p wen an obstacle is placed in front of the sensors while the o/p is low wen there is no obstacle...
This o/p is given to PIC 16f877 which controls the on/off of dc motor.

Driving of motor:
The o/p pin of the PIC which controls the motor is connected to ULN 2803 relay driver which drives a 5v relay which turns the motor supply on/off..

what is expected to happen..:
the ckt is fitted on a small toycar... with the sensors fixed infront..
when the mode is selected,the PIC turns on the motor by activating the corresponding o/p pin.the motor( and hence the vehicle) moves until a pulse is obtained at the sensor o/p. when this happens the PIC pulls the o/p pin low to turn off the motor.. The chip is programmed and the program is simulated using MPLAB and gives works as expected...

What actually happens:
When the mode is selected..and there is no obstacle ahead of it,it was found that the moment motor starts to run, some pulses are obtained at the sensor o/p as long as the motor is running, which are misinterpreted by the PIC as the obstacle pulses and hence it stops the motor..from wher do these pulses come..???

So wat i did ws..i removed the motor and connected a non inductive load instead (a resistor and an LED in series) jus to chk if those pulses are obtained.. bt this time no pulses wer obtained...ONly when an obstacle was placed infront it detected pulses..
So it is almost confirmed that it is the motor that is creating the problem..maybe it sends some back current or sumthin...bt the only common thing i can see between the motor and the sensor ckt is the PIC and the VCC and GND...otherwise there is total isolation..
so Can anyone help me solve this prob..??? i tried putting cap, diode etc across th motor..bt the same thing happens...
So any help will be appreciated...
Thank you...

Offline pelibot

  • Beginner
  • *
  • Posts: 4
  • Helpful? 0
Re: motor causing unknown pulses...HELP!!!
« Reply #1 on: May 13, 2007, 11:46:43 AM »

Well, that sure sounds like a power supply problem.
What is your VCC quality ?
How is it implemented ?

Did you notice voltage drop when motor start ?
A voltage drop may cause your proximity sensor to give false readings.
It is best to drive the motor directly from battery (threw relay or H-Bridge) and the sensor and other electronics threw a voltage regulator with lots of capacitance before and after regulation...

Offline pelibot

  • Beginner
  • *
  • Posts: 4
  • Helpful? 0
Re: motor causing unknown pulses...HELP!!!
« Reply #2 on: May 13, 2007, 11:52:11 AM »

Another thing may be not related with the motor but with movement of your robot....

If you are on the edge of the proximity threshold, you may get high frequency burst of pulses because the sensor can not decide if it is too close or too far...

Try low passing the sensor or schmit triggering it.
That depends on your implementation.


Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,632
  • Helpful? 169
    • Society of Robots
Re: motor causing unknown pulses...HELP!!!
« Reply #3 on: May 13, 2007, 04:49:42 PM »
Ok Im suspecting the motor (especially the relay) is causing voltage spikes to go through your system. You will need to dampen these out:

1) Put a large capacitor between power and ground of your power supply. It depends on your power draw, but perhaps ~10mF will do it.

2) Put a tiny capacitor across both leads of your relay and motor. Perhaps 10uF or less.

3) Make sure both of those capacitors are rated at twice the voltage of your power supply.

4) If possible, replace the relay with a MOSFET (or even better, a motor driver). Relays are horrible for robot motor control. With a MOSFET/driver you can also do PWM.

 


Get Your Ad Here