Interfacing Arduino with motion sensor and Glade

Hi everyone. This is my first endeavor into Arduino. I'm accustomed to playing with Phidgets and Max/Msp, but I'm trying something new for a change.

I'm working on a project for the next couple of weeks for an installation, and one of the components includes hacked Glade Wisp air fresheners a la I'm new to arduino and that type of coding, so that alone is going to take me awhile. After that my hope is to have 4 Wisps in the space with a motion sensor or two and have them spray the scent I assign it when there is movement in the space. Can anyone help me with instructions on how to accomplish this? Any help would be greatly appreciated. Thanks!

It should be fairly simple, as long as you already know how to activate the Glade devices from the Arduino. Motion sensor modules are pretty easy to use, but most of them seem to output too low a voltage to register as a high level on a digital input. Usually I will look for anything higher than 600 on an analog input. The Arduino should have you covered as long as you don’t need too many PIR sensors.

Here’s a source of PIR sensors:
I’ve used several of these modules for a few different projects and am very happy with the viewing angle and the detection distance. Simply give them power and run the signal pin into an analog input on the Arduino. Your code should check each input in the loop() section, then take appropriate action…if you get stuck at this point, post back in this thread and ask for some example snippets.


This is SO similar to a project I did a few years ago it's not funny. I used exactly the same glade airfresheners.

Firstly, get the version with a "boost" button - it lets you spray whenever you want in addition to the timed sprays.

I just used a simple opto-isolator to set off the spray. I permanently soldered the "boost" button down, then cut the line going to the button, and put it across the opto-isolator. When you want the spray to happen, just send a high to the input of the isolator.

This is where my project starts to differ though - I wanted it to spray, but I also wanted it to catch fire! Essentially I wanted to make a controllable flamethrower. My problem was the ignition system - I could never reliably make a spark at the right time.

Any ideas?

This is where my project starts to differ though - I wanted it to spray, but I also wanted it to catch fire!

Well, that definitely "differs"...

I'm not sure whether I should encourage this sort of behavior (or demand a signed liability release before offering a suggestion), but, if I wanted to risk life and/or limb by unleashing a robotic flamethrower, I'd probably try using a servo to push the button on a disposable piezoelectric cigarette lighter.

I'd also use a Mythbusters-style remote setup, because I'd be worried about a malfunction causing a fire that resulted in the can exploding.