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.

Reliable yet cheap way to get 38 or 40Khz

Status
Not open for further replies.

vsmGuy

Advanced Member level 2
Joined
Jun 26, 2006
Messages
503
Helped
44
Reputation
88
Reaction score
15
Trophy points
1,298
Location
VddVss
Activity points
3,882
555 40khz

Guys

What will be a reliable yet cheap way to get 38 or 40Khz ~50% duty cycle 5v p.p freq ?

Obviously this will be used to modulate serial transmission so I can use a TSOP1738/40 to demodulate the stuff at remote end.

Will a 555/556 based idea be stable enough ?

Can a AT89C52/2051 do it well enough ?

I would rather not use hard to get / expensive stuff to just generate 38/40kHz..

Hope I make sense :)
 

40 khz 555

I've built a quick & easy oscillator like this before. Follow this app note:
www.onsemi.com/pub/Collateral/AND8053-D.PDF

And make sure and use an Unbuffered inverter! If you use a buffered inverter (74LS04, 74ALS04, etc..) it won't work with a low frequency crystal.

That's assuming you need the stability of a crystal oscillator. Also, if your micro is clocked by a crystal, you could just have the micro generate the clock.
 

555 crystal 40khz

@lladnar23

The circuit you gave me demands that I have a 30/40Khz XTAL.

Does it not ? Or am I wrong ?
 

38 khz 40 khz oscillator using 555

Go for 555, it will be stable enough ..


Regards,
IanP
 

    vsmGuy

    Points: 2
    Helpful Answer Positive Rating
crystal 40 khz

vsmGuy
Yea -- it's for a crystal oscillator.
 

40 khz 555 with microcontroller

I didnt work with AT89C2052 but if you need it anyway in the project you can choose an apropriate quartz frequency and configure a timer to divide the frequency to get 40kHz. Also if it has a PWM channel you can select 50% duty cycle and a division factor to get 40kHz.
I've worked only with AVRs from Atmel.
 

    vsmGuy

    Points: 2
    Helpful Answer Positive Rating
38khz or 40khz xtal or crystal

For IR modulation both 555 or a simple oscillator using two inverters or two nand gates or one nand schmitd trigger gate will be ok. That's because the IR receiver characteristics has a bell shape, so the -3db will be arround 2-3Khz away from the central frequency. That means a 38KHz modulated transmitter will be received as well with a 36KHz or 40KHz receiver, with lower amplitude.
 

40khz crystal usage

I can't tell it can be done on AT892051 or not.
But, you can try to calculate the minimum cycle time on that chip.
If it can achieve 40KHz, I think u can use it.

I'm sure AVR microcontroller can be used for this application.
 

40 khz 555 oscillator

I think that a NE555 can be good
 

555 40khz pwm

This is just on a napkin, but it seems sound.

label loop
movlw 0x1D
addwf 0x20 ,f
rlf 0x20 ,w
rlf 0x22 ,f
movlw 0x1F
addwf 0x21 ,f
rlf 0x21 ,w
rlf 0x22 ,f
rrf gpio ,w
movwf 0x22
rrf 0x22 ,w
andwf 0x21 ,w
movwf gpio
goto loop

With a 20MHz crystal you will have both 38kHz (37,760) and 40kHz (40,365) simultaneously.

I omitted the initialization and such for the 12f675/629.
 

40 khz nand oscillator

@ldanielrosa

You do realize that the microcontroller (PIC in this case) will be forever tied up just bit banging the freq. right ?

No processing power left to do any other job !
 

at89c2052 pdf

Use 4060b with a 10.240M crystal and use ÷ by 256 output = 40kHz or use the ÷ 128 output with a FF to get 40kHz at 50%DC
 

cheap 40 khz quartz

vsmGuy said:
@ldanielrosa
You do realize that the microcontroller (PIC in this case) will be forever tied up just bit banging the freq. right ?
No processing power left to do any other job !
PIC12F683 has built in PWM, the only thing is to config. it! Then you'll have all the processing power and three other free ports! :wink:
 

I am looking for a Reliable yet cheap way to get 38 or 40Khz.

A PIC with inbuilt PWM is waaaay expensive..
 

Hi VsmGuy,

This is how it can be done, a cheap and common xtal and two 74HCXX's.
A 4 MHz oscillator and a divide by 100 chip.

62_1177037176.gif


on1aag.
 

    vsmGuy

    Points: 2
    Helpful Answer Positive Rating
vsmGuy, I know that my contribution was not entirely elegant. The advantages it has are frequency stability and minimal parts, and it will do both frequencies simultaneously.

Like I mentioned, it was "back of napkin calculation". I thought it over a bit, and the code could be unrolled to give better accuracy for frequency. It could also have a startup routine that would accept a serial protocol for changing the modulation frequency before commencing.
 

@ldanielrosa : Your solution would be elegant if all the PIC had to do was generate the frequencies all day long.

However, my objective is to MODULATE the serial communications of a 8051 so I can use a IRLED-TSOP1736/38/40 based solution.

To this effect, the solution posted by on1aag is the most effective.

Infact we had a small discussion on it before he posted, and he seems to have even tested it !

I would like to test it out myself. But that has to wait.

Anyone care to test it out in the meantime ?
 

Ah, I see that I was not explicit. I neglected to mention that pins 4,5 (GPIO3,2) are inputs, and are sampled on every iteration of the loop. The outputs on pins 6,7 modulate the inputs 4,5 respectively.
 

    vsmGuy

    Points: 2
    Helpful Answer Positive Rating
yo guy and rosa don't bother-up!!555 ic will do the job. or just use some hexinverter ic and it will do the job too as long as you calculate it precisely;D
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top