Model originally uploaded to Thingiverse at https://www.thingiverse.com/thing:3237078.
This design requires 1x 1/4" -20 1" hex head bolts. I used stainless steel. You could probably use 3/4" long bolts instead.
Optional 1x m3x12mm Alan key bolts 1x m3 nuts
You can screw this to the wall or use double sided tape or something.
Takes about 1 hr to print. I used 2 outlines, 10% infill, 5 tops and bottoms, and a 0.2mm layer height.
I made these for a mate of mine, he likes the ball and socket design but I didn't want to print so much plastic, and he wants to mount his sensors to the ceiling so the other design isn't optimal anyway.
I remade the socket from scratch, although I followed the design closely. I used the same ball except I continued the hole all the way through (for some reason there was a layer on the inside end of the hole) and I reduced the depth of the cut out for the hex head to fit a 1" bolt as that was all I could buy.
Edit I have added an untested knob at the request of cooasty. It will require about a 25mm M3 bolt. I have sized it so you may be able to screw the bolt into the knob but you may need to glue it.