I've been doing some reading about transformers and have gathered that they are only able to increase or decrease voltage when using AC. I was wondering whether a switching transistor circuit (the circuit that turns on and off really fast), would be enough to induce another voltage in the second coil of the transformer. I've heard that it's the switching property of AC that actually moves the electrons around. Will this constantly switching DC work?
Yes. In fact most MODERN power supplies use that principle. That is called "Switch-Mode Power Supply" (SMPS). It is almost required by law in new electronic equipment (including phone chargers, etc.) for efficiency greatly exceeding the old-style big "heavy-iron" transformers that ran at electric mains frequencies (50Hz and 60Hz). SMPS typically operate at 10s or 100s of KHz and use a much smaller ferrite transformer for equivalent power as the old-school "heavy iron".
You can use a couple of transistors to create an AC signal to feed the primary of a transformer and this works in many different applications: -
What this circuit attempts to avoid is a continuous DC current flowing in the primary because this can saturate the transformer core rendering the transformer inefficient and fairly useless.
A single transistor can be used and a typical example is a flyback transformer: -
Here, the energy stored in the primary coil's inductance (when the transistor is switched on) is released into the secondary when the transistor switches off. The diode and the 0.47uF capacitor are there to quench any unused energy and prevent the core gradually slipping into saturation.
Yes, this is done regularly. Look up something called a flyback converter for lots of information.
In fact, here is a example of where I did exactly what you're talking about in a recent design:
The IPULSE signal is straight from a spare PWM output of a microcontroller. When this line goes high, Q8 is turned on, which builds up current in the primary of TR1. When Q8 is shut off, the energy stored in TR1 is transferred to its secondaries. That causes a squirt of current thru D13.
This example is a classic flyback configuration in that the primary and secondary don't conduct at the same time. This allows wide latitude in the output to input voltage ratio. Basically, it transfers Watts thru the transformer, and the output load largely determines the V x A combination those Watts come out as.
Not shown in this schematic snippet, the resulting power voltage on the right side is threshold-detected, and the result of that fed back thru a opto-isolator to the microcontroller. That input of the micro is configured as a shutdown for the PWM generator. The net result is a isolated regulated power supply that runs itself without any firmware envolvement after initialization.
I have found that transformers intended for POE (power over ethernet) use are handy for applications like this up to a few Watts. In this case the isolated power required is well under a Watt. It runs a isolated serial interface that can do RS-232, RS-485, or RS-422, depending on configuration.