USB interface (micro USB)
8 MHz oscillator for L6470 and PIC microcontroller (PIC24FJ64GB002)
Header for external SPI interface if using Arduino or different microcontroller board.
Headers for step and direction interface, for microcontroller or parallel port PC interface.
I haven’t worked on this since October 2, 2013 (and it’s now January 21, 2014) so I’m uploading the Eagle  design files for you to use as you see fit. If you actually build this board I would love to see how it comes out!
NOTE: I have NOT tested this board design but I believe it works. I am a professional but that doesn’t mean my work is flawless.
The board is basically the same as the last one I wrote about.
On this board I used Mini-Circuits filter modules instead of my homebrew RLC filters. They offer better high frequency performance than I could achieve on my own. Here’s a plot of the filter response, as tested with my VNWA:
The filters allow a usable output from about 40 MHz to 110 MHz. By bypassing the high-pass filter, I can get a usable output from near-DC to 110 MHz.
This board is part of a much larger project. You might have noticed that one PCB is stacked onto the other PCB. The board on the left is a module that will be plugged into a large VME board. The purpose of building the right-side board was to test the module.
USB Interface and control
I’ve done several USB projects, starting back when I worked at Embed Inc. I decided it would be fun to make this a USB controlled board. The microcontroller is a PIC24FJ128GB106 from Microchip. It has a high-speed USB interface. Microchip provides sample code for various interface methods.
I chose to make this a CDC (Character Device Class) because it makes writing the PC software easier. A CDC device presents itself as a VCP (Virtual COM Port) on Windows, and I believe on Linux as well. This means I don’t have to write a device driver or utilize WinUSB or Libusb in order to communicate with the hardware.
I started out with a basic MFC program that I had written to query a laser over it’s diagnostics port, and modified it to control my PIC firmware that, in turn, controls the AD9852. The program is very basic at this point, but the structure now exists to do just about anything with it. I’m not personally invested in amateur radio, but I imagine this could be interesting for creating directly-modulated RF carriers. This board can directly output an RF signal that is amplitude, frequency, on-off, or phase keyed.
In my free time I am working on another version of this board that I may make available to the community. Please leave a comment if you’re interested.
I mentioned that I was building a DDS (Direct Digital Synthesis) board for work. Here’s the result:
Yes that’s a giant block of aluminum that it’s attached to. It keeps the board from sliding around with all those cables attached to it.
It seems to work quite well. The first thing I tested was the bandpass filter. I designed it to have a center of 100 MHz and a bandwidth of 80 MHz. What do you know? Sometimes things work out:
That looks pretty decent to me, but I’m not an RF expert.
Now a chart of the output with the MMIC fully powered up. The AD9852 is being clocked at 260 MHz instead of the desired 300 MHz (for a reason I’ll describe below.) The AD9852 is programmed to output a fundamental frequency of 100 MHz in this test.
I thought I had a screen shot zoomed in on the 100 MHz peak, alas I do not. The noise floor when zoomed in is much better than the spectrum analyzer shows in the above plot (I promise.)
I had to run the AD9852 at 260 MHz carrier instead of 300 MHz because the LMK03001C chip I am using cannot output a 300 MHz clock, given a frequency of 20 MHz. The PLL configuration for the LMK03001C is very flexible, just not quite enough for this. For the next board I am switching to the LMK03000C which has a slightly different VCO. It’ll work.
This synthesizer was a test for my next big project: a huge VME bus board that has 4 AD9852 channels on it. I’m proud to say that this test succeeded.
I’m working on a USB DDS (direct digital synthesis) board that will be a plug-in module for another application. Here’s a block diagram:
It has a few interesting features that I thought others might be interested in:
– AD9852 direct digital synthesis IC with 300 MHz adder, 48 bit accumulator, and digital inverse sinc filter
– A fairly powerful microcontroller with full speed USB
– A low jitter clock synthesizer PLL: LMK03001C
– An MCP3553 22 bit A/D converter
– Gain block chip from Mini Circuits: GALI-74+
– 6 layer PCB construction for excellent ground and VDD planes
These features should give this board possibilities in amateur radio and perhaps homebrew instrumentation. Changing the filter components could allow usage from very low frequencies up to around 125 MHz.
Utilizing upper frequency images would give you usable range into 500 MHz or possibly a bit more depending on how good the RF layout is. The PCB is FR4 and uses standard 0603/0805 discrete parts, so it probably won’t give usable signals into the microwave region.
I dread creating part models in Eagle – it’s time consuming and error prone.
Over the years I have used scripting languages to help with the tedious work. It’s quite easy to create basic part footprint algorithms given the mechanical drawing. Much more tedious would be drawing a picture on graph paper and using your calculator.
If you’ve ever made a circuit board and made a very basic error that caused you to have to remanufacture your board, you’ll understand the value of getting it right the first time around.
If you open up the EAGLE Library editor and paste this script into the command console, you get this:
Not a bad start.
The same technique applies for much larger parts. Imagine how much time you’ll save when you’re creating a part model for a 256+ ball grid array?
I must say I don’t claim to be an expert Python coder – I have my own specialties and I’m really a low-level embedded systems guy. If you need a turn-key shoe-phone (that’s a joke) or a radio watch (if you don’t get the joke you’re too young) or an accelerometer based movement tracker with 6 months battery life, I’m your man.
I’m just rambling – back on topic: there’s another script I wrote that you can access via pastebin (click “see original”)
[iframe src=”http://pastebin.com/embed_iframe.php?i=2RqWXs83″ style=”border:none;width:100%”][/iframe]
This script takes a CSV file and a model name as command line options, i.e:
$ ~/bin/csv2model.py sn74.csv sn74vme22501a
And produces helpful Eagle SCR data that you can call from Eagle to make a schematic symbol, and also to CONNECT the schematic part model PINs to the physical layout PADs. i.e:
PIN '1OEBY' Short (0 0.0)
PIN '1A' Short (0 -0.1)
PIN '1Y' Short (0 -0.2)
PIN 'GND' Short (0 -0.3)
PIN '2A' Short (0 -0.4)
PIN '2Y' Short (0 -0.5)
PIN 'VCC' Short (0 -0.6)
PIN '!2OEBY' Short (0 -0.7)
PIN '3A1' Short (0 -0.8)
PIN 'GND_2' Short (0 -0.9)
PIN 'LE' Short (0 -1.0)
PIN '3A2' Short (0 -1.1)
PIN '3A3' Short (0 -1.2)
PIN 'OE' Short (0 -1.3)
PIN 'GND_3' Short (0 -1.4)
A common annoyance I have is that I’ll design a gadget: make the schematic, figure out how big the board can be, design the board – all of these so far are creative tasks requiring some skilled input as to the technical details.
Then you order the board (a task let’s set aside for now)
Then you have to make a bill of materials and order parts. The most annoying, time consuming part of designing hardware.
I use Eagle from Cadsoft, so my answers may not apply to you. Is your EDA software a lot better? Let me know, I’d like to hear about it. I’d also be interested to know how much it costs. Eagle is relatively inexpensive when it comes to EDA tools. Industry-standard Mentor Graphics (among others) are many thousands of dollars. That’s just not possible for me.
But back on topic: how do you take your schematic and create a BOM? Well, Eagle has a ULP you can run that will produce a rudimentary BOM (bom.ulp) . It sucks.
I’ve tried to improve it a bit by post-processing the CSV with my own Perl script. I use Cygwin on Windows to run this by the way.
The Perl script is called eagle.bom.pl and it attempts to produce a usable BOM. It tries to combine all of your 1K resistors into one line item, for example.
Now that you have a BOM that doesn’t require two hours of manual formatting to complete, my next problem is that I often have numerous different resistor values that I have to look up at Digi-Key or Mouser (or Newark) and make sure I picked a real value, find the part number, and add it to my spreadsheet.
A partial solution I have is that I made a Python script that will print out all E96 resistor values for Stackpole electronics’ RMCF series. This is very specific, but I’ve picked a manufacturer that literally has thousands of parts at Digi-Key, with millions in stock.
Now that I have a list, I can scroll through and find the one I want, and simply copy and paste the part number into my BOM.
The next step would be integrating this into my BOM script. This will get you started though.