adaencoder and HDD motor

The problem is the fact that HDD motor have 4 pins rather than 3.

That's what the article explains. Because from the 3 signals you get 1 is always the negated signal of another pin, 2 are enough for this use case. So you have 3 signals and one ground makes a total of 4. Have you read the whole article or just the first step?