Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

problem faced when connecting dc motor

Status
Not open for further replies.

Simone_Cherry

Newbie level 3
Joined
Dec 16, 2009
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
India
Activity points
1,311
i am doing an obstacle avoider model car. i have a problem. what i am doing is that the voltage from the ir sensor is converted to digital values using the ADC module.it is working properly. it gives the proper binary values as output. but as soon as we connect the dc motors via the l293d ics these output values gets scrambled or incorrect. the model either stops or moves continuously without sensing.


could any of u guys can help me ,it will be a great help.
 

Hi Simone_Cherry,

I think if you can explain the problem by giving more details such as type of micro-controller or way you connect it, might be help to understand your problem clearly.

anyway if you used IR sensor to detect obstacles then built simple OP AMP circuit (something like err amp) by defining threshold value and get pulse from it rather using ADC (if it is not really required)

good luck!
 
hey thanks fro replying.
i am doing an obstacle avoider using p16f877a. i have built my own ir sensor. the sensor is working properly even though the range of detection is too small. the analog value from the sensor is converted to digital values using the analog to digital converter in the p16f877a itself. i have written the code such that an interrupt is set everytime the analog value is converted to digital.and in the interrupt service routine i check wether the value goes below my cut off digital value. if it does the car goes in reverse. if bit values to l293d is 00001010, when obstacle is sensed it becomes 00000101. is have checked the value using leds . it works properly. but as soon as i connect the dc motors. these values get corrupted and the motor either moves on without sensing or continuously moves backwards or doesnt move at all. all this happens after properly working some time.this is my problem and also i cant give delay codes. it crashes the system even more. but works proiperly without the dc motor. first i thought it was the back emf from the motors. but the prtoblem persisted even after i gave two different power supplies.


could any one of solve my problem im desperate.
 

If the circuit works correctly without motors (use e.g. leds instead of motors) but stops working as soon as you use real motors, then the problem will be the motors.

What amount of power do these motors take?
- Try to test it with the motors not too close to your digital circuit, with seperate power supplies with the ground of both connected at only one point.
- Add a small capacitor (a couple of nF) in parallel with the motor leads, these will block the noise from the brushes (if it is not a brushless motor...)
- Do you have some 100nF capacitors close to the powerpins of the microcontroller? Also you should have 100nF capacitors in parallel with the power supply lines of the distance sensors, closeby these sensors.
- Add a low-pass filter to the output of the distance sensors, or do some digital filtering inside the microcontroller.
- Put your digital circuit in a metal case.

If still problems, you can try to test if it helps with a series resistor connected to the motors. If it is solved then, you have to further decouple your powersupply of the motor from the digital power supply.
 

Hi Simon,
Do you need pcb board during your R&d process?
if yes you can contact me.
 

hey thanks for the advice. the capacitors really worked. now i am being able to control my directions and even give delays. but still one problem exists. the model may just suddenly stop or doesnt respond to the sensors and continue moving in one direction or the other. what should i do.


 

Sounds like a software-problem now? Maybe try it first without interrupts?

Other possibility is that there are still spikes from the motor. The largest spikes are generated when you introduce abrupt changes in the motor direction. If you want to reverse the direction at which the motor is running, first set the motor speed to zero, wait a short time (some ms) and then run the motor in the other direction.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top