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 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 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?
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.
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
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 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.
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
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.