user8024: For a project in progress, I have an Arduino UNO sending a message when a condition occurs, and a Raspberry Pi that listens to it. Both are fitted with NRF24L01+ modules with antennas.
It works perfectly when the Arduino is powered from a wall socket, for instance using a 9V / 1A power supply. But when I try it with a 9V battery (which is supposed to supply 600 mAh), the Raspberry Pi receives only 1/10 of the messages.
Could you tell me:

Why this happens
How I can solve this problem (software / wiring / capacitor / ...)
What would be the best way to power an Arduino whose only job is to detect that a switch closes, and emit a message over the air

Here is the code of the emitter (Arduino). And there is the code of the receiver (Raspberry Pi).
Thank you.

user8024: According to the datasheet of another 9V battery, I should not expect more than 30 - 50 mA of constant current. This is probably the reason why.
Long story made short: One can not power a NRFL01+ reliably with a 9V battery.
I'd be better off using 2xAA batteries.

8024: <p>For a project in progress, I have an Arduino UNO sending a message when a condition occurs, and a Raspberry Pi that listens to it. Both are fitted with NRF24L01+ modules with antennas.</p>

<p>It works perfectly when the Arduino is powered from a wall socket, for instance using a 9V / 1A power supply. But when I try it with a <a href="http://data.energizer.com/PDFs/6LR61PL_EU.pdf" rel="nofollow">9V battery</a> (which is supposed to supply 600 mAh), the Raspberry Pi receives only 1/10 of the messages.</p>

<p>Could you tell me:</p>

<ol>
<li>Why this happens</li>
<li>How I can solve this problem (software / wiring / capacitor / ...)</li>
<li>What would be the best way to power an Arduino whose only job is to detect that a switch closes, and emit a message over the air</li>
</ol>

<p><a href="http://pastebin.com/S0BvhiMr" rel="nofollow">Here</a> is the code of the emitter (Arduino). And <a href="http://pastebin.com/PgcCYxNc" rel="nofollow">there</a> is the code of the receiver (Raspberry Pi).</p>

<p>Thank you.</p>
 8024: <p>According to the <a href="http://data.energizer.com/PDFs/522.pdf" rel="nofollow">datasheet</a> of another 9V battery, I should not expect more than 30 - 50 mA of constant current. This is probably the reason why.</p>

<p>Long story made short: One can not power a NRFL01+ reliably with a 9V battery.
I'd be better off using 2xAA batteries.</p>
