Where is the flaw in this machine that decreases the entropy of a closed system? I was thinking about a completely unrelated problem (Quantum Field Theory Peskin & Schroeder kind of unrelated!) when the diagram below sprang into my mind for no apparent reason. After some thinking, I can't figure out why it wouldn't work, other than the theoretical reason that it systematically decreases entropy in a closed system:
 
We have a thick, insulating barrier between two "ventricles" of a closed-off system. The only opening in this barrier is made by a solid shaft snugly (without permitting the transfer of heat between the two compartments) but frictionlessly. On the left ventricle we have a paddle attached, and on the right we have a coiled wire, as illustrated in the diagram. There are fixed magnets surrounding the coil of wire, providing a constant magnetic field through it.  
Let's say the whole contraption is so small that a single air molecule hitting the paddle will contribute a small but not immaterial amount of angular momentum to the shaft (again, I never said this machine was practical!). Therefore, random chance will make air molecules hit the paddle so that it will start turning in Brownian-motion style. This rotation is damped by the energy dissipated when the coil turns the current induced by the magnets moving relative to the turning reference frame of the coil into heat through a resistor in the coil. Thus, the air molecules contribute a small portion of their kinetic energy to the paddle, which is then expended as heat on the other side of the border, making the air molecules on the left colder, while air molecules on the right heat up. 
Doesn't this mean a decrease in entropy? (To see that it can't be an increase in entropy, take away the barrier, and note that the molecules go back to thermal equilibrium naturally, meaning that entropy increases naturally when undoing our actions).  
To further show this mythical contraption to be an impossibility, we could create a barrier with two pieces of equipment forming a passage between the two ventricles. One port-hole of energy would be the paddle already envisioned, the other would be a Carnot engine taking energy from the hot right to the cold left. The paddle would take energy from the left to the right effortlessly for a period of time, and then the Carnot engine would move the heat back the other way, gaining energy that came from nowhere in the process!!  
Where has my logic gone wrong? Clearly entropy must not decrease, and energy cannot be created by the fundamental axioms of physics. Why does this paddle fail to transfer energy from one ventricle to the other? An explanation of what has gone wrong with my reasoning would be greatly appreciated!
 A: 
Thus, the air molecules contribute a small portion of their kinetic energy to the paddle, which is then expended as heat on the other side of the border, making the air molecules on the left colder, while air molecules on the right heat up. Doesn't this mean a decrease in entropy?

Yes it does.
However, we need to take the thermal noise of the resistor into account.
Hot resistors make noise
As discovered by John B. Johnson in 1928 and theoretically explained by Harry Nyquist, a resistor at temperature $T$ exhibits a non-zero open circuit voltage.
This voltage is stochastic and characterized by a (single sided) spectral density
$$S_V(f) = 4 k_b T R \frac{h f / k_b T}{\exp \left(h f / k_b T \right) - 1} \, . \tag{1}$$
At room temperature we find $k_b T / h = 6 \times 10^{12} \, \text{Hz}$, which is a ridiculously high frequency for electrical systems.
Therefore, for the loop of wire and resistor circuit in the device under consideration, we can roughly assume that
$$\exp(h f / k_b T) \approx 1 + h f /k_b T$$
so that
$$S_V(f) \approx 4 k_b T R \tag{2}$$
which we traditionally call the "Johnson noise" formula.
If we short circuit the resistor as in the diagram where its ends are connected by a simple wire, then the current noise spectral density is (just divide by $R^2$)
$$S_I(f) = 4 k_b T / R \, .\tag{3}$$
Another way to think about this is that the resistor generates random current which is Gaussian distributed with standard deviation $\sigma_I = \sqrt{4 k_b T B / R}$ where $B$ is the bandwidth of whatever circuit is connected to the resistor.
Johnson noise keeps the system in equilibrium
Anyway, the point is that the little resistor in the machine actually generates random currents in the wire!
These little currents cause the rod to twist back and forth for exactly the same reason that the twists in the rod induced by air molecules crashing into the paddles caused currents in the resistor (i.e. Faraday's law).
Therefore, the thermal noise of the resistor shakes the paddles and heats up the air.
So, while heat travels from the air on the left side to the resistor on the right, precisely the opposite process also occurs: heat travels from the resistor on the right to the air on the left.
The heat flow is always occurring in both directions.
By definition, in equilibrium the left-to-right flow has the same magnitude as the right-to-left flow and both sides just sit at equal temperature; no entropy flows from one side to the other.
Fluctuation-dissipation
Note that the resistor is both dissipative and noisy.
The resistance $R$ means that the resistor turns current/voltage into heat; the power dissipated by a resistor is
$$P = I^2 R = V^2 / R \, . \tag{4}$$
The noise is characterized by a spectral density given in Eq. (1).
Note the conspicuous appearance of the dissipation parameter $R$ in the spectral density.
This is no accident.
There is a profound link between dissipation and noise in all physical systems.
Using thermodynamics (or actually even quantum mechanics!) one can prove that any physical system which acts as a dissipator of energy must also be noisy.
The link between noisy fluctuations and dissipation is described by the fluctuation-dissipation theorem, which is one of the most interesting laws in all of physics.
The machine originally looked like it moved entropy from the left to the right because we assumed the resistor was dissipative without being noisy, but as explained via the fluctuation-dissipation theorem this is entirely impossible; all dissipative systems exhibit noisy fluctuations.
P.S. I really, really like this question.
A: The reason the "machine,"as designed, will not work, is that the paddle is not being hit by only one particle, on one quarter of its surface! Since it is being hit by several particles, "equally" on all 4 surfaces (two top and two bottom), there will be no net rotation of the shaft, thus no current generated. If the length of the paddle is made equal or less than the diameter of the particle (to exclude other particles), no current will be generated because the particles will be hitting the shaft, thus no net shaft rotation. If you control the direction of the particles, then it will work, by aiming the particles at one of the 4 paddle surfaces. 
A: This (ideal) device is a small variation of Maxwell's demon.
It is believed that Maxwell's demon violates the second law by decreasing the entropy of the universe (isolated system). However, that is not true; Maxwell's demon violates the first law of thermodynamics. See my article http://vixra.org/abs/1310.0181.
Your machine leads to violation of the principle of 'Perpetual motion of the first kind'. 
What I mean by the above is this: Energy can be extracted in the form of mechanical work form a system when there exist between two points in the system, differences in any intensive property of the system. However, if we could extract mechanical work from a system which has uniform values for intensive properties, then we would violate the principle of 'Perpetual motion of the first kind'. This is impossible. 
Your machine (device) makes it possible to extract mechanical work from an isolated (you call it closed) system which is at a uniform temperature through out, thereby leading to violation of the 'principle of 'Perpetual motion of the first kind'.This is the reason your machine does not work.
Radhakrishnamurty Padyala
