In my current project, I need to detect when someone touches a piece of metal (which I already have).
To do that, I use the CapacitiveSensor library with my Arduino. It works well while I'm using the USB power supply, but as soon as I switch to my real power supply (a 5V AC DC adapter), the feature is completely broken.
I came to the conclusion that this happens because the ground I have (which is the "real" Earth) is not the same as the Arduino's one, so the whole mechanism is broken.
First of all, is there any workaround for that ? I tried switching resistors (from 1 MOhm to 330kOhm, but also by randomly adding a 100pF ceramic capacitor in series with the resistor and it kind of works, but I don't know why and I don't like it).
Carrying on in my searches, I found this, which I already had (Gravity: Digital Capacitive Touch Sensor For Arduino -DFRobot). It's a touch sensor, and it's also working when I'm using my AC DC adapter.
Does anyone know how such a thing works? Could I adapt the circuit (schematic here : http://www.dfrobot.com.cn/images/upload/File/DFR0030/20140825132741ztc9n2.pdf) to my project to bypass my grounding issue?
Thanks for any help