$30 off During Our Annual Pro Sale. View Details »

Mmm... smells like Chips!

Mmm... smells like Chips!

My journey through my first hardware project as a software developer: The “Pookimeter” - A bad smells detector. Throughout the project I learned how to read hardware specs, burn a program to a very cheap chip, how to debug using a hardware simulator, and also the different components of the human gas extractions.

Diana Gastrin

October 27, 2022
Tweet

Other Decks in How-to & DIY

Transcript

  1. Mmm… Smells like Chips! Diana Gastrin, RS2022

  2. WHO AM I? Software Developer B.Sc. in Computer Science Side

    projects
  3. Arduino Starter Kit

  4. The Problem

  5. The Problem

  6. The Problem

  7. The Pookimeter

  8. The Pookimeter Code and Burn What is a Pookimeter? Hardware

    parts build it from scratch Software parts Debug Offline and Online 1 3 4 2
  9. What is a Pookimeter

  10. What is a Pookimeter Calibration mode ON / OFF Set

    𝒎𝒊𝒏 and 𝒎𝒂𝒙 values
  11. Human Gas Extraction Methane, 1.87 Co2, 417 Nitrogen, 780840 Clean

    Air Methane, 70000 Co2, 90000 Nitrogen, 590000 Pooked Air
  12. Demo

  13. Danse Macabre by Kevin MacLeod is licensed under a Creative

    Commons Attribution 4.0 license. https://creativecommons.org/licenses/by/4.0/ Source: http://incompetech.com/music/royalty-free/index.html?collection=005 Artist: http://incompetech.com/
  14. The Pookimeter Code and Burn What is a Pookimeter? Hardware

    parts build it from scratch Software parts Debug Offline and Online 1 3 4 2
  15. The Pookimeter Code and Burn What is a Pookimeter? Hardware

    parts build it from scratch Software parts Debug Offline and Online 1 3 4 2
  16. Hardware parts Version 1 1 Arduino 1 Button Wires 1

    Methane sensor 3 LEDs + Resistors 1 Breadboard
  17. Hardware parts 3 Digital Pins

  18. Digital Pull-up resistor Pin Hardware parts Pressed Low (0) Not

    Pressed High (1)
  19. 1 Analog Pin Hardware parts 1 0 1 1 1

    0 1 0 1 1 0 - 1023
  20. Cheaper and Smaller

  21. Hardware parts Microcontroller ATMEGA328-PU

  22. 1 Analog 4 Digital PIC12F683 ATMEGA328-PU Hardware parts Microcontroller

  23. Pookimeter V2

  24. Hardware parts Version 2 1 Button Wires 1 Methane sensor

    3 LEDs + Resistors 1 Breadboard 1 Microcontroller
  25. Hardware parts Power supplier v1 9𝑣 Convert to 5v

  26. Battery life https://www.digikey.com/en/resources/conversion-calculators/conversion-calculator-battery-life

  27. Hardware parts Power supplier v2 9𝑣 Convert to 5v

  28. Hardware parts Power supplier v3 5𝑣 Convert to 5v 𝑈𝑆𝐵

    2.0
  29. Hardware parts Version 2 1 Button Wires 1 Methane sensor

    3 LEDs + Resistors 1 Breadboard 1 Microcontroller
  30. Microcontroller PIC12F683 PIC12F683

  31. Microcontroller PIC12F683 I/O Ports + -

  32. Microcontroller PIC12F683 I/O Ports

  33. Microcontroller PIC12F683 I/O Ports Methane Sensor

  34. Microcontroller PIC12F683 I/O Ports Methane Sensor Push Button

  35. Pookimeter V3

  36. Hardware parts PCB Version 3 1 Button Wires 1 Methane

    sensor 3 LEDs + Resistors 1 Breadboard 1 Microcontroller
  37. Creating a PCB

  38. Creating a PCB Soldering Case printing

  39. The Pookimeter Code and Burn What is a Pookimeter? Hardware

    parts build it from scratch Software parts Debug Offline and Online 1 3 4 2
  40. The Pookimeter Code and Burn What is a Pookimeter? Hardware

    parts build it from scratch Software parts Debug Offline and Online 1 3 4 2
  41. Code

  42. IDE and Compiler IDE Compiler

  43. Code

  44. Code

  45. Code

  46. LOOP Methane Sensor value

  47. LOOP Map value to 0 - 9 Mapped value Value

  48. LOOP Map value to 0 - 9 GREEN LED 𝑣𝑎𝑙𝑢𝑒

    < 4 ORANGE LED 4≤ 𝑣𝑎𝑙𝑢𝑒 < 7 ** RED LED 7 ≤ 𝑣𝑎𝑙𝑢𝑒 **
  49. POOK

  50. POOK

  51. Issue

  52. Issue

  53. Issue

  54. Issue

  55. Issue

  56. Solution A Hysteresis

  57. LOOP Map value to 0 - 9 GREEN LED 𝑣𝑎𝑙𝑢𝑒

    < 4 ORANGE LED 3 ≤ 𝑣𝑎𝑙𝑢𝑒 < 7 RED LED 6 ≤ 𝑣𝑎𝑙𝑢𝑒
  58. Solution B Moving Average

  59. Burn the code

  60. Burn the code HEX file

  61. Burn the code HEX file K150 PIC Programmer K150 PIC

    Driver
  62. The Pookimeter Code and Burn What is a Pookimeter? Hardware

    parts build it from scratch Software parts Debug Offline and Online 1 3 4 2
  63. Offline debug

  64. Offline Debug

  65. Offline Debug

  66. PIC12F683 Data Memory Special function registers (SFR) General purpose registers

    (GPR)
  67. Offline Debug

  68. Online debug

  69. Online debug See the current values in the code Do

    beautiful graphs with the data Understand the data
  70. Online debug Information

  71. Online debug Information

  72. Online debug Information

  73. Online debug Information MCP2221 (Adafruit)

  74. Online debug Information MCP2221 (Adafruit) Python

  75. Online debug Information MCP2221 (Adafruit) Python Asynchronous serial protocol

  76. Online debug Send 23 (00010111) 20 ms init 5 ms

    for 0 10 ms for 1
  77. Online debug Time Mapped value

  78. Online debug Time Mapped value

  79. Online debug Time Mapped value

  80. Online debug Time Mapped value

  81. The Pookimeter Code and Burn What is a Pookimeter? Hardware

    parts build it from scratch Software parts Debug Offline and Online 1 3 4 2
  82. One more thing…

  83. Thanks! @gastrin_diana