The 5200 (most models) had an odd switch box that also supplied power to the console. That’s going to complicate things. But luckily Google found a set of instructions for how to build one. You should make sure this is the type you need. For instance, if your model only has two controller ports, it should have a separate power supply.
If those instructions aren’t enough for you to go off of, I’d recommend searching or asking around on the AtariAge forums.