Post your best Lua script examples here

User avatar
By ArnieO
#8839
Quindor wrote:... v2 will be a lot better, but also more complex (using ESP-12).

Great - I want that board! :)
Will v2 be something like this, or will you make all GPIOs available?
Image
You may want to consider using a smaller footprint DC/DC converter:
http://www.banggood.com/Small-Mini-360-Adjustable-DC-Power-Supply-Module-Mini-Step-Down-Module-p-917568.html Just remember to adjust it to right voltage before connecting the ESP8266.
Dimension the 12V tracks amply, and provide space for heat sinks on the FETs - and this could become a very useful module!
User avatar
By jpe
#8978 Hello all, noob here and first post.
I like this and it looks like something I could do with out blowing up the joint as a first project.
I am thinking it wouldn't be to hard to modify this to control one set of leds on on GPIO and a knob to power on and dim locally. To allow local control of lamps. Maybe one of those touch sensors.
I'm eyeing a couple lamps right now itching to gut them and make them LED.
User avatar
By Quindor
#8999
ArnieO wrote:
Quindor wrote:... v2 will be a lot better, but also more complex (using ESP-12).

Great - I want that board! :)
Will v2 be something like this, or will you make all GPIOs available?
Image
You may want to consider using a smaller footprint DC/DC converter:
http://www.banggood.com/Small-Mini-360-Adjustable-DC-Power-Supply-Module-Mini-Step-Down-Module-p-917568.html Just remember to adjust it to right voltage before connecting the ESP8266.
Dimension the 12V tracks amply, and provide space for heat sinks on the FETs - and this could become a very useful module!

v2 will be something like this but using a ESP-12 because it has more GPIO outputs.

I think I will make it so that we can address 3 PWM channels and route those with block terminal outs. That way you could potentially run them with an RGB LED strip, but more then that aren't needed in my situation. The current mosfets used can be driven up to 10A without issue, so you can already address LOTS of LEDs. It's more so we can address the channels/LEDs individually but then again, if I want more then those 3, I'll just use an extra board.

Also, if I ever wish to do something with an RGB strip I will use addressable RGB strips and those don't require a mosfet or something like that. They have a dedicated line for control.

I will expose the rest of the pins because in the end I want to use the same modules to do temperature, humidity, light level, motion sensing and also a physical switch button to report to my Domoticz system so I can use it to trigger events, etc. Sometimes I might want to combine that with LEDs connected to it and sometimes just as a separate sensor module. But it shouldn't be a problem to create a generic board for that.

But don't expect this very soon. I'm a bit busy at the moment and designing this board is quite a bit more complex and also I don't have good template/component designs for fritzing and suck at making them myself. (I'm missing the ESP-12 and the Voltage converter I want to use).

The voltage converter you linked is nice, but way too expensive. I've bought 20 of the following which I want to use on the v2 boards. These are only ~0.50$ a piece!

The diagram you included is how the current board using the mosfets already works.

@jpe
You might have a hard time to do with the current board what you are trying to do. Currently GPIO0 and GPIO2 are routed to go through a mosfet. You can make it work by soldering a bridge between the drain and the gate pin holes. That way you would effectively connect a GPIO port directly to a block terminal out port.
User avatar
By ArnieO
#9041 @Quindor: I think your approach is good. One set of RGB FETs per bord is enough. Yes, the ESP-12 or ESP-07 seem to be the good choices. Nota: There seem to be several versions of the ESP-07. I bought two ESP-07, and the ones I received have same pad configuration as ESP-12 with the added advantage of a ceramic antenna and a plug for a larger antenna. Nice if you need to increase the range. If you layout your board for ESP-12, I think the ESP-07 will fit directly.
http://l0l.org.uk/2014/12/esp8266-modules-hardware-guide-gotta-catch-em-all/

Quindor wrote: But don't expect this very soon. I'm a bit busy at the moment and designing this board is quite a bit more complex and also I don't have good template/component designs for fritzing and suck at making them myself. (I'm missing the ESP-12 and the Voltage converter I want to use).

No worries, but I'm sorry I can't help you out there. Maybe I look at it if I find time.

Quindor wrote:The voltage converter you linked is nice, but way too expensive. I've bought 20 of the following which I want to use on the v2 boards. These are only ~0.50$ a piece!

Thank you for that link! That is a very similar module at a great price, so I too just ordered 20 of those.

I am searching for a range (in amps) of low cost super compact modules to go from 220V AC to 12V DC. If anyone could point me to candidates I'd be grateful!