# Raspberry Pi Pico | End-to-end AI Design Tutorial [Example] ## Description Raspberry Pi Zero 2W with 5V MQ Gas Sensor and ADS1115 I²C ADC: Breadboard Interface Design ## Project Details - **Owner:** parker01 - **Created:** 7/28/2025 - **Last Updated:** 7/28/2025 - **Visibility:** Public - **Power Requirements:** USB - **Breadboard Guide:** - TP_3V3 → top power rail (+) - TP_GND → top power rail (-) - TP_5V → top 5V rail - TP_SDA → breadboard row 10 - TP_SCL → breadboard row 12 - TP_ALERT → breadboard row 14 - J1 pin 1 (MQ VCC) → breadboard row 20 power rail (+) - J1 pin 2 (MQ GND) → breadboard row 20 ground rail (-) - J1 pin 3 (MQ OUT) → breadboard row 20 - **Breadboard Outline Size:** 165.1 mm by 54.0 mm - **System Architecture:** ```mermaid graph LR subgraph Sensor_FrontEnd MQ["MQ Sensor 5V Supply, A0 Out"] R1["100kΩ"] DivNode["Divider Node / A0 Input"] R2["62kΩ"] C1["47nF Filter"] MQ -- out --> R1 --> DivNode DivNode --> R2 --> GND["GND"] DivNode --> C1 --> GND end subgraph ADS1115_ADC ADC["ADS1115"] VDD["VDD"] GND2["GND"] ADDR["ADDR=GND"] A0["AIN0 (DivNode)"] SDA["SDA"] SCL["SCL"] ALERT["ALERT"] VDD --> ADC GND2 --> ADC ADDR --> ADC C9["100nF"] --> VDD C9 --> GND2 C8["10µF"] --> VDD C8 --> GND2 A0 --> ADC SDA --> ADC SCL --> ADC ALERT --> ADC end subgraph I2C_Interface R5["4.7kΩ PU"] R6["4.7kΩ PU"] R3["100Ω Series"] R4["100Ω Series"] TP_SDA["TP_SDA"] TP_SCL["TP_SCL"] TP_ALERT["TP_ALERT"] TP_3V3["TP_3V3"] TP_5V["TP_5V"] TP_GND["TP_GND"] SDA --> R3 --> TP_SDA SCL --> R4 --> TP_SCL ALERT --> R7["100Ω Series"] --> TP_ALERT R5 --> TP_3V3 R6 --> TP_3V3 end ``` - **Connectivity:** WiFi - **Prototype Wiring Map:** Pi pin 1 (3V3) 163 163 763 163 TP_3V3 net 3V3 Pi pin 6 (GND) 163 163 763 163 TP_GND net GND Pi pin 2 or 4 (5V) 163 163 763 163 TP_5V net 5V Pi pin 3 (GPIO2 SDA) 163 163 763 163 TP_SDA net SDA Pi pin 5 (GPIO3 SCL) 163 163 763 163 TP_SCL net SCL Pi pin 7 (GPIO4 ALERT) 163 163 763 163 TP_ALERT net ALERT - **Part Type:** Processor - **Manufacturer Name:** Raspberry Pi - **System Architecture:** ```mermaid graph LR Pi test pads --> ADS1115 ADS1115 --> MQ front-end MQ front-end --> I²C/pull-ups I²C/pull-ups --> MQ header ``` - **Connectivity:** Bluetooth - **Operating Voltage:** 3.3V - **Finished Project URL:** https://www.flux.ai/nico/rp2040-only-ai - **Title:** Raspberry Pi Zero 2W Front-End Interface for MQ Gas Sensors with ADS1115 I²C ADC ## Key Components ### ADS — [ADS1115IDGSR](https://www.flux.ai/adrian95/ads1115idgsr~3y9.md) - Role Details: 16-bit I2C ADC for sensor interface - License: https://creativecommons.org/licenses/by/4.0/ - Datasheet URL: https://www.ti.com/general/docs/suppproductinfo.tsp?distId=10&gotoUrl=https%3A%2F%2Fwww.ti.com%2Flit%2Fgpn%2Fads1113 - Manufacturer Part Number: ADS1115IDGSR - Part Type: Integrated Circuit - Manufacturer Name: Texas Instruments **Pins:** - ADDR [pin 1] - AIN0 [pin 4] - AIN1 [pin 5] - AIN2 [pin 6] - AIN3 [pin 7] - ALERT/RDY [pin 2] - GND [pin 3] - SCL [pin 10] - SDA [pin 9] - VDD [pin 8] ### MQ_HEADER — [0022232031](https://www.flux.ai/adrian95/0022232031~ox7.md) - License: https://creativecommons.org/licenses/by/4.0/ - Datasheet URL: https://www.molex.com/pdm_docs/sd/022232031_sd.pdf - Manufacturer Name: Molex - Part Type: Connector - Manufacturer Part Number: 0022232031 - Role Details: MQ sensor module connector - Role: Connector **Pins:** - 1 [pin 1] - 2 [pin 2] - 3 [pin 3] ### PI_3V3 — [5019](https://www.flux.ai/adrian95/5019~fxh.md) - Part Type: Test Point - Datasheet URL: https://www.keyelco.com/product-pdf.cfm?p=1357 - Manufacturer Part Number: 5019 - Role Details: Test pad for net 3V3 - Manufacturer Name: Keystone Electronics - Package or Case Code: 5019 - License: https://creativecommons.org/licenses/by/4.0/ **Pins:** - 1 [pin 1] ### PI_5V — [5019](https://www.flux.ai/adrian95/5019~fxh.md) - Package or Case Code: 5019 - License: https://creativecommons.org/licenses/by/4.0/ - Manufacturer Name: Keystone Electronics - Datasheet URL: https://www.keyelco.com/product-pdf.cfm?p=1357 - Manufacturer Part Number: 5019 - Part Type: Test Point - Role Details: Test pad for net 5V **Pins:** - 1 [pin 1] ### PI_ALERT — [5019](https://www.flux.ai/adrian95/5019~fxh.md) - Role Details: Test pad for net ALERT - Manufacturer Part Number: 5019 - Datasheet URL: https://www.keyelco.com/product-pdf.cfm?p=1357 - Part Type: Test Point - Package or Case Code: 5019 - License: https://creativecommons.org/licenses/by/4.0/ - Manufacturer Name: Keystone Electronics **Pins:** - 1 [pin 1] ### PI_GND — [5019](https://www.flux.ai/adrian95/5019~fxh.md) - Datasheet URL: https://www.keyelco.com/product-pdf.cfm?p=1357 - Manufacturer Part Number: 5019 - Role Details: Test pad for net GND - Part Type: Test Point - License: https://creativecommons.org/licenses/by/4.0/ - Package or Case Code: 5019 - Manufacturer Name: Keystone Electronics **Pins:** - 1 [pin 1] ### PI_SCL — [5019](https://www.flux.ai/adrian95/5019~fxh.md) - Manufacturer Name: Keystone Electronics - Package or Case Code: 5019 - License: https://creativecommons.org/licenses/by/4.0/ - Part Type: Test Point - Manufacturer Part Number: 5019 - Role Details: Test pad for net SCL - Datasheet URL: https://www.keyelco.com/product-pdf.cfm?p=1357 **Pins:** - 1 [pin 1] ### PI_SDA — [5019](https://www.flux.ai/adrian95/5019~fxh.md) - Manufacturer Name: Keystone Electronics - License: https://creativecommons.org/licenses/by/4.0/ - Role Details: Test pad for net SDA - Package or Case Code: 5019 - Part Type: Test Point - Datasheet URL: https://www.keyelco.com/product-pdf.cfm?p=1357 - Manufacturer Part Number: 5019 **Pins:** - 1 [pin 1] ### TP_3V3 — [5019](https://www.flux.ai/adrian95/5019~fxh.md) - License: https://creativecommons.org/licenses/by/4.0/ - Package or Case Code: 5019 - Manufacturer Name: Keystone Electronics - Manufacturer Part Number: 5019 - Datasheet URL: https://www.keyelco.com/product-pdf.cfm?p=1357 - Role Details: Test pad for net 3V3 - Part Type: Test Point **Pins:** - 1 [pin 1] ### TP_5V — [5019](https://www.flux.ai/adrian95/5019~fxh.md) - Package or Case Code: 5019 - Role Details: Test pad for net 5V - License: https://creativecommons.org/licenses/by/4.0/ - Manufacturer Name: Keystone Electronics - Datasheet URL: https://www.keyelco.com/product-pdf.cfm?p=1357 - Manufacturer Part Number: 5019 - Part Type: Test Point **Pins:** - 1 [pin 1] ### TP_ALERT — [5019](https://www.flux.ai/adrian95/5019~fxh.md) - Datasheet URL: https://www.keyelco.com/product-pdf.cfm?p=1357 - Manufacturer Part Number: 5019 - Part Type: Test Point - Role Details: Test pad for net ALERT - License: https://creativecommons.org/licenses/by/4.0/ - Package or Case Code: 5019 - Manufacturer Name: Keystone Electronics **Pins:** - 1 [pin 1] ### TP_GND — [5019](https://www.flux.ai/adrian95/5019~fxh.md) - License: https://creativecommons.org/licenses/by/4.0/ - Package or Case Code: 5019 - Manufacturer Name: Keystone Electronics - Manufacturer Part Number: 5019 - Datasheet URL: https://www.keyelco.com/product-pdf.cfm?p=1357 - Role Details: Test pad for net GND - Part Type: Test Point **Pins:** - 1 [pin 1] ### TP_SCL — [5019](https://www.flux.ai/adrian95/5019~fxh.md) - Part Type: Test Point - Manufacturer Part Number: 5019 - Datasheet URL: https://www.keyelco.com/product-pdf.cfm?p=1357 - Role Details: Test pad for net SCL - Manufacturer Name: Keystone Electronics - License: https://creativecommons.org/licenses/by/4.0/ - Package or Case Code: 5019 **Pins:** - 1 [pin 1] ### TP_SDA — [5019](https://www.flux.ai/adrian95/5019~fxh.md) - Part Type: Test Point - Role Details: Test pad for net SDA - Manufacturer Part Number: 5019 - Datasheet URL: https://www.keyelco.com/product-pdf.cfm?p=1357 - Manufacturer Name: Keystone Electronics - License: https://creativecommons.org/licenses/by/4.0/ - Package or Case Code: 5019 **Pins:** - 1 [pin 1] ### U1 — [RP2040](https://www.flux.ai/vasy_skral/rp2040~kqt.md) - License: https://creativecommons.org/licenses/by/4.0/ - Part Type: Microcontroller - Datasheet URL: https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf - Manufacturer Name: Raspberry Pi - Manufacturer Part Number: RP2040 - Symbol Style: Parametric **Pins:** - ADC_AVDD [pin 43] - DVDD [pin 50] - DVDD [pin 23] - GND [pin 57] - GPIO0 [pin 2] - GPIO1 [pin 3] - GPIO10 [pin 13] - GPIO11 [pin 14] - GPIO12 [pin 15] - GPIO13 [pin 16] - GPIO14 [pin 17] - GPIO15 [pin 18] - GPIO16 [pin 27] - GPIO17 [pin 28] - GPIO18 [pin 29] - GPIO19 [pin 30] - GPIO2 [pin 4] - GPIO20 [pin 31] - GPIO21 [pin 32] - GPIO22 [pin 34] - GPIO23 [pin 35] - GPIO24 [pin 36] - GPIO25 [pin 37] - GPIO26/ADC0 [pin 38] - GPIO27/ADC1 [pin 39] - GPIO28/ADC2 [pin 40] - GPIO29/ADC3 [pin 41] - GPIO3 [pin 5] - GPIO4 [pin 6] - GPIO5 [pin 7] - GPIO6 [pin 8] - GPIO7 [pin 9] - GPIO8 [pin 11] - GPIO9 [pin 12] - IOVDD [pin 10] - IOVDD [pin 49] - IOVDD [pin 33] - IOVDD [pin 1] - IOVDD [pin 22] - IOVDD [pin 42] - QSPI_CSN [pin 56] - QSPI_SCLK [pin 52] - QSPI_SD0 [pin 53] - QSPI_SD1 [pin 55] - QSPI_SD2 [pin 54] - QSPI_SD3 [pin 51] - RUN [pin 26] - SWCLK [pin 24] - SWD [pin 25] - TESTEN [pin 19] - USB_DM [pin 46] - USB_DP [pin 47] - USB_VDD [pin 48] - VREG_VIN [pin 44] - VREG_VOUT [pin 45] - XIN [pin 20] - XOUT [pin 21] ### U3 — [MQ-2](https://www.flux.ai/vasy_skral/mq-2~b9j.md) - License: https://creativecommons.org/licenses/by/4.0/ - Part Type: Integrated Circuit - Role Details: Generic MQ gas sensor front-end - Role: Sensor - Manufacturer Part Number: MQ-2 - Manufacturer Name: SparkFun Electronics - Symbol Style: Parametric - Datasheet URL: https://cdn.sparkfun.com/assets/3/b/0/6/d/MQ-2.pdf **Pins:** - A1 [pin 6] - A2 [pin 4] - B1 [pin 1] - B2 [pin 3] - VH- [pin 5] - VH+ [pin 2] *The full schematic, PCB layout, bill of materials, and interactive design are available at [https://www.flux.ai/parker01/raspberry-pi-pico-or-end-to-end-ai-design-tutorial-example~ty](https://www.flux.ai/parker01/raspberry-pi-pico-or-end-to-end-ai-design-tutorial-example~ty).* --- *Generated from [https://www.flux.ai/parker01/raspberry-pi-pico-or-end-to-end-ai-design-tutorial-example~ty](https://www.flux.ai/parker01/raspberry-pi-pico-or-end-to-end-ai-design-tutorial-example~ty)*