Help: Controlling El Wire with Arduino

Hi, I'm trying to control El wire with an arduino and am new to electronics completely.

I'm trying to regulate it by controlling the 9v battery's connection to the inverter with an NPN transistor. I'm using the basic blink sketch and have the base connected to pin 13. Initially it didn't work until I grounded the negative side of the 9v to the arduino. However, even though it works, the wire is much dimmer than before. This is what I'm unsure about: Is the wire dimmer because the arduino will only take 5v or maybe because the transistor is too small? I've included a diagram of the circuit, any help would be greatly appreciated

Although I don't know the answer to your specific question, I'd like to say that I have used EL wire using a inverter and a triode acting as a switch and it worked perfectly. Maybe you should retry using a triode instead, SparkFun has a tutorial with schematics http://www.sparkfun.com/tutorials/130

Thanks,
However, originally I thought of using a triode or triac, but I wanted to have the switch between the 9v battery and the inverter because even if the El wire isn't connected, the inverter still makes a small high pitched sound which I think means it's still drawing power. The whole battery/inverter assembly will be embedded in the project, so I won't have access to the switch on the inverter to turn it on and off. So I think the battery would end up drained after a while...

Maybe you could help me with the "primary power switching circuit" because building that on the El escudo board and building that with what I have now are essentially the same thing. Even if I do get an El escudo shield, I think I'll be running into the same problem making a "primary power switching circuit" that works

Okay, thanks for helping... I took readings between the 9v battery and the inverter and found it draws .06A or 60mA current, at 8.5v.
It doesn't matter to me whether we switch ground side or power side and I don't think it needs to be protected

Sounds to me like maybe the base is not getting enough current to turn the transistor on all the way. (Saturate it???) Do you have a resistor between 13 and the base? (you should) what size?

Or...

The it may not like the voltage drop across the transistor. Maybe use a relay instead?

I moved the transistor from the wire between the positive side of the battery and and the inverter to the wire between the negative side and the inverter and it worked. I don't know why, but maybe you could explain that

Thanks for the help!

It's not saturation issue with first schematic, by physics law it only could provide:
V(output 13 arduino) ~ 4.5
V(e-b of the transistor) ~ 0.7
V(inverter) = Vout - Ve-b = 4.5 - 0.7 = 3.8V. It doesn't matter what voltage coming from the source (battery in this case).

Second variant provides:
V(e-c of the transistor) ~ 0.4
V(inverter) = Vbat. - Ve-c = 9.0 - 0.4 = 8.6V
But it require a resistor (330 Ohm - 1 kOhm) between 13 pin and base of the transistor,
or output arduino board could be damaged.

Magician:
But it require a resistor (330 Ohm - 1 kOhm) between 13 pin and base of the transistor,
or output arduino board could be damaged.

Right, I'll add that

Ran into another problem...

I took a reading between the base of the transistor and pin 13 and read 80mA, which is definitely above recommended current. So I added a 220 ohm resistor between pin 13 and the transistor base (4.3v/.02A = 215 ohms) and the el wire is really dim again.

I also tried this on other pins, because pin 13 has a built in resistor.

Should I use the set up that works, or use something else like a MOSFET to control it?

Sorry, if I'd give my advice to late.
Most likely arduino output! damaged or transistor.
In order to clarify, change transistor (keep resistor in base circuitry),
if it still no resolution of the problem, current should not exceed 20 mA, , change pin number in software.
Don't worry about 13 pin biased with something.

MPS 2222A transistor from Radio shack, on the package it says typical hfe is 200
Datasheet:
http://www.eng.yale.edu/ee-labs/morse/compo/datasheets/mps2222-d.pdf

I also changed inverters. The new one uses two AA's but its hooked up the same way.

When I short across the collector and emitter it goes to the desired brightness.

So?

80 mA is not possible without distraction.

X-ray can clear situation, probably.

sorry, the last post was responding to KE7GKP's questions

I tried a new transistor on a new pin with the 220 ohm resistor and got the same results...

also, when I don't use the resistor on pin 12 there is definitely 78mA going between the base of the transistor and pin 12

I don't think 20Ma is enough to saturate it, is it? (Don't know how to calculate it but it seems too low.)

Can you use a smaller resistor? 150 or 100?

I'll have to get some resistors, the lowest I have is 220 ohm and 10 ohm

How much current can the pins really take? It hasn't blown up yet....

The inverter as it comes out of the box draws between 140mA and 150mA at 3v

You're definitely right, I don't want to fry the arduino...

As for the el wire return, I don't think its going back to arduino GND... All I did was cut the lead between the negative side of the battery and the board and solder in my wires that goto the transistor. The gray wires in the picture are mine and the black ones at the top lead out to the EL wire

I got a MOSFET, which I think will work better in this situation
(datasheet: http://inst.eecs.berkeley.edu/~ee40/su10/labs/Booster/IRF510.pdf)

Would I wire it the same way as the transistor?