I have a small issue here.
I am trying to drive a coil from an AtTiny85. I am sending an output signal to a transistor and the transistor will then connect to a coil.
I know that I am sending the proper signal to the transistor, but this is not passing it properly to the coil. I am getting an output with noise and it is definitely not a square wave.
Am I missing a Diode? Did I pick a wrong transistor ? Do I have a wrong resistor value?
I am attaching the pictures of the circuit,data sheet and of the oscilloscope.
The transistor picked is an MMBT3904
The signal that is connected to the base is the 2.5 kHz signal coming from the ATtiny that passes trough the 1k resistor.
These are the properties of the transistor.
Do any of you have any ideas or suggestions?
I am adding the pictures of the oscilloscope
The code intends to change the frequency, and it is actually doing it, but not as intended.
I have also changed the BJT for a Mosfet, it did not work. I keep getting the same results.