Author Topic: UART ground loop maybe?  (Read 1242 times)

0 Members and 1 Guest are viewing this topic.

Offline enjoy.cowboyTopic starter

  • Contributor
  • Posts: 17
  • Country: br
  • Probably intoxicated on magic smoke
UART ground loop maybe?
« on: November 01, 2021, 12:10:28 pm »
Possible murphy level 4 circumstance, but here's whats happening:

I have this arduino talking to a modem over UART. The modem has a separate power circuit with a LM2596 converting from 2x Li-ion cells (7.4V ish) to 5V feeding into both the modem and the arduino. I built a hat on a perfboard to stick on top of the arduino to avoid any iffy contacts on a breadboard. I powered it on, plugged in the USB for serial debugging, no response from the modem via serial, even tho it is powered on and appearing to do something. I jiggle the hat back and forth a bit and to my surprise the AT commands start getting responses, so code is working fine. I let it go, thinking I found the sweet spot, no more responses. I jiggle it again, trying to pay attention to where I was touching, I was touching the power connections.

Then I got my meter and started buzzing away. The power and ground connections from the batteries seem to buzz fine, also because the modem and arduino work on batteries alone. However, the arduino's USB plug seems to not have the shield connected to ground.

Am I chasing a red herring here?  :-//
 

Offline dtmouton

  • Contributor
  • Posts: 42
  • Country: za
Re: UART ground loop maybe?
« Reply #1 on: November 01, 2021, 02:45:23 pm »
Does the modem have enough time to complete its startup cycle, when switched on, before your Arduino start talking to it?
 

Offline enjoy.cowboyTopic starter

  • Contributor
  • Posts: 17
  • Country: br
  • Probably intoxicated on magic smoke
Re: UART ground loop maybe?
« Reply #2 on: November 01, 2021, 03:19:23 pm »
Yup. When the iffy connection sweet spot is found, it works flawlessly. Its more of a contact issue than a code one.

I found in the back of my drawer one of those Saleae usb logic analyzers. Thought about using it instead of the arduino serial monitor to avoid it being powered by the usb jack:

Weird.... One of the lines seem active low while the other is active high?
Upon further inspection of the modem TX line, it seems its just a contact bouncing? not an actual data packet


Modem RX looks fine...


I got the meter and I measure a 0.7V drop between modem rx and ground. Just to be completely sure, it buzzes one way but not the other way around
 

Offline dtmouton

  • Contributor
  • Posts: 42
  • Country: za
Re: UART ground loop maybe?
« Reply #3 on: November 01, 2021, 06:00:19 pm »
The only thing that comes to mind is that there might be a surface mount component that isn't properly soldered. They have a tendency to make contact when you push on the board. Otherwise the problem may be with one of your connectors. Also start at the lowest possible baud rate.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->