Skip to main content
Topic: Tiny waveform generator (Read 10214 times) previous topic - next topic

Tiny waveform generator

Hi everyone,

Here is my last project, a tiny waveform generator based on my previous project and some components:
-   An AD9834 (DDS chip with sinus/triangle output)
-   2 x AD5310 (10bit DAC: one for the Vpp control, another one the offset control)
-   3 x LM7171 (Fast OPA)
-   3 x LT1616 (switching regulator: +5V, +7V, -7V)

This waveform generator is directly powered by a standard 12V jack and is capable of outputting a 10Vpp signal at 1MHz (between -5V and +5V, sinus waveform, no load). Above 1MHz, the output starts fading, reaching only 9Vpp at 4MHz (maximal frequency). Frequency, amplitude and offset are digitally controlled through the smart TFT.
Three “basic” waveforms are provided: sinus and triangle, coming from the DDS chip (0.1Hz to 4MHz, 0.1Hz step), and PWM coming from the microcontroller (0.1Hz to 1MHz, variable steps).
The microcontroller also provides arbitrary waveforms such as sawtooth, sin(x)/x, noise, wav file playback, etc… but at lower frequencies (0 to 2kHz -- or 100kSPS). Each waveform can be directly outputted, or can be used as an input for frequency or amplitude modulation.

As usual, the project is under OSHW / GPL3.
A small video showing the generator is available here (english subtitles available)
Some meaningless technical explanations on my blog (in french)
Suggestions / advices / comments are welcomed.

Re: Tiny waveform generator

Reply #1
Do you have any plans of selling this as an addon to the display you sold earlier on Tindie?

Re: Tiny waveform generator

Reply #2
[quote author="neslekkim"]Do you have any plans of selling this as an addon to the display you sold earlier on Tindie?[/quote]
Not for this project. Some parts like the 75.0MHz crystal, the AD9834, etc... are quite hard to find at a low price. Moreover, the board needs to be calibrated and there is no software procedure implemented (the calibration is done through some constants, at compilation time :s). Finally, I no longer have TFT module to sell with, so it would be useless for most buyers.

Cheers

Re: Tiny waveform generator

Reply #3
What about blank pcb, and BOM?

Re: Tiny waveform generator

Reply #4
[quote author="neslekkim"]What about blank pcb, and BOM?[/quote]
Hum why not... I will sell my 3 remaining PCB on Tindie.
About the BOM: I do not have a precise reference for some components (mainly the connectors: SMA, DC 12V...) since I bought them first on eBay and then design the board. I've also removed a pin from the DC12V connector, so it's no longer a standard one :/

Re: Tiny waveform generator

Reply #5
cool, need to watch the tindiepage then, so I don't miss it :)

This type of sma connectors? http://www.ebay.com/itm/151088834234

Re: Tiny waveform generator

Reply #6
[quote author="neslekkim"]cool, need to watch the tindiepage then, so I don't miss it :)

This type of sma connectors? http://www.ebay.com/itm/151088834234[/quote]

Yes it is... But beware of its gender (male / female). I used a female connector on the board and a male for the cable, but it is not mandatory to follow this implementation.

The PBC is available at http://https://www.tindie.com/products/herptronix/tiny-dds-pcb/

Re: Tiny waveform generator

Reply #7
Great!, ordered :)

Regarding the bom, for the items, that you ordered from, is it possible to have detailed info about those?, seems that most of the components in the BOM have information about package etc, but some don't have it.
The stuff you have ordered from ebay, I just have to find out about, but things from mouser, farnell, digikey etc would be interesting to have more info about.

If it's not to much trouble that is :)

Btw, I see you use google docs for source and such, no more Github? I really liked that setup..

Re: Tiny waveform generator

Reply #8
[quote author="neslekkim"]Great!, ordered :)

Regarding the bom, for the items, that you ordered from, is it possible to have detailed info about those?, seems that most of the components in the BOM have information about package etc, but some don't have it.
The stuff you have ordered from ebay, I just have to find out about, but things from mouser, farnell, digikey etc would be interesting to have more info about.

If it's not to much trouble that is :)

[/quote]
Well I bought every components from eBay, so I don't have the exact reference for each part. Anyway:
- for all resistors: 0603 package, 5% or better, 0.063W or better. I disregard some characteristics such as the breakdown voltage, etc... since the highest voltage should not be greatter than 14V. Btw, there is a huge mistake about R22: its power dissipation can be greater than 0.1W, so if you short-circuit the output and if you ask a high amplitude to the DDS, R22 may blow up ><".
- for the capacitors: the BOM specifies the type (tentalum / X5R / NP0) and the rated voltage; any "regular" capacitor is suitable here.
- for the ICs: the package is specified in the BOM. Sometime, an extension is added at the end of the reference: for example, the LM7171 comes with the 'AIM' or 'BIM' extension, where 'A' or 'B' defines the quality grade; the parts from Analog Devices come also with the 'Z' extension (RoHS), 'W' extension (automobile)... For this project, any of these grades will do the job, so just buy the cheapest one :p
- for the other parts: the diode MBR0530 comes in a unique package (SOD123); same for the LT1616 buck regulator (SOT23-6), the AD9834 DDS (TSSOP), etc...

At the end it only remains:
- the crystal that I provide
- some connectors (2x5 pin header)

[quote author="neslekkim"]Btw, I see you use google docs for source and such, no more Github? I really liked that setup..[/quote]
Yeah its was easier to put all on google docs. I'm not sure to open a git repository for this project since its software quality is quite poor.

Re: Tiny waveform generator

Reply #9
Thanks for the overview  of the components, I guess one can say that the r22 will act as an fuse then? :), but anyway I think I will stick to low voltages, will use this mostly for learning, still trying to learn about my scope. :)

I woudn't worry about the code quality, lots of various codequality on github :)
But if others do changes to the code, it would be easier to contribute (will try myself, when I manage to set up the toolchain for everything)
Are you using mplabx+xc32?, or some other toolchain/ide?

Re: Tiny waveform generator

Reply #10
[quote author="neslekkim"]Thanks for the overview  of the components, I guess one can say that the r22 will act as an fuse then? :), but anyway I think I will stick to low voltages, will use this mostly for learning, still trying to learn about my scope. :)
[/quote]
Well, it will be ok as long as you don't short-circuit the output while asking a 5V DC signal to the DDS... Otherwise, R22 will effectively act as a fuse :s

[quote author="neslekkim"]
Are you using mplabx+xc32?, or some other toolchain/ide?[/quote]
I'm still using MPLABX with the C32 compiler (not the XC32 which have a discusting licence management and which doesn't come with the good old plib). By the way, the software shall be compiled with at least the -O1 level of optimization; this level is available even with the free version of the compiler. Compiling with -O0 will produce and .hex that doesn't fit in the memory of the PIC32 :/

Re: Tiny waveform generator

Reply #11
Ah, Didn't know that I could use c32 with mplabX