Picaxe Emulate TV remote

Hi, I was wondering if it is possible to emulate a Sharp TV remote signal using a Picaxe. I know it can do the SIRC protocol, but is it possible to do any others?
Thanks for any reply,
tntexplosivesltd
 

hippy

Ex-Staff (retired)
You will have to write your own program which emulates INFRAOUT / IROUT for other than Sony IR protocol.

Whether that's possible depends on exactly what protocol this particular Sharp TV uses. If the protocol isn't well documented on the WWW or doesn't work with your TV you likely need access to an oscilloscope to have a real chance of getting it to work.
 

hippy

Ex-Staff (retired)
Thanks for the protocol info, slimplynth. Not the simplest of protocols but not the most complicated I've seen and it should be achievable with a PICAXE.
 

inglewoodpete

Senior Member
It could be possible to do with a PICAXE that can run at (at least) 16 MHz. When I was designing my universal IR receiver, I used a second PICAXE to generate continuous IR-like 'data'. This output strings of 0s or 1s at 4MHz but I had to tart it up a bit to send combinations of 0s and 1s (eg real codes), due to the time taken in shifting and branching.

If you have a CRO and some time available, it could be worthwhile.
 

hippy

Ex-Staff (retired)
@ tntexplosivesltd : The general principle of the code would be to use PWMOUT to generate a 38kHz carrier signal, then connect the IR LED + R between the PWMOUT and an output pin which can turn the LED on and off to modulate it. The timing control is achieved by using PULSOUT to the LED pin to create a pulse of IR and a PULSOUT to an unused pin to create the gaps between pulses.

For example, this code should notionally generate ten pulses of 100us IR with 1ms gaps between them once every second ...

PwmOut PWM_PIN , 25, 53 ' 38kHz at 4MHz
Do
For b0 = 1 To 10
PulsOut LED_PIN, 10 ' 10 x 10us = 100us
PulsOut DUMMY, 100 ' 100 x 10us = 1000us = 1ms
Next
Pause 1000
Loop

That's only notional timing though because it doesn't take into account the time of instruction execution itself so you need an oscilloscope or logic analyser to fine tune it. If the timing isn't what the receiver expects the IR will simply be ignored.

Once you can generate IR signals, then it's a case of generating the required signals for each key press with the correct timings. If which keys generate which signals isn't known that has to be reverse engineered from looking at the signal from a remote controller known to work.

Then you've got to scan the keys and simply generate the correct codes. With a large memory PICAXE that may be a long list of subroutines for each code generated, with smaller memory you have to work out a way to build each sequence to send depending on key pressed.

The principle is simple but the doing it can be a long and involved exercise. I wouldn't attempt the project without access to an oscilloscope as it would be near impossible to get it to work by guesswork.
 

benryves

Senior Member
The principle is simple but the doing it can be a long and involved exercise. I wouldn't attempt the project without access to an oscilloscope as it would be near impossible to get it to work by guesswork.
Infrared communications are generally slow enough that a sound card "oscilloscope" (or even just a sound recorder) should be sufficient for testing. Naturally, you'd like to be as close to the specification as possible, but my experience dictates that your timing don't have to be obsessively accurate to still work, thankfully!
 

slimplynth

Senior Member
Just an idea based on my own failings with the JVC protocol. Could be worth starting with the Sony protocol, to see if you can manually reproduce it. Then alter it for the Sharp.

edit: what I mean is, debugging might be easier if you have two picaxes (and no CRO - like me). One picaxe expecting Sony IR commands and the other outputting your bit banged attempt.
 
Last edited:

hippy

Ex-Staff (retired)
Good point benryves, 320us pulses are less than 4kHz so should work with a sound card oscilloscope, and a really good idea with a Sound Recorder; that gives a long capture time and a WAV viewer can scroll and zoom just like a two channel digital storage scope.

Not sure what the timing accuracy actually is and probably varies according to protocol but I'd imagine protocols are usually designed to be tolerant to quite wide errors.
 

bgrabowski

Senior Member
This thread is quite similar to the Canon thread of a year or so ago. Type Canon Remote in the search box for more information on circuits and programming ideas.
 
Top