Running Power through a capacitive sensor

Hi,

I am working on a lamp with a capacitive sensor to turn it on/off using the Capacitive Sensing Library (although I do not NEED to us the library, I just happen to be using it at the moment). The lamp has a steel braided coaxial cable to run power to it and I am wondering if there is a way I can run the 12V DC to the LED lamp through the same piece of metal that I do the touch sensing through?

I haven't fully wrapped my head around how the capacitive sensor library works, but I dug through the code and it seems to simply set a state of one of the pins and then wait until that state is matched on the other pin.

I understand the library is not set up to do this but I am wondering if there is a way that I can either change the range of the signal (via hardware; resistors, transistors etc) so that the electrical signal could be filtered out or if there could be a way to isolate it from the capacitive signal with some sort of frequency shift?

I have looked around but haven't found much on this so any input would be much appreciated.

Thank you.

schematic ?

All I've got at the moment is a pencil and paper, so attached is a rough drawing of what I am thinking.

I would like to be able to touch either the live or ground on the LED circuit to turn the light on/off.

Thanks.

Why do want to do this ? What are you trying to accomplish ?

It doesn't make sense to connect a led like that when you have a microcontroller that is capable of much more than driving leds . Why do you want to do that ?

(and your led is missing a resistor)

I have a series of 12V led lights, and they are hung by 2-line braided coaxial cables. I would like to be able to touch the line that they are hung from (which is also a one of the conductors) to turn the lights on/off. the LED's are on a separate circuit from the arduino, and the only metal I have access to is the cable they are hung from.

No . You can't do it that way. You have use the arduino to drive a mosfet or relay when the touch sensor is detected.

You schematic does not show what would switch the leds on or off.
I hope your weren't thinking the touch sensor would do that .

You haven't posted any code.
You haven't stated whether or not you have tested the touch sensor.

This statement :

I understand the library is not set up to do this but I am wondering if there is a way that I can either change the range of the signal (via hardware; resistors, transistors etc) so that the electrical signal could be filtered out or if there could be a way to isolate it from the capacitive signal with some sort of frequency shift?

makes no sense. If the capacitive touch sensor works then why not simply switch the led string with a mosfet after the capacitive sense code detects it ? You say you don't need to use the library but based on the above comment you clearly do need to use it. There is no way you can switch the leds with the circuit you posted. It doesn't even contain a switching device (mosfet,transistor , relay) .

Apologies, the schematic only shows a portion of the system, that's my fault. The arduino would toggle a relay to the 12v line which would switch the LEDs on/off.

What I want is to get a signal from touching the steel coax cable that the lights are hung from by touching it.

Post a schematic of just the touch sensor without the led strings.

It's just the upper portion of the schematic I sent earlier, you can see it used in a tutorial here: https://rmit.instructure.com/courses/47702/pages/making-a-capacitive-sensor

The difference is I want to run current through the capacitive sensor line and still be able to detect a touch.

No. You can't have 12V anywhere near the arduino inputs .
I have not seen you use the expression "electrical isolation" so what I see in the schematic is 12V
connected to the capacitive sensor.

I don't need to run the 12v to the arduino pins; the line that detects capacitance could be spliced onto the 12v line, and reduce the voltage to a more managable level before going into the arduino pin, it would just need to filter out the noise from the 12v DC current going past it to the LED lights. I'm just not sure how that could be achieved, or if the noise is consistent enough to be filtered out reliably.

Hence the "?" in my sketch.

You are not explaining what the electrical connection is between the capacitive sensor and the 12V.
Either it is connected, or it is isolated. Your use of the word 'filter' has no meaning based on what you have presented. I don't know what you the word 'filter' means to you . Can you explain what kind of filter you are speaking of ?

I don't need to run the 12v to the arduino pins; the line that detects capacitance could be spliced onto the 12v line, and reduce the voltage to a more managable level before going into the arduino pin, it would just need to filter out the noise from the 12v DC current going past it to the LED lights

The lamp has a steel braided coaxial cable to run power to it and I am wondering if there is a way I can run the 12V DC to the LED lamp through the same piece of metal that I do the touch sensing through?

This question does not answer the question of whether or not the connection from the steel braid is at 12V potential. Is it ? Or is it isolated ?


You make it sound so simple but I still don't know what you mean. Either the 12V is connected or it is not.
which is it ?

The 12v would be connected to the pin, but by "connected" I don't necessarily mean directly, there would need to be something in between to drop the voltage before it got to the arduino, and it may also need to even out noise from the 12v DC current, but I don't know.

An idea might be piggybacking a low voltage signal onto a PWM signal to the LED that the arduino could pull timing data from, but I don't know enough about the Capacitive Sensing Library to know how to do that.

I am wondering if there is a way I can run the 12V DC to the LED lamp through the same piece of metal that I do the touch sensing through?

The short answer is NO. Capacitive sensing requires high-impedance and power (or regular "signals") are low-impedance.

An idea might be piggybacking a low voltage signal onto a PWM signal to the LED that the arduino could pull timing data from, but I don't know enough about the Capacitive Sensing Library to know how to do that.

You've been watching too much TV.

You can't connect the 12V to the arduino capacitive sensor.
I don't understand why you are calling it 12V if it is simply the braid of the cable insulation.
No led string is going have 12V on the outside of the cable. That's just stupid , so why are you calling
it 12V ?

There are plenty of high end lighting companies selling lights with exposed conductive lines. The light set I am working on uses the exposed braid of the cable to run the live 12v through it, while the ground runs through an insulated core.

I'll agree, it's probably not the smartest thing, but these are passing UL and UR certification all the time, so they obviously seem to think it's safe enough.

And I currently have the 12v line running to the lamp with a splice running to a resistor and then to the arduino capacitive line, there is just noise from the PWM signal, and I am wondering how I can filter it out via hardware, or software, or if there might be a more creative solution.

It's called a Low Pass filter