Hi. I’ve signed up for your course on Home Automation Using ESP8266 (4th Edition) and I am enjoying it.
I have a question about using the ESP-01 board because I have a project that does not need all of the other pins and only 2 sensors. I need to have GPIO0 and GPIO2 as inputs to accept two values from two sensors: one temperature (from DS18B20) and the other from a TDS/EC sensor. I have them working OK with the Arduino Yun and need some guidance on ESP-01 which is where I seem to be struggling with.
Thanks.
Harish
You may want to look into external ADC’s. Adafruit and microcontrollerslab have good articles.
Hi Harish.
Can you be a bit more specific about what exactly are you struggling with?
Is it the code? The connections? Are you getting any errors in your code?
Regards,
Sara
Sara –
Thanks for the reply. It is about the wiring of the ESP-01. I want to use GPIO0 as the input for the temperature and GPIO2 as the input from the tds/ec sensors respectively.
I have the board setup with CH_PD + Vcc to 3.3 V, GND to GND and am connecting the GND wire of the temperature sensor to the same GND (I am using a small breadboard to do all of the connections between the ESP-01 and the two sensors). The temperature, the tds/ec probes and the ESP-01 both get their 3.3 v from the USB to TTL UART module (https://www.aliexpress.com/item/32665965133.html).
I’ve the temperature data going to GPIO0 and the tds/ec to GPIO2. I think this should work, but it does not seem to be.
I will keep at it until I get it working, and follow the video training as well. Any suggestions are most welcome.
Harish
Hi again.
When you say that it doesn’t seem to work, what happens exactly?
Are you able to upload code to the board? Do you get invalid readings?
Regards,
Sara
Sara –
Hi. I think I’ve figured out the issue I am having. One of the sensors I am using (the tds/ec) is an analog sensor and the ESP-01’s GPIOs expect only digital. I am kinda out of luck in trying to use the ESP-01 for this purpose and would perhaps need to go back to the Yun or a NodeMCU for that – unless you’ve a suggestion.
Thanks.
Harish
Hi.
Perhaps the best option is to use a NodeMCU board. It comes with one analog pin exposed that can easily be used.
If you think you might need more ADC pins in the future, an ESP32 might be a better idea.
If you don’t need wi-fi in your projects, an Arduino will do just fine.
Regards,
Sara
Thanks, Sara. I will look around for an alternative to the tds/ec module that send data out digitally so that I can use the ESP-01s (I’ve got a bunch of them). But for now, I will stick to the NodeMCU modules just to complete the project I am working on (note to self: always check if data from sensors are digital).
Harish
OK.
Then, let me know if it works properly with the NodeMCU board.
Regards,
Sara
Thank you Steve.
I did not find those ADCs – I guess I was not looking at the right places. I think this might be what the project needs – I really want to maximise the ESP-01s I have and not have to use ESPs with more ports than the project needs.
Thanks again, Steve.
Harish
Ok.
I’ll mark this issue as resolved.
If you need further help, you just need to open a new question in our forum.
Regards,
Sara
Yes, close this thread. Thanks.
BTW, I’ve posted the learnings on my blog: https://harishpillay.com/2020/12/01/my-esp8266-01-adventure/ and will add to it as I make progress.
Harish