Skip navigation

Enchanted Objects

5 Posts authored by: coolbox
coolbox

Enchanted Window - Video

Posted by coolbox Jun 24, 2015

Here I want share Video about my project:

 

coolbox

Enchanted Windows

Posted by coolbox Jun 24, 2015

Hi,

Here,I want to post some update about may Enchanted windows project. I was able to control window using arduino yun’s wi-fi.I was not sure about a actual window so I have tried with thermo Cole model.

 

Here I have used 150 RPM DC geared motor with Infineon DC motor control shield.pic connections are:

Digital 2 in yun -> IN1 in motor shield

Digital 3 in yun -> IN2 in motor shield

INH1 and INH2 were connected to 5V in yun. Also I have shorted GND of Infineon shield and yun as power for both board are different. Yun was powered by 5V supply and motor shield was powered by 12V supply same as motor supply.

 

Yun Software:

I have modified Bridge example as per my requirement. Using REST APIs I was able to control motor. Code is as below:

 

 


 

#include <Bridge.h>

#include <YunServer.h>

#include <YunClient.h>

 

// Listen to the default port 5555, the Yún webserver

// will forward there all the HTTP requests you send

 

YunServer server;

boolean JustTwoSeconds;

 

void setup()

{

  // Bridge startup

  pinMode(13, OUTPUT);

  digitalWrite(13, LOW);

  Bridge.begin();

  digitalWrite(13, HIGH);

 

  // Listen for incoming connection only from localhost

  // (no one from the external network could connect)

  server.listenOnLocalhost();

  server.begin();

 

  // For Driving Motor We need this two pins.

  pinMode( 2, OUTPUT ); //IN_1

  pinMode( 3, OUTPUT ); //IN_2

 

 

}

 

void loop()

{

  // Get clients coming from server

  YunClient client = server.accept();

 

  // There is a new client?

  if (client)

  {

    // Process request

    process(client);

 

    // Close connection and free resources.

    client.stop();

  }

 

  delay(50); // Poll every 50ms

 

  if( JustTwoSeconds )

  {

    JustTwoSeconds = 0;

    delay(4900); // 1.5 sec

    digitalWrite( 2, LOW ); //IN_1

    digitalWrite( 3, LOW ); //IN_2   

  }

}

 

 

 

void process(YunClient client) {

  // read the command

  String command = client.readStringUntil('/');

 

  // is "digital" command?

  if (command == "digital") {

    digitalCommand(client);

  }

 

  // is "analog" command?

  if (command == "analog") {

    analogCommand(client);

  }

 

  // is "mode" command?

  if (command == "mode") {

    modeCommand(client);

  }

}

 

 

 

 

void digitalCommand(YunClient client)

{

  int pin, value;

 

     // Read pin number

     pin = client.parseInt();

 

    

   if( pin == 1 )

   {

         digitalWrite( 2, HIGH ); //IN_1

         digitalWrite( 3, LOW ); //IN_2

        

         JustTwoSeconds = 1;

   }

   else if( pin == 2 )

   {

         digitalWrite( 2, LOW ); //IN_1

         digitalWrite( 3, HIGH ); //IN_2

        

         JustTwoSeconds = 1;

   }

   else if( pin == 3 )

   {

         digitalWrite( 2, LOW ); //IN_1

         digitalWrite( 3, LOW ); //IN_2

   }

   else

   {

       ;

   }

}

 

 

 

 

 

 

 

HTML File:

For EASY interface I have created simple HTML file which you can open in any device. Code is as follow:

 

<body bgcolor = "yellow">

 

<a href = "http://192.168.240.1/arduino/digital/1 ">

<h3><center> OPEN WINDOW </center></h3>

</a>

 

</br>

</br>

 

<a href = "http://192.168.240.1/arduino/digital/2 ">

<h3><center> CLOSE WINDOW </center></h3>

</a>

 

</br>

</br>

 

<a href = "http://192.168.240.1/arduino/digital/3 ">

<h3><center> STOP </center></h3>

</a>

 

</body>

 

I will publish a video soon.

I want to control windows using arduino.I got Tinkerkit servo in competition kit.But I just found another good solution,I found a 10 RPM 12 V DC geared which has pretty nice torque.So,need to make

decision between this two.What are your suggestions?

 

IMG_20150531_182142.jpg 

coolbox

Working with yun

Posted by coolbox May 31, 2015

Hello friends

 

I was trying to getting started with arduino yun.I was able go get it on my laptop's wi-fi.Then I tried to re-configure it using 192.168.240.1 because arduino.local was not working.After re-configuring it showed that arduino is being restarted.But I cannot find it in my wi-fi panel after restart is it normally happen or arduino will connect my assigned network.

 

Regards,

parth

First of all I want to thanks element14 and sponsors for selecting me as competitor in this awesome competition.

Here I want to share some ideas about my project enchanted windows.

 

 

 

1) It can be opened or closed remotely from anywhere. All the windows and curtains in our house can be closed by a single button in our mobile app, when we are leaving from home. Also we can know status (open or close) of any window.

 

 

 

2) It can we used as morning alarm. Windows and curtains will be opened automatically in morning and let the sun come in at preset time.

 

 

 

3) It can be used to avoid the mosquitoes and other unwanted bugs which generally enter home in evening time. We can set the time so that some desired windows will be automatically closed in evening at that time.

 

 

Not only preventing them from coming in we can add functionality to even kill them

Implementation

We can use high voltage grid and put it before window on outside. Generally insects are attracted towards the light. So we can have a light source behind window. Insects will be attracted toward the light but will be killed due to high voltage grid. Again this can be enabled using any wi-fi device. Arduino uno will control a relay and light source.

mosgito.PNG

 

 

 

4) We can avoid fire accidents due to gas leakage by having automated ventilation, using gas sensors. If a gas sensor detects gas leakage the windows near leakage will be opened automatically, so that gas can be released outside easily.

 

 

 

5) Sometime in India people use diesel generators inside home this can create suffocation to the people and even lead to death. We can check CO2 level in home, and when it goes above the certain level windows will be opened automatically. Also In this condition people can cannot clearly find exits .So we can use red lights to show exits.

 

 

6) For the people who leave near railway station & airport are generally irritated by loud noise. We can automate windows, so that when noise begins it will automatically close and opens when noise goes.