Servo glitch when downloading from Picaxe Programmer

I seem to be having trouble with downloading programs from my Picaxe Programmer to my Picaxe-40x2. A lot of times I get communications faults and have to reset and try again.

Worst of all, sometimes these errors are accompanied by somewhat distrubing behavior for the bot itself. It seems like all the servos are being forced to turn very far to one side. One servo (a DAGU mini) in particular seems like it is trying to turn itself past its limit.

Usually when this happens, I acknowlege the error message in Programmer and then press F5 to download again and everything works fine.

Any idea what is going on?

 

I don’t recall the default

I don’t recall the default behavior, but all pins might go high which would cause any thing connected to act oddly.

This could also be causing a high draw of current causing the glitches.

I’d try disconnecting the servo(s) or adding some caps (470uf) near the power leads to the uproc as well as the servo…

could also be the batteries… :slight_smile: try a fresh set.

This might help

 

Well, the uproc already has

Well, the uproc already has a 100 uF and a .1 uF cap. right near its power leads. The power supply itself has .1 uF and 470 uF to each side of the power regulator. The servos are powered from the battery side of the regulator, from the 4xAA batteries. The capacitors on the battery side of the power regulator are only about an inch from where the servos are connected.

I just measured the batteries, and they are putting out 5.63V with no load. The dropout voltage for the KA278RXXC in the power supply is rated below 0.5V, so it should be OK, but that is getting pretty close. So I’ll test with new batteries and see if that is any better.

Thanks for the advice.

Results: Hold down the reset

Results: Hold down the reset button.

Fresh batteries were a good idea, but didn’t solve the glitch. If I hold down the reset button for the Picaxe while I initiate a download, then release the reset button, it works OK.

I guess holding down reset prevents the pins going high and glitching the servos. Thanks for the advice, voodoobot!