DC voltage sampling circuit

BobTPH

Joined Jun 5, 2013
11,515
BUT then USING that reading to program a DC power supply is quite different. THAT is what I se the TS as requesting.
You may be right, but I do not see anywhere where he said anything like that.
and this sampler circuit can hold it in itself so that I can use that voltage if needed.
This sounds to me like simply keeping this voltage in a display so he can refer to it later. It does not sound like automatically producing the same voltage as an output.

But there is clearly a language problem here.

So @fx5, answer this: What is the input and output of your device?

Edited to add: A block diagram would help.
 
Last edited:

crutschow

Joined Mar 14, 2008
38,508
I am thinking of a circuit that can sample and store power like some power supplies by pressing a push button
It's not feasible to "store power" but you can use the output of the D/A in my suggested solution to drive a power buffer from a 26V power supply if you need a power output.

For example, below is a circuit using the common LM317 voltage regulator and LM324 op amp to provide that higher current output at the DAC output voltage:
The LM317 is not used as a regulator, but acts as a smart power buffer, controlled by the LM324.
A power transistor could be used in place of the regulator, but the LM317 provides short-circuit protection at about 1.5A, and shuts down at high temperature for over-temperature protection, such as could occur for a continuous short-circuit.

The LTspice sim shows the output voltage (yellow trace) going from ≈1.7V to 24V for an input voltage (red trace, horizontal axis) of 0 to 5V.
(The gain is set to 4.8 by R1 and R2, assuming the full-scale output of the DAC is 5V).
The output can't go below about 1.7V due to the limitations of the LM317.

1725665519276.png
 
Last edited:

MisterBill2

Joined Jan 23, 2018
27,522
I am guessing that the TS is using a power supply for some sort of experimenting, and wants to be able to start up where they left off. OR to make sure that there is no damage done because somebody has borrowed the power supply and left it set at a higher voltage, and then the prior user came back a week later, connected it, and switched it on without checking, and fried many dollars worth of electronics. Exactly that happened in one place I worked. The really bad part was that it fried a special order crystal oscillator module that had a six week lead time. THAT did cause pain.
 

BobTPH

Joined Jun 5, 2013
11,515
I am guessing that the TS is using a power supply for some sort of experimenting, and wants to be able to start up where they left off
@fx5: It would be very helpful if you would tell us how you plan to use use this device you want to make.
 

Thread Starter

fx5

Joined Feb 5, 2022
10
I'm looking for a practical circuit that I can give it a momentary dc voltage as a sample by pressing a switch, and this sampler circuit can hold it in itself so that I can use that voltage if needed. This sample voltage should change only if I define a new value for it by pressing the (start) key.
The amount of voltage I mean is from zero to a maximum of 24 volts direct, which can be even lower, and the consumption current, if necessary, in the consumer I mean is a few milliamps.
@fx5: It would be very helpful if you would tell us how you plan to use use this device you want to make.
 

atferrari

Joined Jan 6, 2004
5,012
I'm looking for a practical circuit that I can give it a momentary dc voltage as a sample by pressing a switch, and this sampler circuit can hold it in itself so that I can use that voltage if needed. This sample voltage should change only if I define a new value for it by pressing the (start) key.
The amount of voltage I mean is from zero to a maximum of 24 volts direct, which can be even lower, and the consumption current, if necessary, in the consumer I mean is a few milliamps.
Two points not clear, at least for me:

The voltage you will sample, is materialized where?

You intend to program a voltage source replicating the value you read above?
 

MisterBill2

Joined Jan 23, 2018
27,522
I still see NO USEFUL APPLICATION for such an unusual function, except possibly some ............
Really, this functionality does not seem to have any useful application.
Display hold on a meter is very useful, but latching that to a power supply????? What is the actual application???
 

BobTPH

Joined Jun 5, 2013
11,515
I'm looking for a practical circuit that I can give it a momentary dc voltage as a sample by pressing a switch, and this sampler circuit can hold it in itself so that I can use that voltage if needed. This sample voltage should change only if I define a new value for it by pressing the (start) key.
The amount of voltage I mean is from zero to a maximum of 24 volts direct, which can be even lower, and the consumption current, if necessary, in the consumer I mean is a few milliamps.
Repeating your original post does not give us more information. How about answering out questions instead.
 

Tonyr1084

Joined Sep 24, 2015
9,744
this sampler circuit can hold it in itself so that I can use that voltage if needed.
FOR WHAT ? ? ? How is this stored voltage to be used? How much POWER do you want this stored voltage be capable of supplying? HOW LONG do you want this stored power to be useful?
 
Last edited:

panic mode

Joined Oct 10, 2011
4,983
Duration of button press varies. Capacitors never fully charge if when connected to la ow impedance source that has fixed voltage. It would still take infinity for capacitor to reach voltage of the source. Using smaller value capacitor means capacitor voltage will quicker get within some limit. That limit is not specified. next part is decay. Any analog sample and hold circuit will droop over time. It is still not mentioned how long the value need to hold and to what accuracy.
Be specific ..

for example input is pretty steady (slow changing). Sample need to be within 1% of the input for 60 minutes

Then we can really look at something that is suitable. Without spec, all suggestions are merely random shots


Sample and hold example posted above supports up to 10V input and with proper capacitor type (polystyrene) the droop is 5mV per minute. That us some 300mV or 0.3V per hour.

If the goal is really to stay within 1% or 0.24V this will not work for 1h. But it will work for shorter time...

But if the goal is 0.1%.... that 24V*0 1/100=24mV so this would be less than 5min.

Show me the numbers...
 

MrChips

Joined Oct 2, 2009
34,812
hello friends
I am looking for a practical circuit where I can give it a momentary dc voltage as a sample by pressing a switch, and this sampler circuit can hold it in itself so that I can use that voltage if needed. This sample voltage should change only if I define a new value for it by pressing the (start) key.
The amount of voltage I mean is from zero to a maximum of 24 direct volts, which can be even lower, and the consumption current, if needed, in the consumer I mean is a few milliamps.

It is preferable not to use a microcontroller.

thank you
You said exactly the same thing three times. What you said is perfectly clear, no problem with the translation.

Yes, it is possible to do what you want. It is possible to do it with an analog circuit or with a digital circuit. You can store the setting for one minute, one hour, one day... forever.

What you have not told us is exactly where and why would you want to do this. Tell us the exact application and then we can offer you an appropriate solution.

To demonstrate how your request is lacking information, here is what you said:
"sample and storage until needed again".

If we take this literally as stated, here is the solution:

Take a DMM and measure the voltage.
Write the measurement down on a piece of paper.
Now you have the reading for when you need it again.
 

MisterBill2

Joined Jan 23, 2018
27,522
You said exactly the same thing three times. What you said is perfectly clear, no problem with the translation.

Yes, it is possible to do what you want. It is possible to do it with an analog circuit or with a digital circuit. You can store the setting for one minute, one hour, one day... forever.

What you have not told us is exactly where and why would you want to do this. Tell us the exact application and then we can offer you an appropriate solution.

To demonstrate how your request is lacking information, here is what you said:
"sample and storage until needed again".

If we take this literally as stated, here is the solution:

Take a DMM and measure the voltage.
Write the measurement down on a piece of paper.
Now you have the reading for when you need it again.
I described exactly how I did a sample and maintain system that achieved the exact function, back in post #4. And no response asking for details. Also ignored.
And now with the TS only repeating the initial in response to questions, how about no more !
 

Tonyr1084

Joined Sep 24, 2015
9,744
At some point I'm going to click the "UNWATCH" button. The TS is just repeating him/herself and not answering the questions posed. We can't help if the TS doesn't help us help them.
 

Tonyr1084

Joined Sep 24, 2015
9,744
After reviewing every comment by the TS it seems like this may be a problem with translate. Google Translate may be the problem here. I wonder what the native language is the author is speaking. Perhaps someone can discuss his needs in his native language. I'm only good with English. And then even that's sometimes difficult for others to understand me.
 

MisterBill2

Joined Jan 23, 2018
27,522
All that we have is that FX5 is a "student", which may be why we do not get any additional information.
I wonder if, also, FX5 may be a creation of an AI application gone astray.

And really, the harm that AI is capable of exceeds any possible benefit, as I see it. I already get AI phone calls about Medicare benefits, intending to somehow rip me off. Probably most folks here also get them, at least those in the US.
 
Simple sample&hold controlled by pressing a button can be done with push-pull pair to obtain a low output impedance + R (like 100ohm) to limit the current flowing to capacitor.
IMG_1034.jpeg
An effective Input voltage is about 3-24V. If zero input voltage is needed you have to tie the bottom of push-pull little negative like -3V:
IMG_1035.jpeg
 

Thread Starter

fx5

Joined Feb 5, 2022
10
Greetings to friends and teachers.

First of all, thank you for your cooperation and kindness in answering my question.

See, friends, I want a circuit to use that works like the hold switch in a multimeter and can sample the dc voltage source instantaneously, but as a momentary push button, this storage is until we press the button again and the new value is stored. I already mentioned that the voltage is from 0 volts to 24 volts dc.

Thank you for giving me your experience and time.
 

MisterBill2

Joined Jan 23, 2018
27,522
Once again the TS has stated the request without one word about any application.
Given that the TS has simply re-stated what they asked for in similar terms, which implies to me that none of the responses have been understood, or possibly not even read.
Could this be an AI powered troll?? Now I ask the TS to respond and let us know what part of the world they are in, so that we can have a clue as to what sort of resources they might have available.
 
Top