im looking for a circuit that can remove access power from a battery, but i can not find it anywhere.

im not that competent in designing circuits so i wil try in forum.

maybe someone have a circuit that i can use.

i did not ask about safety, i did not ask about other ways of doing this, i only ask for circuit and discussing about discharge circuit please respect that.

ok i have a few "requirements" for way of function

no programming

pwm based discharge

pwm 0-100% (not critical can be for example 10 - 90%)

pwm start voltage adjustable if batteryvoltage 5v over start voltage =100% pwm

pwm start voltage adjustable dc240v - dc265v (example start 265,05=1%pwm 270=100%pwm

pwm ramp up and down slowly

pwm is limited by a current shunt adjustable from 1A to 100A

pwm frequency not critical about 3khz

explaining of circuit work:

start voltage adjusted to 240vdc

current limit set to 10A

voltage increase to 240,1vdc

pwm start 2%

voltage increase to 241vdc

pwm adjust slowly to 20%

voltage increase to 242vdc

pwm try to adjust slowly to 40% but the current limit stop and hold the pwm at 30%

voltage increase to 243vdc

current limit still hold the pwm at 30%

voltage decrease to 240,5

pwm adjust slowly to 10%

voltage decrease to 240

pwm stop