As the title says... Chat on...

User avatar
By ardhuru
#19577 Actually, this is more an electronics problem than that to do with lua.

I have a project running on the ESP8266 01, with both gpios being used as outputs.

My code works fine, *but* at switch on, both pins pulse high for about 300ms, before the code takes over and switches them off. This is completely unacceptable, as one of the gpios operates a solenoid to open a door, and wouldnt want that to happen every time there is a power on!

I have determined that no amount of changes to the code would help; wrote a simple script that just configures the pins as outputs, and keeps them low, just as a test. Even then, the pins do flash high for a few milliseconds.

Can anyone suggest a hardware solution to suppress this, short of using a 555 monoshot?

Regards.
User avatar
By trackerj
#19581
ardhuru wrote:Actually, this is more an electronics problem than that to do with lua.

I have a project running on the ESP8266 01, with both gpios being used as outputs.

My code works fine, *but* at switch on, both pins pulse high for about 300ms, before the code takes over and switches them off. This is completely unacceptable, as one of the gpios operates a solenoid to open a door, and wouldnt want that to happen every time there is a power on!

I have determined that no amount of changes to the code would help; wrote a simple script that just configures the pins as outputs, and keeps them low, just as a test. Even then, the pins do flash high for a few milliseconds.

Can anyone suggest a hardware solution to suppress this, short of using a 555 monoshot?

Regards.


I would prefer the old fashion way:
Schmitt triggers inverter + change your "HI" and "LOW" commands, 1 -> LOW, 0 -> HIGH
User avatar
By ardhuru
#20235 Surprisingly, the pull-down didnt help.

Eventually just programmed a pic 12F629 as a dedicated initial 1 second delay line. The ESP drives the pic, the pic controls the relay. I know its an overkill, but served the purpose very well. A single component solution, with perhaps the world's shortest pic program sunning!