Arduino Losing Serial Connection

Hi All,

I’m having an issue regarding the serial connection (I believe) cutting out occasionally with my Arduino (clone). Here’s the scenario:

  • Arduino communicates with an Intel NUC PC
  • Both are used to control an AGV, I’ve installed an off the shelf motor controller (DM860I) to control the steering, controlled by the Arduino, using a stepper motor.
  • The motor driver is fed by unregulated 24V from a battery, the Arduino is externally powered by a 12V buck converter (also powered by said 24V battery).
  • I’ve placed ferrite filters on the 0V and 24V going into the motor driver, as well as on the motor phase leads.
  • IDE version 1.8.13 and the rosserial_arduino package are used to communicate between the Intel NUC and Arduino.
  • Baud rate of 50k is used, as higher baud rates cause problems with communication between the NUC and Arduino.
  • The specific clone Arduino is here, Rugged MEGA-ET ST (Screw Terminal) — Rugged CircuitsRugged Arduino

When driving around with my AGV in my initial location, I never had any issues with the Arduino losing serial connection after several days of testing. When it was moved to another building, the serial connection would cut out after driving 10m forward, consistently. I removed some noise caused by the motor driver by adding the ferrite filters and the serial connection drop occurred now only about once every 2-3 hours of driving around.

I’m seeing about a 2v p-p on all power lines (24V battery, 12V buck, even the 5V line coming out of the computer to the Arduino…) when driving around. My guess is this noise is causing the problems, but I’m not sure of I’m going down the wrong rabbit hole. The buck converter alone causes a 1v p-p.

The only way to have the Arduino reconnect again is to unplug and plug back in. This issue also came up even while running a simple “hello world” program.

My question is has anyone seen this type of issue before and is there any suggestions on a) how to fix it or reduce it or b) how to possibly reduce the noise more, either on the buck converter side or motor driver side.

Thanks

Use of our search engine will give you some pretty good hits.
Here are a few of those

Any DC motor will cause spikes so placement of the Arduino and the type of cables used will be a critical factor.
You should be using a single ferrite on both the positive and negative rather than seperate ones on each line.

Also make sure you have some filtering on the motors too by way of suitable capacitors.

See also this topic

Hi, @smill138
Welcome to the forum.

Please read the post at the start of any forum , entitled “How to use this Forum”.

It sounds like your gnd connections are not rugged or heavy enough.
What frequency is the ripple.
What gnd are you using as reference for your scope readings?

If you have 2V p-p on the 5V rail, your gnds are definitely a problem, because you would not get any operation from your controller with that amount of ripple.

Can you please post a couple of pictures of your project so we can see your component layout.

What comms system are you using to remotely control the AGV.

Can you please post a schematic of your project.

I hope all your gnds in the AGV are star connected to the battery and not daisy chained around the vehicle.
Star connection makes sure that each device ONLY has its current flowing in its suplly.
If you daisy chain then all of your peripherals currents flow in the same wire and can cause noise and voltage drops.

Thanks… Tom… :grinning: :+1: :coffee: :australia:

1 Like