Remote Problems

D396

Senior Member
I am having problems creating a remote control for my Sony TV this is my setup

Picaxe 28x1

Ir led ( http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=160-1061-ND)

Sony Lcd TV KDF-E50A10

Here is my code:
setfreq em16
symbol Outbyte = b1
symbol counter = b2
symbol CUP = 016
symbol CDOWN = 017
symbol VUP = 018
symbol VDOWN = 019
symbol POWER = 021
symbol POWER_OFF = 047
symbol VONE = 064
symbol VTWO = 065

main:

if pin0 = 1 then 'turn Channel Up
outbyte = CUP
gosub ir
goto main

else if pin1 = 1 then 'turn Channel Down
outbyte = CDOWN
gosub ir
goto main

else if pin2 = 1 then 'turn Volume Up
outbyte = VUP
gosub ir
goto main

else if pin3 = 1 then 'turn Volume Down
outbyte = VDOWN
gosub ir
goto main

else if pin4 = 1 then 'turn TV on
outbyte = POWER
gosub ir
goto main

else if pin5 = 1 then 'turn TV off
outbyte = Power_off
gosub ir
goto main

else if pin6 = 1 then 'turn To video 1
outbyte = VONE
gosub ir
goto main

else if pin7 = 1 then 'turn to video 2
outbyte = VTWO
gosub ir
goto main

endif
goto main

ir:
for counter = 1 to 4
irout 0,1,Outbyte
pause 45
next counter
return
Everything is wired correctly and it emits the infrared light. I even hooked up my 18x with a detector and infrain2 and it transmitted correctly. The TV's remote also works with the infrain2 tansmitting the correct codes.

I can not think of any thing else that could be wrong. Thanks for any help you can give.
 

BeanieBots

Moderator
Your Tx loop only sends 4 pulses.
That might not be enough for your TV, try a larger value, maybe as high as 50 to start with.
Also, the pause 45 seems a bit long, try reducing it.
 

hippy

Technical Support
Staff member
So the 28X1 transmits IR which can be received by the 18X but will not control the TV, what's received by the 18X looks the same whether coming from the remote or 28X1.

Could it be that the TV and remote do not use the standard SIRC codes ( such as Sony 20-bit codes ) ? What the remote does send may be partially read by the INFRAIN2 but isn't the entire signal. What the 28X1 sends looks the same when read by INFRAIN2 but isn't the full code.

Do you have an oscilliscope which would let you look at the demoulated IR signals ?
 

D396

Senior Member
Still no efect. (I looked at the remote though the 18x and it sent 4 pulses)
I changed the code to
main:

for b1 = 1 to 50
irout 7,1,21
pause 10
next b1

wait 2

goto main
 

BeanieBots

Moderator
I doubt it's the brightness if the 18X can pick it up.
Easy to check, put it right up against your TV's IR receiver.
Unfortunately, I think Hippy might be on to something.
Without access to a 'scope it will be hard to tell for sure.
 

Technical

Technical Support
Staff member
45ms or so between irout commands is about correct, but when you are running at em16 'pause 45' is no longer 45ms and so you may be flooding the TV with too much IR! Try your program just at m4.

Other than that there are unfortunately several variants on the Sony protocol...
 

D396

Senior Member
It still does not work at but m4 here is how the code looks now
setfreq m4
main:
for b1 = 1 to 10
irout 7,1,21
pause 45
next b1

wait 2

goto main
 
Last edited:

D396

Senior Member
I forgot to mention that it does not work with my Sony stereo either. (with the right device code)
 
Top