Why does my motors stop spinning after awhile

 

Hi all,

I am on my second (well third if you count my incomplete herbie bot) and i have completed proto work on my project board with hook up wires. My basic code thru the PICAXE 18X is to keep pin 7 and 6 HIGH while 5 and 4 LOW as triggers to the inputs of a L293D motor driver. What I find is that for the most part the motors spin for a while and then stop for no reason.

 

My L293D are directly connected to the motors with no caps in place. Could the missing CAPS be the reason my my motors halt after awhile ?  

 

 

 

- Check your battery/power

- Check your battery/power supply

- Add capacitors on the motor connections

- Check the connections from the Picaxe to the L293D motor driver. I am not familiar with the 18X project board, but could it be, that you have to keep pin 7 high and pin 6 low to turn the motor in one direction and pin 7 low and pin 6 high to turn it in the other, same with pin 5 and 4 for the second motor?

Battery issues seem the most

Battery issues seem the most likely, either that or overheating.

What sort of batteries are you using? If possible, can you measure the current being consumed while the motors are running? Does the L293 get hot when the motors have been going for a little while?

Are you holding them up when

Are you holding them up when they start and then, after setting them down, they stop?

Do your motors get hot? What power source are you using? What are your motors rated for?

Have you tried connecting them directly to power? Does the same thing happen?

If the L293D gets hot after

If the L293D gets hot after a while, it is probably the integrated thermal shutdown of the driver IC. You should use then a heat sink and check the current of your motors while they are running. L293D has a output current of 600 mA per channel. Your motors should draw less.

** I keep the pins high at**

 

I keep the pins high at all times and loop

no the motors never get hot

they are the GM9 from solarobotics rated at 500ma stall and about 50ma running I think (could be wrong)

connecting them directly to the power works no issues

 

 

not using a project board

not using a project board did up my own connections on one of those boards with the multiple pin holes and rows / columns connected (forget the name)

my pins are being held in the right status infact see a glimpse of teh code is something like this

 

main : 

GoSub Stopandwait

high output7

low output6

high output5

low output4

pause 20000

 

low output7

high output6

low output5

high output4

goto main :

Stopandwait:

low output7

low output6

low output5

low output4

return

 

 

 

l293d is cold to touch. I

l293d is cold to touch. I even added some leds to show directional flow as in the motor diver kit from solarobotics and the funny thing is when the motor stops both reverse light and forward lights are on. found that strange since both are connected in the reverse of each other figure them both lighting up would be impossible

this is what your code is

this is what your code is doing:

turning motors off faster than you can see them go off

Then turning them on for  20 secs and then reversing them really fast that you probably can not see them reverse and then looping back. 

Your “stop and wait” is not waiting. So it would appear that your motors should all ways spin one direction.

Could you try this and post your results:

 

main : 

 high output7

 low output6

high output5

low output4

pause 5000

low output7

high output6

low output5

high output4

pause 5000

low output7

low output6

low output5

low output4

pause 5000

goto main

This is just a simple test of forwards, reverse, and stop for 5 seconds each.

Sorry I was at work when i

Sorry I was at work when i gave you that code it was my best memory of what the code really was this below is a cut and paste of my code

main: 

 

GoSub ApplyBrakes

high output0

low  output1

high output7 

low output6

pause 20000

 

GoSub ApplyBrakes

low output0

high  output1

low output7 

high output6

 

 

pause 20000 

goto main

ApplyBrakes:

 

low output0

low  output1

low output7 

low output6

pause 2000

return

i’m using a 6v adapter 200ma

i’m using a 6v adapter 200ma

I suggest that you use your

I suggest that you use your multi meter to read the outputs from the picaxe going to your l293d and see if they are correct. Then check the outputs of the l293d and see if they are correct. See if they change like your code is telling them to. If this shows a problem then pictures of the circuit you made would be nice. Kind of sounds like maybe a faulty soldering connection which i have done in the past and gave the same problem you have.

Using a battery instead of

Using a battery instead  of a 6V wall transformer. Many wall transformers deliver no a clear and steady DC output and may disturb the PICAXE. I would also add interference suppression capacitors on the motors.

Both LEDs on; sounds like

Both LEDs on;  sounds like a fast oscillation between forward and reverse.

Sorry to ask but, do you have a resistor in series with the anti-parallel LEDs?

 

Just reading your code:

You brake for 2 secs, forward for 20 secs, brake for 2 secs, reverse for 20 secs.  Is that right?

When do the motors stop within this loop? Always in the same place?

** Yes resistor is in series**

 

Yes resistor is in series with anti-parallel LEDs

the Brake for 2 sec should be the only stopping point, i didn’t really check if its always the same point in the code. but the LEDs are powered from the +5V logic coming from the picaxe18X to the L293D motor driver so i would seem that the lock out is at the picaxe end

 

 

Did you check with a

Did you check with a multimeter every where like i suggest?

Not yet waiting on the

Not yet waiting on the weekend, will let you know though

As well as putting

As well as putting capacitors (0.1 uF) across the motor terminals, also put a capacitor of the same size across the picaxe power supply, as close as possible to the chip’s power pins. It is highly possible that motor noise and disturbances on the picaxe power supply are causing your problem.