rotary encoder project: troublesooting

Hello,
i am doing a project with arduino and a rotary encoder from a HP injekt printer.

The wire connections are the followings

The problem is when i connect the wire from the pin of sn754410 to the +9v wire of the dc transformer i have sparks and dc motor doesnt work..

The problem is when i connect the wire from the pin of sn754410 to the +9v wire of the dc transformer i have sparks and dc motor doesnt work..

Is it an encoder wiring problem or a motor power supply problem. Disconnect one and prove that the other works.

motor works when is directly connected to power supply 9V.
So what about encoder? Wrong connections?

Btw i have done the part 1 of my project. I have to make it count position with interrupts. So i think connection of the encoder with arduino board is ok.

Hi, you have not said if you are running any software.
First I would disconnect the arduino and with the motor connected to the 754410 then connect power, it seems to me from the IC spec the motor should not run with no input.
If that is not the case then you will have to trouble shoot the 754410 circuit.
If all is okay, then write a sketch just to make the motor run, when you have that working, put in a reverse command, then some speed control.
Learn as you got, leave the encoder out of the development until you have control of the motor. (What I am trying to say is don't do to much at once.)

I don't know a lot about the 754410 but this link shows a two motor connection, you ofcourse only need half. Note the protection diodes.
http://twolewis.com/archives/73

Tom