Multiple Push buttons interfering

Thread Starter

TorranceM

Joined Dec 17, 2018
4
I'm using an arduino to control 4 pieces of EL wire for a jacket. I have an inverter for AC power and using optoisolators and triacs to control when the lights turn on and off. Push buttons are meant to turn each light on or off. I prototyped this circuit using LEDs and the buttons worked fine. Now that I've switched to AC power control, the buttons seem to be staying on HIGH rather than switching to LOW when released. I've included an image of how my circuit is wired - note* optocouplers are actually optoisolators used to keep DC and AC currents separate.

Wire behaviors should be as follows:
Yellow - default HIGH
Left/Right Green - blink when button pressed, stay blinked until button pressed again
Red - set to HIGH when button is pressed - yellow sets to LOW

Right now they dance back and forth with all lights turning on and off.

Any ideas on why this is happening and how I can fix it?Screen Shot 2018-12-17 at 7.35.25 PM.png
 

sghioto

Joined Dec 31, 2017
1,067
What is the part number of "N"? The connections from the 4N35 to "N" may be the problem. You also said the optocouplers are optoisolators so what are the actually components you are using and do you have a schematic?
SG
 
Last edited:

AlbertHall

Joined Jun 4, 2014
10,068
It would be a really bad idea to mains supply voltage to a solderless breadboard - and especially to adjacent tracks - as it appears from your diagram.
If this is really what you have done then you should find a safer way of prototyping this circuit.
 

bertus

Joined Apr 5, 2008
20,573
Hello,

If you want to switch AC, you could have a look at MOC optocouplers.
Are you using the Arduino to dimm or switch the AC loads?
There are several types of MOC's.
The types for dimming are direct acting have the partnumbers:
MOC3010M, MOC3011M, MOC3012M, MOC3020M, MOC3021M, MOC3022M, MOC3023M
The types for switching have the followinh partnumbers:
MOC3031M, MOC3032M, MOC3033M, MOC3041M, MOC3042M, MOC3043M

Bertus
 

Attachments

Thread Starter

TorranceM

Joined Dec 17, 2018
4
It would be a really bad idea to mains supply voltage to a solderless breadboard - and especially to adjacent tracks - as it appears from your diagram.
If this is really what you have done then you should find a safer way of prototyping this circuit.
I'm pretty novice at circuits, a senior physics major and this is part of a final project. What is mains supply voltage and why is it not a good idea to have it with a solderless breadboard? Thanks for pointing it out!
The AC power is coming from a DC to AC 12V inverter powered by 3 AA batteries.
 

Thread Starter

TorranceM

Joined Dec 17, 2018
4
Hello,

If you want to switch AC, you could have a look at MOC optocouplers.
Are you using the Arduino to dimm or switch the AC loads?
There are several types of MOC's.
The types for dimming are direct acting have the partnumbers:
MOC3010M, MOC3011M, MOC3012M, MOC3020M, MOC3021M, MOC3022M, MOC3023M
The types for switching have the followinh partnumbers:
MOC3031M, MOC3032M, MOC3033M, MOC3041M, MOC3042M, MOC3043M

Bertus
I'm using the Arduino just to switch pins on and off. The AC power is coming from a DC to AC 12V inverter. I'm not trying to dim any of the lights, just turn them on and off by use of buttons. I used octoisolators just to protect the arduino from getting an AC current if a triac fails.
 

Thread Starter

TorranceM

Joined Dec 17, 2018
4
I have solved the problem! Thanks for all the replies! Turns out my resistors were not pull down resistors and my voltage was floating between 0V and 5V once the program was uploaded. Switching out resistors gave me complete control using the arduino.
 

danadak

Joined Mar 10, 2018
4,057
"Mains" refers, generally speaking, to 100 or 220 VAC. So that you would
not want in a solderless breadboard, personal safety, arcover, crappy contacts
in BB....

I gather your AC is relatively low voltage from the inverter ?

Regards, Dana.
 
Top