loading
11Comments

Tell us about yourself!

Complete Your Profile
  • LED NeoPixel Motion Sensor Stair Lighting

    you told right . its not supporting multi threading. now i am facing a problem is i am using 4 relays to control 4 separate powered led strips of 5050 . i need output like if persons travels down stair to up stairs . down pri detected and relays to start like relay1 on and next relay 2 ,relay3 . ... after person reaches top pir . have to off in reverse mode like relay4,3,2,1. and same while top to bottom stairs . i am facing the problem is when bottom pir detects and person travels to up stairs then top pir sensor detect and reserving the process and after down stair process completed , the reserved process starts .. plz solve the problem... for testing i used 1 relay..the code is :unsigned long timeOut=6000; // timestamp to remember when the PIR was triggered. ...see more »you told right . its not supporting multi threading. now i am facing a problem is i am using 4 relays to control 4 separate powered led strips of 5050 . i need output like if persons travels down stair to up stairs . down pri detected and relays to start like relay1 on and next relay 2 ,relay3 . ... after person reaches top pir . have to off in reverse mode like relay4,3,2,1. and same while top to bottom stairs . i am facing the problem is when bottom pir detects and person travels to up stairs then top pir sensor detect and reserving the process and after down stair process completed , the reserved process starts .. plz solve the problem... for testing i used 1 relay..the code is :unsigned long timeOut=6000; // timestamp to remember when the PIR was triggered. int ledPin = 13; // choose the pin for the LEDint downUp = 0; // variable to rememer the direction of travel up or down the stairsint alarmPinTop = 4; // PIR at the top of the stairsint alarmPinBottom = 3; // PIR at the bottom of the stairsint alarmValueTop = LOW; // Variable to hold the PIR statusint alarmValueBottom = LOW; // Variable to hold the PIR statusint pirState = LOW; // we start, assuming no motion detectedint val = 0; // variable for reading the pin status#define RELAY1 12void setup() { Serial.begin(9600); pinMode(ledPin, OUTPUT); // declare LED as output pinMode(RELAY1, OUTPUT); // declare relay1 as output pinMode(alarmPinTop, INPUT_PULLUP); // for PIR at top of stairs initialise the input pin and use the internal restistor pinMode(alarmPinBottom, INPUT_PULLUP); // for PIR at bottom of stairs initialise the input pin and use the internal restistor delay (200); // it takes the sensor 2 seconds to scan the area around it before it can //detect infrared presence.}void loop(){ alarmValueTop = digitalRead(alarmPinTop); // Constantly poll the PIR at the top of the stairs Serial.println(alarmPinTop); alarmValueBottom = digitalRead(alarmPinBottom); // Constantly poll the PIR at the bottom of the stairs Serial.println(alarmPinBottom); if (alarmValueTop == HIGH && downUp != 2) { // the 2nd term allows timeOut to be contantly reset if one lingers at the top of the stairs before decending but will not allow the bottom PIR to reset timeOut as you decend past it. timeOut = millis(); // Timestamp when the PIR is triggered. The LED cycle wil then start. downUp = 1; Serial.println("downup=1"); //clearStrip(); topdown(); // lights up the strip from top down } if (alarmValueBottom == HIGH && downUp != 1) { // the 2nd term allows timeOut to be contantly reset if one lingers at the bottom of the stairs before decending but will not allow the top PIR to reset timeOut as you decend past it. timeOut = millis(); // Timestamp when the PIR is triggered. The LED cycle wil then start. downUp = 2; Serial.println("downup=2"); //clearStrip(); bottomup(); // lights up the strip from bottom up } } void topdown() { Serial.println ("detected top"); // Helpful debug message //for(int i=0; i<3; i++) { // Helpful debug indication flashes led on Arduino board twice digitalWrite(ledPin,HIGH); delay(8000); digitalWrite(ledPin,LOW); digitalWrite(RELAY1,HIGH); delay(5000); digitalWrite(RELAY1,LOW); Serial.println ("delay 50"); alarmValueBottom = LOW; downUp = 0; //} } void bottomup() { Serial.println ("detected bottom"); // Helpful debug message //for(int i=0; i<3; i++) { // Helpful debug indication flashes led on Arduino board twice digitalWrite(ledPin,HIGH); delay(8000); digitalWrite(ledPin,LOW); delay(500); downUp = 0; //} }

    hi, i have doubt that if 3 persons passes from bottom pir sensor with between 10sec difference from one to another .. and also continue passes from top pri sensor with 10sec difference . what is the output of led lights ? does it reserve detected 3 times and start cycle 3 times ?

    View Instructable »
  • LED NeoPixel Motion Sensor Stair Lighting

    thank you for your information.. is there any function other than millis() i wan't minutes to delay.. thank you.

    View Instructable »
  • LED NeoPixel Motion Sensor Stair Lighting

    thank for your advice ...its 21 steps and i have to make 3 - 4 relays only by every 5 steps one relay to turn on 5 steps at once . i am weak in coding ... i made some code from your coded file... plz try to solve . problem is its looping against one function which is selected first .. {if first selected up pir sensor then only up pir sensor working and down pir sensor not detecting... } program :unsigned long timeOut=6000; // timestamp to remember when the PIR was triggered. int ledPin = 13; // choose the pin for the LEDint downUp = 0; // variable to rememer the direction of travel up or down the stairsint alarmPinTop = 4; // PIR at the top of the stairsint alarmPinBottom = 3; // PIR at the bottom of the stairsint alarmValueTop = LOW; // ...see more »thank for your advice ...its 21 steps and i have to make 3 - 4 relays only by every 5 steps one relay to turn on 5 steps at once . i am weak in coding ... i made some code from your coded file... plz try to solve . problem is its looping against one function which is selected first .. {if first selected up pir sensor then only up pir sensor working and down pir sensor not detecting... } program :unsigned long timeOut=6000; // timestamp to remember when the PIR was triggered. int ledPin = 13; // choose the pin for the LEDint downUp = 0; // variable to rememer the direction of travel up or down the stairsint alarmPinTop = 4; // PIR at the top of the stairsint alarmPinBottom = 3; // PIR at the bottom of the stairsint alarmValueTop = LOW; // Variable to hold the PIR statusint alarmValueBottom = LOW; // Variable to hold the PIR statusint pirState = LOW; // we start, assuming no motion detectedint val = 0; // variable for reading the pin statusvoid setup() { Serial.begin(9600); pinMode(ledPin, OUTPUT); // declare LED as output pinMode(alarmPinTop, INPUT_PULLUP); // for PIR at top of stairs initialise the input pin and use the internal restistor pinMode(alarmPinBottom, INPUT_PULLUP); // for PIR at bottom of stairs initialise the input pin and use the internal restistor delay (200); // it takes the sensor 2 seconds to scan the area around it before it can //detect infrared presence.}void loop(){ alarmValueTop = digitalRead(alarmPinTop); // Constantly poll the PIR at the top of the stairs //Serial.println(alarmPinTop); alarmValueBottom = digitalRead(alarmPinBottom); // Constantly poll the PIR at the bottom of the stairs //Serial.println(alarmPinBottom); if (alarmValueTop == HIGH && downUp != 2) { // the 2nd term allows timeOut to be contantly reset if one lingers at the top of the stairs before decending but will not allow the bottom PIR to reset timeOut as you decend past it. timeOut = millis(); // Timestamp when the PIR is triggered. The LED cycle wil then start. downUp = 1; Serial.println("downup=1"); //clearStrip(); topdown(); // lights up the strip from top down } if (alarmValueBottom == HIGH && downUp != 1) { // the 2nd term allows timeOut to be contantly reset if one lingers at the bottom of the stairs before decending but will not allow the top PIR to reset timeOut as you decend past it. timeOut = millis(); // Timestamp when the PIR is triggered. The LED cycle wil then start. downUp = 2; Serial.println("downup=2"); //clearStrip(); bottomup(); // lights up the strip from bottom up } } void topdown() { Serial.println ("detected top"); // Helpful debug message //for(int i=0; i<3; i++) { // Helpful debug indication flashes led on Arduino board twice digitalWrite(ledPin,HIGH); delay(5000); digitalWrite(ledPin,LOW); delay(50); Serial.println ("delay 50"); //} } void bottomup() { Serial.println ("detected bottom"); // Helpful debug message //for(int i=0; i<3; i++) { // Helpful debug indication flashes led on Arduino board twice digitalWrite(ledPin,HIGH); delay(5000); digitalWrite(ledPin,LOW); delay(50); //} }

    plz give your email or contact me on my email address :samee14326@rediffmail.com

    View Instructable »
  • hi can you deliver to india also ?

    View Topic »
  • LED NeoPixel Motion Sensor Stair Lighting

    samee14326@rediffmail.com

    i want a program for it ... thanking you ...

    thank you for your valuable response to my quires. WS2812B led strip is very expensive so i decided to make with normal 5050 rgb led strip with 24 key remote. i need your guidance i want to build with {Arduino, 2 pir motion sensors, 1 relay module, some meters 5050 led strip , power adapters} . the concept is same as like your but only thing is that there is normal 5050 rgb led strip ... i am expecting output that if a person travels from down stair then down pir motion sensor send signal to arduino and arduino hold off up-pir sensor and turn on the relay module through relay led strip gets on . for few minutes it release to normal . and if up-sensor detects first then down sensor put on hold.. like that plz .... also ldr continue active when no light...

    View Instructable »
  • LED NeoPixel Motion Sensor Stair Lighting

    and also 6. how to set random color change at every single cycle...

    View Instructable »
  • LED NeoPixel Motion Sensor Stair Lighting

    its amazing very very impressive . i have some doubts and quires . 1. how to control brightness of all led's2. which led strip you used WS2812B is 150/meter or 300/meter/ 5050 led? and also is there any compatible led other than ws2812b . 3. is smps is mandatory or we can use laptop charger or any other charger which having same power output.4. how to slow down lights at every step slowly glowing step by step ? and after walk away step by step slowly off like fade/smooth effect ! 5. how to add display and some new modes . i am going to build it please .

    View Instructable »