Skip to the stories
Electronics & Semiconductors

Configurable PIR Sensor Combines Digital Sensitivity Control and Low-Battery Alerts

  • PrithviRaj Narendra
  • 359 reads

An SLG47001-based PIR design pairs adjustable gain with a 2.8 V battery warning and power gating for coin-cell operation.

Configurable PIR Sensor Combines Digital Sensitivity Control and Low-Battery Alerts

A battery-powered PIR detector has to amplify a tiny sensor signal while keeping its own current draw low. This design brings the signal chain, button-adjustable sensitivity, low-battery alert and power control into a single configurable mixed-signal device: Renesas’ SLG47001. The result is a compact circuit built around a CR2032 coin cell, with a measured sensitivity range and a battery warning that flashes briefly when supply voltage falls below 2.8 V.

The engineering trade-off is clear: integration cuts the need for separate amplifiers, filters, comparators and mechanical adjustment hardware, while making the detector’s behavior depend on the device’s internal analog and logic configuration. A pair of buttons changes gain electronically, and an enable input shuts down power-hungry blocks when sensing isn’t needed.

Amplifying the PIR signal

A pyroelectric sensor produces a low-frequency signal typically measuring only a few millivolts. The circuit first amplifies and filters that signal, then checks whether the conditioned waveform crosses a defined detection window. The familiar three-part arrangement is a first gain stage with band-pass filtering, a second amplification stage and a window comparator that turns threshold crossings into a digital motion output.

Here, OPAMP0 handles the first stage and receives the PIR signal at PIN 6. Its gain is set by R5 and R4 at 1+(1 MΩ/47 kΩ), or 22.3. OPAMP1 supplies the second stage. Its gain depends on the resistance set by the digital rheostats, so the circuit can adjust the signal amplitude presented to the detector without a mechanical potentiometer.

The gain range is wide enough to change whether a given sensor waveform triggers the comparator. At the low end, Rheostat0 is set to 100 kΩ; together with Rheostat1 at 10 kΩ, the stated Stage 2 gain is 1+(1 MΩ/110 kΩ), or 10.1. At the high end, Rheostat0 is near 100 Ω, which is small relative to the 10 kΩ Rheostat1 value. The resulting Stage 2 gain is 1+(1 MΩ/10 kΩ), or 100.

Multiplying the two stage gains gives a total gain that varies from 225 to 2,230. The configured starting value for DigitalRheostat0 is 49.6 kΩ, corresponding to a Stage 2 gain of 17.8. Pressing UP lowers the rheostat resistance and raises gain; pressing DOWN increases resistance and lowers gain. In practical terms, the buttons let a user tune how large a movement signal must be before the detector responds.

Comparator and sensitivity logic

The amplified output from OPAMP1 feeds two comparator channels configured as a window comparator. Their thresholds sit symmetrically at 0.25 VDD and 0.75 VDD. A signal that moves outside this window counts as a detection, and the output logic combines the comparator results through a NOR gate to drive the PIR detect output at PIN 19. The output is active-low for the motion indicator LED.

The UP and DOWN buttons connect to GPIOs with internal pull-ups and operate as active-low inputs. Because tactile switches can bounce, the design applies 50 ms delays through CNT3/DLY3 and CNT4/DLY4 before the button signals clock the digital rheostats. Each accepted press steps the resistance setting, changing Stage 2 gain.

Figure 1. The PIR signal passes through two amplification stages before the comparator logic generates a motion output. Source: Renesas

Figure 2. Active-low UP and DOWN buttons change the digital rheostat setting. Source: Renesas

Battery warning and shutdown

The low-battery monitor compares half the supply voltage with an internal 1.4 V reference. When the battery voltage falls below 2.8 V, half of VDD is below that reference and the comparator detects the condition. The design uses this check to flash a red LED for 25 ms every 2 s, limiting the warning’s duty cycle to reduce its energy cost.

The reference comes from VREF 0A0 through the source-sink buffer. Its output at PIN 20 is routed to PIN 17 as the reference for comparator channel 2; the comparator’s positive input receives VDD at 0.5× gain. A 0.5 Hz clock, generated from a 4 Hz input using OSC0/512 and counter logic, combines with the comparator result to trigger the 25 ms one-shot that drives the low-battery indication at PIN 18.

Figure 3. The circuit monitors the coin-cell supply and uses a pulsed LED to indicate a low battery. Source: Renesas

Power control is handled by the active-low ~ENABLE input at PIN 1. Pulling it low enables sensing; allowing it to go high disables the circuit. The internal EN_POR signal initializes the logic as the device wakes. When disabled, the connection matrix gates the power-up or enable inputs of the internal blocks, including both operational amplifiers, the reference and VDD/2 circuits, the source-sink buffer, the analog comparators and OSC0. In this state, the device is described as drawing leakage current, typically in the nanoamp range.

Figure 4. The slider switch controls the active-low enable input for the internal sensing blocks. Source: Renesas

Compact board layout

The reference hardware uses a four-layer PCB intended for a small enclosure or wall mounting. Its routing is concentrated on the component side except for one track, so the design could also be implemented as a two-layer board to reduce cost. The layout places particular emphasis on the high-impedance PIR signal path, where long traces can make the input more susceptible to interference and false triggers.

The PIR sensor sits near the center of the top side. The SLG47001 is placed close to it to keep the PIR_OUT trace short. The bottom side carries the other surface-mount components, including the CR2032 holder. The holder’s placement allows battery replacement without putting the sensor side of the board in the way.

Decoupling capacitors sit beside the SLG47001 power pins and connect to ground through vias. The interface uses reverse-mounted surface-mount UP and DOWN switches and status LEDs, with a side-mounted slider for ~ENABLE. The red LED indicates low battery; the green LED indicates motion. Both LEDs are active-low and illuminate when their output pin sinks current.

Figure 5. The board’s top side carries the PIR sensor and interface markings. Source: Renesas

Figure 6. The bottom side carries the remaining surface-mount parts. Source: Renesas

Configuration and simulation

The internal blocks are configured in GreenPAK Designer. The design file, PIR_band_pass_configurable.aap, contains the analog front end, comparator logic, button handling, battery monitor and power gating. Renesas also provides a ready-to-use design file and the Go Configure Software Hub for inspecting and adapting the configuration.

In the low-battery simulation, the VBAT input follows a trapezoidal waveform that falls below 2.8 V and rises again to 3.0 V. The simulation checks how comparator channel 2 and the 0.5 Hz timing signal trigger the one-shot and produce the low-duty-cycle LED pulses.

Figure 7. GreenPAK Designer shows the configured analog, logic and power-control blocks. Source: Renesas

Figure 8. The VBAT waveform setting drives the simulated battery-threshold test. Source: Renesas

A separate simulation applies a 2 mV input signal with a 1 V offset to Stage 1, then toggles the UP and DOWN signals to model button presses. As rheostat resistance changes, the amplitude at the Stage 2 output changes. When the signal remains below half of VDD, comparator channels 0 and 1 don’t trigger, so the PIR output stays inactive.

Figure 9. The simulation exercises the low-battery comparator and LED pulse timing. Source: Renesas

Figure 10. The simulated Stage 2 waveform grows or shrinks as sensitivity changes. Source: Renesas

Bench checks

For the low-battery test, the supply was stepped from 3.0 V down to 2.6 V in 50 mV increments. A GreenPAK Lite development board supplied VDD, while Go Configure Software Hub in Emulation mode controlled the voltage change. The ~LOW_BAT signal produced 25 ms pulses every 2 s below 2.8 V, as captured with a Saleae logic analyzer.

Figure 11. The captured low-battery output pulses when the supply falls below the set threshold. Source: Renesas

To check sensitivity adjustment in hardware, a sine-wave generator supplied a 1 mV peak-to-peak signal with a 1 V offset to the PIR input. With ~ENABLE pulled low, repeated UP presses increased gain; repeated DOWN presses decreased it. The test observed OPAMP1’s output amplitude and the PIR output state as the waveform crossed the comparator thresholds. Letting ~ENABLE rise through its internal pull-up disabled the circuit.

The logic-analyzer capture showed both amplification stages starting after the enable input went low. Their settling time depended on how long the circuit had been disabled. As UP presses raised gain, the Stage 2 waveform grew until its peaks crossed a comparator threshold, pulling the active-low PIR output low. DOWN presses reduced the output amplitude until it no longer crossed the window threshold. Raising ~ENABLE disabled the amplifiers again.

Figure 12. The hardware capture shows Stage 2 gain changing as the buttons are pressed. Source: Renesas

Testing with the sensor

The final check used the PIR sensor and its Fresnel lens instead of a generated electrical input. Movement in front of the sensor supplied the changing infrared signal. After UP presses raised sensitivity, human movement during roughly the 25 s to 35 s interval triggered PIR_OUT. With sensitivity lowered using DOWN, the same movement produced a smaller Stage 2 signal that didn’t cross the comparator window.

The waveform also showed the Stage 2 settling behavior during the first 10 s and the circuit powering down when ~ENABLE was pulled high after the 50 s mark.

Figure 13. With a PIR sensor as the input, movement triggers the output at higher sensitivity but not at the reduced setting. Source: Renesas

The design’s practical contribution is the combination of an adjustable two-stage PIR front end, a threshold-based coin-cell warning and internal power gating in one configurable device. Its bench and sensor tests show the key behavior: button presses alter gain enough to change detection, the low-battery output pulses below 2.8 V, and disabling the system shuts down the main analog and timing blocks. For a compact PIR product, the next design decision is whether that integrated configuration and its measured gain range fit the sensor, enclosure and expected power budget.

Source: PrithviRaj Narendra · www.edn.com

From the same set