Actually i want to turn on the 12v Gong bell as it is connected to the D10 pin of the arduino Via 12V relay.
I am providing 12v,2a single wall-wart power supply to whole circuit..problem is that gong bell is not turning on properly...Seems same power supply interfering with Arduino IO pin..shaft hammering the plate with delay (NOT continuous hammering)and as shaft hammers arduino BuiltIN LED getting on-off..
Please check the attached Image for schematic of my hardware connection:
Note:
Relay is triggering perfectly and gong bell turns on when I have provided another external 12v wall-wart supply to the LOAD(gong bell).
Is there need of Two Psu's?or one is sufficient?what hardware changes required?
How much current does the gong require? Do you have documentation for the gong? Same questions for the relay. What is the part number of the transistor? Can you post a data sheet? And the value of R.
That resistor is a pretty high value. Lower it to 330 - 1K.
I can't find any data on the gong. I suggest that you measure the current with an ammeter so that you know what it takes. Assumptions can't bite you.
Your description sounds like a power problem. The LED flashing on and off suggests that the Arduino is resetting due to low power. Monitor the 12V, with your meter, while the project operates. Does the voltage fluctuate a lot or is it steady. To see if the Arduino is resetting, put a serial print statement in your code in the setup() function. Some thing like Serial.println("arduino reset") and watch serial monitor while the project operates. Does the print show up just once or every time the LED blinks?
Post the code that you are using. We haven't ruled out a mistake there.
Do you have some weird switch connected to the Arduino? A switch is either pressed or it isn't. There is no else case. If the switch is not pressed, there is no need to read it again to see if it is now pressed.
Yes arduino is resetting every time the LED blinks
No, it is not the blinking of the LED that causes the Arduino to reset. It is the resetting of the Arduino that causes the LED to blink.
You need a more powerful (more current capacity) power supply, or a separate one for the Arduino.
If I make simple 12v to 9v dc DC converter using LM7809 From same 12v psu..and supplied 9v to the Arduino..and rest with the 12v ..will this approach work?
I think that we need to know what is happening before trying a bunch of stuff.
The gong can be pulling the 12V power down to the point that the Arduino resets. That can be seen by monitoring the 12V power line as mentioned in a previous post. A more robust (more current) power supply could cure that.
Or there may be some electromagnetic noise induced on the 12V by the gong that is disrupting operation of the Arduino. We need a scope to see that. We don't know how the gong is constructed internally. There could be coils in it that are inducing nasty spikes on the 12V line. That may be mitigated by snubbing or flyback circuits.
Without knowing what is happening, a separate power supply for the gong is the only thing that makes sense.
Also put a reverse diode across the bell pins.
The bell may be putting big spikes on the 12V as well, just like the relay would.
As mentioned above, if your design and supply are valid, you could probably get rid of the relay completely if the supply and transistor are up to the task.