The output from the CPU is 5V or 0V capable of driving 40mA, but total max 200mA, according to data sheet.
If your load has other requirements you need to put a driver inbetween. Your driver has an input that fits with the CPU output characteristics. The driver is also capable of driving your load.
Do be able to help you, we need to know the requirements for your load, i.e. what is the input switching voltage and how much current does it consume.
Here is a BJT circuit that may do what you need. I am not sure you could do it with a single FET. The key is that you need to switch on/off the FET with 5V to switch 9V at the output.
The circuit would be simpler if you could switch the return. You could use a single FET or BJT switched from a digital I/O pin if you switch the ground side.
The switch shown below will switch the 9V using a 5V digital output. This circuit can also be configured as a current limiter by adding two diodes and a resistor. Again I would need to know what you are planning to drive to help with that.
Thanks, im generating a pulse with the 5 volt digital pin out and it need to get to the +/- 9 volt out and also the pulse should still be seen at the 9v out. I hope this is possible it is for strongen the magnettic field that im generating.
If you want to just pulse the 9V and can connect on end to 9V and the other to ground then just use the first transistor of the circuit above. Connect one end of the load to the collector and the other end to 9V, this is called sinking the current.
If however you want to source the current then you will need the two transistors as shown.
Hi,
If you need double swing, have you looked at RS-232 transceivers as MAX232, available from both Maxim and TI, I think ST also have some, but these have a different number.
RS-232 swings between a positive and negative voltage, this way can you send your 5V/0V signal and get a balanced swing around zero.
BTW what frequency is your metal detector operating at?
If you want it to swing about zero just couple the coil to the single ended output through a capacitor with the other end to ground. That will ensure you have both a positive and negative swing. If you have a capacitor across the coil you can drive the system close to resonance and get hundreds of volts across it from a simple 5V input.