# Journey to a fully automated garage



## ThomasA (Oct 2, 2015)

BOO!

I am doing a fully automated garage this year. Normally I did everything using PIR sensors but this year I wanted to take the edge of on the big day.

*Parts:*
(how ever many I need) relays
Arduino Mega
3 strand wire
IR remote + IR Receiver

*How it works:*
The IR remote has 2 settings (more can be used later) that control the intensity of the show.

There is some C code like this:


```
// In this code 0 is mega-scary and 1 is scary.
struct Prop {
int pin;
int level;
int timeframe; // in seconds
}

Prop[] props = {
{2, 1,20}, 
{3, 0, 20}, // Would only go off when its set to "scary"
{3, 1,20}, 
{3, 1,20}};
```
I then loop through the code and based on the IR button pressed, control the PINs. The relays are connected via a 3-strand wire to the arduino. I have actually modified the relays to use molex connectors, making them secure (and stupid proof).

If people are interested I could post my exact parts and code. If anyone has questions, feel free to ask.


----------



## JeffHaas (Sep 7, 2010)

Go ahead and describe as much as you can - people are always interested in learning how someone does this.

Why did you drop the PIR sensors? Just going to have the haunt run continuously, and then adjust the scaryness factor based on who goes in?


----------



## ThomasA (Oct 2, 2015)

JeffHaas said:


> Go ahead and describe as much as you can - people are always interested in learning how someone does this.
> 
> Why did you drop the PIR sensors? Just going to have the haunt run continuously, and then adjust the scaryness factor based on who goes in?


Yeah, we have a lot of popup stuff, we're in a mainly younger area and want to be able to let them choose how badly they get scared.

Also this way everything just works. The PIR sensors need power and it becomes a pain to tab into the 6V supply, then I needed a transistor to trigger ground. This, I have 10 cheapie relays, they draw nothing open, so I'll need little power. I'll be demoing a lot of my hacks since I have a place to show them off now hehe


----------

