Naughty Kids Guardian

Made by Yubing Zhang

A device help you keep an eye of your naughty kids by sending you a alarm, calling you and attracting your kids' attention to the blinking light.

Created: January 29th, 2016



Babies begin to learn how to crawl after 8 month or so. Since then, they enjoy crawling, walking or running everywhere to explore and learn the world. However, no everywhere is safe for them, so parents have to keep an eye to their babies all the time.Once parents fail to notice the potential dangerous on time, the result can be very horrible.

My sister always has this problem – while she was cooking the other day with the balcony door opening, my nephew started to crawl around to the balcony. He was very obsessed with the outside world, and even tried to shake the fence. Fortunately, my sister happened to stop him on time. However, my sister was really scared after that. 



The first goal of this project is to give parents immediately alarm when their babies are entering dangerous zone, without causing any alarm when they are walking there. Also, drawing baby’s attention back to the safety zone is another part of this solution. In this way, we can keep babies in the safety area while reduce parent’s monitoring work....


At first, I defined my problem - I want to design a product that helps my sister in her daily life.

Then, I began to think about the components needed to achieve the goal - a force sensor, a LED light, a switch, and a voice equipment. I also walked though all relevant tutorials related to figure out the relationship between them.

I tried to combine the force sensor with the LED first, and then added the switch. Finally, I put the Piezos to the circuit. 


After that, I began to do coding. I first tried to put the force sensor and LED control code under the control of the switch. At the end, I included the Piezos code into the loop of the switch.

Sometimes parents may trigger the device by accident, so I add an if-condition to make sure only the child will trigger the device.

int fsrPin = A0;
int switchPin = D0;
int speakerPin = A4;
int melody[] = {1908,2551,2551,2273,2551,0,2024,1908};
int noteDurations[] = {4,8,8,4,4,4,4,4};
int fsrReading = 0;
int ledPin = D1;
int ledBrightness = 0;

void setup(){
  pinMode(ledPin, OUTPUT);
  pinMode(switchPin, INPUT_PULLUP);
  pinMode(speakerPin, OUTPUT);
  Particle.variable("force", &fsrReading, INT);

void loop() {
  int buttonState = digitalRead(switchPin);

  if (buttonState == HIGH ){
  fsrReading = analogRead(fsrPin);
  ledBrightness = map(fsrReading, 0, 4095, 0, 255);
  analogWrite(ledPin, ledBrightness);
  if (ledBrightness > 100) {
    for(int thisNote = 0; thisNote < 8 ; thisNote++){
      int noteDuration = 1000/noteDurations[thisNote];
      int pauseBetweenNote = noteDuration*1.30;

void playNotes()
    for (int thisNote = 0; thisNote < 8; thisNote++) {
      int noteDuration = 1000/noteDurations[thisNote];
      tone(speakerPin, melody[thisNote],noteDuration);
      int pauseBetweenNotes = noteDuration * 1.30;
Click to Expand

After realizing all function on Particle Dev, I created my own Recipe. I feel like a phone call may be the best way to inform parents since they use cellphone a lot.



- 1 Switch

- Photo Resistor

- LED (Green, 3mm)

- 10K-Ohm Resistors (Brown-Black-Orange)

- 1 FSR

- 1 Piezos

-1 Particle Photon Microcontroller

- Jumper Wires (11x) 



When the force sensor detects the force, it will sent signal to the LED light, and then the signal will be translated to the brightness of LED. If the brightness of LED is larger than 100, which means that the force is larger than 1050, the buzzer will be triggered so that parents can receive an immediate alarm. 

Slack for iOS Upload-1
Yubing Zhang -

Also, parents will receive a phone call telling them the dangerous situation of their kids. 

"Your child is approaching the dangerous!!! Keep an eye of your child!!!"

Receive a phone call
Yubing Zhang -


Though designing of the Internet of Thing, I think about more possibility in my daily life - how to connect seemingly unrelated things to make our life easier and more convenient. I feel like Particle is actually a very powerful tool for me to explore the programming world.

From another view, I understand more about the circuit, coding and the relationship between circuit and code. I enjoy the process of adding the circuit or code step-by-step until realizing all functions. It's a very amazing experience to learn and do thing in a way from easy to complex. 

Share this Project


49-713 Designing for the Internet of Things

· 4 members

This course charts the emergence of the now "connected world" to explore the possibilities for future products and connected spaces.


A device help you keep an eye of your naughty kids by sending you a alarm, calling you and attracting your kids' attention to the blinking light.