Controlling 12v Bell via MOSFET

Hi all,

I have a circuit similar to the attached pic. To describe this, I have a 12v/5a power source which is split between feeding the MOSFET and a fixed 5v regulator. The output of the 5v regulator feeds the Arduino and has a 1000uf capacitor. A digital output of the Arduino triggers the MOSFET which supplies power to the 12v bell.

What happens is sometimes it seems to get ‘stuck’. I am trying to make the bell ‘ding’ rather than ‘ring’ so am writing high, delay of 25, writing low. If I wish to ring the bell multiple times (max. 3) I delay 75 and then repeat. The code is written in such a way that it should be impossible for the bell to sound more than 3 times or for more than the combined time that 3 times should take. Infrequently (1 out of 10, sometimes more often, sometimes less) it seems to get ‘stuck’ after I set high and so the bell continues to ring indefinitely. At this point the only way to recover is to reset the Arduino. It does/has worked, but sometimes doesn’t.

Any idea why it would be doing this?

Thanks in advance!

You likely need to add a kick back diode to the bell.

How you set high? Without code hard to answer...

5v from the buck converter should go to the Arduino 5v pin (not the Arduino Vin pin).

I second @Railroader recommendation and there is no need for that gigantic capacitor, it does nothing.

1 Like

Looking at this example your bell wiring may be reversed
61uiYN6pYhL.AC_SX569

Thanks all for the responses. I should have clarified the diagram is a approximate representation, the mosfet is wired the correct way but shown incorrect in the diagram.

@Railroader @jim-p I will try a kickback diode. Any advice on diode selection? I’m have a bunch of 1N4001s kicking around. And just to check this is a diode ‘reversed’ (diode + to bell -, diode - to bell +) in parallel with the bell itself?

Thanks again everyone

Would likely work but personally I would use a 1N4007 if I had it.

Yes. Think like this: The current through the coil flowas from positive to negative. When the relay/transistor brakes the flow the diode should carry the current through the coil in the same direction.
Diodes had anodes amd kathodes, not + or -.

Why.
The 1N4001 is better suited for low voltage.
And the diode will never see a higher reverse voltage than the supply.

I never understood why people prefer the 1N4007 for low voltage applications.
Vf is a bit higher and the 4005-4007 group is a bit slower than the 4001-4003 group.
Bigger is better doesn't work here. Not that it makes a difference in OP's application.
Leo..

You're surely right. My mind was on the max current. Gotten a bit rusty here.

@Railroader @Wawa thanks both for the help, I just run through 40 cycles without an issue. I used a 1N4001 in the end and seems to be working fine

1 Like

Thanks for telling. Nice to know.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.