Presence Detector With "Nodo Limón"





Introduction: Presence Detector With "Nodo Limón"

The “Nodo Limón” has all applications of an Arduino Leonardo with the advantage of has a module GSM/GPRS Sim900 included, we can do SMS or we can call a cellular phone. In this time we will make a Presence detector. This is simple.


1 sensor PIR.

1 Nodo Limón.

3 female female cables.

1 USB mini USB cables.

1 power supply.

if you want get the Nodo Limón you can buy it in this link

Step 1:

We have to connect the sensor with the Nodo Limón; for this we will remove the dome of sensor to see the pinout of sensor.

Step 2:

The ground pin of the PIR will connect with the analog ground pin of the “Nodo Limón”.

Step 3:

The voltage pin of the PIR is connecting to the voltage pin of “Nodo Limón”.

Step 4:

The PIR output pin is connected to pin 5 Node Limón.

Step 5:

We have to load the program this is very simple first one: we have to connect the board to the computer and we load the program it’s similar to Arduino; we can use the Arduino’s IDE or other compilers that are compatible with Arduino.

Note: this the code.


#define SMS_MAX_LEN3 100

#define SMS_MAX_LEN4 100


GSM gsm;

int calibrationTime = 10;

long unsigned int lowIn;

int valor_limite= 200;

long unsigned int pause = 5000;

char mes;

boolean lockLow = true;

boolean takeLowTime;

int pirPin = 5;

int indicador =13;

void setup() {




pinMode(pirPin, INPUT);

digitalWrite(pirPin, LOW);

pinMode(indicador, OUTPUT);

digitalWrite(indicador, LOW);

Serial.print(" calibrando sensor ");

for(int i = 0; i < calibrationTime; i++){




Serial.println(" hecho");

Serial.println("SENSOR ACTIVADO");



void loop() {

if(digitalRead(pirPin) == HIGH){

digitalWrite(indicador, HIGH); //LED visualiza el estado de la salida del sensor


//Se asegura de que esperar a que la transici�n a la baja antes de cualquier salida se hace otra:

lockLow = false;

//Cambie el numero de telefono por el numero autorizado

gsm.SendSMS("+523121125190","movement detected");

Serial.println("se detecto movimiento, mensaje enviado");



takeLowTime = true;


if(digitalRead(pirPin) == LOW){

digitalWrite(indicador, LOW); //LED visualiza el estado de la salida del sensor


lowIn = millis(); // guardar el momento de la transici�n de alta a baja

takeLowTime = false; // asegurarse de que esto s�lo se hace al comienzo de una fase de baja


//Si el sensor es baja para m�s de la pausa dada,

//Asumimos que el movimiento no m�s que va a pasar

if(!lockLow && millis() - lowIn > pause){

//Se asegura de este bloque de c�digo s�lo se ejecuta de nuevo despu�s de

//Una secuencia de movimiento se ha detectado nuevo

lockLow = true;

//Cambie el numero de telefono por el numero autorizado

gsm.SendSMS("+523121125190","The movement stopped");

Serial.println("El movimiento se detuvo, mensaje enviado");





Step 6:

We have to connect the board with the power supply.

The operation of the alarm is simple when the sensor detect movement the “Nodo limón” sends a SMS to the user. When movement finish the board sends other message to indicate the movement stopped.



    • Epilog Challenge 9

      Epilog Challenge 9
    • Pocket-Sized Contest

      Pocket-Sized Contest
    • Science of Cooking

      Science of Cooking

    We have a be nice policy.
    Please be positive and constructive.




    Very cool! Thanks for sharing your project! I can't wait to see what else you come up with in the future.