Om mij wat beter te verdiepen in elektronica, ben ik bezig om een woordklok te maken. Nu vond ik het wat makkelijk om een Raspberry Pi of Arduino te pakken, wat standaard code te uploaden en klaar. Dus ik heb een ESP01 en NodeMCU gekocht met wat ondersteunende electronica en een goed soldeerstation met toebehorenen. Na mijzelf wat te hebben ingelezen en een paar avonden aanklooien, heb ik besloten om mijn vraag hier te stellen.
Via deze tutorial heb ik de Arduino firmware(?) er op geflashed. Om te testen of alles werkt heb ik het ESP8266 blink voorbeeld geupload, en voila, de ingebouwde led gaat branden. De volgende stap is om een ledstrip te laten branden. Ik heb ervoor gekozen om gebruik te maken van 'NeoPixelBus by Makuna' library, om te testen heb ik de NeoPixelTest sketch geupload en aangepast zodat ik de volgende code krijg:
De data kabel zit aangesloten op D1(PixelPin 5) en de ledstrip telt 4 leds.
Om het een en ander duidelijk te maken heb ik onderstaand schema gemaakt, dit schema is zoals het momenteel is aangesloten.

Het probleem is echter dat er geen led gaat branden, het gekke is dat de eerste twee leds wel gaan branden wanneer ik met mijn vingers de ledstrip aanraak. Met een multimeter heb ik aan het uiteinde de 5v en gnd gemeten en deze meet netjes 5v. Ook de stepdown voeding heb ik gemeten, deze meet ook netjes 3.3 volt.
Ik heb ook deze methode geprobeerd en de logic level converter weggelaten en ook dit werkte helaas niet.
Gebruikte onderdelen
NodeMCU V3
3V3-Stepdown-voeding
Logic level converter
Via deze tutorial heb ik de Arduino firmware(?) er op geflashed. Om te testen of alles werkt heb ik het ESP8266 blink voorbeeld geupload, en voila, de ingebouwde led gaat branden. De volgende stap is om een ledstrip te laten branden. Ik heb ervoor gekozen om gebruik te maken van 'NeoPixelBus by Makuna' library, om te testen heb ik de NeoPixelTest sketch geupload en aangepast zodat ik de volgende code krijg:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
| // NeoPixelTest // This example will cycle between showing four pixels as Red, Green, Blue, White // and then showing those pixels as Black. // // Included but commented out are examples of configuring a NeoPixelBus for // different color order including an extra white channel, different data speeds, and // for Esp8266 different methods to send the data. // NOTE: You will need to make sure to pick the one for your platform // // // There is serial output of the current state so you can confirm and follow along // #define FASTLED_ESP8266_NODEMCU_PIN_ORDER #include <NeoPixelBus.h> const uint16_t PixelCount = 4; // this example assumes 4 pixels, making it smaller will cause a failure const uint8_t PixelPin = 5; // make sure to set this to the correct pin, ignored for Esp8266 #define colorSaturation 128 // three element pixels, in different order and speeds NeoPixelBus<NeoGrbFeature, Neo800KbpsMethod> strip(PixelCount, PixelPin); //NeoPixelBus<NeoRgbFeature, Neo400KbpsMethod> strip(PixelCount, PixelPin); // For Esp8266, the Pin is omitted and it uses GPIO3 due to DMA hardware use. // There are other Esp8266 alternative methods that provide more pin options, but also have // other side effects. // for details see wiki linked here https://github.com/Makuna/NeoPixelBus/wiki/ESP8266-NeoMethods // You can also use one of these for Esp8266, // each having their own restrictions // // These two are the same as above as the DMA method is the default // NOTE: These will ignore the PIN and use GPI03 pin //NeoPixelBus<NeoGrbFeature, NeoEsp8266Dma800KbpsMethod> strip(PixelCount, PixelPin); //NeoPixelBus<NeoRgbFeature, NeoEsp8266Dma400KbpsMethod> strip(PixelCount, PixelPin); // Uart method is good for the Esp-01 or other pin restricted modules // for details see wiki linked here https://github.com/Makuna/NeoPixelBus/wiki/ESP8266-NeoMethods // NOTE: These will ignore the PIN and use GPI02 pin //NeoPixelBus<NeoGrbFeature, NeoEsp8266Uart1800KbpsMethod> strip(PixelCount, PixelPin); //NeoPixelBus<NeoRgbFeature, NeoEsp8266Uart1400KbpsMethod> strip(PixelCount, PixelPin); // The bitbang method is really only good if you are not using WiFi features of the ESP // It works with all but pin 16 //NeoPixelBus<NeoGrbFeature, NeoEsp8266BitBang800KbpsMethod> strip(PixelCount, PixelPin); //NeoPixelBus<NeoRgbFeature, NeoEsp8266BitBang400KbpsMethod> strip(PixelCount, PixelPin); // four element pixels, RGBW //NeoPixelBus<NeoRgbwFeature, Neo800KbpsMethod> strip(PixelCount, PixelPin); RgbColor red(colorSaturation, 0, 0); RgbColor green(0, colorSaturation, 0); RgbColor blue(0, 0, colorSaturation); RgbColor white(colorSaturation); RgbColor black(0); HslColor hslRed(red); HslColor hslGreen(green); HslColor hslBlue(blue); HslColor hslWhite(white); HslColor hslBlack(black); void setup() { Serial.begin(74880); while (!Serial); // wait for serial attach Serial.println(); Serial.println("Initializing..."); Serial.flush(); // this resets all the neopixels to an off state strip.Begin(); strip.Show(); Serial.println(); Serial.println("Running..."); } void loop() { delay(5000); Serial.println("Colors R, G, B, W..."); // set the colors, // if they don't match in order, you need to use NeoGrbFeature feature strip.SetPixelColor(0, red); strip.SetPixelColor(1, green); strip.SetPixelColor(2, blue); strip.SetPixelColor(3, white); // the following line demonstrates rgbw color support // if the NeoPixels are rgbw types the following line will compile // if the NeoPixels are anything else, the following line will give an error //strip.SetPixelColor(3, RgbwColor(colorSaturation)); strip.Show(); delay(5000); Serial.println("Off ..."); // turn off the pixels strip.SetPixelColor(0, black); strip.SetPixelColor(1, black); strip.SetPixelColor(2, black); strip.SetPixelColor(3, black); strip.Show(); delay(5000); Serial.println("HSL Colors R, G, B, W..."); // set the colors, // if they don't match in order, you may need to use NeoGrbFeature feature strip.SetPixelColor(0, hslRed); strip.SetPixelColor(1, hslGreen); strip.SetPixelColor(2, hslBlue); strip.SetPixelColor(3, hslWhite); strip.Show(); delay(5000); Serial.println("Off again..."); // turn off the pixels strip.SetPixelColor(0, hslBlack); strip.SetPixelColor(1, hslBlack); strip.SetPixelColor(2, hslBlack); strip.SetPixelColor(3, hslBlack); strip.Show(); } |
De data kabel zit aangesloten op D1(PixelPin 5) en de ledstrip telt 4 leds.
Om het een en ander duidelijk te maken heb ik onderstaand schema gemaakt, dit schema is zoals het momenteel is aangesloten.

Het probleem is echter dat er geen led gaat branden, het gekke is dat de eerste twee leds wel gaan branden wanneer ik met mijn vingers de ledstrip aanraak. Met een multimeter heb ik aan het uiteinde de 5v en gnd gemeten en deze meet netjes 5v. Ook de stepdown voeding heb ik gemeten, deze meet ook netjes 3.3 volt.
Ik heb ook deze methode geprobeerd en de logic level converter weggelaten en ook dit werkte helaas niet.
Gebruikte onderdelen
NodeMCU V3
3V3-Stepdown-voeding
Logic level converter