Skip to content

Commit dc48f46

Browse files
authored
fine tuned: ambient light level, PWM signal, LED dimming curve, readme
1 parent fbb4d3f commit dc48f46

File tree

8 files changed

+149
-166
lines changed

8 files changed

+149
-166
lines changed

README.md

Lines changed: 36 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,20 @@
11
# Sensor Light
22

3-
A smart light bar — illuminates dark places on-demand by gently dimming up/down a LED stripe depending on the ambient light level and a detected human presence.
3+
_A smart light bar — illuminates dark places on-demand by gently dimming up/down a LED stripe depending on the ambient light level and a detected human presence._
44

5-
This automatic light is completely self-contained – just needs 12V power supply.
5+
This automatic light is completely self-contained – just needs a suitable 12V power supply.
66

7-
An advanced but quite cheap presence sensor is used here, which works to my satisfaction. The circuit and software is designed to save power where possible.
8-
An ESP32-H2 SoC low power processor serves for the logic. It is connected to a VEML7700 ambient light sensor and the mentioned small but effective LD2410 radar based presence sensor.
7+
An advanced (and quite cheap) presence sensor is used here, which works to my satisfaction. However, it should be fine-tuned using the manufacturers app at the final location to get the best out of it.
98

10-
It does NOT need nor use any Wifi / Zigbee / Matter features of the ESP32-H2 SoC. One may feel free to add a Smart Home connector on his own.
9+
The circuit and software is designed to save power where possible.
10+
An ESP32-H2 SoC low power processor serves for the logic. It is connected to a VEML7700 ambient light sensor and the mentioned small but effective LD2410 radar based presence sensor.
1111

12-
_Status: Hardware and Software is feature complete, tested and ready to Roll 'n' Roll._
12+
It does NOT need nor use any Wifi / Zigbee / Matter features of the ESP32-H2 SoC. One may feel free to add some sort of Smart Home connector on his own.
1313

14-
<a>
15-
<img src="hardware/pictures/light_bar_final.png" alt="Light bar sketch" width="600">
16-
</a>
14+
__Status: Hardware and Software is feature complete, tested and ready to Roll 'n' Roll.__
1715

16+
---
1817
## Hardware
19-
20-
<a>
21-
<table style="border-style: none">
22-
<tr>
23-
<th><img src="./hardware/pictures/esp32h2.png" alt="drawing" width="300"/></th>
24-
<th><img src="./hardware/pictures/main_board_complete.png" alt="drawing" width="600"></th>
25-
</tr>
26-
</table>
27-
</a>
28-
2918
### Wiring diagram
3019
<a>
3120
<source media="(prefers-color-scheme: dark)" srcset="hardware/wiring_diagram_dark.svg">
@@ -41,27 +30,30 @@ Please note:
4130

4231
### Parts
4332

44-
#### LED Bar parts
45-
- ESP32-H2-WROOM-03 (the 2MB flash model is sufficient)
33+
#### LED bar
34+
35+
_Designed for 12V and (up to) 35W LED Stripe._
36+
37+
- ESP32-H2-WROOM-03 _(the 2MB flash model is sufficient)_
4638
- VEML7700 Ambient Light Sensor
4739
- HLK-LD2410 Radar presence sensor (2x)
4840
- BC337-40 TO92 NPN Transistor (2x)
4941
- BC327-40 TO92 PNP Transistor
5042
- IRLB8721PbF N-Channel MOSFET (TO-220)
51-
- Resistor 1 kΩ
52-
- Resistor 10 kΩ (2x)
53-
- Resistor 4.7 kΩ
54-
- Capacitor 0.1 µF (2x)
55-
- Capacitor 1.0 µF
43+
- Resistor 1kΩ
44+
- Resistor 10kΩ (2x)
45+
- Resistor 4.7kΩ
46+
- Capacitor 0.1µF (2x)
47+
- Capacitor 10µF
5648
- 3.3V LDO voltage regulator LD1117V33 (SOT-223)
5749
- Diode (any, working at 3.3 V and 150mA max.)
58-
- 5m LED Stripe
50+
- 5m LED Stripe (12V, 3000-3200k, COB, 8mm wide, power: 5-7 W/m)
5951
- 12V DC Connector
60-
- 12V Power Supply
52+
- 12V, 5A Power Supply _(look for a good one to avoid flickering)_
6153
- Wiring Board
6254
- 4 Pin Connector Mini Socket
6355
- Cables
64-
- 5m LED Housing
56+
- LED Housing (5m)
6557

6658
#### USB Flash Adapter
6759
- USB-C Plug Female
@@ -88,15 +80,24 @@ After connecting the ESP32-H2 via a flash adapter to a USB computer port:
8880
- `cargo run --release` _(flashes the chip)_
8981
- `espflash monitor` _(optional – see ESP32 console output)_
9082

91-
## References
83+
## Prototype pictures
9284

93-
- [Transistors](http://stefanfrings.de/transistoren/index.html)
94-
- [Switching with transistors](https://dl6gl.de/schalten-mit-transistoren.html)
95-
- [The Rust on ESP Book - Setting Up a Development Environment](https://esp-rs.github.io/book/installation/index.html)
85+
<a>
86+
<img src="hardware/pictures/light_bar_final.png" alt="Light bar sketch" width="600">
87+
</a>
9688

89+
<a>
90+
<table style="border-style: none">
91+
<tr>
92+
<th><img src="./hardware/pictures/esp32h2.png" alt="drawing" width="300"/></th>
93+
<th><img src="./hardware/pictures/main_board_complete.png" alt="drawing" width="600"></th>
94+
</tr>
95+
</table>
96+
</a>
9797

9898
## Terms & Conditions
99-
Feel free to use anything here for learning, building your own version or make a product out of it and sell it.
99+
100+
Feel free to use anything here for learning, building your own version or make a product out of it and sell it.
100101
Have fun!
101102

102103
Pull requests are welcome.
@@ -105,4 +106,4 @@ _bitmagier, September 2024_
105106

106107
---
107108

108-
_In case you find this work useful and like to support me, I would be delighted to notice a donation in [Solana](https://solana.com/) to: [`FTMfeKYhpVAouuwXjpJXhnT13fkeNJqQsRGMBxBo1GML`](./hardware/pictures/solana_wallet.png)_
109+
_In case you find this work useful and like to support me, I would appreciate a donation in [Solana](https://solana.com/) to: [`FTMfeKYhpVAouuwXjpJXhnT13fkeNJqQsRGMBxBo1GML`](./hardware/pictures/solana_wallet.png)_

0 commit comments

Comments
 (0)