SECTION 5 - ADDING NEW PARTS
Prepare for adding new parts
I suggest that you drill a hole in the back for the wires from your new motor's power source to enter the washing machine, and pull the wires through from outside to inside, through the hole.

Adding the new motor
Connect some wires to the motor (you can solder them if you want, but it's not needed). They probably don't need to be longer than 25cm.

We added the motor in the left corner of the groove at the bottom of the cylinder, firstly because the groove which the original motor sits in at the top was too small for our bigger drill motor, and secondly because the screws on the bracket holding the original motor on are really hard to get to. And the cheapness didn't end there! We just held it on using Selotape (a kind of sticky tape), but we wrapped it a little way around the cylinder so that it held more strongly. ;)
zOMG! A real photo! It's a still from a video, that's why it doesn't look very good. I've edited it to try to make it look better though.
You can see that we just put the (large) drive belt from the new motor's pulley straight to the large main drum pulley, so that we can get the drum up to faster spin speeds, and the motor can easily handle the little extra strain. The old motor is no longer there because Stevn-986 accidentally broke the bracket holding it on. -_-;

Now connect some wires to the output of your new motor's power supply. If you're using a general-purpose power supply, then it will probably have a plug on the end of the output cable. Probably the best way to connect it is to cut the plug at the end off, strip the wires back a centimetre or 2, then you can easily use them in the new little circuit we're going to build. (Do I seriously need to say to not have the other end plugged into the mains at the time?)

Alternatively, if you don't want to cut the output plug off (you want to be able to use the power supply for something else some other time), you could just get some of the new wire you got at the start of this guide, strip that back a bit, and wrap it around the terminals, or insert it into the holes, of the output plug (depending on what design the output plug is). If you do this, make sure you wrap the wires around firmly (or insert them into the holes, whichever is applicable), and cover the terminals with plenty of masking tape, so that the newly-attached wires don't just fall off (or move a little and short-circuit the power supply!).
Example of two different power supplies' output plugs:
(No, it's not a cannon. XD)
One wire's wrapped around the outside of the plug, the other one is pushed into the hole.
Both wires are put into the holes on the output plug.
The thin red and black wires are the new ones which you got at the start of this guide.
Put the other ends of the 2 wires through the whole you drilled in the back piece of the washing machine for the entrance of the power supply cables.

Making the circuit with the MOSFET
The MOSFET acts as a switch for the motor circuit. It will be controlled by the computer.
The MOSFET has 3 pins. To tell the right and left ones apart (to make sure that the MOSFET's the right side up), the heat-sink (silver metal face) seems to always be on the back.

There are basically 2 circuits which the MOSFET combines with its 3 pins, and the Source is a kind of common ground (pun not intended :P).
- The Gate pin will get power from the serial cable's Receive pin ('+' from the computer), and the Source pin will get the Ground from the serial ('-' from the computer).
- The MOSFET will act as a switch between its Drain and Source pins, so we connect the negative side of the power supply to Source (since it is a ground), and the positive side of the power supply will go to the motor, the other side of which will connect to the Drain pin.

When the MOSFET gets power from the Gate, it will disconnect the Drain and Source pins from each other. When it gets no power, the Drain and Source pins are connected to each other.


This is how the stuff needs to be wired. Hopefully it's easier to understand than my description above. >_<
Since we haven't got the wires from the serial cable yet, just connect 2 wires; we'll connect them to the serial plug when you've finished soldering the wires (or even just firmly taping the wires in place) in this part of the circuit.

Sorting the serial plug
You need to make a hole in the back (or side or top, I suppose) of the washing machine's case, for the back end of the serial plug to sit in. Here's a photo showing the hole and serial plug.
(Click to see in full-size)

This picture shows the pins at the end of a serial cable.

We only need to use two of the pins - the Receive (Received Data) and the Ground (Signal Ground) - which are both on the longer row of pins, as you can see. You need to get the serial plug, and 2 pieces of wire (no more than 30cm each), and secure one wire to pin 2 (Receive) and the other wire to pin 5 (Ground), on the back of the serial plug. Remember that the diagram is for the serial cable! So on the BACK of the serial plug, the pins will look mirrored somehow.

Here are some pictures showing how Stevn-986 positioned and wired the serial plug.
NOTE: It's been rotated 180 degrees to the diagram above, so the long column of pins is now on the bottom.
Front of plug --> Flipped half-way --> Rear view with wires
(Click any of those pictures to see them in full-size)
Here you can see clearly which pins we connected on our serial plug (pin 2 and pin 5). Also, the middle picture shows you the hole Stevn-986 drilled underneath the serial plug, for the entrance of the power wires. You can also see that we removed the white plastic thing which joins the hand-crank handle to the main motor pulley (it's just a hole now).

Then you can join these two wires to the appropriate ones coming from the Gate pin and the Source pin on the MOSFET, as I showed in the picture above the serial plug diagram.

IMPORTANT: This diagram shows how it will be at the end of the serial cable which we will be using. Of course, the computer transmits pulses on pin 3, but it is switched round inside the serial cable so we receive it on pin 2, even with a Female-to-Female cable. If you are going to directly connect wires to the serial port on your computer, remember to use pin 3. Otherwise, the cable will switch it round for you so that you need to use pin 2 to get the pulses.

If you use the wrong pin (out of pin 2 and pin 3), you will not damage anything. It will just be annoying, because it won't work. If you are not sure about whether you should use pin 2 or pin 3, use pin 2, but don't make it impossible to remove the wire from that pin, in case it doesn't work. Completely finish following this guide, and if it doesn't work, then after checking connections, switch the wire from pin 2 to pin 3. When you're sure it works, you can secure the wire more firmly, e.g. solder it to the pin.

Secure the serial plug to the washing machine's cover. As you can see, we just used some sticky tape on the outside. It is very easy to do (and undo), doesn't look too bad (since it's transparent), and held it in place firmly.
By now, you should have all the circuits contained inside the washing machine!
- The power supply wires are coming in through a hole.
- The serial plug attached to a side of the machine.
- The motor secured to the cylindrical block behind the drum.
- Wires from the power supply, serial plug, motor and MOSFET all connected to each other.

Once you've got everything new installed and connected,
let's send some pulses through the serial cable! --> Section 6 - Controlling the motor