Cut six 3-inch square plates from the sheet metal, using the metal shear. Grind the edges smooth so they are free of burrs or snags.
Use the hole saw to cut a 3/4-inch hole in the center of four of the plates.
Drill four 1/4-inch holes in each of the corners on all six plates.
Set the bed frame into the opening to which it will be hinged. Measure from the vertical uprights to 1 inch past the bed frame. This measurement is how long your pipe piece needs to be.
Weld the pipe piece to the center of the two plates that do not have holes cut through the center. Drill two holes through the end of the pipe piece opposite the plate end. These holes are for the cotter pins to slide through.
Measure 7 inches away from the back wall along the vertical uprights and 4 inches above the floor. Mark on the uprights where the corner holes are on the plates. Drill through the uprights. Put the plates in place and attach with the bolts and nuts at each corner on both sides of the bed.
Measure 7 inches from the headboard end of the frame and drill a 3/4-inch hole. Do this on both sides of the bed frame. Place two plates on either side of both holes and attach with the bolts and nuts.
Slide the pipes though the holes in the frame. Thread the cotter pins through the holes on the pipe ends and bend the legs apart. Raise and lower the frame to test.