• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

About using ESP-01

Q&A Forum › Category: ESP8266 › About using ESP-01
0 Vote Up Vote Down
harish pillay asked 2 years ago

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

12 Answers
0 Vote Up Vote Down
Best Answer
Steve Mercer answered 2 years ago

You may want to look into external ADC’s. Adafruit and microcontrollerslab have good articles.

0 Vote Up Vote Down
Sara Santos Staff answered 2 years ago

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

0 Vote Up Vote Down
harish pillay answered 2 years ago

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
 

0 Vote Up Vote Down
Sara Santos Staff answered 2 years ago

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

0 Vote Up Vote Down
harish pillay answered 2 years ago

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

0 Vote Up Vote Down
Sara Santos Staff answered 2 years ago

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

0 Vote Up Vote Down
harish pillay answered 2 years ago

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

0 Vote Up Vote Down
Sara Santos Staff answered 2 years ago

OK.
Then, let me know if it works properly with the NodeMCU board.
Regards,
Sara

0 Vote Up Vote Down
harish pillay answered 2 years ago

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

0 Vote Up Vote Down
Sara Santos Staff answered 2 years ago

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

0 Vote Up Vote Down
harish pillay answered 2 years ago

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

0 Vote Up Vote Down
Sara Santos Staff answered 2 years ago

That’s great!
Thanks for sharing your journey in your blog.
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] SMART HOME with RPi, ESP32, and ESP8266 (version 1.2) March 8, 2023
  • [eBook Updated] ESP32-CAM Projects (version 1.3) January 7, 2023

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2023 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.