Automatic rainbow nightlight  (Veilleuse "arc en ciel" automatique)

Automatic rainbow nightlight (Veilleuse "arc en ciel" automatique)

thingiverse

Night Light in LED RGB with Automatic Detection of Presence and Light Fading Through Every Color of the Rainbow. This device features automatic detection of presence and light fading through every color of the rainbow. It also has a regulation of the threshold of detection according to the ambient light level. The electronics are driven by an Arduino Nano. The plan for this project is outlined below. Printer Settings * Printer: Vertex K4800 * Rafts: Doesn't Matter * Supports: Doesn't Matter * Resolution: 0.15 * Infill: 45% * Notes: Designed with FreeCAD and printed in PLA Post-Printing How I Designed This This night light is very practical to use at night in the bathroom to avoid being woken up by switching on the light. Custom Section The power supply voltage (5v) is supplied by a USB charger connected to the sector. The hull has been removed and the USB plug unsoldered. Arduino Code /* ***** Night Light RGB, called "Rainbow Night Light" auth: Yves Le Chevalier, 18/12/2016 Works only in darkness based on presence detection Turns on a LED RGB that automatically cycles through colors of the rainbow Config: Arduino Nano board + LDR70 photoresistance + LED RGB with common cathode + PIR infrared detector + 1 4.6kΩ resistor + 3 220Ω resistors Pin assignments: A0 = Input from photoresistance LDR720 A1 = Input for ambient light sensitivity adjustment D3 = PWM output to blue LED D5 = PWM output to green LED D6 = PWM output to red LED D9 = Input from infrared detection signal **** */ // NOTE REPLACE % by # (changed because of constraints of this site) // REMPLACER les % par # (modifié a cause des contrainte de ce site) %define rouge 6 %define vert 5 %define bleu 3 %define pir 9 // pin reception states from PIR %define tempo 30 // delay between each color modulation int i = 0; int j = 0; int qlum = 0; int pot = 0; void setup() { // Serial.begin(9600); pinMode(pir, INPUT); // presence detector pinMode(vert, OUTPUT); pinMode(bleu, OUTPUT); pinMode(rouge, OUTPUT); analogWrite(vert, 0); // LED turned off by default analogWrite(bleu, 0); analogWrite(rouge, 0); } void loop() { pot = analogRead(A1); // measure ambient light sensitivity adjustment pot = constrain(pot, 80, 900); // because returned value is always > 70 pot = map(pot, 80, 900, 25, 1024); // spread between low darkness (70) and high darkness (900) ...

Download Model from thingiverse

With this file you will be able to print Automatic rainbow nightlight (Veilleuse "arc en ciel" automatique) with your 3D printer. Click on the button and save the file on your computer to work, edit or customize your design. You can also find more 3D designs for printers on Automatic rainbow nightlight (Veilleuse "arc en ciel" automatique).