Introduction: The Smell of Success

Picture of The Smell of Success

The Smell of Success is an Internet connected object that emits a puff of perfume every time you get a retweet.

Hacking an off the shelf automatic air freshener, we attached it to an Arduino and programmed it to be controlled through Processing. The software then listens to retweets of our @MintFoundry account. When it finds one, it sends a signal to the air freshener to puff.

Designed by Foundry at Mint Digital with assistance from Shaun Mcwhinnie

Here's a demo + explanation of it in action:



You will need:

COMPONENTS:
1x Digital Air Freshener (Make sure it has a tester button on the front - we have used a cheap one by Glade)
1x Arduino (with connection cable)
2x resistors (not sure what value)
some wires
a PCB

SOFTWARE:
Processing software (download from here: http://arduino.cc/en/Main/Software)
Arduino Software (download from here: http://processing.org/download/)

TOOLS:
A soldering iron + solder
wire cutters
wire strippers (unless you know how to strip wire with cutters)
thin pliers


For more information go visit: foundry.mintdigital.com/smell-of-success


Step 1: Hacking the Air Freshener

Picture of Hacking the Air Freshener

1. First things first, you will need to take apart the air freshener.

2. Remove batteries and unscrew the back, don't lose the screws, you will need them again.

3. Remove the motor and gear unit, taking note of how the gears are put back together.
The circuit board is then a bit tricky to remove as there are a couple of bits holding it in place. Keep at it, but be careful not to snap it!
Have a look at where the tester button is soldered onto the back of the board and de-solder it.
Solder two wires in it's place.

4. Put everything back together and slip the wires in through some hole or feature on the front.
Put the batteries back in and test that when the wires are connected at the exposed end it activates the dispenser.

Step 2: Connecting the Arduino

Picture of Connecting the Arduino

1.  Don't have a schematic diagram for this, the approach was a bit of trial and error until it worked. Would love to hear from an electronics person how to do it properly - I tend to hack and hope for the best!

2. Essentially you are using the wires as a switch connected to pin 13 on Arduino alongside a pull down resistor.


Step 3: Get OAuth Info From Twitter

1. Go to dev.twitter.com

2. Sign in with the details of the twitter account you wish to get retweets from.

3. Click on "Create an App" (it's towards the bottom right of the page)

4. Fill in the various fields (you have to do this but the details are not hugely relevant unless you are creating multiple apps), agree to the rules and enter the captcha information

5.The details you need are 'Consumer Key' and 'Consumer Secret' - these can be found under 'OAuth Settings'

6. You will also need your "Access Token" and "Access Token Secret" - these can be found under "Your Access Token"
If there is no information there, click on 'recreate my access token' and it should be regenerated

7. It is important that you do not share these values with other people as they will be able to do horrible things to your twitter account!

Step 4: Time for Code!

1. Download the file attached, it has various documents within it for the code

2. Open your Processing sketchbook folder. This is a folder on your computer where new sketches are automatically saved to. If you're unsure on where to find it, open Processing and create a new sketch, save it, then find where that file saved to - it will be a file called 'Processing' and that will be your Processing sketchbook

3. There should be a folder called 'libraries' within this Processing sketchbook folder - if so go to point 3a) if not go to point 3b)
    
     3a) Open the folder within the downloaded document called 'libraries' and copy the file from within it - called 'processing-arduino-0017' - into you own 'libraries' folder within the Processing sketchbook

     3b) Copy the entire 'libraries' folder from the downloaded document into the Processing Sketchbook - you now have a library within your Processing sketchbook!

4. Copy the folder called 'twitproduino' into your Processing sketchbook

5. Open up this folder now and within it is the processing file - open it up

6. Remember the 'Consumer Key'; 'Consumer Secret'; 'Access Token'; and 'Access Token Secret' values you got from twitter - enter them into the relevant fields within the code

7. Have a look at the Twitproduino code - there is a section titled 'Set Up Ardunio'. The first line underneath this begins with '//' this means that it is a comment and not read by the Processing as a line of instructional code. This line of code is important though for finding out which port on your computer the Arduino is connected to. So uncomment it (delete the '//') comment up the two lines below that so it looks like this:

  // Set up Arduino
  Arduino.list(); //Uncomment to get list of serial devices attached, update [x]. Remember to setup arduino pins as input or output here.
  //arduino = new Arduino(this, Arduino.list()[1], 57600);
  //arduino.pinMode(ledPin, Arduino.OUTPUT);

8. Plug in your arduino - but don't put the batteries in the air freshener unless you want to get covered in perfume

9. if you run this you will get a value for the Arduino port - should be a [1] or a [0] - use this to alter the Arduino.list()[X] value (where X is the value of your relevant port)

10. Change the commenting/uncommenting back to how it was originally now

NOTE: There may be a few errors, fingers crossed there are not, but if so please leave a comment and I'll do my best to debug!

Step 5: Lets Get Smelling!

1: So with the Arduino plugged into the computer open the arduino programming software.
Goto File/Examples/Firmata/StandardFirmata

2:Upload this information to the Arduino - it prepares the chip to take data from processing

3: Now with this data on the Arduino, go back to your Processing Twitproduino document and hit run.

4: If it works there will be a counter displaying your most recent retweeted tweet along with the number of times it has been retweeted.

5: With batteries plugged in to the air freshener (it should not puff while plugged in right now) do a test retweet of something from the account to make sure everything is communicating properly.

6: Give it a second or so and enjoy the blast of fragrance!

(let me know what issues there are if there are errors and I'll update this - this is my first instructable so may have missed something!)

Step 6: Optional - Make a Housing!

Picture of Optional - Make a Housing!

We just made a quick Kappa board box - share what you turn your housing into!

Fire an email over to foundry@mintdigital.com and show us what you have made

Comments

RossH15 (author)2015-12-09

I have a problem where when I unplug the arduino usb cable the air freshener will start sparying constantly. Does anyone know a way where I can wire the air freshener up differently to the tutorial to prevent this and has anyone had the same problem?

About This Instructable

7,506views

9favorites

License:

More by mintfoundry:The Smell of Success
Add instructable to: