Introduction: Alarm With Motion and Sound Sensor Monitored and Controlled Via Web

In this Instructables i'll made a little project with a PHPoC Blue from Sollae System (South Korea).

PHPoC Blue(P4S-342) is a programmable board embedded with a PHPoC interpreter. It has 22 digital input/output pins, 6 analog inputs, and various communication interfaces such as UART, SPI and I2C. PHPoC Blue supports Ralink TR3070/RT5370 chipset applied USB Wireless adapter to be used in IEEE802.11b/g Wireless LAN environment.

You'll find every information you'll need at

For further examples you can also visit the forum of this board at

In this instructable we'll realize a little motion and sound sensor, that can be monitored from everywhere through'll be able to see if someone is in your room, and in this case you can activate the alarm from your smartphone! The best things is that with PHPoC Blue you can load your webpage directly on the board, because it can interprete php!

Step 1: Hardware Needed

The parts that i've used in this project are:

- PHPoC Blue P4S-342

- Usb Cable to connect the board to the pc

- Usb Wifi Dongle, to connect the board via wifi

- PIR Sensor HC-SR501

- Sound Sensor KY-038

- Active Buzzer KY-012

- RGB Led KY-016

- Screwdriver to regulate the potentiometer on the sound sensor

The IDE that i've used is the one provided with the board, PHPoCd (you can download it from the web site)

Step 2: Hardware Connection

The best thing is to have module like the one that i've used and some dupont cable. In this way you'll be able to set your project fast and easily. Pay attention to your modules...some of them from china are printed in the opposite way then the pin order is wrong!!!

The connection are the following:

  • PIR Motion Sensor Module

it has 3 pin: VCC, OUT, GND .Connect them in this way:

VCC --> PWR5(5volt);

OUT --> Digital0 ;


  • Sound Sensor Module

it has 4 pin: A0, G, +, D0 connect them in this way:

A0 --> not used ;

G --> GND ;

+ --> PWR5(5volt);

D0 --> Digital1

  • Active Buzzer Module

it has 3 pin: S, -, Signal connect them in this way:

S --> 3.3v ;

- --> GND ;

Signal --> 8 ;

  • RGB Led Module

it has 3 pin: S, -, Signal connect them in this way:

- --> GND ;

R --> Digital19 ;

G --> Digital20;

B --> not used;

NOTE: the sound sensor has 2 must regulate the potentiometer with a screwdriver in order to set the threshold of the module...when the 2 led are on it means that the sound sensed is bigger then the level setted. you must set it so that one led is off...after that you must regulate it in order to be sensitive as you want!

NOTE2: the sound sensor module is not really must be amplified in order to have a good sensitivity and quality...but for this purpose can be used without can simulate the sound detection moving the potentiometer!

Step 3: Code

As i've said before, this board have an embedded php interpreter, then you can load your index file on it. I'll attach 3 file:

- init.php

- task0.php

- index.php

init.php in necessary in every project. It list the task.php files to recall when the execution start.

task0.php contain the php code that manage the pin and the signal for our application. You can define different task files, but they must be included in init.php

index.php contain our web page that we will use to connect to our board, to monitor our sensor and to send signal to the board.

I've create a little page with some javascript also use some image, then you must load these image on the board to watch the page in the correct way!!!

In other words, you must download the zip file attached to this post, extract it and load every file to the board!!!

Step 4: Some Screenshot From Our Web Page!

Now that everything is connected, it's time to connect to our web page!

If you are directly connected to the board via wifi, you can connect to and you're done.

If you want to control your sensor from everywhere, you must connect the board to your router and make a port mapping in order to connect remotely to the port of your PHPoC!

I've attached some you can the first thing to do is to connect to the board...if everything is ok you'll be able to see the image on the top that is coloured, and some indicator that gives you feedback from your sensor!

They work in real time,then you can see every moment what's happening. You'll fine also a button that, if pressed, will switch on the buzzer!!!

Thanks, and if you have some question, don't hesitate to contact me!!! add a comment and like!!! F. ;)


About This Instructable




Bio: I'm studying for the Master Degree of Computer Science Engineering. I'm passionate of every things that can be related with technology...i've ... More »
More by freddyngl:Alarm With Motion and Sound Sensor Monitored and Controlled Via WebInteractive Ambient Sensor with Intel Edison & Grove Starter Kit Plus
Add instructable to: