0hmX/mq135-air-quality-sensor-module

This code defines a detailed PCB and schematic design for a Winsen MQ-135 air quality sensor module featuring the sensor itself, a comparator IC, voltage regulators, LEDs, resistors, a potentiometer, pin headers, and associated physical component footprints.

Version
1.0.1
License
unset
Stars
0

README.md

# FC-22 MQ-135 air-quality sensor module

This tscircuit project reconstructs the blue FC-22 breakout sold as Robocraze
RC-A-41350 / [Amazon India ASIN B07MY5PB8L](https://www.amazon.in/dp/B07MY5PB8L).
It is the sensor module itself, not a carrier board.

## Physical model

- 20.4 x 32.4 mm blue two-layer PCB with four 3 mm mounting holes on a
  15 x 27 mm center pattern.
- Directly soldered MQ-135 can: 19 mm diameter and six 1 mm leads on a circular
  9.5 mm pitch pattern.
- Bottom-side LM393, 3362P trimmer, LEDs, passives, and black connector body.
- 1x4, 2.54 mm right-angle male header whose pins project out of the short PCB
  edge. Pin order is `VCC`, `GND`, `DO`, `AO`.
- Local colored GLB models for the domed/perforated MQ can, trimmer, and bent
  header. Regenerate them with `bun run models:generate`.

Amazon's 36 x 24 x 25 mm value is treated as a coarse overall envelope that
includes the projecting connector. Dimensioned FC-22 drawings and matching
product photos support the 32.4 x 20.4 mm PCB outline used here.

## Circuit

The analog node is formed by the MQ-135 sensing resistance and a 2 kOhm load
resistor. One half of the LM393 compares that analog voltage with the 10 kOhm
trimmer threshold. `DO` is open-collector with a 10 kOhm pull-up and is active
low when `AO` rises above the threshold. The board also includes power and
digital-status LEDs plus local supply/analog decoupling.

`AO` and `DO` are 5 V-domain signals. This original module does not contain the
3.3 V dividers that were present in the earlier carrier-board interpretation.

## JLCPCB/LCSC BOM

Every surrounding component has an explicit, currently orderable JLC/LCSC
part number. The raw MQ-135 can is not stocked as a normal JLC assembly part,
so `MQ1` must be customer-supplied/consigned for assembly.

| References | Value / function | Package | JLCPCB/LCSC |
| --- | --- | --- | --- |
| U1 | LM393DR2G dual comparator | SOIC-8 | C7955 |
| RV1 | 3362P-1-103, 10 kOhm top-adjust | THT | C118956 |
| J1 | PZ254R-11-04P right-angle male header | THT, 2.54 mm | C492412 |
| R_PWR, R_DO | 1 kOhm | 0805 | C17513 |
| R_PULL | 10 kOhm | 0805 | C17414 |
| R_L | 2 kOhm load | 0805 | C17604 |
| R_H | 5.1 Ohm, 0.5 W heater return | 0805 | C313941 |
| C_AO | 100 nF X7R | 0805 | C49678 |
| C_VCC | 1 uF X7R | 0805 | C28323 |
| D_PWR | Red LED | 0805 | C84256 |
| D_DO | Green LED | 0805 | C2297 |
| MQ1 | MQ-135 sensing element | 6-lead radial | Customer-supplied |

FC-22 batches vary: some use a 1 kOhm load resistor or slightly different
capacitor/LED values. The 5R1 and 202 values here match the photographed board.

## Verification

```sh
bun install
bun run models:generate
bun run typecheck
bunx tsci check netlist
bunx tsci check schematic-placement
bunx tsci check placement
bunx tsci build --pcb-png
bunx tsci build --3d-png
bunx tsci check routing-difficulty
bunx tsci check shorts
bun run snapshot
```

References:

- [Robocraze MQ-135 module](https://robocraze.com/products/mq-135-gas-sensor-module)
- [Winsen MQ135 manual](https://www.winsen-sensor.com/d/files/mq135-%28ver1_6%29---manual.pdf)
- [Common FC-22 reverse-engineered schematic](https://www.codrey.com/wp-content/uploads/2020/01/Air-Quality-Sensor-MQ135-RE-Schematic-TK-768x436.png)