Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

RE: [AVR-Chat] Re: ADC Vref

2007-12-14 by Tim Mitchell

Graham Davies wrote:
> --- In AVR-Chat@yahoogroups.com, "David VanHorn" <microbrix@...>
> wrote: 
> 
>> For this business, you really need
>> some software, and some hardware,
>> specifically ANALOG!
> 
> Agreed.  So, shall we do it?  It seems like an interesting problem
> and it isn't someone's homework. 
> 
> I would use a P-channel enhancement MOSFET with its source connected
> to the supply being monitored and its drain feeding the top of the
> voltage divider.  The gate would have a resistor to the source to
> keep the MOSFET normally off.  To turn it on, we need an N-channel
> MOSFET or an NPN transistor with source/emitter at ground and
> drain/collector connected to the P-channel MOSFET's gate.  To turn
> the whole thing on, we apply a high level to the drain of the
> N-channel MOSFET (or switch a current into the base of the NPN
> transistor).  If we pick the right parts for low leakage, nothing
> draws current when it is off. Unfortunately, the whole thing may have
> to be replicated for each supply to be measured, but if they are
> similar in voltage it may be possible to share the N-channel/NPN
> part.           
> 


Why couldn't you use a N-channel fet at the bottom end of the voltage
divider, with fairly high resistors for the divider? This would save on
mosfets and resistors, and I don't think would draw any power when off
(the AVR's analog inputs are high resistance - 100M according to the
data sheet). Plus you can use a single fet to switch any number of
dividers.

I have got a circuit which uses exactly this technique and seems to work
fine.


-- 
Tim Mitchell
tim@sabretechnology.co.uk http://www.sabretechnology.co.uk
Sabre Technology (Hull) Ltd, 3a Newlands Science Park, Hull HU6 7TQ
Registered in England and Wales no.3131504
t:01482 801003 f:01482 801078

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.