Aug 18, 2016

30 MHz DIY Signal Generator (part 1)

A year ago I started this simple, microcontroller based DIY signal generator project which was capable for approximately 60_kHz sampling rate. However, that ended up to be quite boring becase I need test signals with higher bandwidth in my projects and there's already couple of similar MCU based signal generator projects on the internet. One idea leaded to another, and now I have dual channel, 90_MS/s, 30_MHz, 16-bit self-made arbitrary waveform generator (AWG). This won't be a complete step-by-step tutorial to build a similar one, but I'll try to explain enough details to give a good overview about the system. Also, the HW design and source code will be released, if someone wants to build one or even develop it further!

Click to enlarge
The user interface (UI) is managed mostly by the Atmel ATmega microcontroller. The signal generation itself is done in FPGA, which controls also the LCD screen, and couple of other miscellaneous tasks. The digital signal goes from the FPGA to the high-performance DAC through the 2x 16-bit parallel bus, and the analog signal passes through the low-pass filter, to the high speed op-amp and output BNC connectors. The low-pass filter is needed to remove the unwanted alias frequencies.

Analog bandwidth__30 MHz
Sample rate90 MS/s
Channels2 (+one internal modulation gen. / ch.)
Voltage swing±8 V (±4 V to 50 Ω load)
WaveformsSine, Square, Triangle, Saw, Noise, Arbitrary__
ModulationFM, AM, PM, Frequency sweep
Others2.8" TFT touch screen,
3 rotary encoders,
10 MHz clock reference input (BNC),
2.5 PPM internal clock reference,
USB remote control & SW update

Click to enlarge
The first prototype was built by using a Lattice XO2 breakout board (~$25) and self-made ATmega328P development board. The DA converter was implemented with two 8-bit R2R ladder DACs. There was no LCD or control knobs attached yet, but all the commands was given via virtual COM port (FTDI FT232RL) to the MCU, which controls the FPGA via SPI bus.

Click to enlarge
The next step added the LCD screen, control knobs and a frontend low-pass filter & amplifier (TI_THS3001) testing board to the prototype. The DAC component (AD9747) was not tested in this prototype, because the breakout board just for that would have been quite expensive due to the price of the DAC IC (~$30). Instead of physical breakout board, the DAC and the analog front-end was simulated by using Agilent Advanced Design System, and the simulations ended up to match pretty well to real-world performance tests.

Click to enlarge
Download schematic:
PDF File (rev 1.0)
Proteus 7.7 Schematic file (rev 1.0)

As you may notice, there is no separate JTAG header for the FPGA, but there's a ISP header for flashing the ATmega MCU. After flashing the Chip45boot2 bootloader to the MCU, the ISP header isn't needed anymore. The Lattice XO2 breakout board has a FTDI FT2232H USB interface IC which is programmed to USB-JTAG bridge configuration. The same IC is utilized also in this design, but more of that, it has also a USB-UART bridge functionality, so both, the MCU and the FPGA can be programmed via the single USB connector. The USB-UART bridge also allows the debugging and remote control features for the MCU.

The schematic design of the front panel leds & knobs may look a bit strange at the beginning, but the idea was to use as few MCU pins as possible for controls. All of the signal wires are connected to ADC pins of the MCU, which switches these pins very rapidly between the input mode (reading the values of knobs) or the output mode (feeding current to the leds). Depending on the voltage value, the MCU deduces the position of the switches. More common way would have been to place an extra MCU to front panel PCB for knobs & leds and the communication would pass through I2C bus, but again, this solution was chosen to keep the design as simple as possible (and to try something new). As an after thought, it works quite ok after tuning the ADC treshold values, but in my next AWG project I'd use a separate MCU for controls.

As the XO2 FPGA has a quite nice clock manipulation features built-in, I used a temperature compensated crystal to provide an accurate clock reference for the signal generator core. However, if even that isn't accurate enough or the clock of the different devices needs to be synchronized, there's also a input BNC connector for the external 10 MHz clock reference, and the internal clock MUX of the FPGA selects the clock, that is selected from the UI menu.

To keep the design as simple as possible, there is no variable gain amplifier or even separate DAC for offset leveling. This compromises in the resolution of the AWG, since the smallest possible voltage step is 16_V_/_2^16_=_0.24_mV in any voltage or offset scale.

Click to enlarge
The design was fitted into 50 x 100 mm 2-layer PCB, which was ordered from ITead Studio. There was only one bug, which was easily corrected with a piece of copper wire, so I decided not to order a new revision. Also the 5 V linear regulator, next to the power connector was replaced with SMPS module, which gives a lot better efficiency. The front-end op-amps still have linear regulator for the best possible noise performance. Power rails of the DAC are well filtered and regulated with LDO regulators, so the switching noise wouldn't pass to the signal outputs.

Click to enlarge
The project box (Bahar BDA-40004-W200) was ordered from AliExpress, and modified for all the knobs, connectors, leds and the display. The layout was designed in 3D modelling software to make sure that everything fits nicely and the placement looks logical. Someone may like separate buttons, but I'm a fanboy of rotary encoders, so there's three of them! One controls the selected menu item, another the digit of the selected value and third knob controls the value of the selected menu item/digit.

Click to enlarge
All the necessary pieces fitted into that project box. The main power supply is implemented by using IEC power connector with fuse holder & switch and 230 V to 2x15 V toroidal transformer. AC voltage goes to the PCB with fuses, MOVs (over-voltage protection), rectifier and bypass capacitors. +-21 VDC voltage passes to main PCB. The transformer with 2x 10-12 VAC outputs would be ideal, but I happened to have this 15 VAC model already, so it shall be good enough, althoug the output voltage is a bit high.

WARNING - Do not attempt construction of the power supply if you do not know how to wire mains equipment.

Well, that was quite broad description about the project. The Part 2 will include the PCB design files, source code, description about the program and performance measurements. Please, Tell me in the comments, what else you want to be included into Part 2!

45 comments:

  1. The blog is nice, but arabic people can't benefit from site because content is not arabic, so for arabic content about electronic circuits you can find it الكترونيك بابل

    ReplyDelete
    Replies
    1. hi Petteri Liikkanen
      I am very happy with your article it's very useful to me.
      I will give you some advice, you should remove any comment that contains links in your posts like comments above. this links not good for you in google ranking.
      thank you.

      Delete
    2. This so quite interesting and enlightening. Thanks fro this

      https://www.pawnerspaper.com/2021/10/biyi-bandele-shares-some-interesting.html
      https://www.pawnerspaper.com/2021/10/tales-from-moonlit-path-halloween.html
      https://www.pawnerspaper.com/2021/09/2021-vi-international-flash-fiction.html
      https://www.pawnerspaper.com/2021/09/the-brunel-international-african-prize.html

      Delete
  2. Thank you for this excellent project! Do you have an idea when the second part could be expected? I am just so anxious about trying it out.

    ReplyDelete
    Replies
    1. Thanks! Good to hear that there's interest for part 2. Lately I've got time only for smaller projects, but I'll try to write the part 2 when possible. Also the program works but is still quite..lets say..spaghetti code. Would be nice to release a bit more refined version, but we'll see.. :) It won't be a complete step-by-step guide, but I think that anyone with good electronics knowledge should be able to at least reproduce it. If you have a Twitter, I'll inform about my new posts also there.

      Delete
    2. First of all very nice project... I want to build that machine too :). But can you please make part 2 of the project i really need code and gerber files to build it...
      Kind Regards

      Delete
  3. Electronic advancements has improved the quality of technical standards. This generator looks a good addition in the computers technology. I hope we wll soon see the next version of it with more capacity.

    ReplyDelete
  4. Is this project still going on? Very nice project.

    ReplyDelete
  5. where is part 2 this project is so exquisit

    ReplyDelete
  6. How many samples per wave ? What is max and min frequency ? How do you handle sample rate below 1Hz. Do you store samples in the memory or compute them ? Thanks for sharing

    ReplyDelete
  7. This comment has been removed by the author.

    ReplyDelete
  8. I really loved reading your blog. It was very well authored and easy to undertand. Unlike additional blogs I have read which are really not tht good. I also found your posts very interesting. In fact after reading, I had to go show it to my friend and he ejoyed it as well!

    Customized UV Lamp Ballast

    ReplyDelete
  9. Great Article… I love to read your articles because your writing style is too good, its is very very helpful for all of us and I never get bored while reading your article because, they are becomes a more and more interesting from the starting lines until the end.

    Pump Station Monitoring

    ReplyDelete
  10. Excellent blog & I love your
    latest foreign Music you have a good work here... It's hard to find good quality writing like yours nowadays..
    Naija Entertainment
    Excellent blog & I love your
    latest naija Music

    ReplyDelete
  11. Xcluciveoffer
    buy the latest electronics product at here.Choose form a wide range of Electronics products at xcluciveoffer.
    Click now
    Shop now

    ReplyDelete
  12. hey Hi
    I hope u be as well as always
    Would you pls tell more about what is going on inside the FPGA?
    TNQ

    ReplyDelete


  13. Xcluciveoffer
    Buy latest all producta has 50% discount only on give to Xcluciveoffer.this site has branded products.
    you cn buy only on best online shopping site in
    India Xclucvioffer.com
    Click
    Shop now

    ReplyDelete
  14. https://nishitnathwani.blogspot.com/?m=1
    Here I have also giving good technical information is shared.

    ReplyDelete
  15. Are you looking for trusted online marketplace?
    Then you must visit this site.
    Please visit: yosells.com

    ReplyDelete
  16. Thanks for this wonderful and amazing information, Kudos to your team

    Wasiu Ayinde Songs
    Wizkid Songs
    Buy Data Online

    ReplyDelete
  17. HACK ANY WHATSAPP ACCOUNT

    HACK ANY INSTAGRAM ACCOUNT ,
    HACK FACEBOOK ACCOUNT,
    READ OTHER PHONE SMS,
    HACK TELEGRAM ACCOUNT,
    HACK VIBER ACCOUNT
    HACK WECHAT ACCOUNT
    HACK HANGOUT CHAT ACCOUNT
    HACK ANY SOCIAL MEDIA ACCOUNT,
    SPY ON YOUR CHEATING PARTNER (HUSBAND/WIFE)
    contact me : putro9111@gmail.com
    Telegram: https://t.me/Hackord247
    Phone: +1(914) 278-7320


    HACK N'IMPORTE QUEL COMPTE WHATSAPP

    HACKER TOUT COMPTE INSTAGRAM,
    COMPTE HACK FACEBOOK,
    LIRE D'AUTRES SMS TÉLÉPHONIQUES,
    COMPTE TÉLÉGRAMME HACK,

    COMPTE HACK VIBER

    COMPTE HACK WECHAT

    COMPTE CHAT HACK HANGOUT

    HACK N'IMPORTE QUEL COMPTE DE MÉDIAS SOCIAUX,
    ESPIONNEZ VOTRE PARTENAIRE TRICHEUR (MARI / FEMME)
    contactez-moi: putro9111@gmail.com

    Télégramme: https://t.me/Hackord247

    Téléphone: +1 (914) 278-7320


    هاك أي اختراق أي حساب واتساب

    اختراق أي حساب في انستغرام ،
    حساب FACEBOOK ،
    قراءة الرسائل القصيرة للهواتف الأخرى ،
    هاك حساب التليغرام ،

    حساب الاختراق

    هاك حساب WECHAT

    اختراق حساب دردشة Hangout

    اختراق أي حساب لوسائل الإعلام الاجتماعية ،
    تجسس على شريكك في الخداع (الزوج / الزوجة)
    اتصل بي: putro9111@gmail.com

    برقية: https://t.me/Hackord247

    هاتف: +1 (914) 278-7320



    HACKEAR CUALQUIER CUENTA DE WHATSAPP

    HACK CUALQUIER CUENTA DE INSTAGRAM,
    HACK FACEBOOK CUENTA,
    LEER OTRO TELÉFONO SMS,
    HACK CUENTA DE TELEGRAMA,

    CUENTA HACK VIBER

    HACK WECHAT CUENTA

    HACK HANGOUT CHAT CUENTA

    HACKEAR CUALQUIER CUENTA DE MEDIOS SOCIALES,
    ESPIA A TU SOCIO ENGAÑOSO (MARIDO / ESPOSA)
    contáctame: putro9111@gmail.com

    Telegrama: https://t.me/Hackord247

    Teléfono: +1 (914) 278-7320


    拥有任何WHATSAPP帐户

    拥有任何INSTAGRAM帐户,
    HACK FACEBOOK帐户,
    阅读其他手机短信,
    骇客电话帐户,

    HACK VIBER帐户

    黑客微信帐号

    HACK环聊聊天帐户

    拥有任何社交媒体帐户,
    窥探您的作弊伙伴(丈夫/妻子)
    与我联系:putro9111@gmail.com

    电报:https://t.me/Hackord247

    电话:+1(914)278-7320



    ਕੋਈ ਵੀ ਵਟਸਐਪ ਖਾਤੇ ਹੈਕ

    ਕੋਈ ਵੀ ਇੰਸਟਾਗ੍ਰਾਮ ਅਕਾਉਂਟ ਹੈਕ ਕਰੋ,
    ਹੈਕ ਫੈਸਬੁੱਕ ਖਾਤਾ,
    ਹੋਰ ਫ਼ੋਨ ਐਸਐਮਐਸ ਪੜ੍ਹੋ,
    ਹੈਕ ਟੈਲੀਗ੍ਰਾਮ ਖਾਤਾ,

    ਹੈਕ VIBER ਖਾਤਾ

    ਹੈਕ WECHAT ਖਾਤਾ

    ਹੈਕ ਅਕਾਉਂਟ ਅਕਾਉਂਟ

    ਕੋਈ ਵੀ ਸਮਾਜਿਕ ਮੀਡੀਆ ਖਾਤਾ ਹੈਕ,
    ਆਪਣੇ ਚੀਟਿੰਗ ਪਾਰਟਨਰ 'ਤੇ ਜਾਸੂਸੀ ਕਰੋ (ਪਤੀ / ਪਤਨੀ)
    ਮੇਰੇ ਨਾਲ ਸੰਪਰਕ ਕਰੋ: putro9111@gmail.com

    ਟੈਲੀਗਰਾਮ: https://t.me/Hackord247

    ਫੋਨ: +1 (914) 278-7320


    WHATSAPPアカウントをハック

    インスタグラムアカウントをハック
    ハックフェイスブックアカウント、
    他の電話SMSを読む、
    ハッキングテレグラムアカウント、

    ハックバイバーアカウント

    ハックWECHATアカウント

    Hang Hangout Chatアカウント

    ソーシャルメディアアカウントをハックする、
    あなたの浮気パートナーをスパイ(HUSBAND / WIFE)
    私に連絡してください:putro9111@gmail.com

    電報:https://t.me/Hackord247

    電話:+1(914)278-7320




    HACKEN SIE JEDES WHATSAPP-KONTO

    HACK JEDES INSTAGRAM-KONTO,
    HACK FACEBOOK-KONTO,
    LESEN SIE ANDERE TELEFON-SMS,
    HACK TELEGRAM ACCOUNT,

    HACK VIBER ACCOUNT

    HACK WECHAT-KONTO

    HACK HANGOUT CHAT-KONTO

    HACK JEDES SOZIALMEDIENKONTO,
    Spionieren Sie Ihren betrügerischen Partner aus (EHEMANN / EHEFRAU)
    Kontaktieren Sie mich: putro9111@gmail.com

    Telegramm: https://t.me/Hackord247

    Telefon: +1 (914) 278-7320



    Взломать любой аккаунт

    Взломать любой аккаунт INSTAGRAM,
    HACK FACEBOOK АККАУНТ,
    ПРОЧИТАЙТЕ ДРУГОЙ ТЕЛЕФОН СМС,
    HACK TELEGRAM ACCOUNT,

    HACK VIBER ACCOUNT

    HACK WECHAT АККАУНТ

    HACK HANGOUT ЧАТ СЧЕТ

    Взломайте любой аккаунт в социальных сетях,
    ПОПИСЫВАЙТЕСЬ НА МОЕГО ПАРТНЕРА (МУЖ / ЖЕНА)
    свяжитесь со мной: putro9111@gmail.com

    Telegram: https://t.me/Hackord247

    Телефон: +1 (914) 278-7320




    HACK QUALQUER CONTA DO WHATSAPP

    HACK QUALQUER CONTA INSTAGRAM,
    CONTA do HACK FACEBOOK,
    LEIA OUTRO TELEFONE SMS,
    CONTA DE TELEGRAMA HACK,

    CONTA HACK VIBER

    HACK WECHAT CONTA

    CONTA HACK HANGOUT CHAT

    Hackear qualquer conta de mídia social,
    ESPIÃO NO SEU PARCEIRO TRAVANTE (MARIDO / ESPOSA)
    entre em contato comigo: putro9111@gmail.com

    Telegrama: https://t.me/Hackord247

    Telefone: +1 (914) 278-7320




    किसी भी व्हाट्सएप खाते को हैक करें

    किसी भी INSTAGRAM खाते को खोलें,
    हैक बुक खाता,
    अन्य फोन एसएमएस पढ़ें,
    हैक टेलीग्राम खाता,

    हैक VIBER खाता

    हैक WECHAT खाता

    HAT HANGOUT CHAT ACCOUNT

    किसी भी सामाजिक मीडिया खाते को खोलें,
    अपने सहयोगी साझेदार (पति / पत्नी) पर जासूस
    मुझसे संपर्क करें: putro9111@gmail.com

    टेलीग्राम: https://t.me/Hackord247

    फोन: +1 (914) 278-7320

    ReplyDelete
  18. TJmart.pk is one of the Leading Online shopping store in Pakistan that deals in all kinds of batteries, power banks, latest gadgets and etc.

    ReplyDelete
  19. This is an informative post review. I appreciate your efforts and all the best. I am so pleased to get this post article and nice information. I was looking forward to getting such a post which is very helpful to us. Best Steam Presses A big thank for posting this article on this website.

    UV Lamp Manufacturer

    ReplyDelete
  20. Always i love any technical blog but here i found a wonderful blog about technical part.

    ReplyDelete
  21. Can You upload complete source code? It's possible?

    ReplyDelete
  22. I saw this very good post of yours and I liked it very much, I do not know how to praise it, I would just like to say that this post is one of the posts that I like very much and I am very happy to see these posts.
    escort service gurugram
    call girl gurugram
    Gurugram Escorts
    Gurugram escorts

    ReplyDelete
  23. Home Automation Ideas with Tutorials: from Simple to Amazing,Tips For Home Automation Ideas about Lifestyle , kids care ,your pets, Healthcare and all about you.

    ReplyDelete
  24. Need an hacker for hire? need to keep an eye on your spouse by gaining access to their emails?, want to know what your kids do on social networks? Whatever it is, Ranging from Bank Jobs, Flipping cash,Taxes. He can get the job done. Are you looking for help hacking into social media? change of grades? help with projects management hacking, social media hacking- Contact him via: (hackingsetting50@gmail.com)

    ReplyDelete
  25. Need an hacker for hire? need to keep an eye on your spouse by gaining access to their emails?, want to know what your kids do on social networks? Whatever it is, Ranging from Bank Jobs, Flipping cash,Taxes. He can get the job done. Are you looking for help hacking into social media? change of grades? help with projects management hacking, social media hacking- Contact him via: (hackingsetting50@gmail.com)

    ReplyDelete
  26. Really nice blog. We Super Antennas best Antenna Installation Melbourne in Australia appreciates your blog and content.

    ReplyDelete
  27. Cre8tivebot is one of the top Australian IT Company. We can help to grow your business. Best ecommerce website development at very low prices.

    ReplyDelete
  28. Nice article. Thanks for sharing. Get to know about the best hltaid004 first aid course in Australia

    ReplyDelete
  29. Thrifty Deals UK awesome communication. Package in perfect condition and exactly what expected.I am having some of Uk best deal through thriftydeals you can enjoy this offers and can send gifts With Discount Coupon to any of your relative.

    ReplyDelete
  30. very nice this website
    I have a Electronics Shop there We are Sell all kind off Electronics and House Wiring and PVC Fittings Also if anyone Thinking to Need starting a Slim Business then you can Contact with us Because We rae Sell Wholesale and retail if you want to Know More Details Please Visit my Website or Contact Kibrea Electronics House in jaintiapur Bazar

    ReplyDelete