Project showcase

IoT Controlled Snow Machine © GPL3+

The most homemade snow machine you've ever seen. Made from a hairdryer, polystyrene and MKR1000. Controllable from anywhere in the world*

  • 1,535 views
  • 0 comments
  • 3 respects

Components and supplies

Necessary tools and machines

09507 01
Soldering iron (generic)

Apps and online services

Ide web
Arduino IDE
Sublime Text
Web Hosting

About this project

The most homemade snow machine you've ever seen. Made from a hairdryer, polystyrene and MKR1000. Controllable from anywhere in the world*

*Must have internet connection

Motivation

I live in the middle of wet rainy England and my boyfriend lives in the south of Oregon, USA. This year, they had so much snow, it looked like a winter wonderland. I was so jealous, I mean just look how pretty it is here. We joked how we need an IOT device that turned the snow on and off, as he hated it but I loved it... cue lightbulb moment.

Arduino/Genuino MKR1000

I had previously played around with the Arduino uno and wifi shield, but as this project would be outdoors (mum said that I can't get snow in the house), I wanted to use a wireless connection. I've been looking for a while for a reasonably priced method of wirelessly connecting to the internet and after googling around for this project, I was really excited to hear about the MKR1000, as well as the competition.

My go-to was to use a simple wifi server sketch, but then I thought it would be more interesting if my boyfriend could turn on the snow. Using the Web client in WiFi101 examples, I adapted it so it connected to a txt file on a server and looked to see if there was a 0 or 1. I then made a website that would write 1 or 0 depending on if the on or off button was hit respectively.

The Snow Machine

Now the Arduino was all setup, I just needed to connect it to snow. I couldn't find the right adapter to plug it into the clouds so I made a snow machine.

Well I tried to make a snow machine okay 😂

So version 1 is a hairdryer and a plastic 2l bottle with the ends cut off, using magic snow (powder that you add water to)

Version 2 has the addition of a cloth to stop the snow falling into the hairdryer

Version 3 has crumbled up polystyrene because I ran out of magic snow

Electronics

Shoutout to my dad here. It's good having an electrician in the family.

My MKR1000 could turn an LED on, but I needed it to turn on my "Snow Machine" aka my hairdryer. I tried using a relay. I read on the Arduino website that the board runs at 3.3V, so I used a 5V relay on a board that can be reliably triggered by 3.3V. This was soldered to a 240V AC socket that I could plug my hair dryer in. Worked a dream!

I went to test this with snow (note, this is where I used up all of my magic snow) and found that when I turned on from the website, the snow machine kept flicking on and off. My dad thought it was due to the relay so we added a solid state 2-480V relay and added a power supply to that. We then realised the problem was due to wifi connectivity issues in the garden so it would probably work fine with just the 5V relay.

Final Thoughts

Unfortunately because of time differences and running out of snow, my boyfriend didn't get to turn on the snow machine.

We left the solid state relay in so I can play around with this device using other appliances in the future. Next stop the oven for IoT pizza. But for now, time to clear up all the polystyrene/snow in my garden. Going to need more to build a snowman.

Bonus

As I didn't have enough snow to run the system for long enough to show it being turned on and off by the website, I turned a lamp on to demonstrate it working. Keeping with the holiday theme, I tried to make the lamp light be the star on a Christmas tree but my printer had run out of green ink. This is demonstrated in the video above.

Code

index.phpPHP
Website to control IoT Snow Machine.
MKR1000 looks at switchState.txt - If 0 off, if anything else on
Opening on.php writes 1 to switchState.txt
Opening off.php writes 0 to switchState.txt
<?php 
// Website to control IoT Snow Machine.
// MKR1000 looks at switchState.txt if 0 off, if anything else on 
// Opening on.php writes 1 to switchState.txt
// Opening off.php writes 0 to switchState.txt 

?>


<!DOCTYPE html>
<html>
<head>
	<title>Make it snow</title>
	<!-- Make it look pretty by connecting up bootstrap -->
	<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
</head>
<body style="background-color: #00ccff;">

<main class="page-scroll" id="snow">

<div class="container-fluid text-center">
	<br><br>
</div>

<div class="container-fluid text-center ">
<div class="btn-group btn-group-justified">

<!-- Snow button opens on.php -->
	<a href="on.php" class="btn btn-default btn-lg">Snow</a>
<!-- Stop button opens off.php -->
	<a href="off.php" class="btn btn-default btn-lg">Stop</a>
</div>
</div>

</main>
on.phpPHP
Website to control IoT Snow Machine.
MKR1000 looks at switchState.txt if 0 off, if anything else on
Opening on.php writes 1 to switchState.txt
Opening off.php writes 0 to switchState.txt
<!-- Website to control IoT Snow Machine.
MKR1000 looks at switchState.txt if 0 off, if anything else on 
Opening on.php writes 1 to switchState.txt
Opening off.php writes 0 to switchState.txt -->


<?php 
//Include index file so basic styling is consitant 
include 'index.php';

//Var to open file
$myfile = fopen("switchState.txt", "w") or die("Unable to open file!");

//Text to be written to file. 0 means off. anything else means on
$txt = "1";

//Write to file (file thats been opened, data written to file)
fwrite($myfile, $txt);

//Close file
fclose($myfile);
?>

<footer style="margin-top: 300px">
<div class="container-fluid text-center ">
	<h2>It's snowing!</h2>
</div>
</footer>

</body>
</html> 

<style type="text/css">
/*When the arduino is turned on, the web page will start snowing*/
/*Cheers pal for the snow http://codepen.io/NickyCDK/pen/AIonk*/
#snow{
	background: none;
	background-image: url('http://www.wearewebstars.dk/codepen/img/s1.png'), url('http://www.wearewebstars.dk/codepen/img//s2.png'), url('http://www.wearewebstars.dk/codepen/img//s3.png');
	height: 100%;
	left: 0;
	position: absolute;
	top: 0;
	width: 100%;
	z-index:1;
	-webkit-animation: snow 10s linear infinite;
	-moz-animation: snow 10s linear infinite;
	-ms-animation: snow 10s linear infinite;
	animation: snow 10s linear infinite;
}
@keyframes snow {
  0% {background-position: 0px 0px, 0px 0px, 0px 0px;}
  50% {background-position: 500px 500px, 100px 200px, -100px 150px;}
  100% {background-position: 500px 1000px, 200px 400px, -100px 300px;}
}
@-moz-keyframes snow {
  0% {background-position: 0px 0px, 0px 0px, 0px 0px;}
  50% {background-position: 500px 500px, 100px 200px, -100px 150px;}
  100% {background-position: 400px 1000px, 200px 400px, 100px 300px;}
}
@-webkit-keyframes snow {
  0% {background-position: 0px 0px, 0px 0px, 0px 0px;}
  50% {background-position: 500px 500px, 100px 200px, -100px 150px;}
  100% {background-position: 500px 1000px, 200px 400px, -100px 300px;}
}
@-ms-keyframes snow {
  0% {background-position: 0px 0px, 0px 0px, 0px 0px;}
  50% {background-position: 500px 500px, 100px 200px, -100px 150px;}
  100% {background-position: 500px 1000px, 200px 400px, -100px 300px;}
}	

	
</style>
off.phpPHP
Website to control IoT Snow Machine.
MKR1000 looks at switchState.txt if 0 off, if anything else on
Opening on.php writes 1 to switchState.txt
Opening off.php writes 0 to switchState.txt
<!-- Website to control IoT Snow Machine.
MKR1000 looks at switchState.txt if 0 off, if anything else on 
Opening on.php writes 1 to switchState.txt
Opening off.php writes 0 to switchState.txt -->

<?php 
//Include index file so basic styling is consitant 
include 'index.php';

//Var to open file
$myfile = fopen("switchState.txt", "w") or die("Unable to open file!");

//Text to be written to file. 0 means off. anything else means on
$txt = "0";

//Write to file (file thats been opened, data written to file)
fwrite($myfile, $txt);

//Close file
fclose($myfile);
?>

<footer style="margin-top: 300px">
<div class="container-fluid text-center ">
	<h2>It's not snowing</h2>
</div>
</footer>

</body>
</html> 
IoT_SnowMachine
Based off the Web client in WiFi101 examples, this script is used on the MKR1000 to connect to wifi and check if a file on a server says anything other than 0. This then turns on my connected appliance, in this case my homemade snow machine

Schematics

IoT SnowMachine Bread Board View
Circuit diagram of the setup I used for my IoT snow machine. It was my first time using Fritzing and couldn't find the exact components so used images instead to give a rough overview
Xmascomp bb ab4d1ieg32

Comments

Submitted to Contest

$85 Arduino Store Gift Certificate + MKR1000

The Arduino Internet of Holiday Things

Author

Symmetrical94
Hannah Kilby
  • 1 project
  • 0 followers

Additional contributors

  • Electronic advice and soldering by Nick Kilby

Published on

January 29, 2017

Members who respect this project

AdambenzProfile picture

and 1 other

See similar projects
you might like

Similar projects you might like

Let it Snow - IoT Snow Globe With Virtual Reality Web

Project tutorial by Team Virtual Ecology

  • 5,186 views
  • 2 comments
  • 40 respects

IoT Controlled Planter Lights

Project showcase by John Weers

  • 1,569 views
  • 0 comments
  • 8 respects

SmartQ Notification with Azure IOT Hub and Virtual Shields

Project showcase by vincent wong

  • 1,726 views
  • 0 comments
  • 6 respects

Stylish IoT Neck Warmer Controlled from Mobile Browser

Project tutorial by Dr. Charif Mahmoudi

  • 3,142 views
  • 3 comments
  • 30 respects

Mini Christmas IoT Show!

Project showcase by Majd Janineh

  • 1,193 views
  • 1 comment
  • 1 respect
Add projectSign up / Login