9
\$\begingroup\$

I'm looking to integrate a LiPo charging circuit into my PCB, and found the MCP7831 IC. It's got a PROG pin, that allows you to change the behavior of the IC by use specific resistor values between that pin and ground.

enter image description here

But I'm wondering how it knows the value of the resistor?

I would think to know the value of the resistor your + voltage is applied to one side, and the other goes to an input pin of an IC that measures the lowered voltage. But if it connects straight to ground, how does the value get measured?

\$\endgroup\$
8
\$\begingroup\$

Have a look at the datasheet - it's shown explicitly:

enter image description here

In normal (not precondition) charging, a constant voltage of 1.00 volt is maintained on the PROG pin by closed loop control through the op-amps (the 1.22 V reference is divided down). The resistor connected from the PROG pin to Vss causes a current to flow of 1.00V/R. In the example, a current of 0.5mA will flow through the 2K resistor (Ohm's law).

That current is reflected in the current mirror with a 1000:1 ratio, so 500mA will flow through the battery. There's a few details beyond this, but I think this covers the question.

\$\endgroup\$
  • \$\begingroup\$ Reason for the downvote? \$\endgroup\$ – Spehro Pefhany Dec 20 '14 at 21:56
14
\$\begingroup\$

It's generally done with a current source.

The current source applies a current to the unknown resistor and the voltage across the resistor is measured.

Usually the current source is will be trimmed and curvature corrected over temperature to improve accuracy.

Sometimes the voltage is measured with an ADC.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
  • \$\begingroup\$ I'm not seeing how this maps the schematic above. Vss appears the be the IC's ground, so PROG would have to be the voltage meter? But there's no positive voltage applied trace. Is the PROG pin both V+ and the voltage meter? \$\endgroup\$ – Alex Wayne Dec 19 '14 at 18:45
  • 1
    \$\begingroup\$ Prog is the top of the resistor. Vdd is internal vdd of the IC derived from Vin. \$\endgroup\$ – akellyirl Dec 19 '14 at 18:55
7
\$\begingroup\$

Like most regulator/regulation ICs that use a resistor for programming, a fixed voltage is applied to the resistor. This results in a specific current, and through either a current mirror or a current amplifier further parts of the IC can use this information to control their behavior.

\$\endgroup\$
7
\$\begingroup\$

The PROG pin can measure the resistor by either setting a specific voltage and measuring the current or by setting a specific current and measuring the voltage.

\$\endgroup\$
  • \$\begingroup\$ So like measuring the size of the hose (resistor) by how fast the water drains from the tank (IC)? \$\endgroup\$ – Alex Wayne Dec 19 '14 at 18:39
  • \$\begingroup\$ Hmm, I suppose you could think of it that way, but the analogy is a bit too lose because it suggests values that change with time. I would just say measuring the amount of water leaving the tank at any given time, the tank doesn't drain. \$\endgroup\$ – Samuel Dec 19 '14 at 18:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.