Chat freely about anything...

User avatar
By AdrianM
#40071
Cyberduke wrote:I haven't tried NodeMCU yet, at this stage I am just at that level where it is hard to see the point.

I use NodeMCU LUA mostly because I find it the most reliable. I think the hardware issues being discussed are a bit of a red-herring. The API calls are all event-driven in the LUA environment which is IMO a better mapping to the underlying SDK. While an amazing job has been done integrating the Arduino environment, the casual programmer used to Arduino coding has to be very aware of the potential pitfalls and if not, may well see apparently unreliable behaviour.

I have a number of embedded ESP8266 devices running LUA in various projects - some are directly battery powered, some use Linear regulators. One in particular has to run off a 20V supply and for this I built a buck regulator based on a minimal two-transistor design published by Roman Black. This is an *incredibly* crude power supply yet the ESP8266 has been powered-up constantly with it since early December. I really don't think the supply is anywhere near as critical as people believe it is.
User avatar
By GrahamH
#40080 Looking at your photos, you have long wires, one breadboard has no bypass capacitors, and you appear to be driving relays without any inductive kickback protection.

I think "torntrousers" has given you excellent advice.

For reliability, clean up your breadboards, make the wires reasonably short.
Add bypass capacitors at EVERY point of load.
Add diodes backwards across all inductive loads to absorb the turn off "kick".
No wires on any unused inputs.
No floating inputs, always pull up or pull down at all times.
Tie the negative side of your power supply back to the safety ground on your power supply.
Working on wooden table top without grounded anti-static mat can cause random ESD events.

--- Graham

==
I have run Aruduino-ESP8266 programs for weeks. No crashes.
User avatar
By mianos
#40108
Cyberduke wrote:With my curious side taking over, how did you connect your esp module onto the internet and/or your projects?


I use http. All this MQTT is not for me as I send my board to sleep. It's my belief that continuously open sockets are not all that suitable for transient connects and devices.
Code: Select allwc = esp.ws(remote=('131.84.1.1', 80))
wc.async_post(path='/accept_data',  json.dumps({'temp1': 12}))

That easy.
User avatar
By jeffrey92
#40121 If you want reliability:
1. spend a little extra and get a dev board that is known to function properly (like NodeMCU, or even the cheap $3 yellow boards I've seen around on aliexpress).

2. Write everything in C and do lots of boundary checks on code, especially anything to do with malloc, free, or string operations. Also, you have to be really careful with anything related to SPI Flash.

Once you know your hardware is solid, you can know whether or not your code is what's at fault. When I was first getting going with the ESP8266, most of my issues were hardware related, followed by SPI Flash. Personally I like using C with esp-open-sdk because I can more easily track down bugs and specifically load modules I need. Otherwise you're pretty much stuck waiting for people working on whatever framework you're using to look into your issue. From what I've seen they're pretty fast- faster than a lot of other platforms with paid devs. But still it's nice to be able to find and solve your own problems :D