Dimmable LED kitchen light (Arduino, APDS-9960, RGBWW led)
-
-
https://youtu.be/sNI6H9fURsY
(wasn't able to add the video on the OpenHardware side)
-
-
@mfalkvidd excellent, nice work
-
Wow! That's nice!
-
Love it. Have you tried the APDS-9930? I have them laying around, but haven't got time to try them
-
@TheoL I didn't know they existed. What's the difference?
-
@mfalkvidd a video with cool 8 bit music nice
-
Great looking light setup...... now if you could just get the the sensor to control the kids as well I might be able to get them to do the washing up too.
-
@mfalkvidd Haven't checked all details. But for most less accurate but much cheaper. I believe I paid about 8 times less for the 9930 an aliexpress.
-
@mfalkvidd - Nice work.
Q: How close to the sensor does your hand need to be? and can this distance be controlled?
-
Great project, I have ordered a 9960 and I can't wait to receive it and play with it, this could be a good start.
@TheoL said:
@mfalkvidd Haven't checked all details. But for most less accurate but much cheaper. I believe I paid about 8 times less for the 9930 an aliexpress.
I didn't know about this one, thank you about the information ! From what I see quickly the 9930 is only a proximity detection sensor, it cannot sense movement like the 9960. It can sense distance so it could be used for this application but it has shorter range, 10cm instead of 10 to 20 for the 9960.
-
Could this also have been done using a ultrasonic distance sensor?
-
@gregl said:
@mfalkvidd - Nice work.
Q: How close to the sensor does your hand need to be? and can this distance be controlled?The sensor starts registering at about 25cm/10in distance and reports maximum proximity at about 5cm/2in (anything closer than that results in a reading of 255).
setProximityGain might affect this, but I haven't tried.
-
@Cliff-Karlsson said:
Could this also have been done using a ultrasonic distance sensor?
My experience with the HC-SR04 is that consecutive readings vary too much. A smoothening algorithm (take the median of 5 readings for example) might work, but one reading of the HC-SR04 takes 60 ms which already is 3 times longer than the sample rate I use for the ADPS-9960 so the dimming would probably "stutter" a lot. The speed of sound is simply too slow
-
@mfalkvidd - Great work! This is exactly what I had in mind - now i can follow this great example and spare me some hours! Thanks!
-
I would like to remove the need for holding still to "lock" the light level, but it is a bit hard since the sensor will get several readings while I remove my hand which will set the light level at all sorts of values.
Setting a timeout that "resets" the level to an earlier value when the sensor stops detecting should be possible, but will require some experimenting to get right.
Implementing a PID regulator might be useful as well, but would require revisiting some long forgotten math skills.
-
@mfalkvidd Nice project man!
Did you consider protecting the sensor somehow from direct air contact? Kitchen stuff stends to get real greasy over time...
-
@Yveaux said:
@mfalkvidd Nice project man!
Did you consider protecting the sensor somehow from direct air contact? Kitchen stuff stends to get real greasy over time...Thanks!
I did not consider that. I think the sensor will sense transparent plastic and glass but I haven't tested, so maybe it is possible to put some protection in front of it.
-
@mfalkvidd I have so far not been able to cover the sensor. It's very sensitive. So if somebody knows a material that can cover the sensor while keeping it operating, I'll be be much obliged.
-
@mfalkvidd
I have played a lot with 9960 few weeks ago, as I have a project with it, I will show you maybe..- theoretically 9960 is better than 9930. If you look at datasheet of 9930 it's mentioned as proximity (no gesture engine in it). whereas 9960 is.
- sometimes I had to tweak few offsets in lib for sensitivity or thresholds (on my side, because there is a very nasty while loop in the gesture process..)
- for covering it, you need a material with 80% min of IR transmittance or it won't work well or not at all..
So with this kind of sensor, without a special material, you need a hole (enough large, see datasheet).
-
@scalz said:
- for covering it, you need a material with 80% min of IR transmittance or it won't work well or not at all..
And the datasheet says 1mm thickness maximum for the glass/plastic and also 1mm maximum air gap between sensor and glass. They also suggest if you put a glass to put a rubber layer with just two holes for the led (1.5mm) and the photodetector (2mm) to avoid crosstalk (reflection of the IR light from the led will generate fake proximity or movement detections).
In short it sounds much easier to not use a cover, or else to make a "big" hole for the full sensor size.
-
@Nca78 i think behind a glass plate it's less reliable, even if using rubber layer because this sensor can be sensitive to light fluctuations etc, imho not the best sensor behing a glass plate but i have not run so much attempts on covering it, so..
but it's a fun sensor
-
With the cost of the sensor down to $7.40 (from $15 when I first bought one) and even lower when buying multiple sensors I think it is better to just replace the sensor when it becomes too dirty.
-
Today I learned that the APDS-9960 will detect steam. The kitchen went dark when I poured up boiling pasta and the steam ventured under the sensor. Exciting times
-
@mfalkvidd said:
APDS-9960 will detect steam
More general, it will detect heat (IR radiation), so putting your toaster below it might also turn the lights off (dark-roasting :metal: )
-
Haha, funny story @mfalkvidd!
-
Special welcome to all Adafruit fans. (Adafruit covered this project on their blog yesterday: https://blog.adafruit.com/2016/11/21/gesture-controlled-dimmable-led-light-using-arduino-apds-9960-sensor-arduinomonday/ )
-
@TheoL said in Dimmable LED kitchen light (Arduino, APDS-9960, RGBWW led):
@mfalkvidd I have so far not been able to cover the sensor. It's very sensitive. So if somebody knows a material that can cover the sensor while keeping it operating, I'll be be much obliged.
I'm trying with food wrap on a 9930 and it doesn't seem to affect the measurements much, as long as it's tight on the sensor.
-
@mfalkvidd do you have any MySensors version of this sketch, that can be remotely controlled, or should I make one ?
-
@Nca78 I haven't had a need for remot control so I haven't made one.
Have been thinking about making it possible to control color remotely (the UX managing color with the gesture sensor would be a bit complicated, so an app or web interface could make sense) but it would be more of a gimmick than something I really needso it is pretty low on my priority list.
-
@Nca78 I'm also using 9930 and it is quite insensitive to transparent stuff, even partly transparent plastic cover. I am now finishing my kitchen and plan to put the sensor behind the milky plasic cover of the led aluminium profile, then drill the small hole for the ir diodes and cover the hole with fully transparent plastic. I made the prototype like this and it is working very well, but didn't test with the steam yet ...
-
@rozpruwacz said in Dimmable LED kitchen light (Arduino, APDS-9960, RGBWW led):
@Nca78 I'm also using 9930 and it is quite insensitive to transparent stuff, even partly transparent plastic cover. I am now finishing my kitchen and plan to put the sensor behind the milky plasic cover of the led aluminium profile, then drill the small hole for the ir diodes and cover the hole with fully transparent plastic. I made the prototype like this and it is working very well, but didn't test with the steam yet ...
Did you manage to get reliable data with the 9930 ? It's fluctuating too much to allow the same behavior than what mfalkvidd implemented, so I just split the range in 2 areas "up" and "down" with a "neutral" area in the middle to implement some threshold to go in/out of the up and down zones.
I'm waiting for some very cheap "9960" from AliExpress, that I suspect will be some 9930, but if they are not then I will give up on this sensor as the price difference is very low now and is not worth the compromises.
-
i'm just using it as on/off switch and it is working perfectly. I also made some limited tests with the steam and has no issues with it.
-
I can now confirm that the apds 9930 module works without any issues. no steam problem so far and the module is located next to the stove. Here are some pictures
-
@rozpruwacz said in Dimmable LED kitchen light (Arduino, APDS-9960, RGBWW led):
i'm just using it as on/off switch and it is working perfectly. I also made some limited tests with the steam and has no issues with it.
Do you use a relay to control the leds or still a MOSFET ?
-
@Nca78 said in Dimmable LED kitchen light (Arduino, APDS-9960, RGBWW led):
Do you use a relay to control the leds or still a MOSFET ?
i'm using mosfets.