ESP-12f different analog inputs?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Riewekooche
Normal user
Posts: 21
Joined: 21 Nov 2022, 07:40

ESP-12f different analog inputs?

#1 Post by Riewekooche » 23 Jul 2023, 16:53

Hi there,

trying to build a automatic filling of water at my heating added an analog pressure sensor to the analog input.

Surprisingly i have one with the expected range from 0 to 1023 steps and one (same type and firmware) with 0 to 4095 steps.

Any explanation for that?

Thomas
Attachments
Unbenannt.jpg
Unbenannt.jpg (77.62 KiB) Viewed 1866 times

User avatar
Ath
Normal user
Posts: 3522
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESP-12f different analog inputs?

#2 Post by Ath » 23 Jul 2023, 17:19

What build do you have installed on each ESP? Looking at the screenshot you seem to be using a VCC build, but that has the A0 input soft-wired to... VCC, just like the message states. Don't think you should use that build, pick the same build without VCC in the name.
/Ton (PayPal.me)

TD-er
Core team member
Posts: 8756
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP-12f different analog inputs?

#3 Post by TD-er » 23 Jul 2023, 17:39

Yep the _VCC builds for ESP8266 will internally connect the analog port to the VCC pin of the ESP and then output the value in a somewhat mV unit.

It will NOT measure the voltage supplied to the A0 pin for those _VCC builds.

Riewekooche
Normal user
Posts: 21
Joined: 21 Nov 2022, 07:40

Re: ESP-12f different analog inputs?

#4 Post by Riewekooche » 23 Jul 2023, 18:13

My firmware and build:
Binary Filename:⋄ ESP_Easy_mega_20221122_normal_ESP8266_1M_VCC
Build Platform:⋄ Linux-5.15.0-1022-azure-x86_64-with-glibc2.31

So it seems, that i need another build.

What version do you recommend for using the analog input (0 to 1V)

TD-er
Core team member
Posts: 8756
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP-12f different analog inputs?

#5 Post by TD-er » 23 Jul 2023, 18:36

Anything without _VCC
And also your ESP has 4MB of flash, so better take a 4M build.

And perhaps a 7 months younger build may also be a good idea :)

Riewekooche
Normal user
Posts: 21
Joined: 21 Nov 2022, 07:40

Re: ESP-12f different analog inputs?

#6 Post by Riewekooche » 23 Jul 2023, 19:22

Well i tried the following and it works :D
Thanks

20230623 - Mega
System Libraries:⋄ ESP82xx Core 2843a5ac, NONOS SDK 2.2.2-dev(38a443e), LWIP: 2.1.2 PUYA support
Git Build:⋄ mega-20230623
Plugin Count:⋄ 47 [Normal]
Build Origin: GitHub Actions
Build Time:⋄ Jun 23 2023 21:26:47
Binary Filename:⋄ ESP_Easy_mega_20230623_normal_ESP8266_4M1M
Build Platform:⋄ Linux-5.15.0-1040-azure-x86_64-with-glibc2.35

User avatar
Ath
Normal user
Posts: 3522
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESP-12f different analog inputs?

#7 Post by Ath » 23 Jul 2023, 20:04

Great :)
/Ton (PayPal.me)

TD-er
Core team member
Posts: 8756
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP-12f different analog inputs?

#8 Post by TD-er » 23 Jul 2023, 20:04

Great!
Welcome to your new addiction... ehh hobby :)

bidrohini
Normal user
Posts: 106
Joined: 03 Nov 2022, 16:24

Re: ESP-12f different analog inputs?

#9 Post by bidrohini » 26 Jul 2023, 16:55

What is the pressure sensor doing in your project actually? Are you using that to measure water level, or anything else? For measuring water level, float switches are best. Here is a LoRa remote water level and pump controller project. This one uses 3 float switches:

https://www.pcbway.com/project/sharepro ... 644fa.html

Float switches can be integrated with level control plugin:

https://espeasy.readthedocs.io/en/lates ... /P021.html

TD-er
Core team member
Posts: 8756
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP-12f different analog inputs?

#10 Post by TD-er » 26 Jul 2023, 23:01

Why are float switches better than a pressure sensor?
As far as I understand, those only give a discrete level indication.
This can be useful for battery powered 'alarm' setups like the LoRa controller you linked, as that one probably only needs to wake when some threshold is passed.
But I can imagine other use cases where a more analogue indicator could be useful.

Post Reply

Who is online

Users browsing this forum: No registered users and 36 guests