hi,
A 18K base resistor driven from a PIC pin at say +5V, is far too high a value.
Allowing for a Vbe drop of 0.7V, the Base current is only 4.3V/18K = 240uA.
Assuming a saturation gain of 20 for the 2N2222, the collector current will approx 5mA.
When you use a transistor as a switch, you should assume a transistor gain of between 10 and 20. So if your motor required 100mA, this would mean a Base current of say 5mA to 10mA, say 5mA, this would make the base resistor 4.3/0.005 = 820R I would use a 680R.
Also Make the 180K around 22k thru 47K.
Regarding the electrical noise, you need some noise suppression across the motor, say 10nF and a 120R in series or a suppression diode.