Just wanted to share my latest project!
(Thought of putting thread in Projects section, but thought it belongs better here, if not, please move!)
It is a Precision voltage source with AD5791A/B.
Feel free to copy or just get inspiration from! (I include Gerbers, Schematics and source code)
Output max +/- 14V or 10VAC Sine wave (20Hz to 2kHz in 7 steps)
Maximum load is 150mA.
My version has three boards:
1) 10V Voltage reference LTZ1000A (1k/13k) [2-layer 100x160mm] (pictures before anti-air draft caps on LTZ1000 in place)
2) CPU board with dsPIC33EP512MC506-I/PT running at 128MHz (64MIPS) [4-layer 100x100mm]
3) D/A board with AD5791B and LT1010 output buffer [4-layer 100x160mm]
Source code is compiled with Hobbyist version of CCS C ($99, then I added support for 33EP512MC506 for additional $20).
http://www.ccsinfo.com/product_info.php?products_id=c-workshop-compilerA dsPIC33EP128MC202 (narrow 28pin DIL) can also be used, this is supported in the Hobbyist compiler, just change pin definitions and recompile!
Go easy on me, I am a HW guy, not a programmer!
There is a pin header on D/A board that connects directly to BusPirate, I used a BusPirate to get familiar with AD5791 before writing the PIC program.
http://dangerousprototypes.com/docs/Bus_PirateFor generating ACV, a 128 points sine wave table is stored in ROM and scaled down to get arbitrary voltage, and then a copy is put in RAM. At the moment the frequencies supported are 20Hz, 50Hz, 60Hz, 100Hz, 500Hz, 1kHz and 2kHz. Generating higher than 2kHz is not possible right now with 128 points sine table and 15MHz SPI.
SPI data speed is getting high, every voltage change requires 24 bits of data being sent, multiplied with 128 voltage levels for one period, multiplied with the wished frequency...
My first test version was with a less performing AD5791A and AD581LH reference instead of LTZ1000A. Luckily there were no errors on PCB and the D/A worked directly, puh! To be easy to solder, 0805 size SMD components are default.
To control it, just connect a serial cable with settings 115200,N,8,1 and use HyperTerminal, TeraTerm etc. Menu system will show up in terminal.
There is also the possibility to add a 4x20 VFD/LCD display, program is outputting display data as default. Serial and/or parallell display can be connected.
On the D/A board, the only connection between Analog and Digital ground is underneath the D/A, there is no soldermask on PCB to be able to solder a wire. There are strict zones between analog and digital, no wires or components in wrong zone on any layer. There is also galvanic isolation of the SPI-bus (which runs in 15MHz on the dsPIC33).