[Mogul, XV6800 ROM Development] julienrl:
Sweet! I will post it here so people can contribute if they can.

So the basic idea is that as the IR hits the LED, it will be converted into a signal, when this signal is picked up by the leads of a microphone, we end up with an audio file. This audio file in its own can not be used as the data needs to be cleaned up. Remote controls use a 38khz frequency; most devices dont output sound at this speed so we have to cut it to 19khz and have 2 LEDs outputting in "stereo". This basic principle comes from here.

Now the problem is that editing this on a mobile device would require non-existant software, so there are 2 options. 1- create the software or 2- make it a hardware based solution.

The proper signal can be outputted by the mobile devices, the signal just needs to be amplified as the output of the mogul is in mv rather than in v like my laptop (I haven't figured out why yet)

Since we are already building an amplifier, the hardware solution becomes even more attractive. By having the raw recording being converted by the components, there is 0 processor strain added and as such 0 lag or extra ram needed. The idea here is to have the peaks in the signal be the trigger for an oscillator circuit that would be driving an LED (we no longer need 2 since the hardware solution also allows 38khz output, but 2 leds at 19khz would also be possible).

This is where the hurdle comes in, I have not yet been able to successfully make a circuit that oscillates at 38khz or 19khz; I have tried multiple circuits but they all have variance that is too high due to the lack of precision of the components. I have had suggestions by some people more knowledgeable than myself, but I have not been able to explore them all yet. Here are the 2 most useful suggestions I have had until now

*************************************************

You mention pulses, 38KHz and IR.

It sounds like you are trying to produce an infra red remote control signal from a demodulated remote code stored as a .wav file.

Forget relays for this.

Presumably you are taking the audio from the headphone connector on the phone?

I'd try using a 100 Ohm resistor as a load for the audio output (to ensure no DC component), then feed it to something like an LM311 comparator. Have a look at the data here:

http://www.national.com/ds/LM/LM311.pdf

Look at the example 'Detector for Magnetic Transducer' on the first page. Where it shows the magnetic pickup, substitute the 100 Ohm earpiece load resistor with the phone audio connected across it.

Add 10uF electrolytic caps across the supply and R2 for stability and run the circuit on a 4.5 or 6V battery for safety.

The output at pin 7 will be the switching signal, at the battery voltage, to control your IR transmitter oscillator. If the On/Off polarity is wrong, swap the connections from the phone out to the comparator circuit, or re-encode the .wav inverted.

Ideally the phone ground would be connected to the r1/r2 junction.

Once you get the basic thing going, you should really mod it so the phone ground connects to the external circuit ground. All you need for this is one extra capacitor and resistor, I'll let you think about that.

ps. If your signal is really only a couple of mV, you may need to add the Offset Balancing pot shown on page 1 of the data sheet, then adjust that while watching the output on a 'scope to get the cleanest results.

*************************

Hi,

I'd try a 555 Timer, they are simple and cheap.

You can tweak the 38KHz output using a preset in series with one of the frequency setting resistors.

Feed the output of that through a resistor to the base of a transistor that controls the IR LED, then I think you could put the comparator output straight across the base to 0V, so the output transistor in the comparator clamps off the LED power.

That way the oscillator is running all the time & there will not be any frequency changes or odd effects as it starts up.

**********************************

The second one about 555 timers seems to be the most frequent design on the web, and this is the one I have not tried yet. there are many schematics about this one on the web, but I have not yet had a chance to build it. The biggest problem I am having conceptually is how to make the 0.004v output of the mogul drive the other circuit (turn it on and off at the appropriate times), the osccilator would take care of driving the LED at the right frequency, but the 0.004v from the mogul dictates when and how long it should be on and oscillating.

I have also tried this circuit, but it was not precise enough.