Audio to IR relay circuit question.

Hello,
In the attached picture (please see below), you can see the schematics of an Arduino circuit i have assembled.

It is a circuit that enables a smartphone, to switch On and Off electric devices. It works by converting an audio signal into IR pulses.

Here is a link i used, only as general guideline, to assemble this circuit:

My problem is this:
Most of the time the circuit works well. But sometimes it gets stuck and does not respond.

When that happens, i disconnect the upper left BLUE wire at "Disconnection point A" (please look at image) and then immediately reconnect it and things go back to normal - it works well again.

Is there some kind of capacitor or diode or other electronic component that i can add to this circuit, which would eliminate that problem?

Here is a link to the schematics large image:

And here is a smaller version of that image and below also a download link:

A bit of a silly circuit that one.
The problem is that an audio amplifier is not designed to feed into an LED. This is because an LED is a non linear load and has a threshold voltage. It sounds like your audio amplifier is locking up, perhaps with an overload. Without seeing the schematic of the amplifier it is hard to say exactly what.

If it were me, ( well actually if it were me I would never build such a silly circuit ) , feed the output of the amplifier through a capacitor into the base of a transistor, emitter to ground and collector to the cathode of the IR LED. Then anode of LED to a resistor and the other end of the resistor to 5V.

Hey Mike,
Thanks for replying.

What seems to you silly is for other people, with their minimal knowledge and not easy learning environment - An accomplishment. As well as a graphical accomplishment!

I will try to read again what you write and build that extra overload balance circuit you describe - but will surly have more questions down the road.

P.S
Why is it actually so silly?

It is a less than 40$ amateur solution, including the old smartphone cost, which enables to control via another smartphone + WiFi network, any un-harmful electrical grid device (in other words - people, this is not a safe enough solution for electric heaters/ovens and that kind of stuff).

Of course if you are an expert electronics engineer, with all the PCB machinery, you can get the same result for a much smaller amount. The only other solution i know (and i don't know much) is using an Arduino WiFi shield component, such as the Xbee - which is much more complicated to configure than a smartphone and enables much less flexibility and options, which are gathered when using a smartphone instead, by adding automation applications and other applications on that smartphone. And only the WiFi shield itself costs around 30$ and as mentioned, is much less flexible than an old smartphone that costs the same or even less.

Why is it actually so silly?

Because it is like a Heath Robinson (Rube Goldberg for the U.S) machine. There is just too much that is not needed. Attached is what would do the same thing:-

Dear Mike,
If this more elegant circuit you sketched here, can talk to the IR software library, that is already uploaded onto the Arduino, and make it 'think' that there are an IR led transmitter and receiver that are connected to it - then this is indeed a cooler and a less silly circuit.

I will put that option on my list of things to be done, when it gets to disassembling the Rube-Goldberg machine i have built here, that is, without making the above neighbors' apartment fall on my head (-;

P.S
On the other hand - If you mean by this re-sketched circuit, that i should use a set of un-decoded sounds, such as a simple siren sine wave, at varying tones and then measure them at the Arduino analog input. Well, I have been trying to do this for much too long. Maybe someone more talented than me would be able to do that. But what i got when trying this option, was more akin to a Jurassic Park, than to a Rube Goldberg machine (Hazard note!) - a totally unstable system, that went On and Off pretty much whenever it felt the breeze was right.

can talk to the IR software library i uploaded to the Arduino and make it 'think', that there is an IR led transmitter and receiver outside

No but then nether could your other circuit. It functions just like your original circuit but with less components.

If you mean that i should use un-decoded sounds such as a simple siren sine wave, at varying tones and measure them at the Arduino analog input.

That is all both circuits are doing.

Well, I have been trying to do this for much too long......a totally unstable system that went On and Off pretty much whenever it felt it was nice weather outside.

Then you have not been doing it correctly. Did you use an envelope follower and bias the audio at the mid point? Or did you just stick the audio output into the Arduino input and expose the Arduino to damaging negative voltages? That would not work at all except in the way you said.

I have to sadly admit that i used Option number 2: the Arduino damaging 1..

I think you would be much better off learning just an ounce of theory before trying to do a ton of practice.

Yeah...they told me i should start taking those focus pills, i told them no thank you! (-:

P.S
The wiki articles about "Envelope Follower" and "Filtering" seem to be interesting, when they don't start going over the math equations..

BTW Mike -
Tomorrow or soon enough, i will be trying to go first for the very first response and solution you offered at the beginning of this thread, the one regarding an added resistor and capacitor to the 'Rube Goldberg machine' as is.

I hope you will still be around to help me, cause i am pretty sure there will be some more questions, for example one that pops up in my mind already - what kind of resistor and capacitor are needed? i know..in the later solution you already put colors on the resistor in the sketch - but i will first try to work out the previous solution and there you did not say what are the numerical values of the components needed.

Thanks.

Well look at how many posts I have, I am not going anywhere.
Google
Resistor colour code
For what the colours mean.

If it were me, ( well actually if it were me I would never build such a silly circuit ) , feed the output of the amplifier through a capacitor into the base of a transistor, emitter to ground and collector to the cathode of the IR LED. Then anode of LED to a resistor and the other end of the resistor to 5V.

Hey Mike,
OK here we go:

  1. What kind of capacitor, what kind of transistor and what kind of resistor(1k?)?
  2. On the IR led transmitter board i have 3 pins: DAT, VCC and GROUND. Which one of them is considered the cathode and which one the anode?

Here is a link to the schematics large image:

And here is a smaller version of that image:

Thanks.

  1. What kind of capacitor, what kind of transistor and what kind of resistor(1k?)?

Almost anything.
Cap 0.1uF, transistor any NPN you can get your hands on. Resistor anything between 1k and 10K.

  1. On the IR led transmitter board i have 3 pins: DAT, VCC and GROUND. Which one of them is considered the cathode and which one the anode?

Difficult to say without looking at the schematic. But try ground as the cathode and then Vcc or Data as the anode.