Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

300 Hertz Relaxation Oscillator question

Status
Not open for further replies.

mstechca

New Member
I know how to make a two transistor relaxation oscillator, but rather than me personally figure out the optimal values of C and R to get 300 Hz, I thought I get some insight from someone else. I dont want to end up using values which I cannot purchase in most electronic stores.

and why 300 Hz?

I want to make a serial port data receiver. and it seems that I must have the baud rate correctly on the nose, or else there will be reception errors.

Why 300 Hz? because I want the receiver to autodetect the baud rate since most baud rates today are in multiples of 300.

I think I can be able to automatically detect the baud rate with a counter.

I will for sure dump baud rates that are not a multiple of 300.

I am using a 74HCT164 shift register and a 4040 counter. The clock pulses for both these devices are edge triggered. How long must it stay in one state before the chip recognizes the state? The reason why I'm asking is if I apply a positive and then a negative, not a picosecond later, the IC probably wont recognize the positive.
 
There are several options.
1. A 2 transistor multivibrator. Search this forum or on the internet for multivibrator.

2. Use an IC such as the 555.

3. Use a CMOS Schmitt Trigger such as the 40106, 74HC14, etc.
Connect R between output and input and C from input to ground.
Remember to connect unused inputs to gnd or Vcc.

4. Use a CMOS divider eg. the 4020, 4040, 4060 series. At least one (can't recall which one) has an internal oscillator option. All you need to do is add the R & C.

5. Use one or more of the above (ie. 4020, 4040, 4060) with a crystal whose frequency can be divided down by a binary multiple to 300 Hz.

6. Programme a PIC to generate the frequency.

Len
 
How were you planning dealing with start bits and stop bits?, I would strongly advise either using a PIC (simple, cheap, one chip solution), or a UART (like the 6402) - doing it with descrete TTL is going to be complicated.
 
Where did you get the 300 hz figure?? Its just gonna sound like a really annoying buzzing I would imagine.

Since brainwaves only go up to something like 20HZ, how is 300 hz gonna help? I think when you're sleeping, your brainwaves go to somethin like 12hz, but thats just a guess.
 
300 Hz = 300 Baud in computers, and today, I think 300 baud is the absolute lowest for serial port transmission.

But, now, I'll change it to 115200 Baud, just because I think what a counter does, when the frequency plays with the clock is actually divide the frequency by 2, 3, 8, etc.

I am using a 2 transistor astable multivibrator to generate my pulse. What I need to know is what resistor value and what capacitor value do I need to make 115200 Hz dead on?

and zach, I dont require audio output. My goal here is to autodetect a serial port speed up to 115200, and use that speed.
 
mstechca said:
300 Hz = 300 Baud in computers, and today, I think 300 baud is the absolute lowest for serial port transmission.

But, now, I'll change it to 115200 Baud, just because I think what a counter does, when the frequency plays with the clock is actually divide the frequency by 2, 3, 8, etc.

I am using a 2 transistor astable multivibrator to generate my pulse. What I need to know is what resistor value and what capacitor value do I need to make 115200 Hz dead on?

and zach, I dont require audio output. My goal here is to autodetect a serial port speed up to 115200, and use that speed.

I would argue you'll never find someone using 300baud (why?!) so dont waste your time and large RC values supporting that. You could autodetect at much higher multiples and you'll never have an incompatibility issue.
 
Optikon said:
What I need to know is what resistor value and what capacitor value do I need to make 115200 Hz dead on?
The frequency of oscillation for the classic two-transistor astable is
f = 1/1.386RC.

In your case this gives an RC product of 6.26 x 10^-6.

You won't find any standard values which will give this result so you will have to use a variable R on one side of the oscillator (and it makes a nonsense of using 1.386 in the math. 1.4 is usually sufficient.)

Try 0.1nF for the two Cs, with 33k on one side of the oscillator and 27k in series with a 10k variable on the other.
 
Thanks for the values. I'll try them.

My best circuit has the following description:

As soon as a "1" is detected directly from the serial port, the 4013 (the flip flop) is driven into SET, and that enables both the 4040 counter and the 74LS164 shift register. The counter and shift register when enabled will be synchronized with my oscillator. As soon as the counter reaches 8, the 4013 is entered into RESET mode, and all devices are reset.

I did it like this because a serial data stream is at least 10 bits, the 1st bit is 1, and I only need 8 more for the data, and I thought I could get away without managing the stop bit.
 
mstechca said:
Thanks for the values. I'll try them.

My best circuit has the following description:

As soon as a "1" is detected directly from the serial port, the 4013 (the flip flop) is driven into SET, and that enables both the 4040 counter and the 74LS164 shift register. The counter and shift register when enabled will be synchronized with my oscillator. As soon as the counter reaches 8, the 4013 is entered into RESET mode, and all devices are reset.

I did it like this because a serial data stream is at least 10 bits, the 1st bit is 1, and I only need 8 more for the data, and I thought I could get away without managing the stop bit.

Don't you think this is VASTLY over complicated?, plus it doesn't sound like a very effective design, the usual method is to wait half a bit time after receiving the leading edge of the start plus, then wait a full bit time before sampling each successive bit (this minimises timing errors). As you rightly say, you can safely ignore the stop bit (which isn't a real bit anyway).

Is this for a school project or something?, it's not at all a practical solution, not when you can do it far easier, cheaper, and more effectively, with a micro-controller, or a dedicated UART chip (like the 6402 series).
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top