Introduction: Presence Notifier With Push Button
These days in families, both men and women have started working. Both men and women want to succeed in life and for this they have to work hard and spent more time in the offices. Due to this it becomes difficult for both of them to look after their children. Due to pressure of they offices many of the parents are not able to call their children and as them weather they have reached the house from school or from any other place safely or not. If you come in the category of those parents then I will help you to reduce your tension. This project consist of mediatek linkit one as the controller. A simple push button is attached to this project. Keep it near you door so that when your children enter the house they remember to push this push button. When they will push the button, a SMS will be send to your mobile number and the appliance attached to this project will be turned on. For example when your children will enter the house, they will search for switch board to turn on light. When they will push the button to turn on the light, a SMS will be sent to you telling that your children have reached the home safely. I am sure that this will reduce your stress. Don't forget that you have to change the message in the code from your message which you want to receive when your children reach home. You can also use it to notify yourself when you life partner reaches home. This is a simple step taken by me to reduce the stress of various parents.
Step 1: Collect Parts
Here are the parts required by you to make this project. There I have used some module which you may not have but their is no need to worry because they are basic modules which you can make by yourself. I further steps I will be telling you how to make those modules. Here is the list:
- Linkit one
- Relay module
- Push button module
- A SIM card
- Linkit one GSM antenna
- Linkit one battery
- Jump cables(male to female are preferred)
- A box or enclosure
- A USB cable to upload the code
Step 2: Connect the Battery
This is the first and the most basic step. Your linkit one board already
comes with a 3.7V 1050mah li-ion battery. Just pick up that battery and insert the plug of the battery into the plug present on your linkit one board in left side. It will go inside only one way. To check your battery status or power level of your battery go in examples folder of your arduino ide and upload "LBattery" code to your board and open the serial monitor. Your battery level would be displayed there.
Step 3: Insert the SIM
When the switch is pressed a SMS is also send to the registered mobile number. These days SMS can be sent through internet but the better option would be to use a network provider to send the SMS. For that you would be needing a Mini size SIM card. Make sure that you buy mini size SIM card as linkit one does not support micro or nano size SIM card. Insert the SIM card to the SIM slot present at the back side of the board. Make sure that you insert it the right way.
Step 4: Connecting the GSM Antenna
Linkit one comes with three different types of antennas. One is for GPS, one for WiFi and Bluetooth and one for GSM. Since we are using only GSM feature of linkit one in this project, you would be needing only one antenna. The GSM antenna is rectangle in shape(the big one). Take that antenna and find GSM port one the downward side of linkit one. Connect that antenna to that port(you may have to apply some force while connecting) and you are done.
Step 5: Connectig the Push Button Module
A push button module is a small module consisting of a push button and a resistor. If you don't have a push button module you can make one for you on a small PCB. You only need a push button, small piece of PCB and a 10K resistor. Connect vcc of push button module to linkit one 5V,gnd to gnd and Vout to digital pin 8. If you are making a module, then connect one pin of push button to linkit one vcc, other pin to digital pin 8 and short digital pin 8 to gnd with a 10K resistor.
Step 6: Connecting the Relay Module
In the final product, when the push button is pushed, it will send an SMS as well as turn on the appliance connected to it. The appliance can not be connected directly to the linkit one board as the voltage output of linkit one is 3.7V whereas most of the appliance require 110V to 220V to work so we would be needing a relay which can switch the voltage of you linkit one from a 110V to 220V supply. For switching you can use a relay module like me or can make a module of your own by the circuit diagram attached in the images given above. Connect the vcc of the module to linkit one 5V , gnd of the module to linkit one gnd and Vout of the module to digital pin 11.
Step 7: Making an Enclosure
Choosing a correct enclosure is a important thing. You would be needing a enclosure of small size in which all your things can fit. Don't choose a enclosure in which you can not drill holes properly. Take a enclosure which is small in size, not too much thick, rigid, durable, with thin walls etc. After choosing the enclosure, drill two holes in it. One from which the hump cables of push buttons can pass and other from which the wire going to your appliance can pass. If forgot to tell you that your push button module would be outside your box whereas all other things are inside it. Place all the things inside the box and close it and proceed to next step.
Step 8: Upload the Code
Here is the code you need to upload to your board. Make sure that in the code you change the number "1234567890" from your mobile number and change the message from your message. After uploading the code proceed to next step where you would be told how to use it. Here is the code:
#include <LGSM.h> int push=8; int relay=11; int state=0; void setup() { Serial.begin(9600); while (!LSMS.ready()) delay(1000); Serial.println("SIM ready for use"); pinMode(8,INPUT); pinMode(11,OUTPUT); } void loop() { LSMS.beginSMS("1234567890"); if(digitalWrite(push)==HIGH && state==0) { sentLSMS.print("I am here"); // please change this line for your message state=1; digitalWrite(push,HIGH); } else if(digitalWrite(push)==HIGH && state==1) { digitalWrite(push,LOW); state=0; } } <br><br>
Step 9: TEST
Now its time to test your project. Power on your board and leave it for about 10 seconds so that your SIM card can connect to your telecom partner. The push the button kept on the top. After pushing, the appliance connected to your board will be switched on and you will receive a SMS. When you will again push the button, the appliance you be turned off but this time you will not receive the SMS. S now your project is ready to be used.
Step 10: The End
Place this project at you main door or outside your door. When you reach your home, by simply pushing the button you can give them a message that you have reached the home succesfully thus reducing their tension Hope you like the project and loved it. For any query and problem comment below. Your can change the project according to your use. Do remember to post your project photos also. THANK YOU