ATmega 32u4 and AD9833 based function generator  - Page 1
Forum section: electronics / projects

author: Gabriel
author_rank: Regular Contributor
timestamp: June 09, 2020, 01:57:33 pm
content: Hi All,I have designed this small function generator loosely based on this articlehttps://www.allaboutcircuits.com/projects/how-to-DIY-waveform-generator-analog-devices-ad9833-ATmega328p/and I was wondering if someone would look over it with a fresh set of eyes for any blinding errors. I have triple checked it and run the ERC but as this is my first "larger" scale project and I don't fully trust myself (yet).Many Thanks,Gabriel

author: moffy
author_rank: Super Contributor
timestamp: June 10, 2020, 12:31:45 am
content: Looks pretty good except for a few problems:1. The output of the DDS DAC needs a substantial low pass filter to get rid of the high frequency noise. Look at some of the other DDS data sheets for examples.2. The LM7322 only has 20MHz GBW when you can be dealing with a signal up to 12.5MHz. You need an opamp with a GBW 5 to 10x that of the LM7322.3. The 100nf caps on the rotary encoder seem a little large, perhaps 10nf? Not sure about this, you might be correct.

author: MarkF
author_rank: Super Contributor
timestamp: June 10, 2020, 02:26:23 am
content: Take a look at another thread with my AD9834 Function Generator:Looking for <$50 function generatorA better op-amp on the output would be the LM7171 which has 100mA output current.However, even the LM7171 will NOT be able to drive a 50Ω load at full voltage.Actually, you are not even setting a 50Ω output.As said, you need at least a small reconstruction filter on the output.I only did a 2nd one. But, you may want a sharper roll off.Filter design:https://www-users.cs.york.ac.uk/~fisher/lcfilter/Also a said, the capacitors on the encoder are too big and you are missing two resistors.See my design straight from the PEC11 Encoder datasheet.I would use a higher clock frequency for the AD9833 if you want frequencies above 1MHz.Never mind, 25MHz is the maximum.

author: Gabriel
author_rank: Regular Contributor
timestamp: June 10, 2020, 02:32:33 am
content: Quote from: moffy on June 10, 2020, 12:31:45 amThanks for the feedback! I'm not sure about the low pass filter or how to design it, and the datasheet for the AD9833 isn't much help as it doesn't mention it at all.I tired a quick parametric search for a op-amp that would meet the requirements (+-12V, preferably rail-to-rail and now with the high GBW) and I didn't really find anything. Do you have any recommendations that I could use in place of the LM7322?I just copied a diagram of the internet for the rotary encoder and used that. I also had a rotary encoder (component without the module) lying around so I tried it out and it works fine... You might be right it might not be optimal.

author: Gabriel
author_rank: Regular Contributor
timestamp: June 10, 2020, 02:55:36 am
content: Quote from: MarkF on June 10, 2020, 02:26:23 amOk cool, thanks for your reply! I just read your reply now.As for the op-amp do you have any recommendations that could supply the 600-odd mA required for the 50Ω loading while still having the right GBW and all? Or any good workarounds for it?I just looked at the link and that looks like it will work for me to calculate the filter. Is there any advantage of having the sharper roll-off. Also, the impedance would be 50Ω and the corner frequency is 12.5MHz, right?I'll have a look at the encoder datasheet and redraw that section then.

author: MarkF
author_rank: Super Contributor
timestamp: June 10, 2020, 03:30:15 am
content: I read somewhere showing how to parallel LM7171 op-amps for more current but can't find it.Maybe look at through-hole parts for better heat dissipation.The SOIC-8 part can only go to about 2Vpp into a 50Ω load.I only did a 2nd order filter.The AD9834 boards on eBay appear to have a 6th order.Here is a quick run of a 6th order series filter with the online program:You may want to play around with standard values to see how it changes.Remember the square waveform of the AD9833 DDS also will go through the filter.The filter will round over the edges. To_filter or Not_to_filter. That is the question...

author: Gabriel
author_rank: Regular Contributor
timestamp: June 11, 2020, 12:01:24 am
content: Ok here is an updated schematic with the filter added along with the updated rotary encoder and also a readback for the switch. I am still struggling to find an appropriate op-amp... I would need to parallel 6 of the LM7171s to get the required 600mA, and I don't really think that is a viable option. Especially as I would need 12 altogether (6 each for the offset and amplitude). Any suggestions or is it just not worth the hassle?EDIT: I forgot to attach the file oops

author: glentek
author_rank: Regular Contributor
timestamp: June 11, 2020, 12:36:11 am
content: Itead had a similar unit for sale 10 years ago - I bought one but really never got around to using it. Have a look, might give you some ideas.https://www.itead.cc/blog/iemp-dds-signal-generator-in-stock-and-data-release

author: MarkF
author_rank: Super Contributor
timestamp: June 11, 2020, 02:16:21 am
content: Quote from: Gabriel on June 11, 2020, 12:01:24 amAlmost there:Encoder: The capacitors are in the wrong place.Output filter: R2 from the design tool is your 50Ω load.Basically, you have it backwards.

author: Gabriel
author_rank: Regular Contributor
timestamp: June 11, 2020, 02:28:29 am
content: Ok my bad, I corrected both errors.

author: MarkF
author_rank: Super Contributor
timestamp: June 11, 2020, 02:34:37 am
content: One enhancement that you may be interested in having is a frequency sweep.You can do this by having the Atmega update the AD9833's frequency from an interrupt.With a fixed interrupt, you calculate a delta freq. per update and a sweep period.At the end of the sweep period, you reset the AD9833 freq. back to the initial value and start sweeping again.With a positive delta you can sweep up and with a negative delta you can sweep down.It works very well with not much math.I also generated a "start_of_sweep" pulse with an unused I/O pin for a trigger.

author: MarkF
author_rank: Super Contributor
timestamp: June 11, 2020, 02:41:24 am
content: A second nice_to_have is a PWM output.You can do this with a second unused I/O pin on the Atmega.You should buffer this output to another output connector.(I would not merge it into the AD9833 output.)Food for thought before you have a PCB made.All this starts to add up code-wise and how efficient you coding skills are.I used a graphical display which burnt up a lot of my program space.

author: Gabriel
author_rank: Regular Contributor
timestamp: June 11, 2020, 02:59:55 am
content: These definitely feature that I may add, even if I don't end up coding it in it is still nice to have on the PCB for future expansion. I also plan to implement SCPI at least to a basic level (hence the 32u4 for the USB). I am using a standard 20x4 LCD so I am doing fine. The code currently takes up 8920 bytes (of 28672) without any optimisation and TBH my code is a bit of a mess...

author: MarkF
author_rank: Super Contributor
timestamp: June 11, 2020, 03:14:37 am
content: Quote from: Gabriel on June 11, 2020, 02:59:55 amJust for comparison, I used 32621 of 32768 bytes in my PIC18F2550.

author: Gabriel
author_rank: Regular Contributor
timestamp: June 11, 2020, 03:21:04 am
content: Oh wow, good job!I still have plenty more to write so we'll see how I go

author: Gabriel
author_rank: Regular Contributor
timestamp: June 13, 2020, 08:17:33 am
content: Ok, I have looked further into the op-amp question. The only ones that I can really find that would suit all the requirements are xDSL interface op-amps. Here is the selection chart from AD:https://www.analog.com/en/parametricsearch/11070#/d=5002|2687|4502|300|4501|4101|4500|4108|2839|2840|s3|s5&p5002=600m|2&p4502=100M|4G&p2840=24|220&p2687=|2The only issue with these is that I have found them extremely hard to source and where I could find them they are very expensive, somewhere over AUD$20 ($13 Yankee bucks)...I am starting to consider whether it is worth trying to get another op-amp with more current or if I should just stick to the current one (LM7171 as suggested by MarkF).Anyway, apart from that dilemma I think I can move onto making the PCB for it. I have implemented a pin for the sweep trigger and the PWM just as headers on the board just in case I need it. Thanks for the idea Mark!

author: MarkF
author_rank: Super Contributor
timestamp: June 13, 2020, 03:35:04 pm
content: Which ever op-amp you go with, it might be worth considering a through hole part simply because they are bigger with better heat dissipation. There are ones with a thermal pad in the center but difficult (if not impossible) to hand solder.

author: Gabriel
author_rank: Regular Contributor
timestamp: June 14, 2020, 12:44:24 am
content: Here is the 3rd version of the schematic, now with the PWM, sweep trigger and the opamps swapped to the LM7171s. I decided it isn't worth the huge extra cost to get the high current op-amps.

author: MarkF
author_rank: Super Contributor
timestamp: June 14, 2020, 01:56:11 am
content: Your filter on the output is still NOT correct.The LC components are reversed left-to-right.Without checking the ATmega 32u4, the pin used for PWM is capable of a PWM output?In the PIC, only certain pins can do PWM.

author: Gabriel
author_rank: Regular Contributor
timestamp: June 14, 2020, 02:17:45 am
content: Aghh, I thought I already reversed it, but guess not then. Fixed it up.As for the 32u4 I double-checked witch pins I could use and used one that is PWM capable so that I all good!

author: MarkF
author_rank: Super Contributor
timestamp: June 14, 2020, 02:23:58 am
content: Inspired by a video by Alan Wolke, I built his Time Domain Reflectometer (TDR) to generate really fast edges.I used four outputs with 200Ω resistors for a 50Ω output impedance.You might be interested in using the 74AC14 as a buffer/driver for you PWM pin.

author: Gabriel
author_rank: Regular Contributor
timestamp: June 16, 2020, 12:34:26 am
content: Sorry, I somehow missed your reply!I think that will have to be a separate project, I think it should be fine as it is.

author: MarkF
author_rank: Super Contributor
timestamp: June 16, 2020, 01:43:40 am
content: Requirements creep!You don't want to drive an external signal with your processor.I made the mistake of not buffering my digital output andnow use a BNC coupler to that little PCB as a buffer.If you think you might want it, I recommend adding the footprints now.Edit: Updated drawing to eliminate PWM signal overall inversion.

author: Renate
author_rank: Super Contributor
timestamp: June 18, 2020, 01:42:41 pm
content: Quote from: MarkF on June 11, 2020, 02:34:37 amSweep is great, make sure that it does both linear and logarithmic sweeps.Quote from: MarkF on June 11, 2020, 02:34:37 amMmm, it takes a wee bit more math.

author: Gabriel
author_rank: Regular Contributor
timestamp: June 18, 2020, 11:06:03 pm
content: Ok, I might just add it in then, it will be just easier like that. It's also pretty cheap (AUD$0.45) that's not a problem.

author: MarkF
author_rank: Super Contributor
timestamp: June 19, 2020, 05:58:36 am
content: Quote from: Gabriel on June 18, 2020, 11:06:03 pmI just realized that the PWM signal will be inverted as drawn.(Edit: Drawing updated.)Just use one inverter on the TRIG output and use the second inverter to invert the PWM signal before go to the quad inverters driving the PWM output.You can always invert the TRIG signal in software.Where as you can't invert the PWM signal in software.

author: MarkF
author_rank: Super Contributor
timestamp: June 19, 2020, 06:03:43 am
content: Quote from: Renate on June 18, 2020, 01:42:41 pmThere won't be any logarithmic sweeps in my future since I have less than 150 bytes of program space free.

author: Renate
author_rank: Super Contributor
timestamp: June 20, 2020, 02:40:21 am
content: Quote from: MarkF on June 19, 2020, 06:03:43 amWell, if you get rid of the Comic Sans font you'll have plenty of room.Or you could get rid of all the floating point. Yes, that's a serious suggestion.It also pays sometimes to dump it as assembler to see what the compiler made of your code.

author: MarkF
author_rank: Super Contributor
timestamp: June 20, 2020, 06:16:37 am
content: Quote from: Renate on June 20, 2020, 02:40:21 amThe font is Verdana and I attached it's file.Current display.I also attached the code and will leave that exercise to you to replace the floating point.Looking forward to seeing your code.I'm using the XC8 compiler with Optimize level #2.Best that the free version can do.Long ago when I looked, I thought the assembly was not terribly bad.But, I can't justify purchasing a license for the little I have.It would be cheaper to replace the PIC with a larger one. Which would give me the opportunity to make other desired hardware changes.I actually believe the real memory hog is the "sprintf" function.But, I don't want to code my own. Maybe someone can spin an efficient function for me...There is a lot of overhead in function calls.I suppose some could be eliminated at the expense of readability.

author: Gabriel
author_rank: Regular Contributor
timestamp: June 20, 2020, 09:13:04 am
content: Ok! I have finally finished the PCB design, at least until I or you guys find some faults in itI have attached a PDF with both the boards and the updated schematic. I tried to keep the bottom layer as empty for grounding as possible, but I ended up having to use it for bits and pieces here and there. I split the digital and analog ground planes obviously and only connected them very close to the AD9833's pins (as per its datasheet). I also created a keep-out zone under it (also as per its datasheet). I tried to keep the traces under the opamps to a minimum although it wasn't possible to avoid running some...It would be a lie to say that this is the best layout and/or routing but I'm relatively happy with it. Let me know what you guys think of it!

author: MarkF
author_rank: Super Contributor
timestamp: June 20, 2020, 09:37:30 am
content: I thought we talked about the output filter being wrong before???The capacitors are in the wrong place.See post:https://www.eevblog.com/forum/projects/atmega-32u4-and-ad9833-based-function-generator/msg3093229/#msg3093229Looks like the values are different also? Did you change the cut-off frequency?

author: Gabriel
author_rank: Regular Contributor
timestamp: June 20, 2020, 09:42:13 am
content: Ok, I'm so sorry. I swear to god I changed that, the same thing happened with the rotary encoder so I think I may have lost a version somewhere. The values a slightly different as I couldn't source the. exact 910uH one only a 1uH one.I'll fix it again

author: MarkF
author_rank: Super Contributor
timestamp: June 20, 2020, 09:57:05 am
content: I was going to make another suggestion, but don't see an easy way to implement it on you layout.If I build another version of my PCB, I want to tie the unused pins (1, 5 and 8 ) of the LM7171 to the ground plane.It would help dissipate the heat. I didn't see any place in the datasheet stating not to connect them.Need to test it.I didn't separate my analog and digital ground planes.Both sides of my PCB have a copper pour for my ground plane.Sometimes keeping them separate can cause problems.I will differ to you and others whether to keep them separate.

author: MarkF
author_rank: Super Contributor
timestamp: June 20, 2020, 10:01:52 am
content: Quote from: Gabriel on June 20, 2020, 09:42:13 amAfter running the on-line filter app, you can type in your exact values and have it re-plot the results.Just enter the value and hit ENTER (do not press any of the buttons).

author: Gabriel
author_rank: Regular Contributor
timestamp: June 20, 2020, 10:09:38 am
content: I just quickly plugged in my values and the difference between the 2 is so minimal I had to quickly switch between tabs just to notice anything. I think I am happy with that.

author: Gabriel
author_rank: Regular Contributor
timestamp: June 20, 2020, 10:11:15 am
content: Oh yeah also I just check I can connect some of the pins to the ground plane without an issue so I just quickly did that (and fixed the damn filter aghh)

author: MarkF
author_rank: Super Contributor
timestamp: June 20, 2020, 10:42:05 am
content: I'm a little scatter brained here this morning.I was looking at the footprints for your output filter.Normally the filter is laid out in a line. (maybe it doesn't matter at these frequencies.)The inductors seem small. Can the inductors you choose handle your expected current into a 50Ω load @ max voltage?You didn't leave much room for hand soldering.

author: Gabriel
author_rank: Regular Contributor
timestamp: June 20, 2020, 10:49:06 am
content: No, but neither can the op-amp. The max it can do is 100mA the inductor can do up to 250mA so I think that is all ok.EDIT: As for the layout that is what I initially tried but it didn't really fit well with the rest of the board, so I just decided it most likely won't make a huge difference at such "low" frequencies as the max it can do is only 12.5MHz

author: Renate
author_rank: Super Contributor
timestamp: June 20, 2020, 12:46:35 pm
content: Quote from: MarkF on June 20, 2020, 06:16:37 amAll that about Comic Sans was just a joke.Still, you may be able to chop the font down to just what you need, apparently just digits and decimal.If you stick with one size font and make the tiny stuff a bitmap that would help too.My comment about compiler/assembler output was not a criticism of the compiler.I was only saying if you look at a dump you'll see all the libs and functions that got pulled inand you might see something that you wrote that caused unintended consequences.I don't get bent out of shape over a few subroutine calls and if I do there's always "inline" or a macro.Probably the biggest hog in your hex is the SSD library.You might just check that it's not pulling in code for ellipses, hexagons or unicorns.

author: MarkF
author_rank: Super Contributor
timestamp: June 20, 2020, 01:53:31 pm
content: Quote from: Renate on June 20, 2020, 12:46:35 pmDid you look at the code? My font only requires 480 bytes.There is only one size font (the smallest). It's scaled up for larger sizes.QuoteThis is why I mentioned thesprintf() function.It's the only thing I can think of that the compiler would pull in a lot of code.The print functions require a lot of program space.Noted, the floating point math is another candidate to look at.But, its usage is very limited. Only three or four calculations.QuoteI wrote the SSD1351 library myself. It is all self contained and not using any other libraries.I don't believe the XC8 compiler generates code for functions that are not called. But, I haven't verified that.See for yourself.

author: Gabriel
author_rank: Regular Contributor
timestamp: June 20, 2020, 02:16:01 pm
content: Ok here is the second version of the PCB, with the edits. I connected the pins of the op-amp to that I could to the ground plane and re-did the filter. Fingers crossed it's all good this time!

author: Renate
author_rank: Super Contributor
timestamp: June 20, 2020, 04:46:33 pm
content: Quote from: MarkF on June 20, 2020, 01:53:31 pmWell, this is all PIC stuff and I don't have the toolchain or anything to follow this.I was just trying to give you some ideas how to save yourself some bytes.I've written some feature-full things for AVR8 and never hit 20k out of 32k.

author: MarkF
author_rank: Super Contributor
timestamp: June 23, 2020, 03:08:03 pm
content: Quote from: Gabriel on June 20, 2020, 02:16:01 pmI was playing around with the layout of your output filter. Assuming 0805 components.I believe the components in the filter are far too close together even for hot-air or re-flow soldering.And the ground plane you stitched together for a heat sink is so small that it's useless.You need to keep the ground plane around the LM7171 as intact as possible to move the heat away from the chip.And a few vias to get the heat to the other side of the PCB.Have a look at a partial layout. Plus the filter is inline and not jumping around.It would be a good idea to generate a 3D-View of your PCB for you to get a feel for just how compact it is.

author: Gabriel
author_rank: Regular Contributor
timestamp: June 24, 2020, 02:57:06 am
content: Well, I think I may have made a mistake thenI ordered the boards and parts last night before LCSC closed for the dragon holiday or whatever. Guess we'll have to see how I go...

author: Renate
author_rank: Super Contributor
timestamp: June 24, 2020, 01:28:42 pm
content: Mmm, I'm sorry to be so late with the comments, I got distracted.I don't think that you'll be happy with that whole gain/offset stage.The offset will have to be adjusted when you change the gain.The gain will also change when you use the switch or pot on the offset as that point has a live signal.Also, the gain can not go down to zero signal.The AD9833 puts out a nominal (how nominal?) 0.6V P-P signal.For a sine wave, the baseline is half that, +0.3VYou really have to deal with that offset right at the beginning, before any variable gain.Here's a sloppy LT Spice, the opamp is what I randomly selected.You only need one opamp (unless you want to add a buffer stage).The labelled point goes to +12, -12, gnd or a pot wiper.Edit: Ah, just skip the 1.3k stuff, run the 200 ohm right in. Disable the internal 200 ohm.

author: MarkF
author_rank: Super Contributor
timestamp: June 24, 2020, 02:18:20 pm
content: Quote from: Gabriel on June 24, 2020, 02:57:06 amSorry, it took me a while to trace your PCB layout (and I only did the output filter). Pictures are a little too small.Again, I heavily depend on the 3D-View of my layouts to visualize the clearances between components.Let us know how the assembly works out when your boards come in.Quote from: Renate on June 24, 2020, 01:28:42 pmThis is one of the reasons I used the AD9834 with its differential output.Using an op-amp in a differential configuration, the amplitude and DC offset are independent of each other.I also took advantage of the AD9834 external FSADJ pin to control the amplitude.With the single output of the AD9833, you are pretty much stuck with the inter-action between the amplitude and offset.

author: Gabriel
author_rank: Regular Contributor
timestamp: June 25, 2020, 01:36:08 am
content: No worries! It's only a little project so we'll see how it goes. I'm not too worried about it not being perfect.I'm not sure what you mean about the offset having to be adjusted when I change the gain, Renate. The reason I have the two separate op-amps is so that that won't happen.Anyway, it is what it is. It's too late now

author: robca
author_rank: Frequent Contributor
timestamp: June 25, 2020, 09:07:05 pm
content: Chiming in too late, but I'll offer this anyway: why use an 8bit processor with limited memory, when much more powerful processors (e.g. STM32 family) cost basically the same and offer significantly more room to code?Even a low STM32F103 (as used in the BluePill) offer 4x the flash and 12x the RAM. Granted, those operate at 3.3V not 5V, but it's not a problem in most casesOr use an ESP32 module, dual core processor at 240MHz, Mbytes of flash, and even Bluetooth or WiFi functionality.Programming those is actually easier than programming an Atmega 32u4, because you can use the same toolchain (including Arduino libraries, if you are so inclined) but have a real hardware debugger (via SWD)You wouldn't have tot limit the functionality of your function generator due to processor limitations...

author: Renate
author_rank: Super Contributor
timestamp: June 25, 2020, 09:35:10 pm
content: Quote from: robca on June 25, 2020, 09:07:05 pmBecause I can write every single byte myself (no libraries) and there is more than enough capability.Still, 8 bit is getting pretty old.So the question of offsets:Basically you can pre-gain offset or post-gain offset (or both).Generally function generators tend to have centered around zero volts/signal just above zero volts/signal just below zero volts.If you are using a positive signal and crank the gain it will change from a 0V - 1V signal to a 0V - 5V signal, generally what people want.It's a bit like mixing different fonts on a line, you have to choose the base line that is the steady thing.For most situations you want 0 volts to be the "baseline".If you have a centered/positive/negative signal and you crank the gain what was on 0 volts stays at 0 volts.You might say, "Well, what if I want a signal that has a DC offset of 3.3V and when I adjust the gain it changes for 3.0V - 3.6V to 2.8V - 3.8V?"Well, that's a good argument for post-gain offset.Still, it's not typical.Of course if you use a DAC either pre-gain or post-gain you can make it look like either one in software (presuming that the gain is controlled or readable).

author: robca
author_rank: Frequent Contributor
timestamp: June 26, 2020, 12:16:48 am
content: Quote from: Renate on June 25, 2020, 09:35:10 pmSo can anyone on any STM32 processor, including the high end STM32H743 (480MHz, M4 core, hardware floating point). Any STM32 can be programmed as easily at the 8 bit Atmega, using no libraries. And for the most part, the same Arduino libraries work on those. All STM32 processor have fully documented registers and you can program them directly, use the LL libraries (which are nothing more than a thin abstraction over the registers) or the full blown HAL, which I personally hate. Or just use STM32duino and program it like any Arduino board, good and badThe ESP32 requires libraries, but only because it does everything needed for BLE and WiFi as part of the core functionalitySTM32 are superior in every way to the old 8 bit Atmega (ADC, DAC, DMA, memory, speed). The only area where the old 8 bits still win is when you need 5V logic and for some hardened situation (releasing the magic smoke from an 8 bit Atmega is almost impossible)On the other hand, programming 8 bit processors with no hardware debugger is like using stone tablets to write a novel. Can be done, but why?

author: Gabriel
author_rank: Regular Contributor
timestamp: June 26, 2020, 12:22:12 am
content: Ok, thanks for your explanation. The gain is not software controlled as getting a digital pot with the correct ratings (1k and 50k and something more than like 64 stops between them) turned out to be very hard and expensive... The solution that I settled for is using dual potentiometers and using the Arduino's ADC to read back the values to display. So one side of the pot goes from -12V to +12V for the bias or just works as a variable resistor for the gain and the other side is hooked up to GND and 5V for the Arduino to read. I also implemented a 3 position switch for the gain to switch between the pot, GND and 2.5V. This way I can have a semi-accurate way of setting a 0-5V waveform or one that is perfectly centred on 0.robca: Fair enough about the 32-bit uC. I ended up going with the Atmegas as it is what I am familiar with and it had all the things I needed. I initially just wanted to go with a 328P but then I chose to go with the 32U4 for its USB functionality. I should just get a small dev board and have a play around with the 32-bit ones... Might just grab one off eBay and give it a shot and use it in my next project, whatever it may be!

author: robca
author_rank: Frequent Contributor
timestamp: June 26, 2020, 03:05:41 pm
content: Quote from: Gabriel on June 26, 2020, 12:22:12 amI highly recommend getting an ESP32 board (pretty much all have the same functionality, as long as you get one with the USB integrated. There are even ones with integrated LCD screen, if you want:https://www.banggood.com/LILYGO-TTGO-T-Display-ESP32-CP2104-WiFi-bluetooth-Module-1_14-Inch-LCD-Development-Board-p-1522925.html.If you want hardware debugging for those, you need a F2232L board, which can be used as SWD for the ESP32 lineUp to a year ago, I would have also recommended a Blue Pill, but these days a lot of the Blue Pill boards on eBay have a face STM32, some with a lot of problems. So still good if you are an expert and can make them work, but not for a beginner who would waste a lot of time chasing board issueshttps://www.eevblog.com/forum/microcontrollers/cheap-bluepill-very-likely-it-has-fake-stm32-right/.Probably one of the ST Nucleo boards with an STM32F4 would be a good choice. Slightly more expensive, but also immensely more powerful than an STM32F1. The Nucleo boards also have the ST Link on board, so you can hardware debug as well. Or you can build something like thishttps://github.com/profdc9/STM32surfaceplus a ~$3 ST Link clone on eBay.https://robotdyn.com/catalogsearch/result/?q=stm32also has a lot of very good, well designed boards.The STM32 support USB natively (even USB OTG), while the ESP32 does not and requires USB Serial chip. But on the other hand, if you use the WiFi functionality of the ESP32, you can program only once an OTA bootloader, and from then on the device can be updated over the air via WiFi. There are also a lot of libraries to help preconfigure WiFi on any network, so it's very easy to design a device that can self provision over WiFi and update over the air

author: Gabriel
author_rank: Regular Contributor
timestamp: December 15, 2020, 05:52:25 am
content: Hi Guys,I'm back. Life has been crazy and I didn't get a chance to do much in regards to this project. I now have it finally assembled and it's working mostly. I am facing a couple issues, mostly relating to the amplitude and offset adjustments. I am writing this more as a sanity check then anything but as I have it set up right now, the first op-amp (amplitude) has a maximum gain of ~40 (1+50k/1.3k) and the second one has a gain of 2 (1+10k/10k). The output of the AD9833 is ~600mV p2p so to get that to the maximum +-12V range I need a gain of 40. So I would need really the first one to have a gain of only 20 so that the pot covers the entire range and doesn't "clip", right?Apart from these issues, everything seems to be working just fine the AD9833 seems to be happy and generates all the waveforms and frequencies as requested, once again thanks for all the help in the earlier stages!