Problems with Analog Input
Moderators: grovkillen, Stuntteam, TD-er
Problems with Analog Input
Hey everbody,
after 1000 tries and endless soldering i'm about to give up on this topic.
Following setup: The ESP12F is powered by another external power source, so there is no connection between the circuit to measure and the one who is powering the unit.
I've installed the newest Mega Build with VCC extension.
Then i've setup a new Analog Input Devicec in ESPEasy and looked hopefully at the result: -1
I've tried 2 other modules, same result.
What am i doing wrong? It is possible to measure a current from a circuit which is not the one powering the unit?
after 1000 tries and endless soldering i'm about to give up on this topic.
Following setup: The ESP12F is powered by another external power source, so there is no connection between the circuit to measure and the one who is powering the unit.
I've installed the newest Mega Build with VCC extension.
Then i've setup a new Analog Input Devicec in ESPEasy and looked hopefully at the result: -1
I've tried 2 other modules, same result.
What am i doing wrong? It is possible to measure a current from a circuit which is not the one powering the unit?
Re: Problems with Analog Input
You cannot measure a current directly with the ADC, you only can measure a voltage.
For low voltages you can use one GND for both, the ESP and your Battery and then measure the voltage which drops at the resistor. Following Ohm's Laws you can calculate the current.
Regards
For low voltages you can use one GND for both, the ESP and your Battery and then measure the voltage which drops at the resistor. Following Ohm's Laws you can calculate the current.
Regards
Re: Problems with Analog Input
Hey Tommo,
thanks for your answer.
In my frustration i mixed up the terms.
I only want to measure the voltage, no current.
So instead of using the ground from the battery, i would use the ground from the ESP-powering circuit? The right site of my scheme would be omitted?
thanks for your answer.
In my frustration i mixed up the terms.
I only want to measure the voltage, no current.
So instead of using the ground from the battery, i would use the ground from the ESP-powering circuit? The right site of my scheme would be omitted?
Re: Problems with Analog Input
You still have to connect the ground of the ESP with the ground of the battery.
Just make sure the rest of the schematics allow that connection of both grounds.
And this will draw a current of 0.1 mA.
So a small button cell may get drained when connected.
An AG13/LR44 cell has about 155 mAh capacity, which means it is drained in 2 months.
Just make sure the rest of the schematics allow that connection of both grounds.
And this will draw a current of 0.1 mA.
So a small button cell may get drained when connected.
An AG13/LR44 cell has about 155 mAh capacity, which means it is drained in 2 months.
Re: Problems with Analog Input
So my new construction looks like this, but is still not working (-1).
With the 8,2k resistor and with 0.1ma there should be 0.85V.- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: Problems with Analog Input
And you are running the VCC enabled version?
[Edit]: I now see that you already started that you're doing that.
[Edit]: I now see that you already started that you're doing that.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: Problems with Analog Input
Can i conclude from this, that it should work with this setup?grovkillen wrote: ↑04 Sep 2018, 09:00 And you are running the VCC enabled version?
[Edit]: I now see that you already started that you're doing that.
Maybe all my ESP12F are faulty, they are all from the same batch.
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: Problems with Analog Input
Do you get any testing if you put a GPIO with PWM to the analog input? I mean just to test the unit itself.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: Problems with Analog Input
You must not use the version with VCC in the filename, since you're then measuring the voltage on the Vcc line of the ESP (if connected)
For using an external voltage, you must use the normal firmware version.
Also you must use a 2nd resistor, which is not included in the image, from ADC to GND pin.
You want to make a resistor network to lower the voltage over the ADC pin and since the ADC to GND has a near infinite resistance, your 8k2 resistor has no effect and the voltage applied to the ADC pin is > 1 Volt.
For using an external voltage, you must use the normal firmware version.
Also you must use a 2nd resistor, which is not included in the image, from ADC to GND pin.
You want to make a resistor network to lower the voltage over the ADC pin and since the ADC to GND has a near infinite resistance, your 8k2 resistor has no effect and the voltage applied to the ADC pin is > 1 Volt.
Who is online
Users browsing this forum: Ahrefs [Bot] and 20 guests