+ Post New Thread
Results 1 to 19 of 19
  1. #1
    Newbie level 3
    Points: 224, Level: 2

    Join Date
    Mar 2012
    Posts
    3
    Helped
    0 / 0
    Points
    224
    Level
    2

    How do i generate a 38kHz frequency and how to make it constant.

    Please am working on a project which is to design an intruder alarm system using tsop 1738 ir sensor and tsal 6200 ir diode. But the problem am having is how to produce an electric signal of 38kHz and also how to make it constant irrespective of change in temperature so that it can always be detected by the ir sensor. Expecting your kind contributions thanks.

  2. #2
    Super Moderator
    Points: 38,610, Level: 48

    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    6,405
    Helped
    1968 / 1968
    Points
    38,610
    Level
    48

    Re: How do i generate a 38kHz frequency and how to make it constant.

    Those IR sensors have quite a wide bandwidth, it doesn't have to be exactly 38KHz, as much as 1KHz each way should work just as well.

    You can generate the 38KHz with almost any oscillator, I've used an NE555 on many occasions and when it had to be pulsed to carry data I control it with its reset pin. You could use a small microprocessor for more accurate frequency control or use a crystal oscillator followed by a divider circuit.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



  3. #3
    Full Member level 6
    Points: 2,701, Level: 12
    hexreader's Avatar
    Join Date
    Apr 2011
    Location
    England
    Posts
    368
    Helped
    129 / 129
    Points
    2,701
    Level
    12

    Re: How do i generate a 38kHz frequency and how to make it constant.

    Check out the datasheet for TSOP1738.

    There is a maximum transmit time allowed of 70 cycles (38mS), so continuous 38kHz transmission will be of no use in this application.

    EDIT: now I think harder, constant 38kHz MAY be of use:
    When the beam is broken, nothing will happen, but when an obstruction passes, the receiver will see a new 38kHz signal and pulse the output low for a short time. You might use this to trigger an alarm. Never tried it, so I don't know if this would be reliable.

    If you need to detect break-beam, rather than make:
    Modulate the 38kHz with something like 500Hz to 2kHz to keep within spec.

    This will require two 555 timers, if 555s are what you choose for transmitting.

    Receiving gets a little more complicated too, since you need to detect presence or absence of a square wave, not just a simple high/low output.

    Note that the receiver inverts, in that it will give a low when receiving a mark (38kHz), high when receiving a space (no signal).

    My favourite microcontroller for domestic IR is PIC12F683, as it has a PWM option and the internal oscillator is factory calibrated.
    You will need a programmer such as PICkit2 and software skills to go the microcontroller route though.
    Last edited by hexreader; 8th May 2012 at 00:03.



  4. #4
    Newbie level 3
    Points: 224, Level: 2

    Join Date
    Mar 2012
    Posts
    3
    Helped
    0 / 0
    Points
    224
    Level
    2

    Re: How do i generate a 38kHz frequency and how to make it constant.

    "Those IR sensors have quite a wide bandwidth, it doesn't have to be exactly 38KHz, as much as 1KHz each way should work just as well.

    You can generate the 38KHz with almost any oscillator, I've used an NE555 on many occasions and when it had to be pulsed to carry data I control it with its reset pin. You could use a small microprocessor for more accurate frequency control or use a crystal oscillator followed by a divider circuit.

    Brian."

    @Brian did you use the NE555 to pulse the signal from the oscillator circuit? If yes, did it work perfectly? and if not what is the range of deviation from your desired frequency?



    •   Alt8th May 2012, 00:16

      advertising

        
       

  5. #5
    Super Moderator
    Points: 38,610, Level: 48

    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    6,405
    Helped
    1968 / 1968
    Points
    38,610
    Level
    48

    Re: How do i generate a 38kHz frequency and how to make it constant.

    In my application I was 'remote controlling' a video recorder by duplicating the various commands that a real remote control unit would have sent. I used the NE555 in astable mode to produce 38KHz, connected it's output to an IR LED via a current limiting resistor and I pulsed it on/off to send data by driving it's reset pin. The data (reset to NE555) was produced by a PIC micro. It worked perfectly and allowed control of the recorder over a microwave radio link from 100Km away!

    If all you want is to detect the presence of a beam or not, you can leave the NE555 running all the time. What matters is that the detector sees the IR beam is going on and off at about 38KHz rate. The detector uses the 38KHz to distinguish your IR beam from other sources of IR light, for example it should reject constant IR light (as in sunlight) or pulsing light from fluorescent lighting which is typically around 50KHz.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



  6. #6
    Full Member level 5
    Points: 1,887, Level: 10
    Qaisar Azeemi's Avatar
    Join Date
    Feb 2011
    Location
    Peshawar, Pakistan, Pakistan
    Posts
    307
    Helped
    16 / 16
    Points
    1,887
    Level
    10

    Re: How do i generate a 38kHz frequency and how to make it constant.

    any small microcontroller can do this perfectly. or you have to use crystal oscillator , schmitt triggers and counters to do this job.
    Adjustment with right people is always better than argument with wrong people
    and Meaningful silence is always better than meaningless words.....

    "For an optimist the glass is half full, for a pessimist it's half empty, and for an engineer is twice bigger than necessary." :-)



  7. #7
    Super Moderator
    Points: 12,405, Level: 26
    Achievements:
    7 years registered
    SunnySkyguy's Avatar
    Join Date
    Sep 2007
    Location
    Richmond Hill, ON, Canada
    Posts
    2,229
    Helped
    521 / 521
    Points
    12,405
    Level
    26

    Re: How do i generate a 38kHz frequency and how to make it constant.

    There are many 38KHz IR transceiver chips with daylight blocking filters.
    Before you ask, Where is your Spec? What are you assuming? How did you verify? What did you try?

    "Ohm's Law and Uncertainty Principle" applies to life... Tony Stewart EE since 1975



    •   Alt8th May 2012, 15:35

      advertising

        
       

  8. #8
    Full Member level 6
    Points: 2,701, Level: 12
    hexreader's Avatar
    Join Date
    Apr 2011
    Location
    England
    Posts
    368
    Helped
    129 / 129
    Points
    2,701
    Level
    12

    Re: How do i generate a 38kHz frequency and how to make it constant.

    Just spotted that someone else has built a detector with only one 555 as transmitter:

    http://www.electro-tech-online.com/g...rsion-2-a.html

    See post #11 for circuit



  9. #9
    Super Moderator
    Points: 12,405, Level: 26
    Achievements:
    7 years registered
    SunnySkyguy's Avatar
    Join Date
    Sep 2007
    Location
    Richmond Hill, ON, Canada
    Posts
    2,229
    Helped
    521 / 521
    Points
    12,405
    Level
    26

    Re: How do i generate a 38kHz frequency and how to make it constant.

    Looks like another way to jam the TV so the kids cant change the channel and have your computer remotely control it. ;)
    Before you ask, Where is your Spec? What are you assuming? How did you verify? What did you try?

    "Ohm's Law and Uncertainty Principle" applies to life... Tony Stewart EE since 1975



    •   Alt9th May 2012, 17:38

      advertising

        
       

  10. #10
    Newbie level 3
    Points: 224, Level: 2

    Join Date
    Mar 2012
    Posts
    3
    Helped
    0 / 0
    Points
    224
    Level
    2

    Re: How do i generate a 38kHz frequency and how to make it constant.

    Thank you everyone I think I have gotten the solution. I will go with the NE555 method since it is cheaper and stable also. In all thank you everyone for your contributions.



  11. #11
    Advanced Member level 3
    Points: 8,066, Level: 21
    papunblg's Avatar
    Join Date
    Oct 2010
    Location
    Kolkata India
    Posts
    724
    Helped
    170 / 170
    Points
    8,066
    Level
    21
    Blog Entries
    9

    Re: How do i generate a 38kHz frequency and how to make it constant.

    Quote Originally Posted by eva4good View Post
    Please am working on a project which is to design an intruder alarm system using tsop 1738 ir sensor and tsal 6200 ir diode. But the problem am having is how to produce an electric signal of 38kHz and also how to make it constant irrespective of change in temperature so that it can always be detected by the ir sensor. Expecting your kind contributions thanks.
    For this type of application you can consider photo transistor/ photo diode/ PIR Module even LDR/Laser torch.
    tsop 1738 ir sensor is not easy to use for this type of intruder alarm system. Why? that is explained by hexreader already.
    Last edited by papunblg; 19th May 2012 at 03:19.
    Rajsekhar Nag
    -------------..--------
    Knowledge Grows When Shared



  12. #12
    Super Moderator
    Points: 12,405, Level: 26
    Achievements:
    7 years registered
    SunnySkyguy's Avatar
    Join Date
    Sep 2007
    Location
    Richmond Hill, ON, Canada
    Posts
    2,229
    Helped
    521 / 521
    Points
    12,405
    Level
    26

    Re: How do i generate a 38kHz frequency and how to make it constant.


    I would recommend a 38KHz Tuning Fork 20~30ppm which is 1000x better than over a 3%~% 555 timer.

    Cost $1


    I usually associate 555 users as newbies who do not realize this is like using vacuum tubes in semiconductors. A great design for its time, but now pretty high in tolerance compared to modern, cheap, reliable resonators like Quartz, ceramic and TF.

    http://search.digikey.com/scripts/dk...=crystal+38KHz


    details...
    555 3% + 30% of supply error ~ $0.50
    38KHz tuning fork in SMD 20~30ppm <$1
    Crystal 10~50 ppm ( cheap )

    Of course final decision depends on volume and total cost of design
    Before you ask, Where is your Spec? What are you assuming? How did you verify? What did you try?

    "Ohm's Law and Uncertainty Principle" applies to life... Tony Stewart EE since 1975



  13. #13
    Advanced Member level 5
    Points: 54,409, Level: 56
    tpetar's Avatar
    Join Date
    Sep 2010
    Location
    Pancevo, Serbia
    Posts
    6,468
    Helped
    1704 / 1704
    Points
    54,409
    Level
    56

    Re: How do i generate a 38kHz frequency and how to make it constant.

    Quote Originally Posted by eva4good View Post
    Please am working on a project which is to design an intruder alarm system using tsop 1738 ir sensor and tsal 6200 ir diode. But the problem am having is how to produce an electric signal of 38kHz and also how to make it constant irrespective of change in temperature so that it can always be detected by the ir sensor. Expecting your kind contributions thanks.
    You should know that IR have useful range about few meter, for bigger distance you can use cheap laser 5mW with phototransistor.

    The circuit is a simple IR transmitter operating in the 38 KHz, the frequency of most IR sensors used in TV. The Atable multivibratior built around the popular IC 555 generates output pulses with a frequency of 38 KHz. The output frequency can be set by VR exactly to 38 KHz.



    http://www.eeweb.com/blog/circuit_pr...tk19-or-sfh506



  14. #14
    Full Member level 4
    Points: 1,443, Level: 8

    Join Date
    May 2012
    Location
    Bangladesh
    Posts
    201
    Helped
    50 / 50
    Points
    1,443
    Level
    8

    Re: How do i generate a 38kHz frequency and how to make it constant.

    Why not use HT12A with 455KHz resonator. That will be very stabe and no need to any adjustment. It will provide encoded output also. It is a popular ic. It must be available.



  15. #15
    Advanced Member level 5
    Points: 54,409, Level: 56
    tpetar's Avatar
    Join Date
    Sep 2010
    Location
    Pancevo, Serbia
    Posts
    6,468
    Helped
    1704 / 1704
    Points
    54,409
    Level
    56

    Re: How do i generate a 38kHz frequency and how to make it constant.

    I never use HT12, but why not you can try and test it.



  16. #16
    Advanced Member level 3
    Points: 8,066, Level: 21
    papunblg's Avatar
    Join Date
    Oct 2010
    Location
    Kolkata India
    Posts
    724
    Helped
    170 / 170
    Points
    8,066
    Level
    21
    Blog Entries
    9

    Re: How do i generate a 38kHz frequency and how to make it constant.

    Consider this How to interface PIR modules with PIC microcontrollers http://www.edaboard.com/blog371886-2.html

    In this project a Passive Infrared (PIR) sensor is used to detect human movement and trigger an alarm. A typical PIR sensor comes pre-packaged with all the logic required to, detect IR radiation from living being and raise alarm.

    Picture of the working model below
    Rajsekhar Nag
    -------------..--------
    Knowledge Grows When Shared



  17. #17
    Super Moderator
    Points: 12,405, Level: 26
    Achievements:
    7 years registered
    SunnySkyguy's Avatar
    Join Date
    Sep 2007
    Location
    Richmond Hill, ON, Canada
    Posts
    2,229
    Helped
    521 / 521
    Points
    12,405
    Level
    26

    Re: How do i generate a 38kHz frequency and how to make it constant.

    Quote Originally Posted by eva4good View Post
    Please am working on a project which is to design an intruder alarm system using tsop 1738 ir sensor and tsal 6200 ir diode. But the problem am having is how to produce an electric signal of 38kHz and also how to make it constant irrespective of change in temperature so that it can always be detected by the ir sensor. Expecting your kind contributions thanks.
    @eva4good< I am sure you can get your intruder alarm to work, but it is important to learn why design is done and the reasons should be made clear. Then you can never fail, unless you forget an assumption or cannot solve it in time.

    Specs are based on Time. Budget, Performance, Environmental Specs etc.
    You would do better if you tried to look at existing products and then try to reverse engineer them and make it better for your needs.
    At least make a spec to indicate what exactly you plan to make.

    Of course Make or Buy is a decision made in every stage of design. We can use this analog at every level from Systems down to silicon dust.

    It is critical that you write yourself ( share it too)" a simple one page SPEC " like any commercial product brochure, and say what it wil do in a list of measureable numbers and what environment it will work.

    Otherwise you are wasting your time playing with parts .

    1. Consider what can be detected by intruder motion; and then decide if it meets your criteria above in your spec.
    - audible noise above ambient ( omni directional but poor s/n ratio detecting what sound an intruder makes )
    - reflected light change ( can be wide angle or very narrow beam depends on distance and light ingress, careful design needed)
    - transmitted light interrupted ( drop in can be multiple very narrow beams and detectors )
    - reflected RF signal using return loss bridge and 1/4 wave wire, splitter and HC diode ( detects 5 m easily at low power)
    - inexpensive Webcam GO or newer with motion sense software or equiv.
    - ultrasonic reflection

    Keep in mind SNR has a direct relation to error rate in detection of anything. Stock market, intruders, cell phones (SNR=Signal to Noise Ratio) This is defined by Shannon's Law.

    Next make a list of all noise sources relevant to your purpose..

    Solutions are trivial after the problems are clearly defined. The challenge is to research what you need to solve with acceptance and rejection criteria and what technology can offer in each requirement then becomes easier. This, is Engineering.


    The traditional outdoor sensor lights use IR diode like those in Remote controls for TV and the IR LEDs are powered from the AC power. typ ~20~50mA or IR light. A high value resistor biases a photo diode usually detects refected light changes as an ac signal then rectifies that. Usually as increase in reflected light since it is omnidirectional. It must be very low current integrated for a second or so to detect from afar. But it is adaptive so it is looking the noise of IR reflected from an otherwise static reflection off the ground. It works but can often be too sensitive and false triggered.

    Now describe to yourself how yours will work and summarize that into your spec.
    I could suggest a cheap transceiver Opto pair that would do everything for some ranges, but I want you to defined that range, sensitivity for size and accuracy
    Before you ask, Where is your Spec? What are you assuming? How did you verify? What did you try?

    "Ohm's Law and Uncertainty Principle" applies to life... Tony Stewart EE since 1975


    1 members found this post helpful.

  18. #18
    Super Moderator
    Points: 12,405, Level: 26
    Achievements:
    7 years registered
    SunnySkyguy's Avatar
    Join Date
    Sep 2007
    Location
    Richmond Hill, ON, Canada
    Posts
    2,229
    Helped
    521 / 521
    Points
    12,405
    Level
    26

    Re: How do i generate a 38kHz frequency and how to make it constant.

    If any of you ever use a 555 in professional engineering... you may get laughed at by some as being a newbie... it is only for hobbyists and I have never seen ANY professionals from Seagate, Hitachi, Toshiba, Fujitsu, Tektronics, Hewlett Packard etc etc EVER use one. My suggestion, if you do, beware.... I have tested them and they are good for many small things. I have never seen them in toys either or watches, clocks. There are better solutions when you need higher precision or cost reductions in volume.
    Before you ask, Where is your Spec? What are you assuming? How did you verify? What did you try?

    "Ohm's Law and Uncertainty Principle" applies to life... Tony Stewart EE since 1975



  19. #19
    Full Member level 2
    Points: 268, Level: 3

    Join Date
    Feb 2013
    Posts
    123
    Helped
    3 / 3
    Points
    268
    Level
    3

    Re: How do i generate a 38kHz frequency and how to make it constant.

    hi,i'm using tssp6p38 as receiver and tsal6200 as emitter,i come to know that tsal6200 need to modulated to 38khz in order let tssp6p38 to detect it,without using microcontroller,how can i modulate the signal?if using the 555ic,where to connect my emitter and how many resistor i need to place on my emitter since my emitter operating voltage is max 1.6v



+ Post New Thread
Please login