Transformers are electrical devices that operate on alternating current (AC) and are used to increase (step up) or decrease (step down) voltage levels. However, they are not suitable for use with direct current (DC), which is what batteries generally provide.
If you want to increase the voltage from a battery, you typically use a DC-DC converter, which can step up the voltage. These converters use various techniques, such as switching or inductive methods, to increase the voltage while converting the DC input from the battery to a higher DC output.
For instance, a Boost Converter is a common device used for stepping up voltage from a battery. It works by storing energy in an inductor and then releasing it at a higher voltage.
In summary, while transformers cannot be used directly with batteries, specialized DC-DC converters can effectively increase the voltage from a battery source.