Here is a great way to get intimated via text message (SMS), when you have Trick-or-Treaters at your door, and you are busy hosting a halloween party at home. Place a carved pumpkin just below your letter box or you door steps with an ultrasonic sensor to detect motion and use the Mediatek LinkIt ONEboard with a SIM installed to send the text...
In addition load a couple of spooky audio files on a micro SD card and play them on a portable speaker, from the Mediatek LinkIt ONE audio port, to keep the little goblins busy while you fetch the treats...
Step 1: Things You'll Need for the Build
Here are the list of things you will need to complete the build of this project
- Mediatek LinkIt ONE
- Lipo battery - a lipo battery comes as part of the Mediatek LinkIt ONE package
- GSM antenna - this comes as part of the Mediatek LinkIt ONE pack
- Maxbotix ultrasonic sensor - EZ1
- LED - 5mm Cycling RGB
- 220 ohms resistor
- Micro SD card and reader to store the audio files
- Portable speakers
- SIM card to send the text messages
In addition you will also need
- Knives , Spoons ... to carve the pumpkin
- plastic zip lock bags to protect the circuit
Step 2: Putting the Circuit Together
Before putting the circuit together load a couple of spooky audio files on to the SD card using your laptop, name the file as "halloween.mp3". Now add the micro SD card and SIM card to the LinkIt ONE as shown in the second picture above.
Connect the GSM antenna that comes with the LinkIt one package to the GSM antenna slot.
Connect the Maxbotix ultrasonic sensor PW to pin #2 on LinkIt ONE. And also connect the power +5V and ground pins to 5V and GND on the LinkIt ONE
And connected the +ve of the Cycling RGB LED via a 220 ohms resistors to 3V pin and the -ve to GND terminal.
Step 3: Uploading the Code to LinkIt ONE
To setup the Arduino IDE for the LinkIt ONE register and create an account on the MediaTek Labs website
Then follow the link below to download the latest driver and software LinkOneBoard
Upload the blink example sketch that comes with the Arduino IDE and see if the LED on the LinkIt one board blinks, this is to ensure that you have completed the setup correctly.
Now download the ino file attached and change the mobile number to your mobile number. Select the board and the port and upload the code as shown in the first picture above. If you want to debug/modify the code, un-comment the Serial.begin(9600); line and you should be able to use your serial monitor for debugging if you plan on modifying the code.
In addition you will also change the "obstacleAt" parameter value in the code once you decide where you will be placing the pumpkin. Currently I have set it to 10 inches for testing, you may want to increase this depending upon the spot of your pumkin. For the Maxbotix ultrasonic sensor you can go upto a value of 236 inches (which is about 6 meters)
Step 4: Carve the Pumpkin
Using a sharpie/marker draw you favorite design on the pumpkin, here I choose a spooky simply face.
Cut the pumpkin around the sharpie mark, here while cutting the nose make it to approximately the size of the Maxbotix ultrasonic sensor.
Remove seeds and clean the inside, by cutting a portion at the back of the pumpkin.
Here I choose to paint the eyes with the sharpie so that it can blend in with the maxbotix sensor at the nose which we will insert in the next step.
Step 5: Adding the Circuit to the Jack-o-lantern
Now using a small zip lock bag secure the Maxbotix sensor and attach it to the nose of the Jack-o-lantern
And then use another zip for the LinkIt ONE board.
Connect the Audio cable to the speaker and LinkIt ONE and hide the speaker using a black cloth..
Congratulations !! your are done , it is now time to wait for text message when the Trick-or-Treaters arrive ..
Happy Halloween !