Tiny waveform generator

A place to document your own projects.

Tiny waveform generator

Postby herpderp » Thu Aug 07, 2014 9:29 am

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.
Attachments
dds.JPG
dds_board.jpg
dds_final.png
dds_schematics.png
dds_schematics_eagle.zip
Eagle schematics & layout
(169.82 KiB) Downloaded 643 times
dds_src.zip
source code
(698.32 KiB) Downloaded 670 times
User avatar
herpderp
Newbie
Newbie
 
Posts: 23
Joined: Tue Apr 02, 2013 12:21 pm

Re: Tiny waveform generator

Postby neslekkim » Mon Aug 11, 2014 11:55 am

Do you have any plans of selling this as an addon to the display you sold earlier on Tindie?
neslekkim
Sr. Member
Sr. Member
 
Posts: 349
Joined: Tue Sep 11, 2012 5:36 am
Location: Oslo, Norway

Re: Tiny waveform generator

Postby herpderp » Tue Aug 12, 2014 7:12 am

neslekkim wrote:Do you have any plans of selling this as an addon to the display you sold earlier on Tindie?

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
User avatar
herpderp
Newbie
Newbie
 
Posts: 23
Joined: Tue Apr 02, 2013 12:21 pm

Re: Tiny waveform generator

Postby neslekkim » Tue Aug 12, 2014 7:19 am

What about blank pcb, and BOM?
neslekkim
Sr. Member
Sr. Member
 
Posts: 349
Joined: Tue Sep 11, 2012 5:36 am
Location: Oslo, Norway

Re: Tiny waveform generator

Postby herpderp » Tue Aug 12, 2014 9:32 am

neslekkim wrote:What about blank pcb, and BOM?

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 :/
User avatar
herpderp
Newbie
Newbie
 
Posts: 23
Joined: Tue Apr 02, 2013 12:21 pm

Re: Tiny waveform generator

Postby neslekkim » Tue Aug 12, 2014 9:37 am

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

This type of sma connectors? http://www.ebay.com/itm/151088834234
neslekkim
Sr. Member
Sr. Member
 
Posts: 349
Joined: Tue Sep 11, 2012 5:36 am
Location: Oslo, Norway

Re: Tiny waveform generator

Postby herpderp » Tue Aug 12, 2014 11:51 am

neslekkim wrote:cool, need to watch the tindiepage then, so I don't miss it :)

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


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 https://www.tindie.com/products/herptronix/tiny-dds-pcb/
User avatar
herpderp
Newbie
Newbie
 
Posts: 23
Joined: Tue Apr 02, 2013 12:21 pm

Re: Tiny waveform generator

Postby neslekkim » Tue Aug 12, 2014 2:08 pm

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..
neslekkim
Sr. Member
Sr. Member
 
Posts: 349
Joined: Tue Sep 11, 2012 5:36 am
Location: Oslo, Norway

Re: Tiny waveform generator

Postby herpderp » Tue Aug 12, 2014 4:32 pm

neslekkim wrote: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 :)


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)

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

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.
User avatar
herpderp
Newbie
Newbie
 
Posts: 23
Joined: Tue Apr 02, 2013 12:21 pm

Re: Tiny waveform generator

Postby neslekkim » Wed Aug 13, 2014 3:42 am

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?
neslekkim
Sr. Member
Sr. Member
 
Posts: 349
Joined: Tue Sep 11, 2012 5:36 am
Location: Oslo, Norway

Re: Tiny waveform generator

Postby herpderp » Wed Aug 13, 2014 10:47 am

neslekkim wrote: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. :)

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

neslekkim wrote:Are you using mplabx+xc32?, or some other toolchain/ide?

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 :/
User avatar
herpderp
Newbie
Newbie
 
Posts: 23
Joined: Tue Apr 02, 2013 12:21 pm

Re: Tiny waveform generator

Postby neslekkim » Wed Aug 13, 2014 11:18 am

Ah, Didn't know that I could use c32 with mplabX
neslekkim
Sr. Member
Sr. Member
 
Posts: 349
Joined: Tue Sep 11, 2012 5:36 am
Location: Oslo, Norway


Return to Project logs