Recently, i also made similar experiment like you to make LEGO motor. i have made a Technic cross axle coupler and bracket on general DC Motor. Then, the motor can be connected with other LEGO Technic parts.
Also, due to the motor speed very high (low torque), so i created a gear box to gearing down to increase torque, and used on Technic set 9396 Helicopter for testing.