How to make software voltage divider?

lamartinada:
Yes, of course.

I have an EasyDriver to control my stepper motor through arduino. The stepper must carry loads between 1 to 3Kg. I can use a 12V 2A power supply or a 14.4V 2500mAHr battery if I'm out of home.

My purpose is, when stepper must carry light loads, to have an LCD menu where I can set up to supply less voltage to the driver to prolong battery life. As I read, lower voltage produces lower torque in my stepper motor driver.

EasyDriver has a potentiometer, but it only controls current, not voltage, and potentiometer will be put inside a box and will not be accessible.

You cannot reduce the power used by a stepper driver by reducing the supply voltage, it will pull all the power it needs to supply the current requested - you have to control the set current, which cannot be done programmatically on the EasyDriver.

Stepper drivers are power converters, give them more volts and they draw less amps, and vice versa.

Steppers are basically not suitable for battery operation as they consume way more power than other motors - the stepper doesn't really notice the load in fact, its pulling full current with no load.