Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 00:27 29 Mar 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Arduino frustration

     Page 2 of 2    
Author Message
scruss
Regular Member

Joined: 20/09/2021
Location: Canada
Posts: 79
Posted: 11:01pm 20 Nov 2021
Copy link to clipboard 
Print this post

  flasherror said  It's important to remember the context of the ESP8266. This was a device primarily designed to provide a serial interface to a WiFi network and is resource constrained.

Very resource-constrained indeed. It was meant to give network access to very cheap tablets. It has a serial port, a very weedy ADC for managing ambient light levels and screen brightness from an LDR, and just enough GPIO to handle a couple of buttons.

Arduino on ESP8266 is also a very dismal experience: code upload is slow, and the millions of options you have to choose to set up your flash configuration just right is a pain. Most libraries no longer fit on the ESP-01 or even the ESP-01s.

Sounds like you bought the wrong kit from the get-go
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5645
Posted: 07:54am 21 Nov 2021
Copy link to clipboard 
Print this post

In the original concept of the project the ESP-01S would be the *exactly correct* component to use with a PicoMite (or one of the baby versions if it's money no object). It's the one area where the ESP-01 shines - what it was designed to do. In all probability it wouldn't even need firmware updating for this job. It's a pity Gizmo has had such a negative experience with it, but that tends to be part of R&D work - things don't go smoothly. I suspect he's got a couple of bad modules.

Moving the processing onto the ESP-01 is not a good idea. Yes, you *might* be able to do it, but it's way out of its comfort zone. It's like trying to write a word processor for a PicoMite. It also makes the code much harder to write and maintain for the sake of saving 3.60 UKP.

I have a connector for a ESP-01S on my PicoMite Backpack with the idea of using it with the control graphics to play with remote I/O over wi-fi - a sort of cheap HMI for all sorts of local IOT, I suppose. It's one of those back burner projects that I think about now and again. :) Think of jobs like control & status indication a group of fish tanks (heating, aeration, time switching, pH etc.) from a common point via local nodes with the minimum of wiring. These systems exist, but require network wiring and are very expensive. My idea is very cheap, easily expandable and tanks can be moved and taken out of service at the push of a virtual button.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
jirsoft

Guru

Joined: 18/09/2020
Location: Czech Republic
Posts: 532
Posted: 12:28pm 21 Nov 2021
Copy link to clipboard 
Print this post

I'm using about 10 of ESP's (mostly Wemos D1 mini), some for measurement of temperatures and sending ti over UDP multicast to whole network + store it into DB, some drive LCD for showing the temperatures and everything is working fine for few years.
I have in my dog house rPI3 for control the temp and heating and I'm thinking about switch to ESP also - rPi3 hass lower WiFi sensitivity than ESP, has bigger issues after power outage. At least I'm able to program it over network (VNC) same as for the ESPs (OTA in Arduino)...

So from my point of view, ESP is wonderful piece of equipment for the money...
Jiri
Napoleon Commander and SimplEd for CMM2 (GitHub),  CMM2.fun
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 12:36pm 21 Nov 2021
Copy link to clipboard 
Print this post

  Mixtel90 said  

Moving the processing onto the ESP-01 is not a good idea. Yes, you *might* be able to do it, but it's way out of its comfort zone. It's like trying to write a word processor for a PicoMite. It also makes the code much harder to write and maintain for the sake of saving 3.60 UKP.



 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5645
Posted: 12:37pm 21 Nov 2021
Copy link to clipboard 
Print this post

I know where to come now when I get in a knot, Jiri. lol
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 2989
Posted: 01:10pm 21 Nov 2021
Copy link to clipboard 
Print this post

  jirsoft said  I'm using about 10 of ESP's (mostly Wemos D1 mini), some for measurement of temperatures and sending it over UDP multicast to whole network + store it into DB
...

So from my point of view, ESP is wonderful piece of equipment for the money...


Similar experience here, although I have a wide range of wifi devices put in over the past 15 years. If anything fails, I replace it with an ESP8266 D1 mini. Anything new is likely to be a D1 Mini.

My latest replacement was for a PICAXE plus TP-Link WR703N which monitored the temperature in three hot-water heating zone pipes and sent changes to an accumulator device with TCP using netcat. It went flaky so I put in a D1 mini which sends using UDP. A much simpler and cheaper setup, and just plugged the existing DS18B20 encapsulated sensors into the D1 Mini PCB linked above (available from JLCPCB for about $5 for 5 PCBs).

~
Edited 2021-11-21 23:45 by lizby
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Gizmo

Admin Group

Joined: 05/06/2004
Location: Australia
Posts: 5004
Posted: 11:02am 25 Nov 2021
Copy link to clipboard 
Print this post

I got it to work  

What a learning curve!

I have the modified WiFi Mini ESP8266 connected to a LCD using I2C and the RFID reader using serial.

Program waits for enough characters in the serial buffer, then extracts the HEX data component that represents the card serial number. This is converted to a decimal number , added to a URL, and sent out the wifi to my local network. The response from the web server at the URL is then displayed on the LCD screen, and it waits for the next tag wave.

Phew!

Still to test this on a ESP-01, thats the next step in cutting down the component costs. I'll also need some sort of setup screen and a couple buttons to navigate the menu. The setup screen will be to configure the URL, and the SSID and password of the local wifi access point.

Glenn
The best time to plant a tree was twenty years ago, the second best time is right now.
JAQ
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5645
Posted: 11:32am 25 Nov 2021
Copy link to clipboard 
Print this post

Great! :)
Hard work, but once you reach that sort of stage you have an idea of what pitfalls to look for if/when you mess with this stuff again. Of course, you'll forget how you got it to work unless you take notes, which you'll lose anyway. :)
Been there, done that.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3422
Posted: 12:46pm 25 Nov 2021
Copy link to clipboard 
Print this post

@Gizmo,

Using Arduino or did you use Annex (or ESP basic) to do this ?

Volhout
Edited 2021-11-25 22:46 by Volhout
PicomiteVGA PETSCII ROBOTS
 
flasherror
Senior Member

Joined: 07/01/2019
Location: United States
Posts: 158
Posted: 01:48pm 25 Nov 2021
Copy link to clipboard 
Print this post

  Gizmo said  I got it to work  


Still to test this on a ESP-01, thats the next step in cutting down the component costs. I'll also need some sort of setup screen and a couple buttons to navigate the menu. The setup screen will be to configure the URL, and the SSID and password of the local wifi access point.

Glenn


For the buttons you could use the ESP8266 ADC and read buttons as analog input.
These is what I did on an ESP8266 project for 3 buttons, I used the AnalogButtons v1.2.0 library from https://github.com/rlogiacco/AnalogButtons




Also check out https://github.com/tzapu/WiFiManager and https://diyprojects.io/wifimanager-library-easily-manage-wi-fi-connection-projects-esp8266/
Edited 2021-11-26 00:01 by flasherror
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3422
Posted: 02:45pm 25 Nov 2021
Copy link to clipboard 
Print this post

On the ESP-01 module the A0 pin is not available. For key's you need to add an I2C device like the PCF8574. That alone, more or less, makes the ESP-01 a bad option. Better stick with the D1....
PicomiteVGA PETSCII ROBOTS
 
flasherror
Senior Member

Joined: 07/01/2019
Location: United States
Posts: 158
Posted: 04:29pm 25 Nov 2021
Copy link to clipboard 
Print this post

  Volhout said  On the ESP-01 module the A0 pin is not available. For key's you need to add an I2C device like the PCF8574. That alone, more or less, makes the ESP-01 a bad option. Better stick with the D1....


Agreed. Gizmo should look at the D1 Mini. Plus, the D1 Mini pinout is same as D1 Mini Pro (which allows external antenna/more flash with the same PCB pinout).

Trying to maximize use of all ESP-01 pins will probably lead to hair pulling.

In any case this might be useful: https://randomnerdtutorials.com/esp8266-pinout-reference-gpios/
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 2989
Posted: 05:17pm 25 Nov 2021
Copy link to clipboard 
Print this post

Agree about the superior general usefulness of the D1 Mini.

  flasherror said  Trying to maximize use of all ESP-01 pins will probably lead to hair pulling.


Use of Tx and Rx pins as gpios on the ESP01 is trivial, at least with Annex.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Gizmo

Admin Group

Joined: 05/06/2004
Location: Australia
Posts: 5004
Posted: 01:20am 27 Nov 2021
Copy link to clipboard 
Print this post

Used the standard Arduino C++ Volhout.

Yeah using the analogue input and 4 switches with resistors. Agree a ESP-01 wont have enough inputs for what I want so I'll stick with the D1 Mini, which I think is the same thing as my WiFi Mini from Jaycar.

The only issue with the Mini is I need to cut that serial input track to isolate the USB-Serial circuit. A toggle switch will let me change from programming to running mode.

Writing some menu functions now to let the user change the Wifi access point, username and password, and the devices location and function on the workshop floor.

These things will be used in a workshop to record a employee starting or ending work in a work cell, just by waving his ID card at it. The other function is to record when a employee goes out for a smoke, they dont get paid for smoke breaks.

The 20x4 LCD screen plus I2C converter is the most expensive part of the project. I've ordered a OLED display with I2C to see how that will go as a cheaper ( and better looking ) alternative.

Glenn
The best time to plant a tree was twenty years ago, the second best time is right now.
JAQ
 
     Page 2 of 2    
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024