Hi,
What is the required resolution for each step?
For example, one step would mean 4.000v output at day 1, then at day 90 turn it down to 1.500 volts. That's very poor resolution.
Better is at day one 4.000v, at day 18 turn it down to 3.500v, then at day 36 turn it down to 3.000v, etc., until at day 90 turn it down to 1.5v. This gives us the following schedule
Day,Voltage
01, 4.000
18, 3.500
36, 3.000
54, 2.500
72, 2.000
90, 1.500
Note in the above the resolution is 0.5v, but also note that doing it this way means only the very last day gets 1.500v which may not be what you want.
Here is another similar schedule but with finer resolution:
01, 4.000
15, 3.583
30, 3.166
45, 2.750
60, 2.333
75, 1.917
90, 1.500
but note again that the only day that gets 1.500v is day 90.
Using a finer resolution of 2.5/90, we would see the next to last day have a voltage of 1.528v approximately, and then the 90th day would be 1.500v. So that finer resolution works better.
Is this what you want, or do you see any problems here or need a finer resolution that even perhaps varies hour by hour?
The required resolution to vary hour by hour would be 2.5/90/24 which comes out to about 1.1574 millivolts per hour and that means 2160 steps. The next to last hour would have a voltage of about 1.4988 volts and the last hour would have 1.5000 volts.