I created a battery holder (bracket) for my two 5 Ah gel cell batteries using more schedule 40 PVC pipe. I cut four 2 and 7/8 inch sections and three 3 and 5/8″ sections. Using four 90 degree elbows and two “T”‘s I arranged it to hold the two batteries.
During the “dry fitting” phase, I realised I wanted to align the batteries lengthwise, so I cut another 3 and 5/8″ section and rotated the batteries 90 degrees. I used pvc solvent (purple can) to coat the inside of the fittings and the outside of the pipes, then used pvc cement (red can) to coat the outside of the pipes. Push the pipes into the fittings, rotate the pipe, then hold it in for 30 seconds and it makes a chemical weld between the pipe and fittings.
After gluing the PVC together, I used a Dremel to cut notches in the bottom to sit on the bikes frame, as well as some notches to put two hose clamps through to hold the PVC to the bike. The fit is tight enough so that the batteries won’t fall out just sitting there, but I plan on adding small bungee cords to hold them in when riding.