- build-quality
- flexibility
- size (they have to fit into Small boxes eventually)
- price (as I'm going to need several of each)
The library is what allows me to do this in my main IOT firmware "Esparto":
Which is a real-time display of what all the pins are doing. One neat feature is that the pin descriptions change for each board type (NodeMCU, Sonoff etc)
Anyway, the "main" sensor module looks like this when dismantled:
And like this when assembled with the smaller of the PIR sensors:
There is plenty of debate as to whether the ESP8266 can tolerate 5v on its GPIO pins. A lot of folk say you can - but I'm not going to chance it when a) 3,3v works fine with most sensors* and b) once my IOT devices are deployed, I can't afford to rip down walls or climb ladders when I find out that most folk meant "...for a while" and never "soak-tested" their findings...Always best to play safe where electricity is concerned, as I have found (to my - ouch - cost) on more than one occasion.
*The PIR sensors are a good example. The larger one has an onboard 3.3v LDO, so even when fed 5v, the signal out is only ever 3.3v max, so it goes straight into a GPIO. Oddly, even when fed only 3,3v, it still works fine. The smaller one (fitted) will run with 3.3v but it will not trigger. It has to have 5v to function properly.
The light and sound sensors are both marked with 5v Vcc on the boards, but both work fine with 3.3v - some don't and that's why a) I went modular b) experimentation is the only true way to find out - but test the OUT pin with a meter first!!!
No comments:
Post a Comment