Increase 0-5v in 0-15 minutes depending on pot

Dear all,

I have some issues over here figuring things out.

I want to increae 0-5v slowly with an potential meter.
So if i set the pot meter to max i want to start the 0 volts and increase till 5v in 15 minutes.

What would be the best way to do this?

Also should i use a pwm to analog converter from aliexpress or is there a better way to do this?

With kind regards
Marc

Google

Arduino Digital to Analog Converter.

thank you! that helps for the first part!
but how do i get it working slowly increase depending on the Potentiometer?

  1. What is the load? Neither an analog filter nor a bare DAC will drive a low impedance load.

  2. What did you see on AliExpress?

  3. How much ripple (noise) can you tolerate in the signal?

First tell us, what happens when you set the pot to some value other than maximum? That is all you talked about.

Also, how should the system behave when the cycle has already started, and the pot is changed mid cycle?

1 Like

im sorry for not being clear enough.

i have a power supply form meanwhell that i can regulate the ouput current with 0-5 v from 0-100%

i want to slowly increase the output power.

the time it needs to take i want to set with the potentionmeter.

so when the potentionmeter is on max it needs 15 minutes to reach full power.
but when i set the pot meter half wax i want to increase over 7,5 minutes.

Three points

  1. What supply? Please provide details.

  2. How does the Arduino control the supply?

  3. You still have unanswered questions from posts.

If I get it correctly, the pot sets the ramp time between 0 and 15 minutes, correct? What starts the voltage ramp? Is there an additional switch button for that?

How should pot (and maybe button) input be handled, once a ramp cycle is in progress?

I noticed another weird thing - last post you mentioned supply current not voltage. Explain.

What Arduino do you have?

Before I forget, what happens at end of cycle?

  1. meanwell rst 5000
  2. should be as in the picture below
  3. load is the powersupply input.
  4. https://bit.ly/3e7cSol ( Spanning Pwm Converter Module 0-5V 0-10V Naar 0-100% Pwm Verstelbare Power module)
  5. im not certain of the amount of noise that is allowed.

cycle would be triggered by an external relay.


o

I guess you are not understanding me. The load is some device that you are powering from the supply. What is it?

What is shown there is completely irrelevant to your request.

Also there is a growing list of basic questions about how your system should behave. Please go back, read, and answer them

battery charging, this should be slowly increased.

I have a feeling you are talking about the trim pot, if so it will not do what you want. It will vary maybe +- 0.5V maybe a bit more. If it is another pot we need to know what we are talking about. Post links to "Technical" information on all the hardware items. Post a rough schematic showing how you plan on wiring it showing all connections including power and ground. Post a simple schematic showing what you are trying to do. FYI: A potential meter will display the voltage it will in no way control or adjust it. What pot meter (new to me) are you talking about.

I agree about the diagram. Also, again, please answer the really basic, simple questions I asked you about your original request about coding for the pot. Really, you haven't been forthcoming with replies. That will discourage other people from helping you because the answers to questions like that are crucial to answering your question.

You came here with a coding question about the pot, but it is fairly obvious that you don't have a working hardware design at the moment. Coding for non-existing hardware is not smart.

Also the idea itself doesn't sound like anything that is compatible with any kind of battery that I am familiar with. So you need to explain that part of the project as well.

  1. i would like to fade the 0 volts to go to 5 volts (i will use external relay to digital input of the arduino to trigger the starting sequence).
  2. the 0-5 v should linear build up.
  3. i want to set the timer in what time it needs to get to the 5Volts.
    4 i set the timer trough a potention meter.

See post #12. That won't work.

Two of my question remain unanswered.

  1. What happens when the sequence is finished?
  2. What should happen if the pot or start relay is changed during the sequence?

Also, a lot of general information is still missing. Like, what battery? What Arduino? You show an Uno, but a lot of people just choose it because they find it in Fritzing. Then we find out later, it's actually something else.

to get you started and give you some ideas on how you transform the pot reading into a duration

const byte potPin = A0;
long duration = -1;
const long minPot = 0; // the min and max values your signal pin gives from an analogRead()
const long maxPot = 1023;
const long maxDuration = 900000; // 15 min in ms
const  long minDuration = 60000;  // 1 min in ms

void setup() {
  Serial.begin(115200);
}

void loop() {
  long d = map(analogRead(potPin), minPot, maxPot, minDuration, maxDuration);
  if (d != duration) {
    duration = d;
    long minutes = duration / 60000ul;
    long seconds = (duration % 60000ul) / 1000ul;
    Serial.print(F("Duration = "));
    Serial.print(minutes);
    Serial.write(':');
    if (seconds < 10) Serial.write('0');
    Serial.println(seconds);
  }
}

connect your pot signal pin to A0 and the code will show you a duration that varies between 1min to 15min when you turn the potentiometer

Then once you have the duration, use millis() to handle the ramp. ➜ For extra information and examples look at Using millis() for timing. A beginners guide

Reading through this thread, I think you want to do the following. If so, please respond with clarity for the benefit of all of us, and we can proceed.

  1. Use a potentiometer to tell the Arduino how fast the ramp will be.
    Question - you've said full pot = 15 minutes, but what does minimum pot = ? 1 minute? 0 Minutes?
  2. Create an analog output voltage from the Arduino that will set the output current of the power supply per the chart you presented.
    Question - you state 0-5V, but if you actually read the manufacturer's data sheet, you should only use the range 1-5V, as the 0-1 range is unstable.
  3. This is a programmable current supply, in this mode. Do you really want to run the power supply up to it's maximum current output in this fashion? This could be very destructive.
    Just trying for clarity.

and it's capable of exceeding 5V...

5,000 watt power supply! Do you know what you're doing?

thank you this is verry helpfull!!

  1. it should give directly 5 volts to the powersupply.
  2. is read the output could be trimmed from 20-100%. but i first wanted to know for sure if it even possible to manage with an arduino.
  3. yes it should provide full load to charge the battery.