Hi there,
I think I have a grounding problem with my Arduino, but I don't know exactly where to start with the solution. A metal touch sensor is connected to the Arduino, when touched an audio file is played. All this works fine as long as the Arduino is connected to the computer via USB. As soon as I work with a Powerbank or 9V battery, the sensor doesn't react anymore. Any ideas? Thanks for your help!!
As soon as I work with a Powerbank or 9V battery, the sensor doesn't react anymore
All I can suggest is make sure every device has a common ground connection.
I have seen this kind of behavior before but don't recall the root cause.
I would consider a battery powered circuit to be more stable or robust than one running off a computer
USB cable.
I don't think the audio file should be included in the equation because it is controlled by arduino which is
reading the touch sensor. Focus on the touch sensor. Collect voltage data.
A touch sensor doesn't work without a (large) ground plane nearby.
The ground plane must be connected to sensor (or Arduino) ground.
Post a picture of the actual setup.
Leo..
It works when connected to the USB because your computer is that ground plane. We get this problem quite regularly.
You can use foil to make your ground plane and connect to it with screw connections. It is best if this ground surrounds your touch sensor, or runs along side it.
Ground plane has nothing to do with it.
The touch switch picks up the residual 60Hz RF floating around the environment. This is the hum you hear when you touch the input to an audio amplifier to your finger. A touch pad (not a capacitive pad, that's a different technology) simply detects that same hum and turns on a transistor or FET. If you connect your switch ground to your PC ground (or any outlet ground) it will probably work again.
SteveMann:
Ground plane has nothing to do with it.
You're absolutely right. Should have asked how/what OP was sensing.
Mains/hum based sensors don't need a ground plane.
But most touch sensors (breakout boards) are capacitive, and they do need a ground plane.
Leo..
The touch switch picks up the residual 60Hz RF floating around the environment.
So it is acting as a radio receiver in that case. A radio receiver works best with a ground connection. Without one it is many many times less sensitive.
We get these questions about working on computer power but not batteries regularly.
The OP has added some photographs to the first post, in contravention of the rules in the how to use this forum sticky post.
A simple experiment to test this is to run it off batteries and wire an extra ground to the case of your computer.
Thanks for helping out! So I did wire a ground pin to the case of my computer and it‘s running fine again. Does that mean there is no chance to exhibit the sculpture (shown in the original post) without a big cable coming out of the pedestal being plugged in?
No it means you try what was said in reply #3.
Maybe a plate underneath the sculpture but electricity isolated from it connected to ground
Grumpy_Mike:
Maybe a plate underneath the sculpture but electricity isolated from it connected to ground
Actually, it is not necessary to use a plate.
The same area of conductive mesh ("chicken wire") would do as well.
Paul__B:
Actually, it is not necessary to use a plate.The same area of conductive mesh ("chicken wire") would do as well.
Yes but a plate would look better in an art gallery.
snirtb:
Thanks for helping out! So I did wire a ground pin to the case of my computer and it‘s running fine again. Does that mean there is no chance to exhibit the sculpture (shown in the original post) without a big cable coming out of the pedestal being plugged in?
A pretty thin wire leading along the edge of the floor to a nearby water pipe or so will make an excellent ground, and when done properly is just about completely invisible. Maybe even the wire itself if long enough can act as sufficiently good ground.
Grumpy_Mike:
Yes but a plate would look better in an art gallery.
Maybe, but chicken wire has more texture - I think it could easily be just as "arty" appropriate.
wvmarle:
Maybe even the wire itself if long enough can act as sufficiently good ground.
Which is the point about the chicken wire.
Paul__B:
Which is the point about the chicken wire.
I know that. Just giving OP another suggestion, something that's a bit easier to hide.
They could turn the stand itself into a ground: cover it in conductive paint, or a painted layer of aluminium foil, or simply a complete metal stand.
As long as whatever is connected to it as ground offers sufficient capacitance it'll do just fine.
Did you have a look at the pictures OP added to the original post.
I see some transitor added to a board with a threshold detector.
So no capacitive touch, and there might not be a big need for a ground plane.
The setup is just mains hum detection, and there might not be a lot of mains wiring near.
Analogue as well as digital of the board is connected to the Arduino.
We didn't see any code yet, so what is used, and how.
Leo..
The TTP223 based capacitive touch sensors also seem to do quite well without a large ground plane.
They seem to calibrate to the static capacitance of the sensor on power-up.
Not sure if they can work with large objects like the one pictured.
Leo..
Ah! Must confess, I didn't notice the pictures in the first post.
'
Well, the silly blunder here is the length of wire between whatever "touch" sensor it is or is not. That is making it the ground instead of the sensor; with no ground "ground", it would only work if you touch the Arduino instead of the object.
The most important part of the touch sensor (apart from the ground) is the connection from IC to sensor plate. It must be as short as possible. It is possible - but troublesome - if it is longer, for it to be shielded cable (or in fact, coaxial cable, which is different and has a lower capacitance) but the sensor must be calibrated to match.
The sensor in this case should be directly under the art object, connected by a very short wire through the pedestal. If that plate under the art object is conductive, it should be insulated from the object and used as the ground connection. If it is not conductive, great! Put the chicken wire underneath it!
Further research has been most fascinating.
Wawa:
Did you have a look at the pictures OP added to the original post.
Only just now, with my post just above.
Wawa:
I see some transistor added to a board with a threshold detector.
So no capacitive touch, and there might not be a big need for a ground plane.
The setup is just mains hum detection, and there might not be a lot of mains wiring near.
So I firstly (starting with lowest price of course ) found this advertised as "Touch Sensor Capacitive Touch Switch Module DIY for Arduino Digital TTP223B Z4S3"
What is firstly fascinating is that it has a microphone attached and no part seems to resemble a TTP223B (it's an LM393).
Next candidate entitled "1Pc Metal Touch Sensor Module KY-036 Human Body Touch Sensor A MD JCAU".
Oh look! Another LM393.
Some TO-92 device with a missing middle pin connected to terminals labelled "S" and "G". Wonder how this is supposed to work? Temperature sensor perhaps? Or a FET?
Final candidate, titled "1pcs KY-036 Metal Touch Sensor Module For Arduino AVR PIC". Tests for metal this time.
Similar to, but not quite identical to the last. Also has the white blotch underneath. Almost certainly a LM393 in the shadow.
This one is in the OP's picture. Presumably is a transistor or FET, no instructions (there) as to how to use it or how it works, but OK, further research, it is a KY-036 module, the device is a Darlington.
So what are those other boards then?
Mains hum detectors like that also must also include ESD protection.
One zap, and that darlington is toast.
Leo..