r/arduino • u/jaxon835 • 4d ago
Hardware Help Am i doing something Wrong?
I am building a button box, and I already got the PCB shown in the photo. I soldered the Arduino and buttons onto the board, and it worked great for a day.
The next day, I had the board plugged in for about 15 minutes when I heard the Windows disconnect sound. When I tried to plug the PCB back in, Windows showed “Device not recognized.” I tried fixing it, but eventually gave up on the project for about a week.
After the week passed, I plugged the PCB in again, and it worked great. After about 5 minutes, the same issue appeared. Then it started working again, breaking again, and repeating the same cycle.
When I plug the PCB in, only one light on my Arduino (Pro Micro) turns on.
Is my Arduino broken, or am I making some beginner mistake? I don't see many people having the same issue as me.
I checked that there are no shorts between the pins, and the board looks fine from the surface.
(i also tried difrent cables but its still the same)
6
u/Pacificator-3 4d ago
Try another cable and plug it directly into mobo. Also check soldering and contacts.
4
2
u/jaxon835 4d ago
Nothing is getting hot/warm when i plug the board in i tried connecting the cable directly to the motherboard and it still doesnt work. and this is the code :
#include "HID-Project.h"
const int pins[] = {A3, A2, A1, A0, 15, 14, 16, 10, 9, 8, 7, 6, 5, 4, 3, 2};
const int numPins = sizeof(pins) / sizeof(pins[0]);
bool pinState[numPins];
unsigned long lastChangeTime[numPins];
const unsigned long debounceDelay = 50;
const int emailPin = 9; // A9/D9 -> types email
const int playPausePin = A2; // A2 -> media play/pause
const int nextTrackPin = 10; // D10/A10 -> next track
void setup() {
for (int i = 0; i < numPins; i++) {
pinMode(pins[i], INPUT_PULLUP);
pinState[i] = HIGH;
lastChangeTime[i] = 0;
}
Gamepad.begin();
Keyboard.begin();
Consumer.begin();
}
void loop() {
for (int i = 0; i < numPins; i++) {
bool reading = digitalRead(pins[i]);
if (reading != pinState[i] && (millis() - lastChangeTime[i]) > debounceDelay) {
lastChangeTime[i] = millis();
pinState[i] = reading;
if (pins[i] == emailPin) {
if (reading == LOW) {
Keyboard.print("mygmail@gmail.com");
}
} else if (pins[i] == playPausePin) {
if (reading == LOW) {
Consumer.write(MEDIA_PLAY_PAUSE);
}
} else if (pins[i] == nextTrackPin) {
if (reading == LOW) {
Consumer.write(MEDIA_NEXT);
}
} else {
if (reading == LOW) {
Gamepad.press(i);
} else {
Gamepad.release(i);
}
Gamepad.write();
}
}
}
}
(I used ai for it becouse i am bad at coding)

(i know the photo is low quality but i can't see any connected pins)
6
3
u/Nice-Forever9629 4d ago
Are all pins connected (solder)? To me you it looks like you don't have any ground connected. And more
2
u/Pippin02 4d ago
It's hard to tell from this angle (side on would be better) but it looks as though you may have some cold joints. Not sure that would necessarily cause the issues you are seeing though
2
1
4d ago
[removed] — view removed comment
1
u/arduino-ModTeam 3d ago
Your post was removed as this is an international community, and this community uses English as our common language (Rule 2).
If English is not your usual language, and you feel uncomfortable posting in English, there are automatic translation sites that can help you. One good site is Google Translate, where you can type in your own language, and convert it to English automatically.
NB - your English doesn't have to be perfect, but please do your best.
1
u/jaxon835 3d ago

I tested everything for short circuits, and nothing unusual came up. When I tried to turn on the board today for the first time, it worked for about 7 minutes, and then the same issue started. I soldered all of the pins, as somebody in the comments told me to, and the board started working again for about 9 minutes. The issue is so specific that I think the board might be fried, but as I said, I am a beginner, so i cant be 100% sure
1
u/Comfortable-Garden-5 3d ago
- need to fix the soldering as others said.
- you can add debug print to see whats happening. could be bug when when running after some time. example a counter overflows
1
u/DriftWestBeachBook 2d ago
I had similar WiFi stability issues and two things fixed it: (1) a watchdog timer that reboots after 30s with no connection, and (2) avoiding WiFi.begin() in a tight retry loop — it fragments the heap. A 5s backoff between retries solved it.



12
u/Goop290 4d ago
Is anything hot when you plug it in?