Read the thoughts and musings of a cultured redneck here
In 2020 I updated the Halloween IOT setup to be a clown in a coffin that was controlled remotely from my site. We had a great time with it.
If you're interested in previous years implementations check them out below:
When we moved into the neighborhood everyone told us “Just wait til Halloween”. Well, they were right! Our friend up the street, Jay Ziobrowski, is super passionate about Halloween and turns his garage, driveway, and entire front yard into a magical haunted house that’s free to kids in the neighborhood. After doing this for several years, everyone in the neighborhood and surrounding area knows about this and the result is that our street gets blocked off by cops and is absolutely flooded during Halloween. It’s non-stop action from 4:30 to somewhere around 10pm and it’s a really fun time.
After running out of candy in the first 2 hours on year 1 we knew we needed to step it up in following years. So, each year I’ve tried to contribute to the energy and excitement on our street by creating some type of Particle-based IOT Halloween device. Check out the devices from previous years:
Halloween, a Great Opportunity to Get Kids Involved & Learning IOT!
Over the years I’ve had my friend’s kids help me with the setups. That is, since these devices are mobile controlled, I enlist kids to push the button on their mobile phones while I record the reactions of trick-or-treaters from my phone. One of the kids has taken an interest in wanting to know how to build these things, so this year I’ve been working with my friend’s son to both build the devices and teach him along the way. I even gave him a Particle dev kit. It has been a fun project for everyone. I’ve also been overwhelming him with text messages and videos as I make incremental progress on each device. Now he’s using Particle at his school for his science project!
Here are some pics from when we first got started…
Compressed Air, The Key to Speed & The Key to Scaring People!
After doing this for a few years I realized that HOA’s don’t like fire breathing pumpkins and that the best way to scare people is by using compressed air in some shape, form, or fashion. Geared motors just don’t move fast enough … or … if you do make them move fast enough, they are too dangerous and could potentially hurt someone. So, for the past two years I’ve been using a servo to press the button on an air hose to blow air out and move some spooky object toward trick-or-treaters. Nobody gets mad about getting hit with a gust of air!
Last year, right after Halloween, I decided to try something new. I ordered a pneumatic cylinder and solenoid kit from FrightProps. I had no idea how to really make it work, but I wanted to try and low and behold I was able to figure it out. It was way easier than I thought and FrightProps even provided very helpful videos to walk through the hookups for everything. Just a few weeks after last Halloween my mind was already spinning about next year’s Halloween. The pneumatic cylinders with solenoid kits move a lot faster, you can control the speeds, and they use less air. The only negative is that these could potentially be more dangerous. Though, I’m countering the danger by creating physical space around the implementations so that no one will get close enough to be hit or injured. So, I’m happy with the tradeoff and will take extra precaution in the initial setups.
Here's a picture of the solenoid kit from Fright Props
Quick Show of the Headless Clown & Trash Can “Slimer” in Action
The (Main) Parts
There are a lot of parts used in these devices. Of course, you must have wires, wifi, power, and all the normal things you would anticipate. However, I’m going to just list the main items below. If you have questions about other parts or want to build your own, just submit an email to me through this website and I can connect with you and help you with the smaller details. That said, here is the basis for both IOT Halloween devices:
One thing to note is that these devices are using the exact same principles, concepts, and code to make them work. At a high level the solenoids just need to be hit with a 12-volt current to make the pneumatic cylinder fire. To bring the pneumatic cylinder back in, simply turn off the power.
To do this we are using a relay that can be controlled by a Particle microcontroller, a Photon. The relay essentially breaks the circuit of the 12 volts going to the solenoid. Then, whenever we call the cloud web service endpoint in the Particle cloud, it invokes a function in the microcontroller which sends the relay a signal. The relay then completes the circuit which allows the 12 volts to flow to the solenoid which consequently causes the cylinder to fire. We let it fire for a specified period of time (say .200 of a second) then we cut power which causes the head to go back in. We control the speed going both in and out via the speed control valves on the solenoids. So, if you had to draw one negative of the solenoid it would be that you can’t programmatically control the speed.
The Slimer in the Trashcan implementation is such that the cylinder needs to be stabilized yet, due to the Slimer mask and body we couldn’t have any support mechanisms coming from the sides to stabilize the cylinder. Since the Slimer ghost must move up and down vertically we need to allow it room to do so. What this means is that the cylinder needed to be stabilized from the bottom. The cylinders I ordered are threaded at the bottom with 3/8 of an inch thread. This happened to match to some steel plumbing pipes that you can find at your local Lowes or Home Depot. So, I bought a few pieces to connect and make it stand up on its own. After that I added in weighted sandbags to keep the cylinder from wobbling whenever it fires. I attached velcro to the solenoid and breadboard and have the parts sticking to the inside of the trashcan walls. You will see these in the build pics below.
The Headless Clown implementation uses actobotics for its internal structure. Actobotics are awesome and are basically like metal legos that you can easily configure however you would like and mount anything you want to them. I’ve mounted the cylinder, hoses, and breadboard setup to it. I stuck the actobotics down into 2 bales of hay for stabilization.
Here are some pics from the build out(s):
The code to make this work is very simple. I have identical code running on both devices to make these things work. The only thing that is different is the device id!
In Particle – I’ve written a simple program that creates a cloud function which invokes a function on the Photon and all that function does is write a pin from low to high… that’s it! What we’ve done is inject a relay into the circuit of the solenoid which allows us to use some logic to complete or short the circuit.
Here’s the firmware (code) that I’m using for the Particle Photons:
On the Web – I’ve written a basic jQuery AJAX function to call these web API (services) when buttons are clicked. Maybe jQuery is not cool anymore, but it’s pretty simple to implement so it works for me!
Here’s the code I’m using to make an HTTP Post request when a button is clicked. And if you’re worried about me showing you my access token below, no worries… I’ve already recycled it!
Structural & Electrical Video Walkthrough
In this section I aim to give you a structural overview of the devices. Both devices use pneumatic cylinders but are being stabilized in different ways.
Code Video Walkthrough
In this section I walk you through the setup of the devices and the code that I’m using to make them work. The whole point here is… if I can do this, then you can too!
The Halloween Reactions
In my area we currently have an 80% chance of rain on Halloween night so I'm not sure if we'll have any trick-or-treaters at all. I guess we'll see. If the weather cooperates, I will update this page after Halloween with a video showing reactions we get from trick-or-treaters and their parents. Stay tuned for the hopeful post-Halloween-video update!
I need to start out by saying that I’ve been inspired to do all this by some great guys in the Charlotte area and they are Dan Thyer, Mike Linnen, and Jay Ziobrowski… thanks for the motivation guys! I am either copying something creative I’ve seen them do or trying to imitate their passion, talent, and drive for Halloween and/or IOT projects. One day I hope to be as sharp and creative as they are.
Halloween & IOT
In 2016 I made a flame throwing pumpkin (copy-catting one of Dan’s inventions) and let’s just say some of the parents weren’t too keen on fire being near their kids and I also didn’t make any fans on the community’s HOA! Though, we all must start somewhere. In 2017 I went the safer route and made the AirGhost which is very similar to this year’s project.
The IOT Clown
This year I have created an IOT Clown. I did some testing and iterating on various ideas and concepts and there’s just no way to get around it… the thrust of compressed air brings a startling surprise and the best part is that it’s safe. We have tons of young kids in our neighborhood and moving a skeleton bone (which I debated in this early prototype) could likely hit someone, cause a toddler to fall, or trip someone up which could potentially lead to a spill on the concrete sidewalk. I don’t want to injure anyone or have some local parents mad at me, so I reverted to the compressed air, but then added a few more movements and changed the medium from a ghost to a clown.
Here’s a quick video of the end-product prototype just to show you where we’re heading… I’m going to dress it up a little more by Halloween, but you’ll get the gist.
Here are the main components I’m using for this project:
Here’s a video “talk-through” of the mechanical parts and power supplies being used.
Let’s Talk About Particle
The Particle platform is awesome! Check out this video of the Particle platform to learn more. I am admittedly a little bit behind all of Particle’s new innovations. I still need to learn about their Mesh and Argon solutions. Even though I’m not 100% up to speed I know you can do tons of creative stuff with the particle platform, their multiple IOT devices, and their integrated IDE. Since I’m using the Particle photon, we’ll start with it.
The Particle photon is a small IOT (internet of things) device that makes it easy to bring real world objects online. Particle makes it easy to setup the device and to connect to Wifi via a mobile app. If you want to know more about initially connecting and getting up and running with Particle they have some of the best documentation I’ve seen check out the doc, tutorials, and guides.
For this project all I really want to do is to move 3 servos… one for the head to spin, one for the head to roll, and one to push the handle on the air compressor. To do that we need to use the components I listed above + Particle’s platform + some code. I’ve listed out the components and just introduced the photon… now let’s look at some code.
Let’s Look at Some Code!
Particle’s platform is awesome, but we need some code to make things happen! I could easily copy and paste code here, but that wouldn’t help you understand the “why” and “how” behind some of the concepts. I hope to help you connect some dots here and as such I’ve cut a video walking through how I’m doing some of this stuff. The video shows code and includes videos of the device in action.
To all you senior devs… yes, the code shown in the video could be much better. I have not refactored anything yet, so the code is not nearly as efficient as it could be. And yes, I showed my handy Particle access token in the video… no worries though, by the time you read this I’ve already recycled it and created a new one.
Here are some relevant links:
So, with some disclaimers down and links shared let’s talk through the code some…
If you take the sum of all the info presented here that is how I’m making this happen!
And We Wait on Halloween!
Halloween is just about a week away at this point. If you have any questions or issues filling the gaps in this high-level tutorial, please reach out and ask your question. I plan on trying to video some of the fun at Halloween and posting any interesting reactions here just below this section… so stay tuned!
The Halloween Video
Check out some of the reactions we got from kids and a few adults!
In the past few years I’ve been getting into IOT. You may have seen tweets or blog about the Tech-Turkey project I’ve been working on or flame throwing pumpkins at Halloween. I’ve learned and used Arduinos, Raspberry Pi’s, and Particle Photons and Electrons. It has been fun to learn more and get into the connected world… the internet of things!
I’ve been keeping ServoCity in business and even recently worked to get a custom PCB created. Every step of the way I’ve been learning different things and realizing just how much more there is to learn. Recently I’ve started learning more about Splunk.
What is Splunk If you don’t already know what Splunk is, Splunk is a software company based in San Francisco that produces software for searching, monitoring, and analyzing machine generated big data via a web style interface. Splunk’s software helps organizations with operational intelligence, log management, application management, enterprise security and compliance.
Side note: In my first exploration into Splunk I wrote a blog about using Splunk with DNN that may interest you.
Particle & SplunkDNN is a web application, but what if I wanted to get data from an IOT device? That’s when we call on Particle. If you’re not familiar with Particle, it makes it really easy to bring real world objects online. Particle is one of my favorite IOT platforms. It makes awesome microcontrollers, provides a nice IDE, has awesome documentation, and a great community. Connecting to Particle’s cloud is straight forward and even southerners can do it! See my presentation at our user group on DNN & Particle.
If you’re not familiar with Splunk, it makes it really easy to pull in data (machine data) and make sense of it. I’m talking about parsing vast amounts of data, creating visualizations and/or alerts and making it simple to understand. Even southerners can use it too!
Both Particle and Splunk are industry leaders and have some really big names behind their companies and as clients of their companies.
So why not bring Particle & Splunk together?
Reading Temperature with ParticleTo use the awesomeness that both solutions bring us we’ll first need to read the temperature and post it to a webservice. Here again, Particle makes this easy. I used a basic temperature reader in a bread board layout for this experiment.
Then, in Particle’s IDE I used the basic tutorial level code to read an analog value and post it to a Particle cloud variable. Cloud variables are accessible via web services. That is, I can make a GET request and parse the JSON object to get the data. Epic.
Now we were cooking with oil! The next step was to get this data into Splunk.
Getting Particle’s RESTful Data Into SplunkGetting RESTful data into Splunk is really straightforward thanks to Splunk’s extensibility. Splunk has an extensions gallery that can be found on the Apps and Ad-Ons sections of the Splunk website. I tell you this because ultimately, I followed a blog by Damien Dallimore on getting REST data into Splunk which used a modular input extension and that was all it took. I simply completed the required fields in the Splunk REST Modular Input as shown below.
After clicking save, the data from my Particle temperature reader was showing up in Splunk!
Creating Dashboards from the Particle DataOnce data shows up in Splunk you can literally perform any search query you want on the data and create/configure dashboards, panels, reports, alerts and more. Splunk is very powerful in this regard and scale to infinity. However, for this scenario I just wanted log the temperature over time from one device, as well as the temperature’s highest, lowest, and average. Splunk, again, made this very simple.
After clicking on the “result” field I created some visualizations and voila! Out popped some neat dashboards showing all my data in a way that’s easy to understand.
If you are like me, you kind of want to see things in action. So for those of you like me who are visual learners, here’s a quick video of the solution in action.
An IOT Combination That’s Hard to Beat!As you can see, both solutions are awesome and the opportunities are endless. Consider the possibilities here… Particle is easy to deploy and post data to the net and Splunk can easily connect, suck in data, and bring instant insights. The more data you give to Splunk the more knowledge you’re going to have. Splunk can handle this at scale too… I mean massive scale. Why not connect thousands of devices and pump all the data into Splunk and tune it to your liking! I believe that’s what they refer to as operational intelligence 😊 Now my mind is spinning with possibilities. Is yours?
I also blog on other sites...
And contribute to OSS Documentation...
See my pics on UnSplash