Bed lights LED strip with capacitive touch control?

Hi! This is my first project, more than fiddling with the Sparkfun kit, and I want to build a bed light, using an 1.8m addressable LED strip hidden inside a diffuse white plastic rail to use above my beds as reading lights.

Connected to an Arduino I'll make a simple sketch to let the LED strip toggle between different modes, like light over bed 1, light for bed 2, or light over all.

I'm trying to figure out how to make a capacitive wire inside the rail to be able to send commands to the Arduino.

Is it possible to roughly detect where on the wire it was touched? Would that make it possible to tap and slide, to start the light, and increase/decrease the brightness?

The coding is no problem and I saw the CapSense library which seems good for this.

But what about the hardware? Is there any RGBW (warm) strips that have a capacitive function embedded? Or could I just put an cable inside of the rail?

Or are there any other cool ways of controlling it? I first thought of a remote but it will probably get lost in the bed, and touch seems much cooler, if it's not very prone to failing..

All feedback is greatly appreciated!

nicmar:
Is it possible to roughly detect where on the wire it was touched?

Nope, there are chips that can do more advance touch control but they do need a more complex touch area.

nicmar:
The coding is no problem and I saw the CapSense library which seems good for this.

That works pretty decent but only gives you touched or not touched. But you can have multiple of those (each side of the bed for example) and detect more complex things. Like tap, long touch, double tap etc. I once made simple kitchen cabinet downlights with a touch control. Tap for on/off, long press while off turned it on dim and long touch while on faded it up and down until you let go. Just an example :slight_smile:

nicmar:
But what about the hardware? Is there any RGBW (warm) strips that have a capacitive function embedded?

Not that I know of. And I don't even know about addressable strips with warm white combined.

nicmar:
Or could I just put an cable inside of the rail?

It's a bit more complex and it does take some testing to get it all right.

nicmar:
Or are there any other cool ways of controlling it? I first thought of a remote but it will probably get lost in the bed, and touch seems much cooler, if it's not very prone to failing..

Touch is indeed a pretty elegant and straight forward method. Maybe make multiple buttons? Display? Or you could use one of those gesture detecting IC's. Then you can do all sorts of hand waving to turn them on/off/change modes.

Thanks for the reply. I want it to be as discreet as possible, hopefully a rail like 18x8 mm or so on the wall. We have a slanted wall/roof behind the beds, so in the corner of the slant would be good.

So I think it wouldn't be as clean if there will be buttons and sensors. It's ok to just tap anywhere to switch modes, and hold to dim like you wrote, if what I'm imagining isn't possible.

Someone on reddit proposed pneumatic pressure sensors and the LED strip inside a sealed tube. Not sure if that's easier or more stable.

I want it to be simple and stable rather than advanced and working 30% of the time :stuck_out_tongue:

As I'm a noob, especially in electronics, I want it to be pretty simple to build. The software side is no problem, and a lot more fun for me :slight_smile:

I was talking about touch buttons, which can be as flat as half a mm. And even a display or a sensor can be integrated very nice. But it does depend on the application. Did you see the video?

And a pneumatic tube, sounds interesting but it does not sound easy. And you still have the problem, how do you know the position?

And with touch, it all depends on the material, length etc. The CapSens library isn't very exact nor in making a large object (like the whole rail) touch sensitive. So it's a matter of trying. I just used a piece of PCB (the one filled with copper to etch) with a layer of plastic.

nicmar:
I want it to be simple and stable rather than advanced and working 30% of the time :stuck_out_tongue:
As I'm a noob, especially in electronics, I want it to be pretty simple to build.

Then I would go for simple touch pads like I did :slight_smile:

Ah, now I saw the video. Looks nice!

But I'm not quite sure what the touch pad exactly is made of? If it's just a PCB, how do you close the circuit by touching it? Sorry for noob questions, but this is all new to me :slight_smile:

I will probably have this above the headboard of the bed, so it might not be very visible, so touching anywhere on the LED rail would be a bit easier. But if I can make the button white, and 0.5mm thick, it would proabably be ok, as long as I can find it in the dark.. :slight_smile:

But if the LED rail is aluminum, except for the transparent plastic, couldn't I use that to close a circuit? Or is that the same as a capacitive wire inside?

It's just a PCB yeah. And it's not "closing"anything, that plate is connected to the CapSense library (or a PIC port I made actually).

I used a pieces of PCB with photo resist on it which is covered in foil. I don't need the photo resist but I did find out it worked more reliable if I could not touch the copper/conductor directly. You could do the same with normal copper PCB and tape, foil or even white (spray) paint should work. Or you could design a PCB with soldermask which is even fancier but then I would switch to a dedicated touch IC as well. More reliable (although CapSens works fine under the cabinets) and more possibilities (including sliders). But, it is more work / not as simple.

Maybe you can use the alu rail but like I said, I found it to work better if you can't touch the conductor itself. And also, large area's might be harder to make work reliable then a small-ish pad.

Thanks, I'll think I'll try and check some youtube videos on how to construct this. The more I read, the more I realize how much I suck at this.. but hopefully it will work :slight_smile: