Internet of dusty things

637 views
546 views

Published on

Building Air Purifier and Pollution Sensors with the help of Ruby in Beijing. Talk was given at eurucamp 2014 in Berlin.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
637
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
6
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Internet of dusty things

  1. 1. Internet of Dusty Things by Daniel Bovensiepen
  2. 2. Building Metros mruby core committer <3 3D Printer
  3. 3. – Objective “My kid is the youngest attendee @eurucamp 2014. I want him to be the oldest @eurucamp 2114.”
  4. 4. Airpocalypse ~2
  5. 5. Masks self-protection outside
  6. 6. Bad Air Good Air MAGIC(TM)
  7. 7. Bad Air Good Air MAGIC(TM) airflow
  8. 8. 1. Version • Dual-use of dorm room fan • HEPA filter (80RMB) • Tape and cardboard
  9. 9. ~7
  10. 10. –Dylos Serial reading port = ARGV[0] logfile = ARGV[1] ser = SerialPort.new(port, 9600, 8, 1, SerialPort::NONE)   loop do line = '' loop do char = ser.getc # .. normalize line format .. sleep 0.1 end File.open(logfile, "a+") do |f| txt = "#{DateTime.now.strftime("%Y-%m-%d--%H-%M-%S")} #{line.strip}" f.puts txt end end
  11. 11. Dylos
  12. 12. Dylos
  13. 13. Dylos
  14. 14. expensive
  15. 15. –Cross Compile mruby configuration to ARM http://blog.mruby.sh/201305310507.html
  16. 16. –SHINYEI TECHNOLOGY Co., Ltd. “Thank you for your inquiry of Shinyei Particle Sensor. We usually do not disclose the information you have inquired.”
  17. 17. expensive
  18. 18. –SAMYOUNG S&C Co., Ltd.
  19. 19. –SAMYOUNG S&C Co., Ltd.
  20. 20. –flank Algorithm # .. mcu loop ..   if digitalRead(pin) == LOW unless was_low? # just changed to low; lets save the start start_low = millis was_low? = true end else if was_low? # Low pulse complete   # Calculate the duration of the low pulse duration = millis - start_low # Valid low pulses are only 10ms to 90ms long low_sum += duration if duration >= 10 && duration <= 90 not_low_anymore end end
  21. 21. –flank Algorithm # .. mcu loop ..   if digitalRead(pin) == LOW unless was_low? # just changed to low; lets save the start start_low = millis was_low? = true end else if was_low? # Low pulse complete   # Calculate the duration of the low pulse duration = millis - start_low # Valid low pulses are only 10ms to 90ms long low_sum += duration if duration >= 10 && duration <= 90 not_low_anymore end end Low Flank High Flank
  22. 22. Dylos DSM501a
  23. 23. Dylos DSM501a
  24. 24. DIY Air Purifier ~17
  25. 25. airflow airflow airflow under pressure
  26. 26. Potsdam Air Good Air airflow
  27. 27. Beijing Air Good Air airflow
  28. 28. –PWM based on low pulse ratio # .. mcu loop ..   # acquire ratio (usually between 0% to 10%) ratio = lowpulseoccupancy_ratio(sensor_pin) # map 0-10% to full PWM range and # re-use this ratio as duty cycle analogWrite(fan_pin, 255 / 100 * ratio * 10)
  29. 29. 2. Version • using suction for air flow • fan speed based on air quality
  30. 30. Internet of Dusty Things • contains WIFI and ETH • stable Linux support • 4MB Flash • 16MB RAM
  31. 31. mruby ARM MIPS4k Cross Compile
  32. 32. mruby ARM MIPS4kmruby Cross Compile Cross Compile
  33. 33. http://blog.mruby.sh/201405051415.html Port mruby to everything mruby OpenWRT MIPS4k i.e. PS3Cross Compile Cross Compile pack
  34. 34. Feature Wish List Cloud Storage of Pollution Remote Control Time Scheduler Automatic Filter Exchange Notification History Graph of Pollution Software Upgrade
  35. 35. 3. Version • remote control via wlan • air sensing and filter check • data graphing and collection
  36. 36. I see particles
  37. 37. Portable Counting
  38. 38. Sum-Up

×