circuit bending and optocoupler

Hi to all, I just want to trigger a sound out of a toy pistol using an optocoupler controlled by an arduino pin. :~
The toy pistol has two 1.5 volt battery, the cables used on pin 4 and 5 of the optocoupler trig the sound of the toy pistol if i connect them directly , the optocoupler works (triyng with a simple LED powered by the batteries of the toy pistol in can light it up),i've tried reverting the two cables(not sure that ground was the cable that goes on the 4 pin of the the optocoupler so tried both way).
i've stuck directly + of the toy on pin 5 and ground on pin 4 but nothing happen.
i've tested the arduino code and it works well but as you can imagine i'm a total noob about electronics, so probably there's something really simple that i'm missing here.
Someone can point me in the right direction?
thanks

You can't always use the transistor of an opto isolator to trigger things because of the way your toy is wired up.
It is better if you use an opto with an FET output rather than a transistor.
However it is not clear to me how you have wired it up. Your description is confusing. Any chance of a schematic?

ok, that's the circuit i've simple connect directly the toy, i used optocoupler like a relay... ok i wanted to use in that way :slight_smile:
Can you explain a little more your solution with the FET output?

Thanks

Can you explain a little more your solution with the FET output?

Just do what you are doing but use an opto coupler with a FET inside rather than a transistor.

http://uk.mouser.com/Optoelectronics/Optocouplers-Photocouplers/MOSFET-Output-Optocouplers/_/N-awss6

I ve read something about your solution and there are a couple of question that come into my mind:
1)FET optocoupler should be used to control an AC current but i don t have an AC current.is it right or not?
2)if with normal optocoupler i can t use it to trigs a thing which has a voltage lessthan arduino voltage what should be used for?

These two question probably are totally stupid ones but i can t respond to myself...

FET optocoupler should be used to control an AC current but i don t have an AC current.is it right or not?

Wrong a FET is for DC only.

if with normal optocoupler i can t use it to trigs a thing which has a voltage lessthan arduino voltage

No with an opto coupler you remove all the voltages from consideration. I don't know what you mean but you are mixed up.

The point about a FET is that is is the closest to a resistance changing. A transistor only works off current which some times is fine but others is not it depends on how your bent circuit is wired.

Hi,
I use a lot of optocouplers for interfacing different voltages, I use a 4n32 photodarlington, with high gain. The transistor collector to emitter can take up to 30 vdc, at 40ma. the optocoupler is polarity sensitive so to get your project to work, you must check to see if pin 5(collector on mine) is positive and pin 4(emitter on mine is negative).