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
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.
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.
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