I am considering using Pololu's P-Star 25K50 dev board for some simple LiPo cell testers.

This board is a complete system with on-board voltage regulator, USB micro-B jack and the Microchip PIC 18F25K50 microcontroller. Most of the pins on the controller are brought out to pads along the edge of the board.

Because this board offers USB connectivity, I am considering using USB to power the board. That means that the controller Vdd might be in the range of 4.8V to about 5V. Total system current is expected to be only 1mA or so above the current consumed by the micro.

Because I want to measure single LiPo cells, I need the analog inputs to be able to handle input voltages of somewhat more than 4.2V. The micro has several available analog-capable channels multiplexed into a single 10-bit A/D converter.

I'd like to use an external 5.12V reference that feeds the A/D converter's (+) Reference input. This will give me nice, human-readable voltages with 5.0mV resolution.

With previous projects (not involving USB), I simply powered the entire microcontroller from a buffered copy of the 5.12V reference, then fed the reference itself into the A/D (+) Reference input. That's not as easy with this board.

I'm wondering if it is possible to power the micro from about 5V but have the A/D (+) Reference sitting about 120mV above that rail - and have the A/D converter function correctly.

The datasheet (DS30000684B) is completely lacking this information - there is no guidance as to the limits on the reference voltage other than to say that the voltage on any pin should not be higher than 0.6V above Vdd.

  • 1
    \$\begingroup\$ I was about to say that even if it worked it would be risky in the absence of specific specs that say it's OK. Then I saw who was asking :-) - So I know you know that. You will almos certainly be starting to forward bias the substrate diodes. 120 mV is well down the diode conduction curve and leakage may be in the sub uA or uA range - it's got a good chance of working if you must toss a coin - and / but Murphy loves tossing coins. You know that :-). \$\endgroup\$
    – Russell McMahon
    Jan 9, 2016 at 0:46

2 Answers 2


The analog reference voltage can not be greater than the supply voltage.

Have a look at the datasheet of PIC18F4550. Table 28-28 on p.404 (param no. A21). Vdd is the maximum.

enter image description here

Strangely, the datasheet for your particular PIC doesn't seem to have a table for A/D, although it has got a table for D/A (table 29-12 on p.463).


Minimum voltages at the end of a cable from a USB hub could be quite a bit lower than 5V- I see as low as 4.35V.

If you're not planning on fudging that spec, I don't think this is a good idea- the 770mV will result in a lot of conduction of the protection networks from the reference into the supply- and if you were okay with that you could just run everything off the reference as you've done before. I wouldn't lose too much sleep over 100-120mV (after testing over temperature to 400mV+) but that's only the nominal.

Perhaps you could use a small boost converter such as a AAT1217 to give you 5.3V or so then you'd be relatively safe. Of course you also need to protect against the reference being powered when the USB is not, if that is possible.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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