Description of LED / timer solution
A while ago I created a solution for my home to activate a LED light on the outside. The light will turn off when no movement has been detected during 2 minutes.
As I made this before the FabAcademy started I have asked chatGPT to summarize our conversations sofar.
โ What You Built
You now have:
- Manual start lighting system
- Motion-extended runtime
- Minimum on-time protection
- Electrical isolation between sensor and microcontroller
- Proper relay coil protection
- Fused low-voltage side
- DIN-rail professional mounting
๐งพ Bill of Materials (BOM)
1๏ธโฃ Control & Logic
| Qty | Component | Notes |
|---|---|---|
| 1 | Arduino Nano (5V version) | Main controller |
| 1 | PC817 optocoupler (DIP-4) | Isolates PIR26 from Arduino |
| 1 | BC547 transistor | Drives Finder relay coil |
| 1 | 1 kฮฉ resistor | Base resistor for BC547 |
| 1 | 1 kฮฉ resistor | Current limiting resistor for PC817 LED side |
| 1 | 1N4007 diode | Flyback diode over Finder relay coil |
| 1 (optional) | 10 kฮฉ resistor | Base pull-down for BC547 (recommended) |
2๏ธโฃ Power Supply Section
| Qty | Component | Notes |
|---|---|---|
| 1 | ORNO DIN-rail 230V โ 12V DC power supply | Main low-voltage supply |
| 1 | GYVRM DC-DC converter 12V โ 5V | Powers Arduino |
| 1 | T1A 250V slow-blow fuse | 12V line protection |
| 1 (optional) | T2A 250V slow-blow fuse | 230V lamp protection |
3๏ธโฃ Switching Section (Mains Side)
| Qty | Component | Notes |
|---|---|---|
| 1 | Finder 46.61.9.012.0040 relay | 12V DC coil, 230V contact |
| 1 | Finder DIN-rail relay socket (97.xx series) | Mounting base for 46.61 |
| โ | 230V LED outdoor lamp | Existing or new |
| โ | Terminal blocks (DIN rail) | For L/N/PE distribution |
4๏ธโฃ Sensors & Inputs
| Qty | Component | Notes |
|---|---|---|
| 1 | STBTech PIR26 motion sensor | 12V powered, LED switching output |
| 2 | Momentary push buttons (NO) | Indoor & outdoor |
| โ | Low-voltage wiring | For buttons and PIR |
5๏ธโฃ Mechanical & Mounting
| Qty | Component | Notes |
|---|---|---|
| 1 | IP65 enclosure (Stegen) | Main control box |
| 1 | DIN rail (35 mm) | Inside enclosure |
| 1 | Small perfboard (prototype board) | For PC817 + BC547 circuit |
| 1 | DIN rail PCB mounting clip | Mount perfboard neatly |
| Several | WAGO connectors / terminal blocks | Wiring distribution |
| Several | Cable glands (IP68)** | Cable entry |
6๏ธโฃ Wiring
| Use | Type |
|---|---|
| 230V internal wiring | 1.5 mmยฒ solid or stranded |
| 12V wiring | 0.75 mmยฒ |
| Signal wiring | 0.25โ0.5 mmยฒ |
| Earth wiring | Green/yellow |
๐ System Architecture Summary
230V Side
- 230V โ ORNO PSU
- 230V โ Finder relay COM โ NO โ Lamp
12V Side
- ORNO 12V โ fuse โ Finder coil + GYVRM + PIR26
5V Side
- GYVRM โ Arduino 5V
Signal Isolation
- PIR26 LED output โ 1k resistor โ PC817
- PC817 transistor โ Arduino D4
Relay Drive
- Arduino D8 โ 1k โ BC547 โ Finder coil
โก Electrical Ratings Summary
| Section | Voltage |
|---|---|
| Mains side | 230V AC |
| Relay coil | 12V DC |
| Arduino | 5V DC |
| PIR26 | 12V DC |
Absolutely โ here is a clean, structured schematic diagram of your complete system.
Iโve separated it into logical blocks so it is readable and suitable for documentation.
๐ COMPLETE SCHEMATIC DIAGRAM
๐ด 1) 230V MAINS SECTION
230V AC INPUT
โโโโโโโโโโโโโโ
L (Brown) โโ Fuse T2A โโโโโโโโโโโโโโโฌโโโโโโโโ ORNO L
โ
โ
Finder Relay
COM โโโโโโโ
โ
NO โโโโโโโดโโโโโโ Lamp L
N (Blue) โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ORNO N
โ
โโโโโโโโโ Lamp N
PE (Earth) โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ Lamp PE
Only the phase (L) is switched by the Finder relay.
๐ก 2) 12V POWER DISTRIBUTION
ORNO 12V OUTPUT
โโโโโโโโโโโโโโโ
+12V โโ Fuse T1A โโโโโโโโโโโโโโโโฌโโโโ Finder Coil A1
โ
โโโโโ GYVRM IN+
โ
โโโโโ PIR26 Vin+
0V โโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโ GYVRM IN-
โโโโโ PIR26 Vin-
โโโโโ System GND (common)
All low-voltage grounds are common.
๐ข 3) 12V โ 5V CONVERSION
GYVRM
โโโโโโโโโโโโโโโโโโ
IN+ โโโโโค +12V โ
IN- โโโโโค 0V โ
โ โ
OUT+ โโโโบโค 5V โโโโโโโโโโโโฌโโ Arduino 5V
OUT- โโโโบโค GND โโโโโโโโโโโโดโโ Arduino GND
โโโโโโโโโโโโโโโโโโ
Arduino is powered directly from regulated 5V.
๐ต 4) RELAY COIL DRIVE (BC547)
Finder Relay Coil
โโโโโโโโโโโโโโโโโโ
+12V (after fuse) โโโโโโโโโโโโโ A1
|
|
A2 โโโโโโโโโ
|
Collector (C)
BC547 Transistor
|
Arduino D8 โโ 1kฮฉ โโโบ Base (B) |
|
Emitter (E)
|
GND
Flyback Diode (1N4007)
๐ฃ 5) PIR26 โ PC817 ISOLATION
PIR26 Side (12V)
PIR26 LED+ โโ 1kฮฉ โโโโบ PC817 Pin 1 (Anode)
PIR26 LED- โโโโโโโโโโโโบ PC817 Pin 2 (Cathode)
Arduino Side (5V, isolated)
PC817 Pin 3 (Emitter) โโโโโโโ GND
PC817 Pin 4 (Collector) โโโโโ Arduino D4
โ
โโโ INPUT_PULLUP enabled
When PIR triggers:
- PC817 conducts
- Arduino D4 reads LOW
๐ค 6) PUSH BUTTONS
Inside Button:
Arduino D2 โโโโโโโ
โโโ Button โโโ GND
Outside Button:
Arduino D3 โโโโโโโ
โโโ Button โโโ GND
Both configured as:
Pressed = LOW
๐ท SYSTEM BLOCK OVERVIEW
230V โโ Finder Contact โโ Lamp
โ
โโโ ORNO 12V โโ Fuse โโโฌโโ Finder Coil (via BC547)
โโโ GYVRM 5V โโ Arduino
โโโ PIR26 โโ PC817 โโ Arduino D4
โก Electrical Separation Summary
| Section | Voltage | Isolation |
|---|---|---|
| Mains | 230V AC | Isolated by relay |
| Control Power | 12V DC | Fused |
| Logic | 5V DC | From GYVRM |
| PIR Signal | 12V | Isolated by PC817 |
โ What This Diagram Guarantees
- No 12V ever reaches Arduino directly
- No 230V reaches low voltage section
- Relay coil protected
- Low voltage fused
- PIR fully isolated
- Fail-safe: relay off at reset