Looks like a cool project.
literal answer
The optoisolator is not necessary in this application.
Because you are generating the 100 V, 1000 Hz power to drive the EL from relatively isolated battery power (rather than mains power), there is much less of a safety issue.
Systems without an optoisolator typically connect the A1 pin of the triac is connected to the VCC of the microcontroller (in your case, the +3V supply), using "negative gate current triggering" as recommended.
A digital output pin on your microcontroller is connected with a resistor to the gate of a triac.
When the digital logic pulls the gate pin low (towards the microcontroller GND), the triac is triggered and turns all the way on.
As long as the triac is on, the A1 and A2 pins act like they are shorted together.
Turning the triac off is a little more difficult.
(A few systems without an optoisolator connect the A1 pin of the triac to the GND pin of the microcontroller, using "positive gate current triggering", which is not recommended.
As I recently learned,
hooking the the "GND" pin of the microcontroller to A1 and pulling the gate through a resistor to +3 V or even +5 V doesn't work right with a logic level triac.)
Try to draw your schematic and lay out your parts so it's obvious that:
- one end of the inverter output is solidly connected to a harmless-to-the-microcontroller voltage (probably +3V) and pin A1 of the triac
- the other end of the inverter output (the "hot side") is not directly or indirectly connected to anything anywhere near the microcontroller -- except for the triac, and even then the hot side is only indirectly connected through the EL wire to pin A2 of the triac.
alternate approach
If you're only going to have one strand of EL wire,
why don't you connect it directly to the inverter output,
and use a FET (rather than a triac) to connect and disconnect the inverter input to the +3 V power?
The basic triac driver circuit sinks current into the gate (trigger) input, to ground. If you can connect the grounds of all involved triacs together, you an use one microcontroller to drive all triacs (via a suitable drivers, of course). I hope you realise that this makes your microcontroller circuit 'life' (= connected to the mains), so unless you have an isolated programmer it will make your debugging process tedious.
I have my doubts that this approach will save you much, because optoisolated triac drivers are small and cheap. The snubber R + C are likely to be your largest components (unless you need to cool the triac). Maybe you can combine the snubbers into one filter for all channels.
Best Answer
Depends what the micro is powered from and referenced to. You can run the micro on the live side. However, you give yourself a big problem in attaching debuggers and programmers to the micro, because the 0V side of the programmer usually goes to mains earth through the PC power supply. An isolated USB hub can help. Be very careful with this type of circuit - I know of at least one blown up motherboard caused by this type of work, and there is risk of electrocution.