This post will be a small update on the generator’s project. As I have received the PCBs the next logical step is to solder one PCB and test it out. So, I did exactly that.
I thought that the best way to start soldering everything would be from power circuits – if they work correctly, then MCU and analog circuits could be soldered in.
Links to project’s all posts
- VCA822 Gain Amplifier Circuit
- LM7171 Offset Circuit
- Gain and Offset Control Filter Circuit
- Dual 5V Power Supply
- Dual 12V TPS65131 Power Supply
- Battery Charging Circuit with BQ24295
- Basic WEB Interface
- IPS Capacitive LCD on an ESP32
- IPS LCD, ESP32 with eSPI library and Touch screen
- Final PCB Design for the DIY Waveform Generator
- Custom Design PCBs and How To Get Them Manufactured
- Soldering the PCB (this post)
- AD9833 Library and Further Output Noise Reduction
- Arduino BQ24295 Battery Charger Library
- LCD GUI with LVGL on ESP-32
- 3D Printed Enclosure
- Finished DIY generator
Soldering the power supplies
Firstly, I have soldered battery charger IC (BQ24295) and its passive components. Testing it was quite straight forward – connect a battery, connect a charger to USB and the battery should charge up (and an LED should light up). Disconnect the charger and the circuit should still supply voltage on its output. Leave only charger connected and disconnect the battery – there should still be a voltage on the circuits output (and the LED should blink rapidly). If those three scenarios work – the circuit works.
The second circuit that I have soldered in was +-12V DC/DC converter based on TPS65131. To test this circuit out is really a matter of measuring output voltages. Unfortunately, while positive voltage was around 12V, there was a problem with a negative output voltage. It was -2.5V. Of course, the problem was in a badly soldered component – tantalum capacitor was soldered in a wrong polarity. Soldering it correctly solved the problem, but it appears I had this problem because there was a mistake in a schematic – tantalum capacitor was connected incorrectly there, so markings on a PCB are also wrong for this component…
The third step – soldering in +-5V LV52117 DC/DC converter. Testing it consists of the same measurements as with the TPS65131. Both output voltages were within expected values.
Lastly, there was an LDO regulator from all power circuits. Soldered it in, measured output voltage – it works as expected. So, knowing that at this point all power circuits work, next step was to solder in MCU and flash it with a firmware.
Soldering other components
Also, with the ESP-32 module, I have soldered LCD and touch panel connectors with other components such as I2C resistors, etc. After that, I flashed the MCU with the firmware for checking if it and LCD works correctly. Here were no problems again.
Lastly, analog circuits were soldered and checked if on the generators output was amplified AD9833 signal – and at first glance it was. But the output wasn’t noiseless. Also, as you can see, I haven’t soldered in all components, because I haven’t got all the needed parts at the moment:
The output noise
I haven’t managed to find out and correct all noise sources. One of them might be related to the erratic filtering opamp’s (OPA2196) behavior. There are high frequency impulses at the filters output as shown below:
I have managed to lower the amplitude of those spikes by adding additional capacitor on the filter’s input:
So, from around 10mV peak they were lowered to around 2mV peak. In my opinion, those high frequency spikes might have appeared because at some point in a frequency domain opamp shifts its output signal phase by 180 degrees. Then, instead of filtering those frequencies out, it starts to pass them through to the output…
Also, there might be other noise sources. Like a noisy -5V power rail which is also used as a signal source in filtering circuits input. Furthermore, it seems that one problem is solved – the output does not have distortions when connected to the oscilloscope with a long cable as I have mentioned in this post. Even it seems to behave better, I haven’t fully tested analog circuit’s behavior in different scenarios. So, there might be additional problems with it – only time will tell.
I also have finally received a battery which is going to be used in the generator. It is Li-Po rechargeable battery. The capacity is 2200mAh in a 405580 size (4mm thickness, 55mm width and 80mm length). The battery was bought from AliExpress.
It has its own protection circuit soldered on the contacts, but I think I am going to desolder it, as it is not useful when there is a battery charging/management circuit on the generator’s PCB.
Also, a fun fact, the battery has energy of one liter…
So, as the board is almost fully soldered, the last thing to do is to finally write a normally working firmware with a nice GUI for the LCD. Which I think am going to do next. Also, the device needs some kind of enclosure, which will be 3D printed. But I will do that only after I receive all the parts needed for the PCB and solder them in.