I'm playing with a wireless sensor device (with atmega, xbee, and Capacitive sensor (simple foil)) that works fine with the lab power supply but as soon as I try it with AA batteries stops working. Wireless communication and atmega seems to work fine, but de Capacitive sensor (I use and arduino CapSense library) dosn´t work. It seems to have something to do with the GROUND from Capacitive sensor
I've also tried supplying power directly to the battery box, so no wires seem out of place neither…
Any tipps, recomendations, or saviour tests?? Sorry if I ask a basic concept… I´m newbie…
EDIT: I reformulate ask and attach an image
Thanks,
Xavi
EDIT2: Thanks Ambiorix for explain me the problem on my circuit!
Best Answer
This CapSense library distinguishes between touch and no touch through the increase/decrease of the time delay caused by the series resistance and capacitance to the earth. This obviously requires the Arduino to be connected to the earth.
If you use a power supply the Arduino is either directly connected to the earth via the mains plug or via the stray capacitances through the PS, which are considerably higher than the sensor's capacitance to the earth. The stray capacitance between the battery and earth is far to low for this to work.
Solution: