Good day everyone!
I was wondering how would i use a capacitor with arduino. I am currently working on a project that uses a 24VDC supply , regualted to 12Volts .The 24vdc is used to supply current to my relay, which then activates a solenoid.
Now here's the problem: I have a LCD connected as well, which displays a changing variable like weight(using load cells) and when the relay is activated, the lcd screens have weird characters popping up. It happens some time and sometimes not. I have also connected a diode through the pin and gnd for the relay but it dosent seem to help. I was wondering if a capacitor near before the Vin pin and after the Powersupply would help, but if so, how do i do this?
Post schematic of what you have now, so we can be sure we're all on the same page.
This is the only schemtic i have for now , ( kinda makeshift), but my full schemtic is too large and cant be seen clearly.
Look like you're trying to drive a relay directly from an Arduino pin? That's definitely a bad idea.
[u]Here is a MOSFET driver circuit[/u]. It could be used to drive a relay coil, or in your case it could drive the solenoid coil and you could ditch the relay. (Just make sure the MOSFET has a higher current rating than the solenoid.)
...The diode suppresses the high-voltage back-EMF when the relay (or solenoid) switches off. So if the display only glitches when relay or solenoid is switched-off, that's a clue.
BTW - Probably not related to your problem, but the solenoid coil should also have a fly-back diode. (In your circuit it would prevent arcing of the relay contacts, which could shorten the life of the relay.) Just about any time you power a coil with DC you should have a diode.
MarkT:
Look like you're trying to drive a relay directly from an Arduino pin? That's definitely a bad idea.
DVDdoug:
[u]Here is a MOSFET driver circuit[/u]. It could be used to drive a relay coil, or in your case it could drive the solenoid coil and you could ditch the relay. (Just make sure the MOSFET has a higher current rating than the solenoid.)...The diode suppresses the high-voltage back-EMF when the relay (or solenoid) switches off. So if the display only glitches when relay or solenoid is switched-off, that's a clue.
BTW - Probably not related to your problem, but the solenoid coil should also have a fly-back diode. (In your circuit it would prevent arcing of the relay contacts, which could shorten the life of the relay.) Just about any time you power a coil with DC you should have a diode.
hello! thanks for the reply. And yes the LCD only glitches when the solenoid goes off..... anyway do you reccomend changing to the MOSFET driver and ditching the relay?