Arduino + optocoupler + transistor

Today I went to the lab to check the DC motor parameters and to test the circuit.

I wrote down the motor serial numbers - I wasn't able to access the internet to check the parameters, so I assumed that the collector current will be smaller than 1,5A. I used BD135 transistor, with a proper resistor in front of its base. Then I've turned the power supply on and the motor stared rotating, even when there was no signal from the Arduino!

I disconnected the circuit and I've measured the current flowing through the motor in a basic circuit which contained only the motor and power supply - nothing else. The ammeter showed 11,6mA! The power supply voltage was 9,3V, so the power of the motor should be about 0,1W!

I realised that there can be something wrong with the transistor so I've changed it to BC547B which max Ic = 100mA. After that, the PWM control from Arduino worked, but the motor rotated VERY slowly. I've checked the current flowing through the motor and it was only about 4,6mA!

What is wrong?

6N138.pdf (299 KB)

16N28_motor.pdf (261 KB)

projekt_polaczenia_v1.3_bb.jpg