fc5557f397ce13b04c6cace24176b7342550b96d
Board-dat/NWI/NWI1126-DAT/NWI1126-DAT.md
... | ... | @@ -147,4 +147,4 @@ Default firmware, right bottom LED blink, drive common 4ch RGBW LED strip to bli |
147 | 147 | |
148 | 148 | - [[ESP32-dat]] - code at [[arduino-esp32-dat]] |
149 | 149 | |
150 | -- [[mosfet-dat]] - [[led-driver-dat]] |
|
150 | +- [[mosfet-dat]] - [[led-driver-dat]] |
Tech-dat/PWM-dat/PWM-dat.md
... | ... | @@ -0,0 +1,4 @@ |
1 | + |
|
2 | +# PWM-dat |
|
3 | + |
|
4 | +- arduino code - [[arduino-fading.ino]] |
|
... | ... | \ No newline at end of file |
Tech-dat/PWM-dat/arduino-fading.ino
... | ... | @@ -0,0 +1,42 @@ |
1 | + |
|
2 | +/* |
|
3 | + Fading |
|
4 | + |
|
5 | + This example shows how to fade an LED using the analogWrite() function. |
|
6 | + |
|
7 | + The circuit: |
|
8 | + - LED attached from digital pin 9 to ground through 220 ohm resistor. |
|
9 | + |
|
10 | + created 1 Nov 2008 |
|
11 | + by David A. Mellis |
|
12 | + modified 30 Aug 2011 |
|
13 | + by Tom Igoe |
|
14 | + |
|
15 | + This example code is in the public domain. |
|
16 | + |
|
17 | + https://www.arduino.cc/en/Tutorial/BuiltInExamples/Fading |
|
18 | +*/ |
|
19 | + |
|
20 | +int ledPin = 9; // LED connected to digital pin 9 |
|
21 | + |
|
22 | +void setup() { |
|
23 | + // nothing happens in setup |
|
24 | +} |
|
25 | + |
|
26 | +void loop() { |
|
27 | + // fade in from min to max in increments of 5 points: |
|
28 | + for (int fadeValue = 0 ; fadeValue <= 255; fadeValue += 5) { |
|
29 | + // sets the value (range from 0 to 255): |
|
30 | + analogWrite(ledPin, fadeValue); |
|
31 | + // wait for 30 milliseconds to see the dimming effect |
|
32 | + delay(30); |
|
33 | + } |
|
34 | + |
|
35 | + // fade out from max to min in increments of 5 points: |
|
36 | + for (int fadeValue = 255 ; fadeValue >= 0; fadeValue -= 5) { |
|
37 | + // sets the value (range from 0 to 255): |
|
38 | + analogWrite(ledPin, fadeValue); |
|
39 | + // wait for 30 milliseconds to see the dimming effect |
|
40 | + delay(30); |
|
41 | + } |
|
42 | +} |
|
... | ... | \ No newline at end of file |
Tech-dat/actuator-dat/relay-dat/SSR-relay-dat/SSR-relay-dat.md
... | ... | @@ -61,6 +61,9 @@ In summary: |
61 | 61 | - **Choose TRIAC** if you need basic AC control, minimal cost, and don't require isolation. |
62 | 62 | - **Choose SSR** if you need isolation, durability, fast switching, or you’re controlling sensitive systems or loads frequently. |
63 | 63 | |
64 | +## test of SSR |
|
65 | + |
|
66 | + |
|
64 | 67 | |
65 | 68 | ## datasheet |
66 | 69 | |
... | ... | @@ -69,4 +72,4 @@ In summary: |
69 | 72 | |
70 | 73 | ## ref |
71 | 74 | |
72 | -- [[relay]] - [[relay-dat]] |
|
75 | +- [[relay]] - [[relay-dat]] - [[ssr-relay]] |
Tech-dat/interactive-dat/led-driver-dat/led-driver-dat.md
... | ... | @@ -5,12 +5,14 @@ |
5 | 5 | https://w.electrodragon.com/w/LED_Drive |
6 | 6 | |
7 | 7 | |
8 | -## integrated chip solutions |
|
8 | +## driver options |
|
9 | + |
|
10 | +### integrated chip solutions |
|
9 | 11 | |
10 | 12 | - [[diodes-dat]] - [[AL8805-dat]] |
11 | 13 | |
12 | 14 | |
13 | -## mosfet control options |
|
15 | +### mosfet control options |
|
14 | 16 | |
15 | 17 | The FQP30N06L MOSFET (datasheet) is an N-channel MOSFET designed for switching high-speed circuits, and it’s perfect for switching LEDs. It can control up to a 60V, 30A load and can be switched from 3.3V or 5V. |
16 | 18 | |
... | ... | @@ -19,6 +21,23 @@ https://cdn.sparkfun.com/datasheets/Components/General/FQP30N06L.pdf |
19 | 21 | |
20 | 22 | ![](2024-10-11-16-32-44.png) |
21 | 23 | |
24 | +- [[mosfet-dat]] |
|
25 | + |
|
26 | +### mosfet PWM control |
|
27 | + |
|
28 | +- [[PWM-dat]] |
|
29 | + |
|
30 | + |
|
31 | + |
|
32 | +## futher concern |
|
33 | + |
|
34 | +### high speed switching |
|
35 | + |
|
36 | +- writing .. |
|
37 | + |
|
38 | + |
|
39 | + |
|
40 | + |
|
22 | 41 | ### ref |
23 | 42 | |
24 | 43 | - https://tigoe.github.io/LightProjects/led-strips.html |
code-dat/RPI-python-dat/rpi-python-gpio-demo-1.py
... | ... | @@ -0,0 +1,21 @@ |
1 | + |
|
2 | +# rpi-python-gpio-demo-1.py |
|
3 | + |
|
4 | +import RPi.GPIO as GPIO |
|
5 | +import time |
|
6 | + |
|
7 | +led = 29 |
|
8 | +switch = 31 |
|
9 | + |
|
10 | +GPIO.setmode(GPIO.BOARD) |
|
11 | +GPIO.setup(led, GPIO.OUT) |
|
12 | +GPIO.setup(switch, GPIO.IN) |
|
13 | + |
|
14 | +for i in range(10): |
|
15 | + GPIO.output(led, GPIO.HIGH) |
|
16 | + time.sleep(5) |
|
17 | + GPIO.output(led, GPIO.LOW) |
|
18 | + time.sleep(5) |
|
19 | + print('Switch status = ', GPIO.input(switch)) |
|
20 | + |
|
21 | +GPIO.cleanup() |
|
... | ... | \ No newline at end of file |