Jump to content

Basically, i want this to turn on and off a relay,m one clap for on, another for off, but instead one clap turns it off then back on.  if i remove the relay from the circuit, its fine, clap on led, clap off led.  more info here, http://www.element14.com/community/message/160833?tstart=0#160833 .  schematic below  here is a vid  https://youtu.be/KMs2VD4fwFA

 

post-119027-0-26676100-1442203608_thumb.

I can help with programming and hardware.

<Script>alert("This website is vulnerable to XSS");</Script>

Link to comment
https://linustechtips.com/topic/449615-arduino-relay-help/
Share on other sites

Link to post
Share on other sites

use a transistor to switch the relay instead of the board and put a diode in reverse polarity of the relay. The electrical spike from the relay is freaking out the arduino, and the arduino can only supply 20mA per output. Just enough for an LED or transistor.

Link to comment
https://linustechtips.com/topic/449615-arduino-relay-help/#findComment-6028062
Share on other sites

Link to post
Share on other sites

Maybe it needs a de-bouncer?

 

I'm thinking the relay slams shut so hard, it bounces back open and then shut again.

whats that, link me to one.

I can help with programming and hardware.

<Script>alert("This website is vulnerable to XSS");</Script>

Link to comment
https://linustechtips.com/topic/449615-arduino-relay-help/#findComment-6028172
Share on other sites

Link to post
Share on other sites

use a transistor to switch the relay instead of the board and put a diode in reverse polarity of the relay. The electrical spike from the relay is freaking out the arduino, and the arduino can only supply 20mA per output. Just enough for an LED or transistor.

woah, too much electrical talk, i don't know that much lol, but know that obviously a relay is a bit overkill for just an led, im just testing the setup with an led before i hook it up to my mains

I can help with programming and hardware.

<Script>alert("This website is vulnerable to XSS");</Script>

Link to comment
https://linustechtips.com/topic/449615-arduino-relay-help/#findComment-6028176
Share on other sites

Link to post
Share on other sites

woah, too much electrical talk, i don't know that much lol, but know that obviously a relay is a bit overkill for just an led, im just testing the setup with an led before i hook it up to my mains

I know, but the coil in the relay is creating a spike of electricity when it gets energized, and it also pulls too much power from the arduino. http://makezine.com/2009/02/02/connecting-a-relay-to-arduino/

Link to comment
https://linustechtips.com/topic/449615-arduino-relay-help/#findComment-6028182
Share on other sites

Link to post
Share on other sites

I know, but the coil in the relay is creating a spike of electricity when it gets energized, and it also pulls too much power from the arduino. http://makezine.com/2009/02/02/connecting-a-relay-to-arduino/

can somebody just explain in great detail a solution

I can help with programming and hardware.

<Script>alert("This website is vulnerable to XSS");</Script>

Link to comment
https://linustechtips.com/topic/449615-arduino-relay-help/#findComment-6028186
Share on other sites

Link to post
Share on other sites

can somebody just explain in great detail a solution

for a full solution, try this

Arduino-ADK-LED-Lighting-schematic.jpg

As a quick attempt at solving the issue, just try putting a diode across the coil of the relay in the way that it normally WOULDNT conduct electricity

Link to comment
https://linustechtips.com/topic/449615-arduino-relay-help/#findComment-6028202
Share on other sites

Link to post
Share on other sites

for a full solution, try this

Arduino-ADK-LED-Lighting-schematic.jpg

As a quick attempt at solving the issue, just try putting a diode across the coil of the relay in the way that it normally WOULDNT conduct electricity

diode? like an led or what

I can help with programming and hardware.

<Script>alert("This website is vulnerable to XSS");</Script>

Link to comment
https://linustechtips.com/topic/449615-arduino-relay-help/#findComment-6028220
Share on other sites

Link to post
Share on other sites

I can help with programming and hardware.

<Script>alert("This website is vulnerable to XSS");</Script>

Link to comment
https://linustechtips.com/topic/449615-arduino-relay-help/#findComment-6028260
Share on other sites

Link to post
Share on other sites

In a diode, electricity flows into the unstriped side and out of the silver striped side. What you want to do is put in in the circuit backwards. the silver side on the arduino's output pin, and the black side on ground. When a relay is de energized, the coil inside the relay actually creates a pulse of electricy that is actually NEGATIVE, and it is at quite a high voltage. this can cause the arduino to freak out.

Link to comment
https://linustechtips.com/topic/449615-arduino-relay-help/#findComment-6028318
Share on other sites

Link to post
Share on other sites

In a diode, electricity flows into the unstriped side and out of the silver striped side. What you want to do is put in in the circuit backwards. the silver side on the arduino's output pin, and the black side on ground. When a relay is de energized, the coil inside the relay actually creates a pulse of electricy that is actually NEGATIVE, and it is at quite a high voltage. this can cause the arduino to freak out.

i still dont get it, im not stupid, i just dont know a lot about electronics.  could you like, draw it(sorry)

I can help with programming and hardware.

<Script>alert("This website is vulnerable to XSS");</Script>

Link to comment
https://linustechtips.com/topic/449615-arduino-relay-help/#findComment-6028369
Share on other sites

Link to post
Share on other sites

In a diode, electricity flows into the unstriped side and out of the silver striped side. What you want to do is put in in the circuit backwards. the silver side on the arduino's output pin, and the black side on ground. When a relay is de energized, the coil inside the relay actually creates a pulse of electricy that is actually NEGATIVE, and it is at quite a high voltage. this can cause the arduino to freak out.

and i could go get a diode tomrrow, any ideas with some stuff i have on hand, assorted resistors, another arduino. attiny, wires

I can help with programming and hardware.

<Script>alert("This website is vulnerable to XSS");</Script>

Link to comment
https://linustechtips.com/topic/449615-arduino-relay-help/#findComment-6028409
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×