-1

I have a problem with a project where one servo is resetting (browning out) two Arduino Pro Minis running 3.3v/8mHz. The two Arduinos are connected by SoftwareSerial on pins 9 and 10 and the slave sends yaw data to the master Arduino obtained from an MPU9250 breakout board. The power supply can supply 1 A of current. The servo is a small 2g servo that takes 3.3v at 50mA when moving (measured, not from the datasheet). Everything is hooked up on a breadboard. In case you're wondering, I am using an adaptation of the ServoTimer2 library to control the servos so as to not interfere with SoftwareSerial. I am baffled as to why one small servo is resetting two Arduinos. The Arduinos, along with the MPU9250, are only drawing 10mA. Could back EMF be causing the brownout?

In the past, I have done a similar circuit but with only one Arduino obtaining sensor data and not sending it over SoftwareSerial. This works completely fine with two servos, a Pro Mini, and an MPU9250 breakout board. This leads me to think it is some sort of software issue.

I have already received some guidance on the Arduino Discord stating to connect ceramic capacitors close to the servos, and this seems to sort of work, but I'm wondering if there might be a software way to do it with the least number of components possible.

Any help would be greatly appreciated!

3
  • RE: "Everything is hooked up on a breadboard" - How about some images of the breadboard setup?
    – VE7JRO
    Oct 11, 2023 at 0:56
  • RE: "This leads me to think it is some sort of software issue" - Can you show us the code, or is it top secret?
    – VE7JRO
    Oct 11, 2023 at 0:57
  • use a separate power supply for the motors
    – jsotola
    Oct 11, 2023 at 3:22

2 Answers 2

0

Note: Commonly you cannot use software to circumvent physics.

Your symptoms show that the initial current of the servo is too high for your power concept to maintain the voltage. Therefore your Nanos brown out.

An electric motor can easily take a multiple of its average current on acceleration. If blocked, and in the first moment it is blocked by the inertia, you can observe factors in low tens. From 50 mA to 1 A it's just a factor of 20...

Please note that servos often control their motors with PWM, and you measure only the average. During the "active" state the current is higher, and depending on the motor's inductive properties can have "strange" wave forms.

Additionally, each wire adds an inductive and resistive component in series with your Nanos and the servo. The shorter and thicker the wires, the better.

So your case looks quite simple, and you have options:

  • Decouple your power supply with appropriate capacitors. Ceramics with some tens of nF and an electrolyte or tantalum capacitor with some µF are common to provide the necessary current "reservoir" for the initial moment in different frequency ranges. Put them near the servo(s).
  • Use a separate power supply for the servo(s). Do not forget to connect the grounds. But also here you might need capacitor(s) to avoid browning out the servo.
-1

You are seeing classic signs of power supply overload. Those motors can draw upto 10x there operating current when starting. Transients etc that are occuring are to fast for your meter to see but the electronics does. To view that you need a scope and a current probe. My recommendation is to get a larger power supply probably in the 3A range.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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