Final PCB for the DIY Waveform generator (Part 10)

Finally, I have managed to design a PCB for my DIY generator based on an AD9833 with additional analog circuity and controlled by an ESP32 MCU with a touchscreen-based user interface.

Because everything that I have used in this design were more or less mentioned in the earlier posts, this one will be a short one.

Whole thing was designed with a free PCB design software KiCAD. In my opinion it is one of the greatest free tools out there and it is quite easy to start with for a beginner.

Links to project’s all posts

  1. VCA822 Gain Amplifier Circuit
  2. LM7171 Offset Circuit
  3. Gain and Offset Control Filter Circuit
  4. Dual 5V Power Supply
  5. Dual 12V TPS65131 Power Supply
  6. Battery Charging Circuit with BQ24295
  7. Basic WEB Interface
  8. IPS Capacitive LCD on an ESP32
  9. IPS LCD, ESP32 with eSPI library and Touch screen
  10. Final PCB Design for the DIY Waveform Generator (this post)
  11. Custom Design PCBs and How To Get Them Manufactured
  12. Soldering the PCB
  13. AD9833 Library and Further Output Noise Reduction
  14. Arduino BQ24295 Battery Charger Library
  15. LCD GUI with LVGL on ESP-32
  16. 3D Printed Enclosure
  17. Finished DIY generator

The Schematics

The schematics are put together from previous posts looks like this:

Schematic Analog DIY generator AD9833
Schematic Power supply for DIY generator
Schematic DIY generator MCU

As you can see, there are three parts of the schematics: analog, power supply and others (MCU, LCD connectors etc.). The schematics has several additional capacitors on power rails. Also, now there is a switch to turn everything off.

Battery voltage measurement circuit was added to the PCB. It was used because the battery charging IC doesn’t report battery voltage and without these reading it would be hard to tell the batteries percentage shown on the LCD screen. To lower the current drain from the battery, this circuit uses a MOSFET which is turned off when main power is cut off with a switch.

The analog part has two output SMA connectors. The first one is used to output waveform after gain and offset control circuits. The second SMA connector outputs square wave directly from the MCU. This output could be used to connect to other digital circuits which use 0-3V voltage signals. Both outputs can be turned on/off with an onboard relay.

SMA connectors were used not because it is some kind of high frequency device, but because these connectors are smaller than regular BNC and are more suitable to this portable application.

Also keep in mind that some parts and/or their values might change during assembly and/or final PCB testing.

Finally, a fun fact. All ESP32 pins (except one – input only pin) were used. So, it seems that parallel LCD + I2C and some output pins can be used in one project. Note, that even RX and TX were used as SPI pins for the AD9833.


And finally, here are the pictures of the PCB:

Diy generator final PCB editor view
Diy generator final PCB 3D view

For unknown to me reason 3D viewer showed only two models of the footprints, so I made a screenshot with no models on the PCB.

The PCB itself is smaller that the LCD which is going to be used for the generator, so whole device shouldn’t be bigger than the bezels of the LCD (of course except for the device’s thickness).

I probably will go with thinner PCB (~1mm) to save some space.

Also, because there are a lot of traces on both copper layers, the ground planes are scattered all over the PCB instead of being one continuous peace. We will see how it works out in the final PCB.

Next Step

As I have the design, final thing to do is to order the PCB to be manufactured and see if it will work as expected.

Subscribe to a newsletter!

Was this page helpful?