intermittent power sensor

Thread Starter

rewIndustry

Joined Feb 4, 2023
30
have a number of 12 and 24 volt batteries whose voltage i must monitor.

am using raspberry picoW boards for this, they have 2 (or 3) ADC inputs that can read 0 - 3.3 volts.

according to what i am reading the way to do this is to make a voltage divider, usually from resistors.

according to my (very rusty) education, this voltage divider draws current at the rate I = V/R.

as far as i can tell this wastes power, which defeats the point of my project.

i need a way to disconnect the voltage divider when the board is not using it.

i could use a relay, but this seems a waste.

would it be possible to disconnect the voltage sensor using a transistor, perhaps?

if so, could anyone advise me how to wire this, without blowing up my boards?

MrChips

Joined Oct 2, 2009
31,079
It is hard to take a voltage measurement and not draw any current.

The first thing you need to ask is what is the input impedance of the ADC input?
This is usually very high. If the input impedance is 100kΩ it means that it will draw 33μA max.

As a rule of thumb, you want the impedance of the voltage divider to be less that 1/10 of the load.
In this case, your voltage divider will have a resistance of 10kΩ.

Now you can specify the resistances of your voltage divider.

R2 = 10kΩ
R1 = 90kΩ

This will give you a 10:1 voltage reduction.

Your max current draw from the battery is 24V/100kΩ = 240μA
How much power does the picoW consume?

Thread Starter

rewIndustry

Joined Feb 4, 2023
30
picoW will be asleep on a timer, most of the time, and will take a reading once every hour, probably.

do not mind consuming power while i am reading the voltage, must obey the laws of physics.

however i want to disconnect the divider when it is not being read.

Thread Starter

rewIndustry

Joined Feb 4, 2023
30
am attaching the relay based circuit i would use, if i can find no other solution, in case this helps to clarify what i am trying to do.

MrChips

Joined Oct 2, 2009
31,079
Here is a battery monitor circuit for you.

V2 represents the control signal from your picoW.
Send a HIGH signal to turn on Q2 and hence Q1.
Send a LOW signal to turn off Q2 and Q1.

The voltage divider is R1 and R2.

Here is with Q1 and Q2 turned off.

Edit: Typo error. Q1 should have been 2N3906.
Edit: Changed Q1 to 2N3906. Changed R1 and R2 values.

Thread Starter

rewIndustry

Joined Feb 4, 2023
30
thank you very much indeed.

have to admit, though, there are bits i cannot understand.

why is it 798mv between R5 and R6? i would have expected 1.5v
i would have thought collector of Q2 would be at 0.7v, the emitter diode drop?

the rest makes sense to me, and is exactly what i wanted - thank you very much.

MrChips

Joined Oct 2, 2009
31,079
I had forgotten to specify Q2 as 2N3904. The voltage under question is now 681mV.
This is the base-emitter voltage of the transistor, not the R5-R6 voltage divider voltage.

0.7V diode drop is only an estimate. It can be between 0V and 1V depending on the diode current.

Thread Starter

rewIndustry

Joined Feb 4, 2023
30
oh, of course, i get it now - thank you again.

LowQCab

Joined Nov 6, 2012
4,293
No Relays needed.
One GPIO can turn On all "Voltage-Samplers" at the same time,
but each Battery requires it's own dedicated ADC-Pin.
.
.
.

.

Thread Starter

rewIndustry

Joined Feb 4, 2023
30
thank you, this makes good sense also, the only thing i don't understand is the 15v Zener.

crutschow

Joined Mar 14, 2008
34,841
i would have thought collector of Q2 would be at 0.7v, the emitter diode drop?
The collector-emitter saturation voltage can be much less than a diode drop, and can be well under 100mV depending upon the collector current.

crutschow

Joined Mar 14, 2008
34,841
but each Battery requires it's own dedicated ADC-Pin.
Alternately, each output can share the same voltage divider as long as only one transistor is on at a time.
Of course that does require a separate control line for each output, so the number of micro lines needed is a wash, unless an external binary address decoder/mux is added (which makes sense if a large number of batteries are being monitored).

LowQCab

Joined Nov 6, 2012
4,293
thank you, this makes good sense also, the only thing i don't understand is the 15v Zener.
.
A very common "maximum-Gate-Voltage" for FETs is around minus~20-Volts.
The Zener prevents the Gate-Voltage from exceeding minus~15-Volts when attached to a 24-Volt-Battery.
It could be slightly lower-Voltage because most FETs are fully "On" by around minus~10-Volts,
and the FET will probably work just fine in this Circuit with as little as minus~7-Volts,
of course depending upon the exact specs of the FET.
.
.
.

Thread Starter

rewIndustry

Joined Feb 4, 2023
30
thank you, i live and learn, MOSFETs are new to me, will study more, and order some soon, along with the appropriate Zeners.

LowQCab

Joined Nov 6, 2012
4,293
Will You be using Through-Hole, or SMD, devices ?
.
.
.

Thread Starter

rewIndustry

Joined Feb 4, 2023
30
not even through hole - i do spaghetti wiring in free space, and then pot everything - this is mostly for marine use.

would you recommend a good TO-92 form mosfet for switching mostly 3.3v, max 5v, at max 200mA or so?

however that is a digression, i will also need something that can handle a max of about 30v, if mosfet is the best way to solve the voltage measurement (the topic) problem, however am hoping such a low current application means i can do this in TO-92 form also?

generally my game is to do everything i can to reduce the amount of power my boards will consume, and am looking for whatever would be the most efficient way of turning on and off the many different kinds of sensors i need to interface.

am planning to use relays for the larger loads - 5 to 20 amps at 12 volts - on the assumption these will be more efficient, as well as cheaper, however i wonder how mosfets would compare, in terms of efficiency and reliability?

however am sure i can google for all this information, i don't need to steal your time..

LowQCab

Joined Nov 6, 2012
4,293
Salt-Air is the evil nemesis of all Electronics.
All exposed metallic objects will be DESTROYED !!!!
( just playing, but it's true )

Potting is a reasonable plan for all Salt-Water Electronics, regardless of construction style.

High-Power-FETs, screwed to the inside of a cast-Aluminum-Box for Heat-Sinking,
then tested, then Potted,
can be very reliable, as there are no Arcing-Contacts to wear-out,
but it will initially cost You more than a Relay.
But if a FET is protected properly, ( Electrically, and physically ), it will last basically forever,
and they don't produce any Electrical "Noise", like Relays do,
and they require extremely low, or almost zero, Current to activate.

Learning how to choose a FET can take a while.
Hear's a P-Channel-FET that will work in the above Circuit ...........
https://www.digikey.com/en/products/detail/vishay-siliconix/IRFD9020PBF/812486

For Higher-Current-Loads, the Circuit is basically the same, but the FET is much more Heavy-Duty,
and may need more attention paid to dissipating any generated Heat.
Careful FET selection can also reduce, or almost eliminate, the Heat generated.
.
.
.

Thread Starter

rewIndustry

Joined Feb 4, 2023
30
thank you very much indeed,
am now studying FETs much more carefully,
and will probably be back with more questions.

for example - are SCR still better for A/C switching, or do FETs have the advantage here also?

crutschow

Joined Mar 14, 2008
34,841
are SCR still better for A/C switching, or do FETs have the advantage here also?
SCR's are some simpler and generally more robust than MOSFETs, but they have a much higher voltage drop when on (which is usually not a problem with main's voltage switching.

Thread Starter

rewIndustry

Joined Feb 4, 2023
30
yes, SCR are mainly just diode bridges, if i remember right, with some extra doping for a gate.

whereas i presume FETs are basically transistors, but there's a metal oxide between the gate and the silicon, called surface passivation, that i understand vastly improves the switching ability of the semiconductor involved.

this is all beginning to make sense to me - thank you very much.

(and thank you also for the link, i shall have to register, you have articles i need to read)