Close
0%
0%

SitSat

In this project, I tried to hack into my sitting pattern and make the table area smarter itself.

Similar projects worth following
Being a health freak, I used to try different methods. There is very famous rule of 20/20/20 for eyes which I tried to implement using Arduino with simple blink program and three LEDs (RGY). I put the arrangement on my office table and it was quite helpful reminder to follow 20/20/20 rule.
Extending the idea, In order to detect my presence at desk area, I used HC-SR04 sensor. In order to improve the performance of whole system and take smarter trigger, I implemented two sensors.
Two sensors are permanently fixed beneath my work table as shown in figure. The threshold value is constant value of 24cm (2 feet) as per my sitting arrangement and chair height. As the figure clearly shows, as soon as both sensor value crosses 24cm, the message is generated and mail is sent through Cayenne setup. As soon as RPi pin 21 gets triggered, an email is sent.
The whole setup generates a lot of mail on daily basis, generates a report on monthly basis with google analytic.

Final assembly is shown in figure below. I have used GPIO extender as shown in figure in order to ease the wiring and flexible sensor placement.

Two sensors are permanently fixed beneath my work table as shown in figure below. The values generated from these two sensors are logically "and" operated to activate the trigger pin. Code structure is as following:

if (distance1 > threshold) and (distance2 > threshold):
	#Print the datetime of leaving the table
        GPIO.output(Rasptrigger, True)
	time.sleep(5)
else:
    GPIO.output(Rasptrigger, False)
    time.sleep(0.1)

Figure #4

Below figure shows the distance measurement from each sensor. The threshold value is constant value of 24cm (2 feet) as per my sitting arrangement and chair height. As the figure clearly shows, as soon as both sensor value crosses 24cm, the message is generated and mail is sent through Cayenne setup.

It is quite easy to setup triggers along with mail and SMS integration. Before Cayenne, I used to work with Python API for SMTP which keep giving me trouble due to advanced security features of gmail. Further SMS integration was a nightmare for me.

Just after creating a device name, just need to setup trigger condition as shown below. As soon as RPi pin 21 gets triggered, an email is sent as shown in below.In office hour of 8 hours, my goal is to take break from office chair for at least 20-30 times. Below figure shows all the mail is generated from last 5 days, it means I am much above goal.

Schematic:



plain - 65.28 kB - 04/19/2017 at 06:10

Download

View file

  • 1 × Raspberry Pi 3
  • 2 × Hc-Sr04
  • 1 × Sparkfun Logic Level Converter
  • 1 × Adafruit Raspberry GPIO extension board
  • 10 × Jumper Wires
  • 1 × Hot Glue Gun
  • 1 × Soldering Iron
  • 1 × Cayenne App
  • 1 × Google Spreadsheet

View project log

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates