Anti-Fart Chair

by kamphuisjulius in Circuits > Arduino

120 Views, 1 Favorites, 0 Comments

Anti-Fart Chair

IMG_5240.jpg

Hi!

Have you ever noticed a person farting? Have you ever wondered who it was? Did you feel mad, angry, furious, and believe they should be shamed for their actions, but you just couldn't do it yourself? With this educational product you can discipline overly gassy individuals in no time!

Supplies

In addition to the supplied 3D Printed parts I used:

  • 1 IKEA GUNDE fold up chair (Other chairs of similar build should also work)
  • 1 Arduino UNO
  • 1 MQ2 Gas Sensor
  • 8 Wires
  • 1 Axe copper sandal deodorant (Other scents work fine too)
  • 1 MG 995 Servo motor
  • Kit/Superglue

Concept

This is a chair, perfectly ordinary chair, nooothing suspicious about it, just kidding.

The chair contains a gas sensor, which can pick up farts, once it detects a fart it will spray off a can of axe bodyspray into the perpetrators back, shaming them and at the same time marking them for the rest of the day.

The original idea with this project was to make something that could seek out the sources of a gas, however with the way that gasses diffuse through a room, this would not be possible using a gas sensor. So i decided to limit the scope of the project to a chair, that could detect, rather than seek out.

Testing Gas Sensor

ITTT MQ2 Test

I knew MQ2 gas sensors could pick up on many different gasses, and sources online said they should be able to pick up human gasses as well. But there was only one way to find out for sure. In this clip you can find the first clip of the gas sensor properly working

The Chair

IMG_5193.jpg

Make sure you drill a hole in the chair for the MQ2 Sensor to fit through. Make sure to place this as close to your bottom as you can get it, but not so close as to where you will sit on it (See image).

The Spray

IMG_5182.jpg
Schermafbeelding 2024-03-27 162908.png
circ.png
IMG_5199.jpg
IMG_5213.jpg
Spray mechanism demo

3D Print the attached file (see below for settings used). This will serve as the housing for the spraying mechanism. I'm unsure about the consistency in size of axe bodyspray bottles, so i strongly recommend you measure it yourself and adjust the model as you see fit. Insert the spray into the hole, making sure the nozzle is facing forward. then add the Servo in its slot, and bring its wires through the small hole next to it.

I personally used kit to attach the print to the chair (some other sort of glue should work as well.), if you're using the same chair as i the curve of the chair you wont allow you to uniformly get the housing on the back of the chair, so i later added some zip ties to make sure the print was secure.

Printed in cura with a 0.8 mm nozzle

settings used in cura:

  • 0.32 mm line width
  • 3 walls
  • 15% infill printed with supports
  • 20% support infill

total print time (with these settings) if everything prints fine in one go ~ 12 hours and 51 minutes. 350 grams of fillament

Downloads

Arduino Time!!

circ.png
IMG_5103.jpg
image.png
IMG_5221.jpg
IMG_5229.jpg
IMG_5228.jpg
IMG_5231.jpg

Print the next models, these will serve as the holders for the arduino and the sensor! Now it's time for everyones favorite part, soldering! We're not using a PCB in this setup, so we'll have to split the 5V, twist three wires and solder them together, this you can now hook up to the VCC on the sensor and the motor! Make sure you bring the sensors wires through the holes, before soldering!

When your done, stick everything to your chair like you did with the spray. Make sure the housing of the arduino is as far back as you can get it, because otherwise the wires might not reach the spray.

Also i left the connection to the wires on the arduino and the wires on the Servo unsoldered and exposed. This is mainly due to the sensor picking up the deodorant as another form of gas, causing it to go on infinitely when it starts spraying. This allows me to easily disconnect everything, you could also add a simple timer in the code to stop the spray for a bit, so deodorant can diffuse before it reads again, but i thought it would be funnier to empty the whole deodorant can in one go.

The Code

#define sensorPin A0
#include <Servo.h>

Servo myservo;
//Makes sure servo is always in the same spot.
int pos = 0;


void setup() {
myservo.attach(9); // attaches the servo on pin 9 to the servo object
Serial.begin(9600);

}


void loop() {
Serial.print("Analog output: ");
Serial.println(readSensor());
}


// This function returns the analog data to calling function
int readSensor() {

unsigned int sensorValue = analogRead(sensorPin); // Read the analog value from sensor

unsigned int outputValue = map(sensorValue, 0, 1023, 0, 255); // map the 10-bit data to 8-bit data

//This value should work fine, but there is a chance that your environment has a way different composition of gasses, in that case make a baseline reading and add about 10 to that to get your own value.
if (outputValue > 50){

//Activate servo (makes the deodorant spray)
for (pos = 0; pos <= 180; pos += 1) { // goes from 0 degrees to 180 degrees
// in steps of 1 degree
myservo.write(pos);
// tell servo to go to position in variable 'pos'
delay(15);
// waits 15ms for the servo to reach the position
}
delay(5000);
}
//make sure there is a base position it goes back to afterward.
else{
for (pos = 180; pos >= 0; pos -= 1) { // goes from 180 degrees to 0 degrees
myservo.write(0); // tell servo to go to position in variable 'pos'
delay(15); // waits 15ms for the servo to reach the position
}


}
return outputValue;
}

This will be the code used in your arduino, in summary, it checks if the concentration of gas is above a certain threshold, and if it is, it activates the servo for some time after which it restarts.

You Are Done!

ITTT Anti-Fart Chair Demo

Enjoy making these poor gassy fools suffer!

Some Important Things I Learned

Good ventilation is very very very important, spraying the deodorant for about 10 seconds will linger for a good 48 hours, great for deodorant, horrible for your lungs. So be careful!