Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Help with using TSOP1738 for line sensing using ATMEGA16

  1. #1

    Default Help with using TSOP1738 for line sensing using ATMEGA16

    Im using TSOP1738 and LED to detect difference in white and black line. Im trying to generate 38MHz frequency from Atmega16 using the Formula,

    ORC0=((8000000)/38000)-1

    where 8000000is the timer0 value. and 38000 is required frequency.

    The LED is glowing but I dont have any device to confirm whether the produced frequency in correct or not. Im expecting that the TSOP1738 Voltage should go down if I bring the LED face to face ner it. But I dont Observe any kind of voltage variation in TSOP on bringing LED to any direction against TSOP even when touching, or far away. TSOp is just coutinously giving voltage of arnd 1.6 Volts without any variation.

    My friend had tried it sometime back as well using TSOP1738 only, and yet he was also unable to do it. Is it some problem in frequency produced by Atmega16? or am I doing some other mistake?

    PS> Im new to Robotics, so plz dont mind if im asking a silly question, but ive searched the forumns but cldnt get much help.

    PS> Though I dont have problem using IC 555, but I would prefer using Atmega16 as manufactureres have provided in it the required feature, and Im not much keen in increasing my PCB size in using an extra IC.

  2. #2

    Default

    Sry, 1 mistake in typing....

    In the formula above, its

    ((8000000/(2*38000)))-1

  3. #3
    Super Moderator T-1000 docel's Avatar
    Join Date
    Sep 2005
    Location
    BANGALORE
    Posts
    1,441
    Blog Entries
    3

    Default

    TSOP wont work for LFR. It is too sensitive and difficult to adjust at that height.

    Check your OCR mode and the formula again.
    docel
    ^Anything is possible..
    after YOU prove it!!

    http://bangalorerobotics.tripod.com

  4. #4

    Default

    TSOP do work.... my friend did it, but he used IC555 for powering LED the required frequency. But I want to keep IC555 the last option. I want to do it via Atmega's internal frequency generator so as to save money as well as space.

    Basic formula is right. Ive used: Frequency required= clock value / (2*OCR +1) , and have derived value of OCR from this keeping Frequency required =38khz, and Clock Value=8000kHz.

    Im using CodeVision AVR

    OCR mode is:

    Timer 0
    Clock Value: 8000 kHz
    CTC Top=OCR0
    Toggle on compare match

  5. #5
    Super Moderator T-1000 docel's Avatar
    Join Date
    Sep 2005
    Location
    BANGALORE
    Posts
    1,441
    Blog Entries
    3

    Default

    Well, why cant you post all the details in your first post??
    It is your duty to let us know ALL the things you have done, BEFORE we solve your problem :!: You have been doing things without any understanding of the component. This will only lead to a lot of unnecessary problems.
    Besides, you dont seem to understand what others tell you, too!!

    1. The TSOP is working alright, if it is 1.6V at its output!
    You cant see it because it is blinking at 38000 times per second ! It doesnt mean that the uC will read it.

    2. If your friend made the line folllower using TSOPxxxx, then why not ask him , since he is an expert already??
    In my opinion, TSOPs cannot be easily used for line following, more so with a 555 output.

    It is time you guys stopped writing code first and trying it out on electronic components, of which you know little or nothing about.
    docel
    ^Anything is possible..
    after YOU prove it!!

    http://bangalorerobotics.tripod.com

  6. #6

    Default

    of course i know very less of components as yet, as im just a beginner.... but im trying to know them through the datasheets. Im sure you would had also been in my shoes sometime back when you were a beginner....

    My friend is no expert either, but they use TSOP in dere college for line following , and thats where ive come to know of it. Dont you think that if TSOP are used then they would provide more accuracy because ambient light will have very less effect on its working.

    Basicly thats the reason why I wanted to use TSOP. I might be wrong, but each wrong corrected could add to my proper knowledge.

  7. #7

    Default

    Doc is right. TSOP1738 is too sensitive. Normally sensors are placed close to the surface where it has to detect black and white surface, so ambient light won't be that big a problem, untill you are planning to keep the sensors on height, which is not recomended

  8. #8
    Administrator T-1000 rao's Avatar
    Join Date
    Feb 2004
    Location
    New Delhi
    Posts
    833
    Blog Entries
    2

    Default

    One thing I fail to understand is why do you want to use uC resources on running a TSOP rather than figuring out a good enough algorithm to make regular sensors or an array of regular sensors work better?

    There is a lot to LFRs (well not that much, but still...) apart from the sensors... Instead of planning on what sensor to use, you could have spent time looking for a more efficient arrangement of sensors, better algorithms for line tracking, making a faster, smaller and powerful LFR.

    Complexity might 'attract' people but in the end simplicity is what 'amazes' them.

    And by the way, what is this obsession of yours with TSOP anyways. Is it only because your friend was able to make an LFR with TSOP that you want to stick to that one sensor and stop thinking about other aspects of LFR?? or just that you are intrigued by the awesome capabilities ( yeah, right) of TSOPs in the field of line following?

    One final piece of wisdom. In the last 4 years of our functioning as an online Robotics Community, I have never come across an LFR that won prizes based on TSOP sensors. I am not asking you to stop your efforts, rather , I would be happy if you come up with a solution and post it here.


    Rao

  9. #9

    Default

    thnx a lot! il definately try to keep my efforts on, and will also try for other techniques. Whatever I do, Il make its video n post it on youtube, n give its link here. and in case of further problems, il keep troubling you! :wink:

  10. #10

    Default create 38kHz frequency with bursts using single NE555

    Ive seen in some forumn here on roboticsindia a method of creating bursts. In it its said to create frequency using 1st 555 n then use 2nd 555 to create bursts by connecting it to the reset of 1st.

    Is it not possible to create bursts using just 1 555? Im able to produce arnd 38kHz frequency, and TSOP is responding to it well for a few miliseconds. Not with continous signals. Reading the datasheet, and other Qs here, I feel its definately so due to lack of bursts. So all I need is to create bursts using same NE555

    Im insisting on using same NE555 as ive just 1 NE555 at the moment and Market is closed tomorrow, so just wishing that I could do the sensor part of my project by tomorrow.

    In case its not possible to do it using just 1 NE555, then please can you give me circuit diagram of producing bursts? And how would we define that after how many cycles we need burst and equvalen to how many cycles. As i read in some post here that we require approx 14 cycle burst after 10 cycles. I cant figure it out easily from the datasheet.

    And can you explain me what exactly we mean by the term duty cycle.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •