474
Smart plinth 1.0
I attend to one problem - the dark hallway on the way from the bedroom to the kitchen. Well, you know, I love to go to the kitchen at night, but in the dark, uncomfortable, and because Corridor width relatively long enough, chances of deviation from the route when navigating over head built in gyroscope. The error is accumulated, and even the legs of different lengths, walked with outstretched hands and hit the doorway not the first time.
Yes, of course there are all kinds of lamp, motion sensors, smart homes, but I have the better I have a plastic plinth with cable channel.
Therefore, the idea to push the LED tape and see how it will feel yourself there and it turned out, you know, pretty cool, podsvetochka such as in spacecraft.
Well, more of course - ARDUINO! And what for? And to Smart! Ordered Ali 2 of the motion sensor and the work went.
Do not work of course, but fun. The motion sensor has been selected without trying and I, as always lucky, it fit perfectly in the plinth. Two sensors are needed to put them on the two ends of the baseboards, and in fact need to go back to the kitchen.
Pinout Sensor Chinese somehow made under the lens. The range of supply voltages 4, 5-20V, output: 3, 3B - is movement, 0V - no movement. There is one jumper and two trimmer, did not understand, because By default, all worked fine. Still, when all assembled and connected in parallel 2 outputs sensor voltage when driving it was about 1, 5B. I think that this can not be done, and it was necessary to put the diodes, but was reluctant to re-assort, moreover, that this output has been led to the ADC.
The tape is controlled Polevikov IRFZ34N, because this lay. Of course it does not open fully five volts, but with my band, which consumes about 1A at 12V it copes without heating.
Photoresistor was taken cheap Chinese.
The program is simple, with this logic: if the light is below a certain threshold, it is highlighted, turn smoothly and after a time delay switch off smoothly. If, during the luminescence detected motion again, we consider the delay anew. Illumination do not measure when the light, because ambient light sensor is lighted by skirting
& lt;. code class = "cs" & gt; int ledPin = 5; LED Strip // int lightSensorPin = A7; Photoresistor // int motionSensorPin = A0; // Motion sensor int val = 0; // Brightness tape int light = 0; Illumination // int motion = 0; Movement // int timerCounter = 0; // Rhymes time int timerEnable = false; // Start on cycle int timeOn = 8; // Start-up time in seconds int faderEnable = false; // Enables extinguished int lightEnable = false; // Enable lighting void setup () {pinMode (ledPin, OUTPUT); Serial.begin (9600); } Void loop () {analogWrite (ledPin, val); light = analogRead (lightSensorPin); motion = analogRead (motionSensorPin); if (light & lt; 50 & amp; & amp;! lightEnable) {delay (1000); if (light & lt; 50) lightEnable = true; } If (light & gt; 50 & amp; & amp; val == 0) lightEnable = false; if (motion & gt; 150 & amp; & amp; lightEnable) {timerEnable = true; faderEnable = false; } If (timerEnable) {timerCounter ++; val = val + 1; if (val & gt; 254) val = 254; if (timerCounter & gt; timeOn * 50) {if (motion & lt; 150) {// val = 0; timerCounter = 0; timerEnable = false; faderEnable = true; } Else {timerCounter = 0; }}} If (faderEnable) {val = val - 2; if (val & lt; 0) {faderEnable = false; val = 0; }} // Serial.println (light); delay (20); } & Lt; / code & gt;
All sensory farm was installed in the plinth, and for Arduino with the power supply has been printed on a 3D printer chassis, all laid back, closed and hidden.
After the work was done, I thought that it would be cool to make a narrow charge controller, which would be placed in the plinth, and it would need to take only the food, but everything to do switching within the plinth. But I get the fact that there is, therefore, from the plinth 6 are living in a rather bulky body. We use Smart skirting a week, appreciated all the home. Smooth on and dim, even light - that is all that is needed for night walks
. So tempted, according to the latest trends, to write: "In the future I plan to tie Wi-Fi and equipped with sensors so that when you pass by, he measured the heart rate and calculated the calories burned, as well as hit the intruders discharge in the absence of foot prints in the database , led the statistics on / off and connected to the cloud, "and somehow shines and nothing more.
Source: geektimes.ru/post/276198/
China published a scheme Space Station "Tiangong-3"
In the United Kingdom submitted a brilliant idea how to wean people littering the streets!