Function Generator - Arduino Nano (Atmega 328) and XR2206 based. - Page 1
Forum section: electronics / projects

author: No.Mad
author_rank: Regular Contributor
timestamp: September 20, 2020, 09:20:34 pm
content: Hello everyone,I was recently working on function generator for in-house use. I made it just to give it a shot as mostly I was doing electronics from Arduino and various modules from EBay and so on.Any critique and pointers are welcomed (both in case of component selection and operation as well in schematic capture). Schematics in attachment.

author: MarkF
author_rank: Super Contributor
timestamp: September 20, 2020, 10:46:48 pm
content: I would use a DDS module instead.Take a lot at this thread:Looking for <$50 function generatorYou can buy an AD9834 module and drive it with an Arduino. Or build your own based on the AD9834.

author: ledtester
author_rank: Super Contributor
timestamp: September 20, 2020, 11:44:02 pm
content: Having a display showing the frequency of the signal would be convenient.This project video goes quite in depth behind a similar idea of controlling a XR2206 via a microcontroller - especially with regard to frequency selection:https://youtu.be/ZCdTxRASqiQBefore that he did a simpler XR2206-based project, and there is quite a bit of useful tips on how to trim the feedback loop of the op-amps to get a better looking signal:https://youtu.be/D3OGcUU1oGE?list=PLUMG8JNssPPwjMZ0eUjj5Zahx2yjz6Alo&index=1

author: Renate
author_rank: Super Contributor
timestamp: September 20, 2020, 11:56:41 pm
content: I prefer an ATMega32u4 (with USB) and an AD9850 DDS.I was looking at the single pot for sine adjust and realized that I hadn't ever used an XR2206.I built a Southwest Technical Products (SWTPC) fun generator that used two separate pots for + and - sine adjust.I'm so confused because this article from Don Lancaster shows an XR205.https://www.tinaja.com/glib/rad_elec/funct_gen_9+10_72.pdfI was pretty sure mine was an Intersil 8038.Edit: Ah, in 1973 it switched to the 8038.Your diagram says "XP2206".

author: ledtester
author_rank: Super Contributor
timestamp: September 21, 2020, 12:20:50 am
content: Quote from: Renate on September 20, 2020, 11:56:41 pmSouthwest Technical Products - that logo of theirs! I remember seeing their ads all the time in Byte magazine. Don Lancaster - TV Typewriter - what a blast from the past!

author: Renate
author_rank: Super Contributor
timestamp: September 21, 2020, 12:25:02 am
content: Quote from: ledtester on September 21, 2020, 12:20:50 amDon Lancaster is a pretty good sport, he's put his old books up for free download.https://www.tinaja.com/ebksamp1.shtmlEdit: I had the SWTPC FG-2 function generator, a later edition with the ICL8038, it was still "new" by January 1974.http://www.piratenpraten.nl/schemas/Amtron/SWTPC/SWTPC%20Function%20Generator.pdf

author: Mechatrommer
author_rank: Super Contributor
timestamp: September 21, 2020, 12:55:20 am
content: once i built my DDS9850 that served me for few years until i bought a Uni-T AWG .its using $10 AD9850 module controlled from atTiny13A and adjustable output offset, magnitute etc and output to THS4631 opamp.

author: No.Mad
author_rank: Regular Contributor
timestamp: September 21, 2020, 04:02:25 pm
content: Thank you everyone for pointing me to AD9850 solution, I think I will do that one nextQuote from: ledtester on September 20, 2020, 11:44:02 pmI didn't know Scullcom did it already I had to miss it somehow. I knew I should put Schmidt on square output. Btw, love his clips on YT, he goes on such length to explain stuff. Cheers!Quote from: Mechatrommer on September 21, 2020, 12:55:20 amIt looks really neat. I hope you won't mind if I use your solution?I decided to do FG based on XR2206 (or it's clone XP2206) as I have two of these ICs. It was choice between XR2206 and MAX038. And I really wanted to try doing something more complicated from literall scratch.Regards,No.Mad

author: Mechatrommer
author_rank: Super Contributor
timestamp: September 21, 2020, 04:38:58 pm
content: Quote from: No.Mad on September 21, 2020, 04:02:25 pmits not anyone's solution. i believe anyone can do better than me. the analog trimpot control was crude, slightly touching the trimpots making the output signal jumped nastily, maybe some loose contact or body capacitance got coupled to the signal, not really sure. its suggested to use digital control from mcu but more components will be needed, i was just want to be quick. what i'm afraid is soon enough, you'll want pass the 1MHz limit that XR2206 can give, AD9850 can go to 30-50MHz down to near DC and audio range. ymmv.

author: HB9EVI
author_rank: Frequent Contributor
timestamp: September 21, 2020, 05:43:03 pm
content: to call a XR2206 setup 'Function Generator' is a crude definition for 2020.even a dirt cheap AD9833 module board can reproduce all 3 wave types (sine/tri/square) better than the XR2206 ever did; the AD9834 is doing the same for a few bucks more and this up to the 10MHz-rangesure, it's everybodys free choice, but I wouldn't waste time and material for such a prehistoric chip

author: MarkF
author_rank: Super Contributor
timestamp: September 21, 2020, 07:01:56 pm
content: Quote from: HB9EVI on September 21, 2020, 05:43:03 pmThe advantage of the AD9834 over the AD9833 is that you can easily implement an amplitude adjustment with a pot or DAC.

author: HB9EVI
author_rank: Frequent Contributor
timestamp: September 22, 2020, 02:48:26 pm
content: jep, that's +1 for the AD9834, the second +1 is the higher MCLK frequency

author: David Hess
author_rank: Super Contributor
timestamp: September 22, 2020, 11:02:58 pm
content: QuoteQuote from: MarkF on September 20, 2020, 10:46:48 pmI might do a discrete analog design and phase lock the frequency to a DDS for simplicity. I definitely would not use an integrated analog function generator because it is too easy to make a discrete implementation with better performance.

author: No.Mad
author_rank: Regular Contributor
timestamp: October 27, 2020, 06:03:36 pm
content: Now you've done it. I didn't know about AD9850 at the beginning.For now I designed plug-in module board. Now I have to do Motherboard and PSU. I would like to do 2 channel based on AD9850 with neat LCD display.Well everybody, it's your faultRegards,No.Mad

author: Renate
author_rank: Super Contributor
timestamp: October 28, 2020, 12:52:10 am
content: Mmm, don't you want to use the same crystal oscillator for all the synthesizers?It will make it easier to lock them and to adjust the calibration.OTOH, Analog Devices has tons of DDS chips with multiple outputs so that you can easily do quadrature or specific phases or phase modulation.