Digitally programmable 1MHz squarewave

Hi,

I have a requirement for a digitally programmable squarewave which is nominally 1MHz but that can be digitally changed in 1kHz steps

+/-50kHz. It has to be fixed at one frequency (no dithering) and stable to +/-100Hz between 50 & 125 degC. The digital update rate is
Reply to
Daveb
Loading thread data ...

Could you use a simple PLL with a digitally programmable divider?

You can always lock to a convenient multiple of your desired output frequency.

Reply to
Spehro Pefhany

How about a dds design, with adders + latch with feedback ?. Try a search on "dds synthesiser" devices. Analog Devices most likely...

Regards,

Chris

Reply to
ChrisQ

Translation: frequency synthesizer. Some microprocessors let you apply an external clock to a counter; if you had enough counter resources with such a chip you could even implement the dividers in the micro.

The "Stable to +/- 100Hz" makes me wonder if a 74HC4046 would be good enough, or if you'd need a better synthesizer.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Do you need to implement control loops in software?
"Applied Control Theory for Embedded Systems" was written for you.
See details at http://www.wescottdesign.com/actfes/actfes.html
Reply to
Tim Wescott

An off the shelf chip might be sensible, but whomping up a DDS from scratch is likely to be pretty expensive. You'd want to contrast the cost of a DDS with a PLL-based synthesizer, though.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Do you need to implement control loops in software?
"Applied Control Theory for Embedded Systems" was written for you.
See details at http://www.wescottdesign.com/actfes/actfes.html
Reply to
Tim Wescott

Since you don't need better than ±100Hz, and have slow response needs, just steal the dual-modulus game from sigma-delta synthesizers, but don't sweat the ripple... over-filter the charge pump. ...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     |
| Analog Innovations, Inc.                         |     et      |
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    |
| Phoenix, Arizona  85048    Skype: Contacts Only  |             |
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  |
| E-mail Icon at http://www.analog-innovations.com |    1962     |

      Remember: Once you go over the hill, you pick up speed
Reply to
Jim Thompson

Guys,

Thanks for your quick replies.

I'd ruled out a standard PLL e.g. 4046 as I've come across problems in the past with stability at high temperature. I'd also ruled out a DDS chip as I couldn't find one which worked at 125degC. However, going back and looking at the AD website I came across the AD5930/2 which work up to 125degC. However as far as I can tell, these devices won't give me what I want as they seem to be aimed at fancy autonomous frequency sweeps rather than high resolution frequency control. They have a 24bit delta_f register but I can't see what the units are so I assume it's MCLK counts which won't give me any advantage to the microcontroller I/O line approach.

Jim: I could only find a Maxim device that implements a sigma-delta synthesizer but it's only good for 85degC, as are all other synthesizer type devices I've come across.

I need something that's good for 125degC and available as a smallish SMD (due to space & time an FPGA approach is out). Has anybody got any other thoughts? (it feels like I've hit a brick wall!)

Dave

Reply to
Daveb

So, use two I/O pins, one to give (for instance) 1.5 MHz, and the other to make 500 kHz plus/minus 100 kHz, in 2 kHz steps. Mix the two, then bandpass at 2 MHz, then a comparator and divide-by-two flip flop.

Reply to
whit3rd

My eyeballs kind of bounced over the "125C" part, without my brain stopping to consider the implications.

With careful chip selection (i.e., _one_ part number from _one_ vendor) you may be able to overcome the thermal problems with something like a

4046 -- but maybe not. I'd suggest rolling your own VCO, but that wouldn't fly well with "Smallish SMD" unless there's something just _fiendishly_ clever that could be done with transistor arrays.

I dunno -- I might try again with the 4046 (unless you're sure you've exhausted all the possibilities). 1MHz is a bit high for a 555 even on a good day, and you're getting things awfully toasty. You may be able to do something with a comparator and a handful of discretes, and control the temperature sensitivity the old fashioned way -- by doing lots of work yourself.

You piqued my interest: Here's a circuit for an oscillator that has a comparator, a diode, and a transistor as its only silicon content. It should work at whatever temperature you design it for, and I'll be that the phase comparator in the right 74xx4046 works better over temperature than the VCO does. You'll need to find a comparator that'll be OK at

125C and is fairly fast, but I bet they're out there.

(for LTSpice:)

Version 4 SHEET 1 880 680 WIRE 48 32 48 0 WIRE 496 64 496 32 WIRE -192 128 -192 96 WIRE 320 128 320 96 WIRE 192 144 160 144 WIRE 288 144 192 144 WIRE 416 160 352 160 WIRE 496 160 496 144 WIRE 496 160 416 160 WIRE 48 176 48 112 WIRE 160 176 48 176 WIRE 240 176 160 176 WIRE 288 176 240 176 WIRE 48 192 48 176 WIRE -192 224 -192 208 WIRE 320 224 320 192 WIRE 240 288 240 176 WIRE 288 288 240 288 WIRE 496 288 496 160 WIRE 496 288 368 288 WIRE 48 304 48 272 WIRE 192 336 192 144 WIRE 192 336 96 336 WIRE 96 352 96 336 WIRE 192 384 192 336 WIRE 288 384 192 384 WIRE 400 384 368 384 WIRE 496 384 496 288 WIRE 496 384 464 384 WIRE 32 400 -32 400 WIRE 192 400 192 384 WIRE -32 480 -32 400 WIRE 96 480 96 448 WIRE 192 480 192 464 WIRE -32 592 -32 560 WIRE 96 592 96 560 FLAG -192 224 0 FLAG 320 224 0 FLAG -192 96 +5V FLAG 320 96 +5V FLAG 48 304 0 FLAG 48 0 +5V FLAG -32 592 0 FLAG 496 32 +5V FLAG 416 160 Vcmp FLAG 160 176 V+ FLAG 160 144 V- FLAG 192 480 0 FLAG 96 592 0 SYMBOL voltage -192 112 R0 WINDOW 123 0 0 Left 0 WINDOW 39 0 0 Left 0 SYMATTR InstName V1 SYMATTR Value 5 SYMBOL res 32 16 R0 SYMATTR InstName R1 SYMATTR Value 10k SYMBOL res 32 176 R0 SYMATTR InstName R2 SYMATTR Value 10k SYMBOL voltage -32 464 R0 WINDOW 3 -217 163 Left 0 WINDOW 123 0 0 Left 0 WINDOW 39 0 0 Left 0 SYMATTR InstName V2 SYMATTR Value PULSE(1.2 1 0 1u 1u 50u 100u) SYMBOL res 384 272 R90 WINDOW 0 0 56 VBottom 0 WINDOW 3 32 56 VTop 0 SYMATTR InstName R3 SYMATTR Value 4.7k SYMBOL res 480 48 R0 SYMATTR InstName R4 SYMATTR Value 1k SYMBOL res 384 368 R90 WINDOW 0 0 56 VBottom 0 WINDOW 3 32 56 VTop 0 SYMATTR InstName R5 SYMATTR Value 1k SYMBOL cap 176 400 R0 SYMATTR InstName C1 SYMATTR Value 47p SYMBOL Comparators\\LT1721 320 96 R0 SYMATTR InstName U1 SYMBOL diode 464 368 R90 WINDOW 0 0 32 VBottom 0 WINDOW 3 32 32 VTop 0 SYMATTR InstName D1 SYMATTR Value 1N4148 SYMBOL npn 32 352 R0 SYMATTR InstName Q1 SYMBOL res 80 464 R0 SYMATTR InstName R6 SYMATTR Value 2.2k TEXT -136 -80 Left 0 !.tran 100u

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Do you need to implement control loops in software?
"Applied Control Theory for Embedded Systems" was written for you.
See details at http://www.wescottdesign.com/actfes/actfes.html
Reply to
Tim Wescott

What I had in mind was rolling your own...

Get one of my old MC4024's, or roll a discrete equivalent

Make your PFD from 74HC74's

Use programmable counters to get dual-modulus

But it looks like you are limited on space :-( ...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     |
| Analog Innovations, Inc.                         |     et      |
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    |
| Phoenix, Arizona  85048    Skype: Contacts Only  |             |
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  |
| E-mail Icon at http://www.analog-innovations.com |    1962     |

      Remember: Once you go over the hill, you pick up speed
Reply to
Jim Thompson

You wouldn't need need dual modulus for this -- 1MHz in 1kHz steps is a divider value of 1000, which is pretty modest for a frequency synthesizer.

Anything with a multivibrator is going to have a Really Crappy phase noise characteristic, but maybe that's OK?

I would expect that the phase comparator from a 74HC4046 would still be working long after its VCO had croaked from the heat.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Do you need to implement control loops in software?
"Applied Control Theory for Embedded Systems" was written for you.
See details at http://www.wescottdesign.com/actfes/actfes.html
Reply to
Tim Wescott

Shaky for direct.

So use an MC1648 ;-)

As long as it's 74HC... Old 4000-series stuff will croak. ...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     |
| Analog Innovations, Inc.                         |     et      |
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    |
| Phoenix, Arizona  85048    Skype: Contacts Only  |             |
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  |
| E-mail Icon at http://www.analog-innovations.com |    1962     |

      Remember: Once you go over the hill, you pick up speed
Reply to
Jim Thompson

Certainly, but I charge $280.00 per hour to do other people's homework

Good Luck! Rich

Reply to
Rich Grise

Probably the easiest would be to use an Analog Devices DDS chip, a modest lowpass filter, and a comparator. Some of the parts include the comparator.

John

Reply to
John Larkin

"Daveb" a écrit dans le message de news: snipped-for-privacy@k38g2000vbn.googlegroups.com...

If you can dedicate a significant part of the processor CPU cycles to the signal generation then you can probably simply implement a DDS generator in software :

- Configures a timer for a periodic interrupt, say 4 or 6MHz

- At each interrupt, calculates the DDS phase using for example a 32-bit phase accumulator and gets the corresponding snie through a small look-up table. It shouldn't require more than some tens of instructions.

- Outputs the corresponding sine value on a crude DAC, for example using a R2R resistor network hooked on a couple of I/O pins (2 or 3 bits may be enough)

- Adds a clean 1.2MHz low pass filter, the best you can get with your space constraints, and a comparator to get a square signal

As your filter will not be perfect you will get a significant phase noise, but sub-Hertz resolution will not be a problem and frequency stability will be as good as the main crystal.

I wrote an article on DDS and in particular on software-based DDS in Circuit Cellar some time ago (CC #217, August 2008), may be it could help you ?

Yours,

--
Robert Lacoste
ALCIOM - The mixed signal experts
www.alciom.com
Reply to
Robert Lacoste

"Robert Lacoste" a écrit dans le message de news: 4d64b48e$0$32429$ snipped-for-privacy@reader.news.orange.fr...

A small correction : just looking again at the required CPU performances my proposed bit-banging DDS approach may be a little tricky for this specific application (1MHz output gives 3MHz minimum DDS clock frequency, with a

80MHz processor this gives only 26 clock cycles per DDS clock). If the processor is a 32 bit RISC then it may be still possible but using carefully assembly-optimized code...

Robert

Reply to
Robert Lacoste

Guys,

After being prompted to revisit the DDS approach, I think I've found the ideal device, the AD5932. Its a tiny 16pin TSSOP that is spec'd for 125degC and although the datasheet isn't particularly enlightening (to me at least) Analogs' design tool

formatting link
dtDDSWeb/dtDDSMain.aspx) suggests it would fit the bill.

Again, thanks for all the suggestions except Mr Rich Grice who suggests that you're all doing my 'homework' for me! Well Mr Grice, you must be one of those people who were born with knowledge of everything and have never needed to ask anyone anything? I'm not and obviously not as clever as you. I've spent quite some time looking for a solution to this problem with its constraints. I wasn't happy with my original solution so I thought I'd ask others who have more experience (and are more clever) than me. Please keep your flippant comments to yourself and your rich clients!

Dave

Reply to
Daveb

Robert Lacoste a écrit :

Why does everybody want him to use an LPF when all he wants is just 1MHz

+/- 50kHz? With a BPF, centered on 1MHz he'll have a much better reconstruction.
--
Thanks,
Fred.
Reply to
Fred Bartoli

Someone suggested a divider and a constant-frequency signal, mixed to get 1MHz. I'm thinking a constant-frequency signal mixed with a DDS output would work nicely, too, as long as you have that BPF.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Do you need to implement control loops in software?
"Applied Control Theory for Embedded Systems" was written for you.
See details at http://www.wescottdesign.com/actfes/actfes.html
Reply to
Tim Wescott

If all you want is a square wave, and you can tolerate one IRQ worth of p-p jitter, you can just use the MSB of the phase accumulator. No sine lookup, dac, no filter, no comparator. That would just be a few lines of code.

John

Reply to
John Larkin

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.