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.

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

Status
Not open for further replies.

eva4good

Newbie level 3
Joined
Mar 23, 2012
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,316
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.:lol:
 

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.
 

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:

"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?
 

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.
 

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

**broken link removed**

See post #11 for circuit
 

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.
 

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.:lol:

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:


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/dksearch/dksus.dll?vendor=0&keywords=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
 

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.:lol:

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.

38-khz-oscillator.jpg


**broken link removed**
 

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.
 

Consider this How to interface PIR modules with PIC microcontrollers

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
 

Attachments

  • pir_com.jpg
    pir_com.jpg
    43.6 KB · Views: 122

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.:lol:

@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
 
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.
 

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
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top