Question: I'm planning to use a ACS712 current sense IC to sense motor-current in a project:

<http://www.allegromicro.com/~/Media/Files/Datasheets/ACS712-Datasheet.ashx>

The device I'm building uses a relay to control 230V to an electrical motor. I want to be able to deliver 2A to the motor. 

I want to sense the current to be able to give a ballpark power value, and also to be able to detect short circuit or open circuit.

I've heard that short-circuiting the 230V mains, even in a residential area, can possibly cause currents up to or above 1000 A. This of course means that a fuse in the building will blow.

However, even at 1000A, it may take some time for the fuse to blow. I'm worried (or convinced) that the ACS712 will be obliterated by a 1000A surge, even faster than the fuse can blow (a couple of milliseconds?).

What could I do to alleviate this? I could put a 10 ohm resistor in series with my motor, but that would still put approximately 20A through the resistor, and I'm worried that the resistor will burn out before a 10A fuse will. Also, the resistor would definitely burn during normal operation.

What would be the right way to solve this?

Answer: 
The trick with a computer fan is the *frequency of the PWM signal* - it has to be within bounds that the default Arduino PWM frequency is about 1/40th of.

Intel (probably) published [this datasheet](http://www.formfactors.org/developer/specs/4_Wire_PWM_Spec.pdf) on 4-wire fan control. Section 2.1.4 has the main business.

The current draw does *not* come from the PWM pin - the specification says it's 8mA maximum. A good Sanyo Denki 12V computer fan can eat 3 Amps through the 12V line! The Arduino could drive the PWM control by itself (although inverted), but I recommend an NPN BJT transistor or an N-channel MOSFET even for one fan, let alone four. All you need to do is connect the Base/Gate to the Arduino PWM pin (with a resistor, if it's an NPN transistor), Emitter/Source to ground, and Collector/Drain to the PWM wire on the fan.

You will of course need to up the PWM frequency on the Arduino to between 21 and 28kHz, and have a read through the rest of the aforementioned datasheet to find the minimum duty cycle. (Spoiler alert: it's actually specified by each fan's manufacturer, not the datasheet *per se*, but it can easily be determined throug trial and error.)

Suitable drivers are (off the top of my tired head):

BJT Transistors:
 - 2N3904 , BC548 , 2N2222;

MOSFETs:
 - 2N7000, 2N7002, BSS138, BS170.
You say the PWM pin works with 3 V, so this is probably a logic input. You may have damaged it by applying 12 V. However, as long as it still works, all you need to to (apparently from your description) is to drive the fan PWM pin from a PWM output of your microcontroller. The circuitry inside the fan takes care of the rest. No power switching is needed on your end.