Issue with power outage and SATA adapter

A project log for 3D Printed Raspberry Pi NAS

3D print your own ARM based NAS with ease (LTS)

tobychuitobychui 03/30/2023 at 14:250 Comments

Recently I have built another NAS but this time based on the orange pi zero 2 with the same configuration as the one I open source few months before. The one on the right (white one) is the latest one while the left one (black one) is the old one.圖片I have store both of these NAS, one powered up and one powered down for maintenance, at my university and a scheduled power outage bring down the new one. Generally speaking, power outage isn't a big issue for SBCs as they will just kick start themselves again after there are power again, but this time, it cannot detect any of the two hard drives.

At first I was questioning about the power management and regulation section of my design. So I added a bypass buck converter that supply 5V to the SATA to USB adapter's USB 5V rail, but issues still exists and IO error just shown up on the linux dmesg outputa

I tried swapping out the drives, rebooting, rubbing the contacts with rubber and many other debugging methods and even call in my friend from Computer Science department for helping with the debugging. Finally, we came to a conclusion that it is not the power supply issue nor the disk issue. We boils down to two possible issues
1. The SATA adapter is fried during the power resume and a voltage surge is happened during the first few ms of power resume (But we do use a power supply with ESD protection)
2. There are bugs in the linux kernel built by orange pi zero 2 which, I have no idea why it happen at the same time we have power outage, have effects on USB stability

As I am still rushing my Master thesis and don't have time to continue to debug this. That is why I bought a used D525 Intel Atom motherboard from a (questionable) seller online, combining with a used aluminum PC case and a Dell ATX power supply, I am building my x86 NAS (finally) for real and hope this time it will work without bringing me any further troubles, at least not before I have done with my thesis.