Getting boards assembled

Several people I know have been asking me for advice when it comes to getting boards assembled lately, so I wanted to write-up my experiences and some tips.

During the design process

At the design process, I get that you just want to churn out your boards, but now is the time to decide on your assembler. Several of the Asian PCB manufacturers have a turn-key solution where you can send them your board files and a BOM, pay them and you get back the boards ready assembled. For simpler things that may be a reasonable approach, but be aware that you have no control on the supply chain this way. Those 1% resistors making up a reference voltage may now be 5% or worse. That microcontroller or low noise Op-Amp may now be a fake.  I like to use a local assembler within driving distance, and to be there when they do a run. That way, I can catch problems during assembly without doing a whole run, if we need to rework a panel.  Often you can pick up great hints from the production personnel when assembling your boards.

Questions to ask your assembler when doing the first contact:

  • What is the preferred size of panels? Larger than this and they won’t fit the machine, smaller and you may get a fee for them having to change the size. Most machines don’t go below 51mm. I have done panels as small as 100x100mm, and as large as 450x600mm.  This is a excellent article about panelization.
  • What kind of frame do they prefer? some have minimum sizes, or want holes in specific locations. Frames are a good place to place fiducials.
  • What size fiducials do they prefer? most places uses a 1mm fiducial.
  • What is the general setup cost? What file format do they want? this can be a major part of the total assembly cost.
  • What is the setup cost pr. feeder?  Some times Tubes has one setup cost that covers several tubes, may be worth it if you can use as many of them as possible.
  • What is the smallest component they can handle?
  • Can they handle fine pitch BGA and QFN? Do they have inspection tools for it?
  • Can you visit when your boards are being run?
  • Do they have a rate for hole mounted components, test and assembly into enclosures?
  • What kind of stencil size and frame type do they use?
  • Do they usually run leaded or lead-free? There is often a fee if they need to clean down for lead-free.

When choosing an assembler, make sure you know how many boards you need to assemble (and sell) in order for it to break even. I know someone doing runs of 100 boards at a time, when the break even point was 122 boards. No wonder they didn’t make money on that run.

Observe that in high cost countries, finding a assembler willing to do a couple hundred boards can be difficult. If they complain about stopping their high volume work to do your few boards, find a different assembler. Experience says that the prices will be high, and the bickering constant.

Also make sure you have a plan for testing and assembling the boards into their final enclosure. Testing can be quite complicated! Time spent during the design process avoids time being spent reworking or scrapping boards.

Before you order your boards and parts

  • Make sure to build the panel of PCBs in your PCB CAD! There are several offerings that board manufacturers can assemble them for you for a fee, but you may end up without fiducials or with a V score separating the boards on the only visible side of the PCB.
  • The panels should have 2 sides square and parallel strips at least 12mm wide where they are fed into the board conveyor. This is often called technical rails.
  • Make sure that the panel, when going to the pick and place process is stiff enough that it won’t flex and make problems assembling. If in doubt, bond the boards together with some mousebites or V-Grooves.
  • Boards with uneven ground pour may scorch in the reflow oven.
  • Complex parts may need a local fiducial to improve the accuracy of the placement. This is something your assembler should be able to help you with.
  • Order your components as reels! If you come with un-reeled strips of tape, you will look like you do not know what you are doing. Most suppliers offers to Re-Reel your tape with the proper leaders and such for a minor fee. This is quite useful for your more expensive parts.  Add 5%-10% more components to the reel than what your board run needs. This is to account for rejected parts in the pick and place.
  • Re-Reels have a tendency to be more hassle than original tapes, due to glue on the leaders and such. If you want to annoy your assembler, supply only Re-Reeled components.
  • For cheaper passives, get a whole reel, and keep the leftovers untill the next board run. It may seem obvious, but I have seen people paying more to Re-Reel 5% resistors than a whole reel would have cost.
  • 7″ reels is often prefered, but there should be no difference if you come with a 13″ reel.
  • Order a couple extra panels. These are used for setup, and for you to touch and look at. I avoid assembling PCBs that have lots of fat from fingers.  If there is a problem with the PCB after assembling, its nice to have a panel that is not assembled to find the fault.  A good PCB manufacturer should deliver boards that are 100% tested.
  • Now is also the time to order the stencil.

At this point, you should try hard to reduce the number of lines in your BOM. Can that 20K resistor you need 1 off, be made up of 2 10K in series? Are you sure you need both 22µF and 10µF capacitors? or could just 22µF do? If you pay per feeder (you probably do), reducing the number of feeders needed helps to reduce the setup cost and lower your break even point.


Local Fiducial in center of W5500 IC to improve placement location accuracy


Getting boards assembled

All your parts have arrived, and you are ready to get the board assembled. At your assembler, you are not the only customer so make sure to not film nor photograph anything other than your board. Ask first.



Posted in Production | Leave a comment

NIST on phase detectors and some verification.

NIST has some interesting articles on their website, one of them being a 5 MHz phase detector with low residual flicker [1] for measuring phase noise.  This spurred some discussions and a series of measurements on my part.


The interesting part is the usage of common 2N2222 transistors.  There have been some discussion on the internet about the outlined connection of the transistor as a diode with the BC junction shorted. Some claiming it behaving as a switch, while others claiming it to be a diode. My own suspicion was that this would act as a diode, and a mixer was built tusing BC547B’s.  A quick look at my crude curve tracer shows the diode action:


The mixer uses a 5:1 transformer for optimal impedance match, and I was not able to find a pair in my junkbox.  Using FT-2402-43 cores, with a 2t primary, and a bifilar 4.5 turns secondary winding. 4 diode connected transistors and the mixer is working.

Mixing action was verified on a spectrum analyzer before compression points were measured used the 30% am technique.



As can be clearly seen, as long as the diodes are conducting, the mixing action is linear.  With the low LO amplitude of 0dBm, the diodes are not conducting properly and that can be shown on the plot of the linearity. Notice that the mixer is in compression with as low as -8dBm input level. The bend and slope with 17dBm LO is somewhat larger than for the lower amplitudes, indicating that the mixer LO may be excessive. Some spectrum analyzer plots showing the IMD products should give further insight into this, if used as a mixer.


As a last test, I did try to use this phase detector to measure phase noise, using my current setup.  Unfortunately there was little change compared to the much more noisy level 7 mixer it has. This is due to the noise in the low noise amplifier that follows the phase detector and masks any improvement in the phase detector for now.  A new, 100pV/sqrt Hz input noise amplifier is planned.



Posted in Instruments, Phase Noise | Leave a comment

Installing DokuWiki on Synology

Since it seems a common problem to get DokuWiki to work on Synology NAS, here are some tips:

  1. Before installing go to: “Web Station” and “PHP Settings” then select your PHP version profile.  Under extensions, add “mcrypt” and “openSSL”.
  2. Install DocuWiki.
  3. Run DocuWiki installation setup, make sure to set your needed parameters here.

If you have installed DocuWiki, but not gotten it to work, make sure you remove it in “Packet Center” before adding the extensions.

Happy Wiki’ing.

Posted in Uncategorized | Leave a comment

Some time back, I was contacted by someone from, asking if I would like to try it out. is a way of providing git with a extension to show Cadsoft Eagle files.


As the gif shows, there are ways of comparing the different commits, and showing both PCB layout and schematics.

There is both a free version, and a paid one with private repositories.  It’s a great tool for developing hardware, I just wish that github and the like would adopt it and incorporate it into their platform.

From what I have been able to get out of cadlab, KICAD files should be supported by the end of the year, and Altium may come after that.  For the record, I’m not receiving anything for writing this,  but its appearing as a new, useful tool for making hardware.

Posted in Uncategorized | Leave a comment

Si5351 VFO sketches

Back when Etherkit did come out with its Si5351 boards, I wrote some sketches to use these as VFO’s.  These sketches have been floating around the internet, without being collected at a single place, so thats going to change, in hope that it will reduce the repeating e-mails a bit.

Both sketches work as a basic VFO. It starts at a given frequency, and there is not implemented a method of changing bands. This can be easily added by someone with a little programming experience.  All of these sketches requires NT7S Si5351 library. Please support his development by buying a board.

The encoder used is a regular quadrature encoder (not Graycode, altough using a stepper motor as a graycode encoder should be investigated). There needs to be a couple debouncing capacitors (100nF) over each of the leads from encoder to ground. This should go as close to the encoder as possible. In addition, you may want to add a 22Ω resistor in series with the A and B leads, and another 100nF at the microcontroller side.

There is a RX/TX pin. Put this pin LOW for RX or the VFO will not tune. This is a tune inhibit function, and can be used for locking the tuning while TX.

The sketches are made to work on both AtMega328 and AtMega32U4 boards. There is some preprosessor switches to decide between those 2. If you use a different board, you may need to use a different set of interrupt pins, and some other preprosessor switches.

All of these sketches are provided free of charge, as is, for use by experimenters in non-comercial ways. There is no warranty nor support, altough I may answer some questions…

There exists 2 kinds of versions of the sketch depending on what display you want to use:

16×2 LCD  Display

This is the most common one.



If you want to use this with I2C 1602 modules:

There is currently no way of using it directly on the Si5351 sketches I have written. I would assume that the modifications to the regular LCD display sketch would not be too hard to do.
Looking at this page:
Down load the LCD library shown there, you should then be able to
replace the line 58 #include <LiquidCrystal.h> with #include
<LiquidCrystal_I2C.h> and line 64 LiquidCrystal lcd(12, 11, 10, 9, 8,
7); with LiquidCrystal_I2C lcd(0x27,16,2);
I have not tried it, but it should be one way of using those 16×2 I2C displays.



OLED display

There is some nice, small OLEDS around for $3 or so that can be used with a graphics library called U8glib:


This version supports both Arduino Uno with ATMega 328, and Arduino Leonardo with ATMega 32U4.

If you do use this code, please send me a mention, either in the comment or on twitter so other can see what you are doing.

Posted in Si5351, Uncategorized | 5 Comments

Homemade thermal test chamber

Some time back (2016 timeframe) I built a test chamber out of an inexpensive freezer, after having several project that required taking some thermal data over the expected useable range.  I was looking for a used laboratory freezer that goes down to -60° or lower, but none seems available used.


The freezer uses “pentane C” cooling media,  and the initial test suggested that before modification, the freezer, with the pump running all the time would go down to -26°C.

After confirming that the freezer would work, it was time to void the warranty. What better way, than by drilling a hole through the side of the freezer?


I choose to drill through the plastic with a small pilot drill, then poke around to see if there was any cooling tubes in the side. That way I hopefully I would be able to avoid cutting any of the tubes.  Given that I couldn’t feel anything in the foam insulation, it was time for the hole saw.  With a hole through the side of the bottom compartment, a 36mm plastic tube was fitted, some foam spray was used to fix the defects and some clear silicone sealed the gap between the tube and the side of the freezer.

The idea I started with was to make a proper, insulated patch panel, with both coax and DC connectors, but after some thinking, the tube filled with a rag seemed like a more flexible approach.


Ripping out the thermostat and sensor tube was quite easy, threading the sensor cable for a ready-made 1-wire sensor (got this via some time back). Drilling a hole in the wall of the  small compartment was done by poking through the insulation from the back with a pice of wire, then when confirming it was clear off the cooling tubes and drilling through.

A 12V PTC heater with fan was modified so that the fan can run all the time, and fitted to the shelf. This way there will be constant air circulation inside, and the heater can be controlled by the microcontroller.

On the back of the freezer,  the connector block for the freezer had an unused terminal that was repurposed as a terminal for the live wire that before had gone to the thermostat. A 12V 20A switch mode power supply was added, and fixed to the back wall with a couple M3 screws and nuts.


A Arduino was fixed above the power supply, and a small pice of wearoboard with some relays and driver transistors to switch the power to the pump motor and to the heater.

The program running on the microcontroller is a fuzzy logic implementation with a 2°C hysteris. There is also some timing logic to not turn on the pump before the back pressure has bled trough, or the fuse will blow.  I started out with some SCR’s but the cheap eBay SCR I bought had too much loss before it caught fire.

The program can be found here:

I intend to implement a proper dual PID for the controller one day, as keeping temperatures within 0.5°C should not be too difficult. Adding network interface in addition to the USB and a propper way of handling those messages would make it more versatile.

There is currently no cap on how hot it can become inside, but I suspect the plastic casing will not take well to having it run at high temperature for long time.

The inside usable size is approx 320x320x180mm, so there is no way of fitting a 19″ rack in there, but for smaller parts, it will do OK.  Now I just need to build the multiple termocouple amplifiers into a box with some method of reading it out.

An example of measured data:



Posted in Instruments, Uncategorized | Leave a comment

Si5351B FM modulation

The Si5351B have an interesting feature in that it can be FM modulated via the VCXO pin. After some discussions with Jason NT7S about the VCXO feature in his last revisions of the Si5351 library we decided I had to try that.

The VCXO pin is DC coupled and swings the crystal frequency a programmed amount to either side of the center frequency. As such, the input should be biased to a given point (VCC/2) and the input AC coupled.


Points to the first one that can tell what side the sine of the modulation signal are clipping  in the above plot (I should get around to fixing that signal generator).

By modulating with 1KHz and 40PPM pull range, I obtained a deviation of 2.5KHz with 2Vp-p  modulating signal. 5KHz was obtained with 4.3Vp-p. It is quite important to avoid overdriving the input, there will be excessive distortion if the input amplitude is larger than 3Vp-p. In order to obtain 5KHz deviation, a 60PPM pull range should put the needed modulation at less than 3Vp-p.

In addition, the input signal should be filtered, limited and added pre-emphasis.

(This article was written in january 2017, but newer published for some reason.)



Posted in NT7S, Si5351 | Leave a comment