-->
Page 1 of 2

Unlimited output pins !!!

PostPosted: Fri Apr 12, 2019 3:30 pm
by Luc Volders
I found an easy way to get loads of output pins on an ESP8266 but it is also usable for ESP32, Arduino, Microbit etc.

This is not using the 74X595 but I am using the WS2811 chips. Cheap, easy to use and expand.
The fun is that you can use PWM on them so you can get loads of output ports with PWM with almost no effort. Just use the neopixel library.

ESPWS01.jpg


I give you some example programs in ESPBasic and in Lua. Arduino code in next part. So keep reading.

WS2811-003.jpg


Source code and hardware schematics on my weblog:
https://lucstechblog.blogspot.com/2019/ ... ur_12.html

I wonder why nobody did this befoer (as far as I know).

Luc

Re: Unlimited output pins !!!

PostPosted: Thu Apr 18, 2019 12:13 pm
by eriksl
It's an interesting thought, but a few notes:

- I seem to have understood you're connecting a relay to the ledpixel. I wouldn't do that, if only for the amount of current it draws and the backcurrent from the coil when released. I also happen to dislike relays anyway ;-)
- from my own experience: max span between two ledpixel is about 3 meters. You can stretch that to many more meters (I haven't met the limit yet) by making the ledpixel control a mosfet gate driver. The mosfet gate driver has a schmitt trigger on it's input, to prevent noise being transferred and it drives the output very hard to gnd or Vcc, which is exactly what you want, to overcome the capacitance of the cabling, at these frequencies.
- I think using a ledpixel for PWM has somewhat limited use for PWM because the refresh is good, but the width is very limited (8 bits), too small for me. When I want an arbitrary amount of inputs or outputs, I just use I2C I/O expanders. Especially those from Microchip are very handy and only cost a few bucks for five pieces.

Re: Unlimited output pins !!!

PostPosted: Fri Apr 19, 2019 2:03 pm
by Luc Volders
Hey Erik,

I am not using a simple relay but a relay module and that has a tarnsistor on board that takes care of the power problem. The module is specially designed for microcontrollers.

About PWM.
Better little PWM as no PWM at all.

Luc

Re: Unlimited output pins !!!

PostPosted: Fri Apr 19, 2019 2:06 pm
by Luc Volders
Part 2 is up now.

In this part I use the same technology but now programmed in Arduino language (C++) so usabloe for everyone who does not like LUA or ESPBasic.

http://lucstechblog.blogspot.com/2019/0 ... -your.html

Luc