1

I'm running serveral servos using a driver A4988 and external power supply. Everything works fine. I've just noticed one issue that I can't explain. As soon as I upload a new program version on my arduino uno, while the external power supply is one, the servo makes some strange noises. After the upload has finished, the noise disappears.

Without any further details, can you explain this behavior? Does the arduino set some Pins to HIGH during flashing?

Thanks!

1

It would depend on which Arduino and what bootloader it's running. Generally MCUs have their pins in INPUT mode when they reset. Sometimes the bootloader will leave some pins configured for a particular mode by the some the sketch runs. E.g. the Leonardo seems to leave pin 13 set to OUTPUT mode.

You usually want devices connected to your Arduino to have stable signals when the Arduino MCU is in reset, or in the bootloader, so it makes sense to pull the signal pins, that will later be output from the Arduino sketch, to known levels. So maybe pulling your servo driver enable signal to inactive (HIGH) is appropriate.

Looking at the A4988, it has an EN (enable) pin, which seems to be active low. So putting a high(ish) value resistor, say 5k or 10k, on it to VDD/HIGH (to inactive) is probably the thing to do. When the Arduino is not driving the enable line to its low (active) state, that is when it's in the bootloader or being held in reset, the A4988 should stop its activity.

2
  • Can you explain what you mean with "Pulling servo signal to ground" ?
    – mAI
    May 1 at 16:20
  • First time through, I'd been thinking of a typical hobby servo. I've changed the wording there to be correct (I think) for the A4988 driver. The basic idea is the same, when the MCU is not strongly influencing the signal (any signal really, the driver enable signal in this case) a resistor can be used to weakly influence the pin to the default level.
    – timemage
    May 1 at 16:28

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.