Futterama
Member
Hi,
I have this 12V car horn I would like to drive using a PIC. I have made a simple circuit using an external 12V battery for the car horn supply. I'm using a MOSFET for driving the horn. But when the PIC turns on the MOSFET, the horn just makes a small "click" and the PIC resets. If I disconnect the MOSFET gate from the PIC pin and activates the MOSFET manually by connecting the gate to VDD through the 220R resistor, the horn sounds but the PIC still resets (I use a LED from another PIC pin to see if my PIC program starts over).
I suspect the inductive back EMF or similar from the horn is causing the reset. I just don't know how to avoid this. I have tried placing some schottky diodes, but this didn't help, maybe I didn't place them correctly?
The car horn is a solenoid and when current runs through, it pulls on the sound membrane. This pull also disconnects internal contacts inside the horn and the solenoid is disconnected from the supply. The sound membrane then pulls back and connects the solenoid again, repeating the process. You probably know this principle and there is maybe even a name for it that I don't know of ;-)
I have this 12V car horn I would like to drive using a PIC. I have made a simple circuit using an external 12V battery for the car horn supply. I'm using a MOSFET for driving the horn. But when the PIC turns on the MOSFET, the horn just makes a small "click" and the PIC resets. If I disconnect the MOSFET gate from the PIC pin and activates the MOSFET manually by connecting the gate to VDD through the 220R resistor, the horn sounds but the PIC still resets (I use a LED from another PIC pin to see if my PIC program starts over).
I suspect the inductive back EMF or similar from the horn is causing the reset. I just don't know how to avoid this. I have tried placing some schottky diodes, but this didn't help, maybe I didn't place them correctly?
The car horn is a solenoid and when current runs through, it pulls on the sound membrane. This pull also disconnects internal contacts inside the horn and the solenoid is disconnected from the supply. The sound membrane then pulls back and connects the solenoid again, repeating the process. You probably know this principle and there is maybe even a name for it that I don't know of ;-)