# Water Level Motor Controller
## Description
Analog water-level controller using an LM31 liquid level sensor input and PEL00884 brushed DC motor drive. The circuit buffers and scales the ratiometric sensor signal, derives motor current demand versus water level, shuts the motor off at 100%, and lights a green full-tank LED.
## Project Details
- **Owner:** brunomilassin
- **Created:** 5/27/2026
- **Last Updated:** 5/27/2026
- **Visibility:** Public
- **Implementation Details:** Three-stage analog design: sensor buffer/reference conditioning, op-amp current reference generation, BJT low-side motor current source with 100% full-level comparator and green LED.
- **Power Requirements:** Stable 5 V rail for LM31 and op-amps; separate motor supply sized for up to 330 mA stall plus margin.
- **Domain:** Analog motor control / liquid level sensing
- **Operating Voltage:** 5 V analog rail; 6 V motor rail recommended for PEL00884
## Key Components
### D1 — [1N4007RLG](https://www.flux.ai/jecstronic/1n4007rlg~07j.md)
- Manufacturer Name: onsemi
- Manufacturer Part Number: 1N4007RLG
- Role: Flyback / Freewheeling
- License: https://creativecommons.org/licenses/by/4.0/
- Part Type: Diode
- Role Details: Clamps inductive kick from the PEL00884 motor when drive current is reduced or switched off.
- Datasheet URL: https://www.onsemi.com/pdf/datasheet/1n4001-d.pdf
**Pins:**
- anode [pin 2]
- cathode [pin 1]
### D2 — [JAN1N4148UR-1](https://www.flux.ai/adrian95/jan1n4148ur-1~0e.md)
- Manufacturer Part Number: JAN1N4148UR-1
- Role: Clamping
- License: https://creativecommons.org/licenses/by/4.0/
- Manufacturer Name: Microchip Technology
- Part Type: Diode
- Datasheet URL: https://www.mouser.com/datasheet/2/268/lds_0281_1-1593505.pdf
- Role Details: At full level U1 comparator output goes low and clamps Q1 base drive off through this diode.
**Pins:**
- A [pin 2]
- K [pin 1]
### J1 — [DB127V-5.08-2P-GN-S](https://www.flux.ai/cherepanyadima/db127v-5p08-2p-gn-s~ic.md)
- Part Type: Connector
- Manufacturer Name: DORABO
- Datasheet URL: https://www.lcsc.com/datasheet/C3018698.pdf?spm=wm.sxq.inf.ggs&lcsc_vid=ElhbUlFSRlUNBF0CQlQIBQBUFFILBFEAQVVWUgZWE1gxVlNRQVVdVFRSQ1daVDsOAxUeFF5JWBYZEEoBGA4JCwFIFA4DSA%3D%3D
- Role Details: External regulated 5 V analog rail input; stability is required because LM31 output is ratiometric.
- Manufacturer Part Number: DB127V-5.08-2P-GN-S
- Role: Power Conversion
**Pins:**
- 1 [pin 1]
- 2 [pin 2]
### J2 — [DB127V-5.08-2P-GN-S](https://www.flux.ai/cherepanyadima/db127v-5p08-2p-gn-s~ic.md)
- Role: Power Conversion
- Manufacturer Part Number: DB127V-5.08-2P-GN-S
- Role Details: Separate motor supply input isolates brushed motor noise from the 5 V analog rail.
- Part Type: Connector
- Manufacturer Name: DORABO
- Datasheet URL: https://www.lcsc.com/datasheet/C3018698.pdf?spm=wm.sxq.inf.ggs&lcsc_vid=ElhbUlFSRlUNBF0CQlQIBQBUFFILBFEAQVVWUgZWE1gxVlNRQVVdVFRSQ1daVDsOAxUeFF5JWBYZEEoBGA4JCwFIFA4DSA%3D%3D
**Pins:**
- 1 [pin 1]
- 2 [pin 2]
### J3 — [691137710003](https://www.flux.ai/adrian95/691137710003~rkt.md)
- Manufacturer Name: Würth Elektronik
- Manufacturer Part Number: 691137710003
- License: https://creativecommons.org/licenses/by/4.0/
- Part Type: Connector
- Role: Sensing (Shunt)
- Role Details: Field connector for the LM31-00000F-002PG liquid level sensor.
- Datasheet URL: https://www.we-online.com/components/products/datasheet/691137710003.pdf
**Pins:**
- Pin_1 [pin 1]
- Pin_2 [pin 2]
- Pin_3 [pin 3]
### J4 — [DB127V-5.08-2P-GN-S](https://www.flux.ai/cherepanyadima/db127v-5p08-2p-gn-s~ic.md)
- Role Details: Connects the brushed DC motor between VMOTOR and the BD139 collector current sink.
- Role: Switching
- Manufacturer Part Number: DB127V-5.08-2P-GN-S
- Manufacturer Name: DORABO
- Part Type: Connector
- Datasheet URL: https://www.lcsc.com/datasheet/C3018698.pdf?spm=wm.sxq.inf.ggs&lcsc_vid=ElhbUlFSRlUNBF0CQlQIBQBUFFILBFEAQVVWUgZWE1gxVlNRQVVdVFRSQ1daVDsOAxUeFF5JWBYZEEoBGA4JCwFIFA4DSA%3D%3D
**Pins:**
- 1 [pin 1]
- 2 [pin 2]
### LED1 — [SML-LX0805GC-TR](https://www.flux.ai/adrian95/sml-lx0805gc-tr~vu5.md)
- Manufacturer Part Number: SML-LX0805GC-TR
- License: https://creativecommons.org/licenses/by/4.0/
- Manufacturer Name: Lumex Opto/Components Inc.
- Part Type: LED
- Role Details: Lights when the full-level comparator trips at approximately 2.5 V sensor output.
- Datasheet URL: https://www.lumex.com/spec/SML-LX0805GC-TR.pdf
- Role: Signal Generation
**Pins:**
- A [pin 2]
- K [pin 1]
### Q1 — [BD13916STU](https://www.flux.ai/lcsc/bd13916stu~7pet.md)
- Part Type: Bipolar Transistors - BJT
- Role: Switching
- Manufacturer Part Number: BD13916STU
- Manufacturer Name: onsemi(安森美)
- LCSC Part Number: C900678
- JLCPCB Part Class: Extended Part
- Role Details: Low-side linear pass device for motor current controlled by U1.
- Package or Case Code: TO-126-3_L8.0-W3.3-P2.28-L
**Pins:**
- B [pin 3]
- C [pin 2]
- E [pin 1]
### U1 — [LM324ADR](https://www.flux.ai/adrian95/lm324adr~6ax.md)
- Manufacturer Part Number: LM324ADR
- Datasheet URL: https://www.ti.com/lit/ds/symlink/lm224.pdf
- Role Details: Single-supply quad op-amp implements the analog control stages from the project brief.
- Part Type: Operational Amplifier (OP-AMP)
- License: https://creativecommons.org/licenses/by/4.0/
- Role: Amplification
- Manufacturer Name: Texas Instruments Inc.
**Pins:**
- 1IN- [pin 2]
- 1IN+ [pin 3]
- 1OUT [pin 1]
- 2IN- [pin 6]
- 2IN+ [pin 5]
- 2OUT [pin 7]
- 3IN- [pin 9]
- 3IN+ [pin 10]
- 3OUT [pin 8]
- 4IN- [pin 13]
- 4IN+ [pin 12]
- 4OUT [pin 14]
- GND [pin 11]
- VCC [pin 4]
*The full schematic, PCB layout, bill of materials, and interactive design are available at [https://www.flux.ai/brunomilassin/water-level-motor-controller~gf](https://www.flux.ai/brunomilassin/water-level-motor-controller~gf).*
---
*Generated from [https://www.flux.ai/brunomilassin/water-level-motor-controller~gf](https://www.flux.ai/brunomilassin/water-level-motor-controller~gf)*