Turn-key PCB assembly services in prototype quantities or low-volume to mid-volume production runs

Rethinking AVR DDS3 signal generator project

These things happen all the time. When you start a new project but from the beginning start feeling that it’s not what you wanted. Usually, they end up collecting dust. I think there is nothing shameful because it is better to fail than do nothing. There are thousands of examples where people start new projects with enthusiasm, but they never reach the daylight. But without those efforts, we wouldn’t see other great projects and products. Not all of them are made from the first try. It’s been over a year since the announcement of the AVR DDS3 signal generator. As you have noticed, there is no progress so far on it. And I am going to give up on it for a couple of reasons. From the beginning, I didn’t feel comfortable with it.

Continue reading

AVR DDS3 boards have arrived

Finally, some updates on the AVR DDS3 signal generator. The circuit is practically done, and PCBs are made. I decided to go with two microcontrollers on board to make it more functional. One microcontroller, Atmega328P, is gonna be dedicated to user interface and signal generator control. The second Atmega88 is gonna be used for signal generators only. This will give un-interruptable signal output while changing parameters or simply doing signal sweeps.

Continue reading

Modeling of analog part for DDS3 signal generator

When building an AVR DDS2 signal generator, there were many discussions about signal conditioning in the analog part of the device. The first argument was that LM358 wasn’t the best choice for this purpose. Another one pointed to the sine wave that wasn’t smooth enough. As you can see, there are some dents on it. Other waveforms also are distorted, especially when higher voltages are selected. This asks for a better analog part. Some people suggested replacing LM358 with OPA2134, but it seems to be quite an expensive choice. In my opinion, low noise, a general-purpose op-amp can be great too. I’m going to give a try to Texas Instruments TL074 low noise op-amp. It is low power, high slew rate (13V/us) IC – almost five times faster than LM358 and for the same reasonable price.

Continue reading

AVR DDS signal generator V2.0

Finally, the second version of the improved AVR DDS signal generator is here. THE first AVR DDS V1.0 generator was only an attempt to run the DDS algorithm without any analog amplitude control. In this DDS generator version, I still wanted to keep things as simple as possible using a minimum count of widely available components in the updated circuit. Also, I kept a single-sided PCB approach. AVR DDS specification AVR DDS signal generator V2.0 is a firmware-based DDS signal generator that uses slightly modified Jesper’s mini DDS algorithm adapted to AVR-GCC C code as in-line ASM. The AVR DDS signal generator has two outputs – one for DDS signal and another for high speed [1, 8MHz] square signal – which may be used to bring back to life microcontrollers with wrong fuse settings for other purposes where a high-speed square signal may be needed. A high speed (HS) signal is output directly from the Atmega16 OC1A(PD5) pin. The DDS output is used for all complex signals generated via the R2R resistor network and is adjusted via LM358N offset and amplitude regulating circuits. Two potentiometers can control offset and amplitude. The offset can be controlled in range +5V..-5V while magnitude…

Continue reading

AVR-DDS signal generator in-line ASM explained

I have got a couple of questions (in fact, not the first ones) for the AVR DDS generator I have built: “that’s all the asm code that I don’t understand. Could you explain it? Is it possible to do it with inline asm (only in C)?” I decided to explain this part more deeply because it took me to figure this all out. First of all, what we have to do, it is to implement simple DDS algorithm. In a few words, Direct Digital Synthesis(DDS) is known as a Numerically Controlled Oscillator. Simple rule: NCO-based DDS is a point(memory location)-skipping technique (and a constant interpolation of the stored signal) and runs at continuous update(clock)-rate. As the DDS output frequency is increased, the number of samples per waveform cycle decreases. Practically speaking, let’s have some math. We have a clock generator connected to MCU. In my case, F_CPU=16000000Hz. This is our Clock In.

Continue reading

AVR DDS signal generator V1.0

Sometimes when tuning various electronic hardware, we need a simple signal generator with different waveform and frequency. One of the options is to by a professional with variable gain professional coating and many additional functions. But if you are a hobbyist, you might want to build one. This small project is dedicated to making one of those signal generators.  

Continue reading

AVR controlled DDS generator software writing

During my spare time, I am developing the program for the AVR controlled DDS generator. I decided to write software using the WinAVR tool-set. How far ahead I have moved with this? I have implemented: Menu system; Reading previous generator configuration from EEPROM; Setting signal mode; Storing last generator configuration to EEPROM to be loaded after reset; Four types of signal output (square, sawtooth, triangle, and sine wave); Things I still need to do: Ability to change signal frequency; Implement other signals (listed below); Make program clean-up;

Continue reading

Creating custom LCD characters using WinAVR

Standard LCD modules come with built-in Character MAP stored in LCD ROM memory. There are plenty of characters for your needs, but you may still need some special ones like backslashes or some symbols in different languages. This LCD has a reserved RAM area for storing eight 5×7 dot matrix character patterns. In the table above, this area is in the first column with addresses starting from 0 to 7 (from 0b00000000 to 0b00000111). This means that you can define any characters in these 8 fields as you like and use them by calling them by addresses from 0 to 7.

Continue reading

AVR controlled signal generator-first impression

Lazy evening. I decided to take a couple of shots of couple generated signals. Without going too deep into timings, I wrote a couple of algorithms to ensure the signals are generated correctly at all voltage range 0-5V. First is the Sawtooth signal using ASM in AVRStudio: (My oscilloscope is old, so sorry for the bad quality) Second signal Triangle. This one I programmed using the WinAVR toolset.

Continue reading