I'm trying to connect a battery of 9 V to the secondary coil in a transformer (220 V - 12 V), but I would like to turn on and of this connection with certain frequency in order to see in a oscilloscope what happens in the secondary coil (sorry if my English is bad). I attached an image to explain myself better.
I would really appreciate if someone could help me to do this.
Thank @Transistor for your answering. And also thanks to Jonk, Vladimir and Tobalt.
As Vladimir said, I want to power the transformer through the battery and when I disconnect the battery there would be some current induced in the primary coil. To see this signal in the oscilloscope I think the switching of the battery should be periodic (correct me if I'm wrong here), but I don't know what should the frequency be exactly. This is the reason why I want to turn on and off the battery with a certain frequency. Finally, I made another sketch that I hope is more readable.
If you could guide me and tell me if I'm doing the right thing to see the desired signal, I would really appreciate it.