![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| General Electronics Discussion Discuss basic electronics, power supplies and anything else electronic related here. |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
I am working on an application requiring that I digitally control the duty cycle of a fixed frequency oscillator. I did some research on the 'net and found a couple circuits to support this system. I spent a lot time understanding the circuit and decided to document how it worked here. Oscillator The CD4541BC programmable timer has a 16 stage binary counter, an integrated oscillator that uses an external capacitor and two resistors. The timer is also programmable by setting the digital inputs to divide the oscillator frequency by to 2^8, 2^10, 2^13, 2^16. The CD4541BC ocscillator frequency can be set by an external RC network that's by the following formula freq = 1 / (2.3 * Rtc * Ctc) where Rs = ~ 2Rtc and Rs >= 10,000 ohms. (Although I've had reasonable results with going down to 1k.) ![]() Obviously there is a lot of flexibility to control the frequency of the oscillator. For my application I just needed a fixed frequency which I set using switch S1. Users that want to control the frequency digitally you could control the frequency by putting TTL control lines on ports A and B. ![]() 4-Bit Counter The next portion of the circuit involves a 74191 4-bit binary counter. The 74191 recieves a clock input and triggers each of the four outputs to produce a series of 4-bit words. The 74191 is called an up/down counter which means it is reversable and count up or down after each clock cycle. When the counter is counting up it produces these outputs on the rising edge of each clock cycle. ![]() Notice that the counter rolls over from 1111 to 0000 at the end of the series. Wiring for the 74191 is really simple. Pin 14 recieves the clock input from the timer and pins 1, 4, 5, 8, 9, 10, 15 are tied to ground. "N.C." stands for not connected. Pin 16 is tied to Vcc. ![]() Stay tuned for the next post... owen |
|
#2
| |||
| |||
| Magnitude Comparator 7485 Suppose we had a chip that could read the signals at the outputs of the 74191 and tell when it was at a certain clock cycle. This is accomplished with a 7485 4-bit magnitude comparator. This magnitude comparator performs comparisons of two 4 bit words. The two 4-bit words are called A and B here. <B>Note:</B> The documentation for the 74191 is confusing because it calls the complete word "A", which has four bits (A0, A1, A2, A3) , however; in the 74191 each <i>bit</i> of the word was called A, B, C and D. The comparator has outputs which register when word A<B, A=B, or when A>B on pins 7, 6 and 5, respectively. Complete circuit What does this allow us to do? Well, if we wanted to count the pulses that are coming from the timer, we could set a word on the B input of the comparator, wait for the clock to cycle the counter up to that word, and watch the output of pins 6 and 7 of the comparator. The wiring for this circuit is as follows: ![]() The simple pulse generator allows you to program its duty cycle. The user can set the inputs to B0, B1, B2 and B3 as digital inputs to the 7485 magnitude comparator IC3. The timer, IC1, increments the 74193 4-bit counter, IC2. When the output of the counter is equal to or greater than your duty-cycle code, IC4 an OR gate, goes high until the counter, IC2, overflows. The input code to pins B0, B1, B2 and B4 determine duty cycle of the overall circuit. Suppose the desired duty cycle was 50%. The total number of clock cycles you can measure is 16, and half of those cycles is 8. The input code corresponding to clock cycle 8 is B0=1, B1=1, B2=1 and B3=0. At these settings the output's duty cycle will be 50%. For an input at clock cycle 4, the duty cycle is 25%. Here is a picture of the outputs of timer and PWM at 50% duty cycle: ![]() Note that the output frequency is CLK divided by 16. owen |
|
#8
| |||
| |||
| If you don't mind a little programming, you can use this: http://www.avrfreaks.net/Devices/dev...ion=1&devid=44 In addition you need one capacitor as you do for all digital circuits, and one potmeter to adjust your duty cycle in 1024 steps. You don't even need a circuit board, just solder it to your pot. It costs around $5.- in single quantity. On the same site you can find appnotes showing how to use the PWM and the ADC. You just need to "glue" the two together. |
|
#9
| |||
| |||
| If you want frequencies up to 32Khz is much easier to design a PWM with a PIC microcontroller. About your optics... if you want to cut metal, use feedback isolator. If not, you will destroy the optics in laser cavity from the reflected beam. I bought the same laser model (G-100) last February and I finish my 2m x 2m CNC laser last May. I can cut steel and s/s up to 2mm. Romos Last edited by Romos V.; 07-30-2004 at 07:41 AM. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Cycle Start button | kaleem1 | Mach Software (ArtSoft software) | 7 | 12-24-2005 02:05 PM |
| Programmable CNC I/O expansion | psevin | Product Announcements & Manufacturer News | 0 | 03-04-2004 11:49 AM |
| Programmable CNC I/O expansion | psevin | Product Announcements & Manufacturer News | 0 | 03-03-2004 12:13 PM |
| Post configuring (black art?) | John F | OneCNC | 12 | 07-18-2003 01:26 PM |