The older I get, the smaller my cubicle gets. In fact, I don't even have a cubicle now. But my boss used to walk in undetected and catch me doing research for some assignment (WWW - to the boss it looked like web surfing) and he would tell me to get to work. I wanted to put a cowbell around him, but I'm sure he wouldn't go for it, so I had to come up with something else. (note - the title should be "Flatulent.")

Step 1: Picked Up This Nifty Noise Maker for About 6 Bucks in the Toy Section of the Food Store.

You can read the package for yourself. It has about 6 different random "tunes." But, the key item is the little RF remote button that comes with it.

Step 2: And I Found This Little Gem in WalMart for About $5.00.

Obviously it turns on a little light (LED) when motion is detected, and the room is dark. (Hmmmmm, I wonder if I could...)

Step 3: Okay. Let's Crack Open the Motion Sensor and Have a Look See...

Well, I labeled everything. The photocell (not shown, but trust me, it's there) is to prevent the light (LED) from coming on during the daytime, and therefore prolongs the battery life.

The Fresnel lens is there to provide a wide field-of view for the motion sensor. Fresnel is pronounced frie-nel, look it up on Wikipedia for more info.

Step 4: Let's Do Some Hackin'

First, you see that PIR motion detector. PIR means "Passive infra-red." Some people call it a "Pyro infra-red." I don't know why. Regardless, we wont hack that. We might need for something later.

Next, we've (well, me...but the royal we) have covered up that photocell I told you about. You see, I want my boss-detector to be active day and night. So, by covering it up, it thinks it's in the dark even when the lights are on. But, we've just pulled the wool over his eyes (actually one eye,) and he/she is now kept in dark.

And you can see that we have installed our own photocell right next to the LED. That little trick lets us know when the LED comes on because motion had been detected. Of course we could have ran a wire from the LED to achieve the same purpose, but where's the fun in that. The fun thing about hacking is to hack it differently than other hackers, as in the other electrical engineers. And that makes your hack a true original.

Step 5: The Photocell Circuit.

The photocell, such as you can buy at Radio Shack, has a resistance of about 50k ohms with no light exposure, and about 5k ohms or less when exposed to a bright light. So, if we use a resistor in series with the photocell, which is just a resistor, and tie them to a voltage source and ground, then we have a voltage divider. From there, tapping in between the two resistors provides a voltage signal which goes high or low, and can be used to trigger a device. In this case the motion detector uses 3xAA batteries, which is 4.5 volts. And this is how the circuit is wired to provide the signal needed to drive some other electronics. With the LED off, the circuit signal is about 1.7 volts, with the LED on, the signal rises to about 3.5 volts, which is enough to trigger a micro-controller

Step 6: Hacking the Remote Control Whoopee Button.

There's a button, which means somewhere there two pins, that when close-circuited, causes the whoopee cushion to do it's thing. The pins are fairly obvious, so I didn't show that part. But, I drilled a little hole and ran a pair of wires to the button pins. And, using a 5v reed relay from Radio Shack, I can connect the two pins by energizing the reed relay.

Step 7: Now for the Tricky Part.

It's not really that tricky if you know a little about electronics, but the deal is that you need to use the trigger signal to activate the system. You can use a one-shot timer, or a comparator, or a 555 timer, but, for me, the easiest thing is to use an 8-pin micro-controller. I used a PIC Micro 12F675. With that, I could trigger on input change of a pin, and flash a red LED. Also, if 5 people walk in I don't want the thing going crazy for 15 seconds, so I put in a 30 second delay so I could hit a kill switch and shut it off. So, I'll just fast-fwd and show the end result of the contraption. Note, I covered the LED so that the ex-boss would not see a light turn on every time he barged into my humble 1/4 of a cubicle.

This pic is the end product. I'll leave the electronics as an exercise for the student.

Here's the code for the PIC Micro 12F675:

; File name: Flatulant_Boss
; Processor: 12F675
; Author: Alan Mollick (alanmollick.com)
; Mode: Interrupt on GP2 change
; GP0 = INPUT -- n/c
; GP1 = OUTPUT -- relay
; GP2 = INPUT -- High = motion detected
; GP3 = INPUT -- n/c
; GP4 = OUTPUT -- Red LED
list p=12F675 ; list directive to define processor
#include <p12f675.inc> ; processor specific variable definitions
errorlevel -302 ; suppress message 302 from list file

; ~ Variables ~
w_temp EQU 0x20 ; variable used for context saving
status_temp EQU 0x21 ; variable used for context saving
hiB EQU 0x21 ; MSByte
lowB EQU 0x22 ; LSByte
temp EQU 0x23
spare EQU 0x24
temp1 EQU 0x25 ; trigger interrupt flag
temp2 EQU 0x26
delay EQU 0x27 ; delay time
pins EQU 0x28 ; pin state
spare1 EQU 0x29
spare2 EQU 0x2a
count EQU 0x2b ; loop count
count1 EQU 0x2c ; outer loop count
count2 EQU 0x2d ; outer loop count
d1 EQU 0x2e ; delay counter
d2 EQU 0x2f ; delay counter
d3 EQU 0x30 ; delay counter
d4 EQU 0x31 ; delay counter

RESET_VECTOR ORG 0x000 ; processor reset vector
goto main ; go to beginning of program
INT_VECTOR ORG 0x004 ; interrupt vector location
movwf w_temp ; save off current W register contents
movf STATUS,w ; move status register into W register
movwf status_temp ; save off contents of STATUS register

; isr code
call motion_detect ; send alarm signals

banksel INTCON
bcf INTCON,INTF ; clear GP2/INT flag

movf status_temp,w ; retrieve copy of STATUS register
movwf STATUS ;restore pre-isr STATUS register contents
swapf w_temp,f
swapf w_temp,w ; restore pre-isr W register contents
retfie ; return from interrupt

main: ; main program

; these first 4 instructions are not required if the internal oscillator is not used
call 0x3FF ; retrieve factory calibration value
bsf STATUS,RP0 ; set file register bank to 1
movwf OSCCAL ; update register with factory cal value
bcf STATUS,RP0 ; set file register bank to 0

;* Initialization *
; GP0= not used, GP1=relay output, GP2=input (motion detect),
; GP3=input for cntrl/emergency cutoff, GP4=output to LED indicator,
; GP5= not used

; set up direction of I/O pins
banksel TRISIO
movlw b'00000101'
; xx------ not implemented
; --0----- 0=output, GP5=n/c
; ---0---- 0=output, GP4=LED
; ----x--- not used, GP3, Dedicated to MCLR
; -----1-- 1=input, GP2 motion detected
; ------0- 0=output, GP1 = solenoid valve
; -------1 1=input GP0=A/D
movwf TRISIO

; set up A/D converter
banksel ANSEL
movlw b'00010000'
; x------- not implemented
; -001---- 001=Focs/8 Conversion Clock
; ----0--- 0=digital I/O, GP4, Fosc/4 clockout for debug purposes.
; -----0-- 0=digital I/O, GP2
; ------0- 0=digital I/O, GP1, relay/etc
; -------0 0=digital I/O, 1=analog GP0
movwf ANSEL

banksel ADCON0
movlw b'00000000'
; 0------- 1=right justified result
; -0------ 0=Vdd is voltage reference
; --xx---- not implemented
; ----00-- 00=select channel 0 (GP0)
; ------0- 0=A/D conversion not started
; -------0 0=A/D converter module is off
movwf ADCON0

; initialize output pins
banksel GPIO
movlw b'00000000'
movwf GPIO

; initialize interrupts
banksel INTCON
movlw b'00000000'
; 0------- 0=global interrupts disabled
; -0------ 1=enable peripheral interrupts
; --0----- 0=disable TMR0 overflow interrupt
; ---1---- 1=enable GP2/INT external interrupt
; ----0--- 0=disable GPIO port change interrupt
; -----0-- 0=no on TMR0 overflow
; ------0- 1=
; -------0 0=no GPIO port change
movwf INTCON

; initialize interrupt on pin change GP2
banksel IOC
movlw b'00000100'
; x------- not implemented
; -x------ not implemented
; --0----- 0=disable GP5
; ---0---- 0=disable GP4
; ----0--- 0=disable GP3
; -----1-- 1=enable GP2/INTR *****
; ------0- 0=disable GP1
; -------0 0=disable GP0
movwf IOC

banksel PIE1
movlw b'00000000'
; 0------- 0=disable EE write complete interrupt
; -0------ 0=disable A/D converter interrupt
; --xx---- not implemented
; ----0--- 0=comparator interrupt disabled
; -----xx- not implemented
; -------0 1=enable TMR1 overflow interrupt
movwf PIE1

banksel PIR1
movlw b'00000000'
; 0------- 0=no EE write complete
; -0------ 0=no A/D conversion complete
; --xx---- not implemented
; ----0--- 0=no comparator interrupt
; -----xx- not implemented
; -------0 0=no TMR1 overflow
movwf PIR1

; GP1=output to relay
; GP4=output to LED

banksel INTCON
bsf INTCON,INTE ; enable GP2 interrupt

; if GP2=1 then output alarm signals on GP1, GP4 via interrupt

goto Main_Loop

; Motion Detection Interrupt Handler
; GP1=output to relay, GP4=output to LED
bsf GPIO,1 ; energize relay for 100 msec
call pause_100ms
bcf GPIO,1 ; de-activate relay

bsf GPIO,4 ; activate LED for 0.5 sec.
call pause_500ms
bcf GPIO,4

; online Delay Code Generator
; http://massmind.org/techref/piclist/codegen/delay.htm

; Delay = 0.1 seconds
; Clock frequency = 4 MHz

movlw 0x1F ;99998 cycles
movwf d1
movlw 0x4F
movwf d2
decfsz d1, f
goto $+2
decfsz d2, f
goto Delay_100
goto $+1 ;2 cycles

; Delay = 0.5 seconds
; Clock frequency = 4 MHz
movlw 0x03 ;499994 cycles
movwf d1
movlw 0x18
movwf d2
movlw 0x02
movwf d3
decfsz d1, f
goto $+2
decfsz d2, f
goto $+2
decfsz d3, f
goto Delay_500

goto $+1 ;6 cycles
goto $+1
goto $+1

; Delay = 1 seconds
; Clock frequency = 4 MHz

movlw 0x08 ;999997 cycles
movwf d1
movlw 0x2F
movwf d2
movlw 0x03
movwf d3
decfsz d1, f
goto $+2
decfsz d2, f
goto $+2
decfsz d3, f
goto Delay_1sec
goto $+1 ;3 cycles


Step 8: Final Words.

This pic is one way to conceal everything.

Note - by using a micro-controller, the number of variations on this instructable are unlimited. You can place the speaker so it the sound emanates from behind your boss. Or, you can tie it into the company PA system. You can even have the system ping your computer and have a work related page pop up in 1/10 of a second so that any time that your ex-boss, or anybody else walks into your perimeter, there's always a spreadsheet, or technical document that you should be working on. And 24/7...anybody walking into your cubicle, or out of it, can say that you have your nose to the grindstone every second of the day. That makes you a high valued employee. You are a goddam workaholic.

Also, you don't really need the Fresnel lens. In fact, for boss-detection, it's better to remove it otherwise people inside your cubicle moving around will set it off. You can take the Fresnel lens off and put a 1 inch piece of PVC tubing (1/2 inch diameter from Home Depot) on the PIR detector and that will give you a very narrow field of view, such as directly at you doorway (assuming you have a door) but the sensor works just as well. It's range is about 5-10 feet without the Fresnel lens. You can also remove the PIR detector and using 3 wires, you can place the detector anywhere to make it concealed.

You can even buy a sound module for 6 bucks, and record your own sounds. You can use the international signal for "boss is approaching" which is clearing your throat. And you can change it every morning. Or record the sound of you typing feverishly, etc.

Here's a sound effect I made from that whoopee cushion, and ran it into my computer, edited it with Audacity, and used it for an Easy Button hack that I might put up one day.

Step 9: A Variation

Here's another boss detector based on the same concept. Also, somebody wanted a video, so I'll put up a video for this soon. The detector for this one is obviously a Robo Sapien mated to a motion detector from Home Depot. When motion is detected, the robot sends an IR signal to the bird cage where there is a hidden 38khz detector. The bird mechanism has several options. All options are individually selectable, but with everything turned on, the bird starts spinning, chirping, with a blinking LED. Also I added a superbright red LED mounted underneath that flashes 4 times so that you know somebody is coming without all the racket. This one also has a 30 second time delay, and you can disable the whole thing simply by lifting the pencil. The pencil has a magnet on the end which, when inserted into the bird feeder, enables the circuitry by way of a small magnetic reed relay. The only real difference in this system is that I didn't use the photocell trick. There's a quad op-amp in the motion detector, and I just tapped off the output pin of the final stage. I bought several of these bird things at a drug store because they were on sale for 5 bucks each. Then I added stones and vegetation in order to hide the IR detector, and made a little box out of cherry wood and varnished it to hide the extra AA battery I needed. The thing runs on 2 AA batteries, and is sound activated. I made it less sensitive to sound, and needed the extra battery because the 38khz detector I used needed at least 4.5 volts, which means 3 batteries. The motion detector was made to plug into a wall outlet, so I cut the big stuff off the circuit board and now it runs off of a 9v battery installed where the light bulb was located.

Here's a link to a video of this.


Not cool.<br>Like a Boss!
I can't wait for the Whoo-pee cushion radio controlled improvised explosive device, for War!
The title had me sitting here thinking, "Okay, so it's a fart detector!" Needless to say, I like this (motion activated farting device) better. I plan to make one that goes off when someone walks past the TV. Just for laughs...
boss motion decetor.. I have wnated to build one these for ever in fact i cant tell you how many posts i have put up on here trying to get sem help with it .. I had the same idea.. of it toggling the screen when motion is deteceted.. are you able to make me one. I will pay for it ! i want to conceal it in a bart doll or a cube toy ... and then have it detect motion and toggle my screen ... email me so we can chat ... thanks Ryan ryan.wilson ( at) rogers.com
How about going lo-tech and attaching one of <a rel="nofollow" href="http://www.sourcingmap.com/convex-round-blind-spot-mini-safety-mirror-p-20655.html?currency=GBP">these</a> above your monitor, then rely on your peripheral vision and that excellent pattern-recognition device - your brain - to give the alarm?<br/>
I gotta get me one of these. i bet i could use it to protect my favorite vinyl albums. That thing must have over a zillion uses (zillion isn't even a number)
actually it is a number, a very, very high number but a number nonetheless.<br/><br/><a rel="nofollow" href="http://dictionary.reference.com/browse/zillion">http://dictionary.reference.com/browse/zillion</a><br/>
It's not really a number, what the dictionary entry meant is that it is used to replace a specific large number.
Nicely <a rel="nofollow" href="http://tubeforme.com/">pointed</a> out... I wonder how many zillion's of times people have thought zillion wasn't a number.<br/>
de gustibus non est disputandum! (there is no accounting for taste.)
stop the foreign comments!would it be nice if i said "bu proje tam bir deli projesi seni herif"to you?
YOU [censored]S! STOP THE "(removed by poster)" thing!
I agree homeland security sucks. the US is all about the "proper procedure" regardless if there are lives on the line and every second counts. My word even paramedics are slow and incompetent. My dad almost died from his appendix rupturing and the paramedics just stood there calmly (all 4 of them who could barely fit in the room) and asked him questions my mom has already answered. The only advantage to being in the US is the freedom to kill and steal at your leisure. Yes, I live in the US, and no, I don't blame bush specifically, this started long before he was in office.
um. wow. your either faking that and know ALOT about that stuff or your telling the truth. I'm guessing you telling the truth based off of how intelligent your idea was in this instructable.
man good job on the flash im deeply impressed.. ironically i can play that song on drums.. me and my band used to play it at shows LOL!!! ppl where like wtf.. anyways good invention.. and sorry bout the chick thing..
Well, firstly, I disagree with the war in Iraq. If the war didn't cost in human lives, then there wouldn't even be public opinion holding back Bush the Lesser. Get rid of him, get out of Iraq, and then 25 to 30 good American men won't have to die each month. <br/><br/>Think about it - if the situation was reversed, would you *ever* give up? Nor will they!<br/><br/>The problem with such asymmetric warfare (30 a month on the US side, vs. 30 a day on the Iraqi side) is that the places you are occupying have no option but to turn to terrorism and guerilla warfare. It's evolution, because anyone dumb enough to try to stand and fight is dead already. No-one stands and fights an M1 Abrams with a few stones if they can help it. The only ways to win are to kill everyone, or leave. The killing everyone option seems not to be working, so why not use the other option, and leave?<br/><br/>With that out the way, on to the topic at hand.<br/><br/>The new shaped charge hand grenades are stick grenades, with a small trailing 'chute, to try and get them hitting head down onto the armour. There are some great videos of them on YouTube. Genuinely shaped charges, and as such they have to interface the target armour at the right distance and angles to be effective.<br/><br/>RPGs are totally different things, warhead aside.<br/><br/>The sticky bombs you mention were invented by the British, and they were very sticky. They weren't shaped charges, though, they were simply a HE head that exploded. To be honest, they weren't very effective, but they were designed for the Home Guard guys as much as anything, to give them some hope of beating a tank. But since they weren't even issued with ammo, generally...<br/><br/>The electrical defence is actually quite simple, but genius. Insulate a metal plate 1&quot; off from the armour, and whack a big capacitor across them. Charge it up.<br/><br/>When an RPG or other shaped charge hits the plate, the charge fires a (usually copper) slug of molten metal through the first plate at around 3000m/s. Think of this as your fusewire. As it reaches the actual armour and starts to penetrate, the capacitor discharges very rapidly through the conductive path opened up. This turns our fusewire into a blown fuse, and the light spatter of molten metal that hits the armour is, of course, easily stopped.<br/><br/>Again, have a look on YouTube, there is a video on there of a UK light armoured car being hit 10+ times by RPG7's with almost no effect.<br/>
That's really clever. Thanks for the info.
Yeah, fine with me if you use it... But instead of the horrid buzzer sound you might want to use a pezio siren of a relay to get a nice sound all together!
Before you continue bashing the US and it's policies, keep in mind where Israel's money comes from. Don't bite the hand that feeds you!
Israel isn't feeding me anything. I fed them a free design. I think you misunderstood what I wrote. Read it again.
I wouldn't be surprised it you wrote this while at work while enjoying the benefits of your boss detector.<br/><br/>=P Creativity at its finest.<br/>
This instructable is simply genius.
a great way to supplement this instructable would be to use "acehide free" its a program that lets you wide a window,( along with the tab in the taskbar) at the touch of a user defined shortcut
Well, you could use &lt;a rel=&quot;nofollow&quot; href=&quot;http://winlirc.sourceforge.net/&quot;&gt;WinLIRC&lt;/a&gt;, but I would use a little micro-controller in a box that goes between the keyboard and the PC. Knowing the keyboard interface (USB/AT) it's easy to send keystrokes. And I have already written a program using &lt;a rel=&quot;nofollow&quot; href=&quot;http://www.autohotkey.com/&quot;&gt;AutoHotkey&lt;/a&gt; script that let's you click on a page and do something else, and, later, with two keystrokes, that page or document you selected, will pop up on the display. So, without touching anything, a work-related page will always be displayed if anybody walks toward your cubicle. You can even have the computer beep in case you're checking your eyelids for pinholes when the boss walks in, and you can look alive by the time he walks in. And it wouldn't interfere with whatever you were typing at the time. And you could just ping the interface box with an IR or RF signal, or just use the RF signal from the whoopee machine.&lt;br/&gt;&lt;br/&gt;BTW, a friend read my instructable, and said that he has a door bell with an RF remote push button, and the whoopee thing is on the same frequency, and if somebody pushes the door bell, the whoopee thing start making noises.&lt;br/&gt;<br/>
There already is a counter-measure. In fact, there are several! Spaced armour plate, wire meshes, and the neat UK invented electrical defence all work. Probably not as well as not being there, but let's not get into that..<br/><br/>The latest Iraqi trick is the shaped charge handgrenades. They *really* pack a punch!<br/>
It wouldn't be much use AFTER being invaded! Also, the terrorists have a lot of trouble finding a courier to deliver the remote whoopee cushion and Wal-mart sensor.
If I were you I would have removed the high brightness LED from the motion sensor and speaker wire with a switch, large red LED and a buzzer so that when it sensed motion a red LED and buzzer would go off but you could turn the whole thing off with a switch... If you used 4 core wire you could have a momentary off switch to turn the circuit off and back on. I know this wouldn't be remote but in my opinion it would work better.
What the heck are you doing in a cubicle? You ought to get a financial/business mentor and become a squid labs.
Thanks. I put a lot of effort into getting it just right, and exactly 10 seconds long, which is the most I could put on the sound recorder board.
Homeland security bothers me, if everyone wasn't a wuss and could defend their own home/property we wouldn't need large money sucking security corporations now would we?
How about just hooking a webcam up to point at the doorway or such and have it so any motion triggers an alert in your system tray or the such. Takes probably 5min and $20.
it detects farts!!!!!???!!!!! Bless you ;-), farts are awesome lol.
Actually, it detects the boss, then it creates the farts.
My boss is a fart, so this could be very handy. Three years here and I'm still waiting for at least a cost of living raise (as is everyone else here). (Not to mention my 10 hours a day with lunch at my desk.)
You could just put a mirror on you monitor.
Mirror on your monitor.. *tisk* *tisk*<br/>Now... What fun would that be?<br/>Plus you can't right and Instructable about that! LoL!<br/>*jokes*<br/>
Right = write<br/>
next step: boss repellent!

About This Instructable




More by el_roboto_loco:Hacking the Failed Billion Dollar Border Security System Easy Button/WalMart Button/Whoopee Cushion Triple Hack++ Mil-Spec PEZ Dispenser 
Add instructable to: