0

I'm playing with the standard L298N motor board and Arduino MKR 1000. However something strange happens: when I upload a new firmware and when I turn on the Arduino power supply (every time Arduino resets) the motors unexpectedly move for 2 seconds. enter image description here

From what I've seen in other questions, it should be enough to pull down the pwm signal (in fact it seems that the floating status of these pin in the reset procedure produces this problem). I used a 10k resistor as suggested, but with no effect.

I've tried also a 100 ohm resistor: in this case the motor makes some noise but it doesn't move. However, it won't move when it is supposed to in the loop section.

I've also tried to pull down all the three signals (enable, in1, in2) of the motor but with no difference. I've also tried to pull up to 5V, instead of pulling down: same issue at reset, but the motor spinning in the other direction.

I've also tried to put a relay controlling the motor external supply. However the reset procedure also turn 'on' the relay (no progress on the problem).

It isn't a software issue because it happens with an almost empty sketch. Same software+circuit on Arduino UNO doesn't cause the problem. What should I do?

  • standard L298N motor board ... there is no such thing as standard board – jsotola Jun 9 '18 at 6:23
  • @jsotola thanks for the link.. I've tried lots of different pins so I don't think it's something strictly related to a particular pin, but more of a general issue with high impedance state in MKR1000... so I can't understand how should I fix it.. – Surfer on the fall Jun 9 '18 at 6:31
  • put 1k resistors between the arduino output pin and ground .... if it works, increase the resistance until it fails again – jsotola Jun 9 '18 at 6:36
  • @jsotola I tried 1k but with no result. When I put a 100 ohm resistor then it can't move at reset, but it also won't move when I want to! – Surfer on the fall Jun 9 '18 at 6:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.