0
\$\begingroup\$

Important context:

A couple weeks ago, I ported a C based nqueens program I found online to the Arduino Uno.

Today, and I'm all like "LETS OVERCLOCK THE NQUEENS ARDUINO!!!" Ugh.

I swapped the 16 MHz crystal for a 19.86 MHz one. Everything went well. The Uno's onboard USB UART controller doesn't play ball, and the serial output is garbled, but that's to be expected.

I swap the ATmega328P to another Uno board I have, change the baud rate to compensate for the increased base clock, and no more serial output. Swapped chips between the boards, both 328Ps are fine. Checked my connections between the CH431 and UNO, they are good. Changed crystals, no dice. The CH431 still works, too.

Swapped back to the original 16 MHz crystal. It's detected properly. /dev/ttyACM0 exists, but the 328P never starts running, and the Arduino IDE complains about the programmer not responding.

My only guess is that the ground loop between the CH431 and the Uno board itself destroyed it. Some of the LEDs on both the Uno and CH431 would light up with both ground and the UART lines connected.

Hell, this same Uno claimed the life of my HMP-139 after I connected the two together. (The GPIO MOSFETs on lower quality silicon in the toy must have been destroyed.)

Well, it probably won't claim the lives of any more electronics now.

Is the ground loop theory correct?

\$\endgroup\$
3
  • 1
    \$\begingroup\$ Please post a schematic \$\endgroup\$
    – Voltage Spike
    Nov 28, 2023 at 6:19
  • \$\begingroup\$ Which Arduino UNO board revision you have? There are multiple revisions and even clones from other manufacturers will be different. Which crystal you are trying to change? Please understand that an ATMega328P MCU is guaranteed for 20 MHz operation at 5V, so using a crystal below 20 MHz can't be considered as overclocking at all, and it is not guaranteed to operate at any rate beyind 20 MHz so it may not just work at all if you try to overclock it. \$\endgroup\$
    – Justme
    Nov 28, 2023 at 6:20
  • \$\begingroup\$ I ended up fixing the board (thats why I answer my own question), so that shouldn't be necessary. \$\endgroup\$ Nov 29, 2023 at 0:25

1 Answer 1

1
\$\begingroup\$

So on closer inspection, I was modifying the wrong crystal.

I thought there was only ONE crystal, but there's actually two.

And whats the state on the second crystal on the half dead uno? NONEXISTANT!

I must have accidentally knocked it off or something.

\$\endgroup\$
4
  • 6
    \$\begingroup\$ Ground loops are rarely the problem but beginners seems to always suspect them. \$\endgroup\$
    – DKNguyen
    Nov 28, 2023 at 3:30
  • \$\begingroup\$ Please use the comment function under your question for additional details, to improve the readability of your question. \$\endgroup\$
    – S_G
    Nov 28, 2023 at 7:00
  • \$\begingroup\$ If you are using cheap arduino clones (and not original ones), if I remember well, there are some with a cristal for the USB communication, and some without (at least, I got one such batch once from Aliexpress, a long time ago, in a startup were I coulnd't convince the both that you get what you pay for) : on those without cristal, I got many bit flips when using USB communication at higher baudrates. \$\endgroup\$
    – Sandro
    Nov 28, 2023 at 7:16
  • \$\begingroup\$ Yep, thats the case! I'm using "Elegoo" branded clones, and there are indeed two oscillators. Also, Atmega328p's overclock decently well! \$\endgroup\$ Nov 29, 2023 at 0:20

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.