This is a modified version of Wade's gear that has the advantage that you only need to file a small indentation on the motor shaft rather than two precision flats.
The hole is exactly 5mm so it will come out too small when printed. This is deliberate so that it can be reamed to exactly fit the shaft. If you haven\'t got a reamer you can use a drill.
Insert an M3 nut and a 6mm grub screw.