# Logic-level square wave to transformer

I try to power EL wire at a chosen frequency. For this I have a microcontroller generating a square wave signal at the given frequency; this signal oscillates between 0 and 3.7V and the current is limited to 20mA. I want to run this through a transformer to convert to about 110V AC.

• The transformer needs an unbiased signal: I think of adding a capacitor in series. (I learnt that this is called a coupling capacitor).
• For amplifying the power of the signal, I will need at least a transistor.

I thus drew the following circuit: (V1 is the square signal, V2 is the Vcc supply, L1 is the load — transformer primary). This circuit does not work (after a very short transition time, L1 has no current). This is probably because, during the “off” part of the square signal, the NPN transistor behaves as an open collector. I observed the same behaviour when simulating the circuit from this similar StackExchange question.

Another idea would be to build a LC oscillator, forced by the signal through the NPN transistor: (simplified model). However such a circuit will be limited to the neigbourhood of the resonant frequency of the LC oscillator.

In trying to fix the first circuit, I thought of two possibilities for preventing the open-collector situation: either add a pull-up resistor (between the collector and V2), or a PNP transistor in the same place (thus complementary with Q1). Would either of these be a workable solution?

• I'm correcting "intensity" to "current": these are two fundamentally different things. – Marcus Müller Jan 14 at 21:32
• The first circuit will not work, because there is no DC connection to the collector. The second is wrong too, because there is no current limiting of collector current, and in case of long pulses on input the transistor will be blown. And no one of these circuits are oscillator. IMHO you need to read some electronic basics instead of start from simulating - this is not good way to learn electronics, because you will see the results and still you will not know, why they are as you see. You should determine the circuit topology not by experiments, but by knowledge and thinking. – VillageTech Jan 14 at 21:38
• @MarcusMüller Sorry, that's a Gallicism! – Circonflexe Jan 14 at 21:54
• What frequency and what transformer are you contemplating? What power into the load? – Andy aka Jan 15 at 8:28