Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Robt control using tsop 1738

Status
Not open for further replies.

nagsaver

Junior Member level 1
Joined
Jun 27, 2012
Messages
15
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,395
I am making a robot controlled by sony TV remote whose output IR is detected by TSOP1738....I have programmed the micro(ATMEGA8L) using appropriate control codes of the tv remote.....the thing is that the output from my tsop is nearly 4v without ir but when any button is pressed it only reduces to closely above 3v which is still logic high for my atmega whose vcc is 5v.....what may be the problem...?????the connections of TSOP are as follows

1st pin--->>>Ground
2nd pin--->>>+5v via 100 ohm resistor
4.7 microf capacitor between 1st pin and 2nd pin

what may be the problem????Also any further suggestions for my project are certainly welcome....
 

Are you measuring the voltage with an oscilloscope or a voltmeter?

A voltmeter will only show average DC value, which means that 3V DC average sounds about right.

An oscilloscope will give a true indication.
 
I thought of exactly the same but i dont have an oscilloscope now so measuring it with a multi....but wont the voltage drop close to zero when tsop detects ir???
 

I thought of exactly the same but i dont have an oscilloscope now so measuring it with a multi....but wont the voltage drop close to zero when tsop detects ir???
No.

Let us say, for the sake of argument, you have a perfect square wave of 0V to 5V with 50% duty cycle. Your voltmeter will measure an average value of 2.5V. It will not show 0V.

Your numbers might suggest maybe 30% duty cycle, which is reasonable for Sony SIRC protocol.

Different remote buttons may give slightly different average DC value, depending on how many '1' s and '0's are coded into the address and command words

I normally check for basic operation by a simple test program in the microcontroller that simply copies input port to a handy output port with an LED on it (with infinite loop). If the hardware is OK, you will see the LED flash when a remote button is pressed.

If no luck with this, put a definite 1 and 0 on the input where the TSOP normally is, just to prove your test program really does light the LED in response to input change.
 
Last edited:
ya you are right ......the remote control codes are like 66% duty cycle wave of ir is 1.....and 50% is 0.....got confused.... thanks for the guidance .............so when I check for a start pulse from my tsop when a remote button is pressed....should the micro check it as a high or low input?????i am asking this because i will have to check each ad every pulse of ir and then assemble it into the 7bit binary code(and similarly 5bit for address).....
 

Be aware that TSOP gives a low output for a mark (38kHz signal received) and a high for space (no signal).
The opposite of what you might expect.

Here are some notes I made for an old Sony TV remote:

sony TV Remote 40kHz 7 bits command (LSB first) then 5 bits address
there are also 15 bit and 20 bit versions of Sony protocol
start bit = 2.4mS mark, .6mS space
1 = 1.2mS mark .6mS space, 0 = .6mS mark .6ms space
repeat every 45mS if key is held down

40kHz 7 bits command (LSB first) then 5 bits address
2.4ms mark=start
0.6sp, 0.6 mark = 0
0.6sp, 1.2 mark = 1

tv address=01
vcr1 address=02
vcr2 address=03
radio/cd address=04
laser disc address=06
surround sound address=0c
tuner address=0d
amp address=10 (theatre / cassette / tuner)
cd player address=11
equaliser address=12
HDMI control address=17
dvd address=1a

01 0-8 tv 1 to 9
01 09 tv 0
01 10 tv ch +
01 11 tv ch -
01 12 tv vol +
01 13 tv vol -
01 14 tv mute
01 15 tv on/off
01 1d -/--
01 25 input select
01 33 right
01 34 left
01 38 tv select
01 3a channel info
01 3b return
01 3f text
01 5b pip
01 5f swap
01 60 menu
01 65 ok
01 67 pip ch+
01 74 up
01 75 down

03 2b clock
03 4c red
03 4d green
03 4e yellow
03 4f blue

04 5b subtitles
04 60 hold
04 6c .

(under flap)
02 xx vtr1
07 xx vtr2
0b xx vtr3
19 xx vtr4
1a xx dvd

xx 10 ch +
xx 11 ch -
xx 1d record (not dvd)
xx 32 play
xx 33 rewind
xx 34 forward
xx 38 stop
xx 39 pause


.... and here is my favourite site for explaining how IR works:

https://www.sbprojects.com/knowledge/ir/index.php
 
Thanks a lot .....the above post and the link really helps my project......
 

By the way, Sony SIRC uses 40kHz IR, whereas TSOP1738 is for 38kHz.

But do not worry, I use TSOP1738 for 40kHz and 36kHz all the time without problems.

In theory, your range may be shorter, perhaps half, but for messing about, this will not matter.
 
thanks for the additional info...and I do have another doubt -is ir remote reliable.......... because of noise from external light and all?
 

thanks for the additional info...and I do have another doubt -is ir remote reliable.......... because of noise from external light and all?
Very reliable.

TSOP is a brilliant chip. It does some amazing filtering and automatic gain control to give really good and reliable reception in normal household use.

Your TV probably has this receiver, or something similar, as do the other devices such as DVD, sound system, etc.

..... and your Sony TV remote works reliably I bet.
 
ya it does......thanks for your patient responses to all my questions..:grin:
 

Just though a bit more......

Not sure if IR is the best option for a robot, as IR is not omnidirectional.

If your robot turns its receiver away from the remote control, it may not get a good signal.

In a small room this may not be a problem, as IR bounces around walls and other surfaces quite well.

In large areas, or where there are obstacles, then reception could become an issue.

You could use multiple receivers, or mount the receiver at the top of the robot, but IR might still be limited and you may turn a simple project into something a little more complex

If this is just a fun robot for home, then I would guess that Sony IR will work sufficiently well for you. If it is a competition robot, or has some serious use, then you might want to switch to radio frequency remote control.
 

ya it is for a competition but the thing is that it is going to be held in a room so I thought ir would be fine........rf might get too costly right?
 

ya it is for a competition but the thing is that it is going to be held in a room so I thought ir would be fine........rf might get too costly right?
Well, IR is cheap and simple. I would go with it and see how it goes.

Perhaps only switch to RF if you find you have to.

Don't know much about RF. I see modules of all prices, but I imagine avoiding interference from the other robots would make the task difficult.

Maybe check out prices for ready made RC controllers. Somebody else will have solved the tricky issues for you, and ready built might be cheaper than self build.

.... but like I say, don't know much about RF
 

Sir, I am using RC5 TV remote & want to decode the bits at interrupt pin of AVR Atmega8... Connected output of TSOP1738 to INT0 of Atmega-8. I visited https://www.sbprojects.com/knowledge/ir/rc5.php the web site & I want to know if I press '1' of Remote the what exactly the data I get at output of TSOP1738. Please guide me... :(
 

I want to know if I press '1' of Remote the what exactly the data I get at output of TSOP1738.
It is impossible to predict exactly what will be transmitted. RC5 protocol does not specify that TV button '1' will produce any particular command or address.

Here is a random sample of an RC5 remote that I have, but your remote could be completely different:

Code:
Unmarked freeview remote uses RC5 protocol 14 bits 36kHz 1.778ms per high/low bit,
24.889ms whole command
0=0.889ms mark, 0.889ms space		1=0.889ms space, 0.889ms mark
start bit = 1 	(only second half of bit (mark) is detectable as space is lost in no data period
start bit = 1	(i.e. two start bits) or field bit in extended mode, where 0 denotes commands 64 to 127 decimal
toggle	  = x	alternates between key presses to distinguish continued press

0	msb
1
0		5 bit address of 08 hex
0
0	lsb
x	msb
x
x
x		6 bit command vol- = 11 hex
x
x	lsb

00to09  0-9
0a      exit
0c      power
0d      mute
0e      tv/dtv
10      v+
11      v-
12      up
13      down
14      select
15      left
16      right
1e      wide
20      p+
21      p-
22      guide
26      subtitle
32      yellow
34      blue
35      menu
36      green
37      red
3c      text
3f      i

If I were to guess, then I would say that address is - anything 0x00 to 0x1f (hexadecimal numbers) and that command is 0x01 for '1' button.

If you want certainty, use Sony protocol for home use. Not sure if the protocol is copyright or not though :(
All I know is that Sony protocol is very popular and very simple
 
Last edited:
Sir, If I use Sony Remote is it easier for me to decode it at INT0 of AVR ATMEGA8..???

Will you please guide me regarding that..??

Sir thanx for ur last post....
 

Sir you Tell... I am ready to use PIC... But Want to first know how to do this...

Please Any one tell me how to write a program in 'C' to decode the code of SONY / RC5 remote...

Please guide me regarding this..

:cry::-(
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top