Hi,
I'm trying to design a PI detector based on a schematic from pulsdetektor.biz (the Base-1, Schematic). My goal is to come up with an Arduino metal detector shield, but it's still a long way to go as I'm an mechanical engineering student with some basic EE skills, but I'm looking forward to improve these with this project
However my first step was to reproduce the transmitter stage in LtSpice in order to analyze the circuit. There is a connection from the TX stage to a microcontroller pin via a transistor (see TP3 in my attached schematic). I think this is used to detect the beginning of the back-emf and start a timer and after the timer has timed out a sample is taken.
This is how I think it should behave: Once the MOSFET opens, the pin on the microcontroller is pulled high to 5V and when the back-emf sets in it should get pulled low to ground.
The problem is that LtSpice shows me a negative voltage of -12V on test point 3 (TP3) when the back-emf sets in. This would instantly kill the microcontroller's input pin.... I have already tried to place a diode in the emitter path but this still leaves a negative voltage of about -0.7V.
Is this a flaw in the original design or am I doing something wrong? How could I improve the design, so that I get high state (+5V) on the pin when the coil is charged (MOSFET open) and a low state (GND) when the back-emf sets in (MOSFET closed) ?
Thanks for any advice and ideas! And of course I can keep you updated with the progress of my little project if you wish
Simon

I'm trying to design a PI detector based on a schematic from pulsdetektor.biz (the Base-1, Schematic). My goal is to come up with an Arduino metal detector shield, but it's still a long way to go as I'm an mechanical engineering student with some basic EE skills, but I'm looking forward to improve these with this project

However my first step was to reproduce the transmitter stage in LtSpice in order to analyze the circuit. There is a connection from the TX stage to a microcontroller pin via a transistor (see TP3 in my attached schematic). I think this is used to detect the beginning of the back-emf and start a timer and after the timer has timed out a sample is taken.
This is how I think it should behave: Once the MOSFET opens, the pin on the microcontroller is pulled high to 5V and when the back-emf sets in it should get pulled low to ground.
The problem is that LtSpice shows me a negative voltage of -12V on test point 3 (TP3) when the back-emf sets in. This would instantly kill the microcontroller's input pin.... I have already tried to place a diode in the emitter path but this still leaves a negative voltage of about -0.7V.
Is this a flaw in the original design or am I doing something wrong? How could I improve the design, so that I get high state (+5V) on the pin when the coil is charged (MOSFET open) and a low state (GND) when the back-emf sets in (MOSFET closed) ?
Thanks for any advice and ideas! And of course I can keep you updated with the progress of my little project if you wish

Simon
Comment