Motors strange movement?

Hello,

I am working on making a tiny obstacles avoiding robot (with the picaxe 08m). The robot use small dc motors to move and a MaxSonar sensor to detects objects.

The problem is that when I set all pins on the picaxe chip to low, the motors movie in pulses, as if its somehow picking up the pulses from the sensor.

Here is my schematic:

Anyone know why its doing this???

Thanks.

 

It’s always recommended to

It’s always recommended to put a 100nF capacitor between GND (V-) and VCC (V+) on eyery IC or µC.

 

Pulling low

Are you sure that you are pulling the outputs low. Could it be that they a set in tri-state mode (floating).

I would put a resistor from the point between the existing resistor and the transistor to 0V. The size depends on the size of you existing resistor, but try with at value between 2k - 5k.

I have added the resistor

I have added the resistor mentioned by octospider and put a 100nf capacitor between GND and VCC. But nothing changed.

So I set all outputs to low again, replaced the motor with an LED, but it kept flashing.

Any Idea?