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 rate | 90 MS/s |
Channels | 2 (+one internal modulation gen. / ch.) |
Voltage swing | ±8 V (±4 V to 50 Ω load) |
Waveforms | Sine, Square, Triangle, Saw, Noise, Arbitrary__ |
Modulation | FM, AM, PM, Frequency sweep |
Others | 2.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 |
Click to enlarge |
Click to enlarge |
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.
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.
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!
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 الكترونيك بابل
ReplyDeletehi Petteri Liikkanen
DeleteI 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.
This so quite interesting and enlightening. Thanks fro this
Deletehttps://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
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.
ReplyDeleteThanks! 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.
DeleteFirst 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...
DeleteKind Regards
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.
ReplyDeleteIs this project still going on? Very nice project.
ReplyDeletewhere is part 2 this project is so exquisit
ReplyDeleteHow 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
ReplyDeletewow 👊 very nice project
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteI 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!
ReplyDeleteCustomized UV Lamp Ballast
Download Mp3 Song Here
ReplyDeleteExcellent blog & I love your
ReplyDeletelatest 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
Xcluciveoffer
ReplyDeletebuy the latest electronics product at here.Choose form a wide range of Electronics products at xcluciveoffer.
Click now
Shop now
hey Hi
ReplyDeleteI hope u be as well as always
Would you pls tell more about what is going on inside the FPGA?
TNQ
ReplyDeleteXcluciveoffer
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
Naija Music & Videos Downloading
ReplyDeletehttps://nishitnathwani.blogspot.com/?m=1
ReplyDeleteHere I have also giving good technical information is shared.
digital marketing course Bahrain
ReplyDeleteThanks for this wonderful and amazing information, Kudos to your team
ReplyDeleteWasiu Ayinde Songs
Wizkid Songs
Buy Data Online
Always i love any technical blog but here i found a wonderful blog about technical part.
ReplyDeleteCan You upload complete source code? It's possible?
ReplyDeleteHome Automation Ideas with Tutorials: from Simple to Amazing,Tips For Home Automation Ideas about Lifestyle , kids care ,your pets, Healthcare and all about you.
ReplyDeleteNeed 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)
ReplyDeleteNeed 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)
ReplyDeleteCre8tivebot is one of the top Australian IT Company. We can help to grow your business. Best ecommerce website development at very low prices.
ReplyDeletevery nice this website
ReplyDeleteI 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
very well written and informative blog
ReplyDeletesound bar for tv Shopping Online In Pakistan
Bubble Gear Knob Black online Shopping in pakistan
buy Ordinary Vitamin C Serum Shopping Online In Pakistan
Best Laser Gaming Mouse Online shopping In Pakistan
buy Original Adidas Perfume Shopping Online In Pakistan
buy Original Bluetooth Speaker Shopping Online In Pakistan
Wireless Bluetooth Earphones Shopping Online In Pakistan
buy Original Gaming Accessories Shopping Online In Pakistan
epson scanner price in pakistan