Voltage divider is not giving correct voltage

Because if you used a cheap plumbing solder it likely has an acid core and will likely cause all manner of problem and unpredictable behavior.

So, what kind of solder did you use, please? The mix, materials, and core are all important factors.

Try to be more receptive to observations and a bit less dismissive of paths suggested to you and you may get to the root of your problems more quickly. Just a friendly suggestion :grinning:

Yes, chines branded, but not cheap ones. If it was solder issue, how i am getting same voltage on the same pins in the board?
And i just looked at the pcb for an hour, nothing i can see gone side ways here.

here is a pic of the board. i shorted the diode here. white line is from the battery and blue line goes to ESP. green colored ones are resistor. other then that 2 resistor i did not soldered anything. i am using the esp in a breadboard.
if any one catch anythin let me know

I see where your misunderstanding is. Just because you have a connection doesn't mean you have a proper connection. There could be a cold joint, cross connection, or a change in the nature of the circuit ie eg more resistance because of a bad connection. There are even deeper issues that can arise, but it's sufficient to say that solder joints can be a huge issue in any project.

It's good that you didn't use a cheap solder. In my solder pot I use 60/40 tin/lead and for my iron I use 63/37 tin/lead with a 2% flux core. What is yours?

know those issues, and i can say soldering was good.
my one is tin 60%,lead 40%, flux 1.5~2%

Sounds like you've got this then.

A bit of parting advise, when you're trying to diagnose a problem never assume anything.
Years ago I had an old boss call me in a panic because his computer just shut off and wouldn't turn back on. A quick panicked glance told him that the computer was plugged in but he failed to notice that his briefcase had tripped the switch on the power strip. Had he not assumed that the power strip was on he would have saved himself a lot of frustration.


I tested the divider in a separately in a breadboard.

  1. if the esp32 is not connected to the power then the divider voltage is not correct. giving me random values in different pins.
  2. if esp is powered, i mean it's powered by the same battery that i am trying to measure using the divider, i get correct voltage.

@Wawa you are correct.
@johnerrington did you tried that? i don't think that simulation won't give you this as it's not silicon level simulation.

Anyway thanks a lot guys.

Nothing you can afford is a silicon level simulator.

Tested on the circuit as shown above yes in real life as I dont believe anything a computer may tell me about cirucit values.

Well, it's your loss, then. Circuit simulation plays a valuable role in electronics design. Like all models it has limitations, but knowing them is part of the craft.

Dont be so disparaging Steve

That was (partly) my point. Simulation can be useful but the practical circuit will only behave (almost) as expected if EVERY component value is precisely known and used in the model.

Well it was a ridiculously dogmatic statement! "Don't believe anything". Really?

Not really. Most circuits behave similarly (or indistinguishably) with a range of tolerances on the components, and that includes physical and simulated circuits.

Circuit simulation is an extremely solid science, and in the vast majority of cases it produces useful, accurate results. Furthermore, tools like Monte Carlo analysis exercise corner cases to see if any combination of tolerances produce aberrant behaviour, something impractical with physical circuits of any complexity. Simulation allows you to analyse behaviours that would take hours or days using physical test equipment. Simulation is a valuable tool used extensively throughout the electronics industry.

So when you say "I dont believe anything a computer may tell me about cirucit values" then yes, you are being ridiculous. Whatever you do, don't say that in a job interview. :laughing:

I don't know circuit simulation but I do know logic simulation and this is a huge issue for me. In just a few minutes time I can fuzz a design and analyze the outputs for undesired behavior and have a darn good idea of what causes it. By hand this could take anywhere from a few hours to many weeks.

I find an annoying thing about simulators is the lack of sanity checking - in LTSpice for instance M means milli, you have to type "Meg" for mega, and if you forget it bites you - the sim may be running with 1000's of amps and you don't even notice, other than being confused by odd behaviour of the circuit! Magic smoke is not simulated well!

The best tool is only as good as the one using it!

Yeah, sometimes you have to tighten the nut at the other end of the handle.

1 Like

The one I'm most familiar with is Multisim, and that does blow up components if they're overloaded, if you let it.

I don't think simulation simulate the inner process of an MCU. So the simulation of an MCU won't give correct result. Like ADC.
As for my problem i don't think any simulation can help one to identify it. Real life testing was the correct way to find the issue.

My reply (post#36) may have misled you into thinking I used a software simulator. Not so. I did the ACTUAL experiment using the parts shown on the diagram.
No simulator can make allowances for variations in parts used unless you apply corrections; so for a voltmeter it assumes infimnite impedance (which is not the case) unless you connect a resistor across it to reflect the actual resistance of the meter you are using.

I don't know about ADC. Some simulators will simulate certain microcontrollers along with their circuitry.

Yes. My disagreement was with @johnerrington, who said he never trusts simulation (paraphrased).

Anyway, we've done this one to death! :grin:

Thanks for help, I have same question so pleased to see this post official site.
Really appreciate to all community members for your valuable and thankful response.