PCB Layout with fillings

PCB Layout with fillings

 

In the first article on the solar lamp, I described the specifications and the schematics of our solar lamp. It is time to move on to designing the PCB.

Tools used

I used Eagle, as this is a hugely popular PCB design tool, and is free for small PCB surfaces. Moreover, a lot of blogs/sites have got tutorials and Eagle libraries which are pretty much field-proven. In particular, I am quite fond of the Sparkfun and Adafruit libraries, which contain tons of useful footprints.

How the PCB was designed

Getting the parts

Before starting actual PCB drawing, it is essential to make sure that the various components in the schematic are using sensible hardware footprints. Also, some components will usually not be present in the default Eagle libraries or the other libraries available on the Internet. In my case, I was missing things such as the ATtiny43u, as well as the Coilcraft inductor. I had to create an “Aerodynes” library with those parts before being able to finalize the schematics. Going into details on how to build Eagle library components is a bit beyond the scope of this article, maybe I will write something on the subject one day.

The Aerodynes library contains, to this day:

  • The LPS4018 Coilcraft inductor
  • ATtiny43u in SOIC package
  • Aerodynes logo (silkscreen)

Drawing the PCB

Using Eagle, it is pretty simple to start with the schematics, and move on to PCB design directly: all parts are connected in what is called a “rat’s nest”, that is simple straight lines. The first thing to do is to decide on the PCB shape: I went for a small circle, which I drew on the “20 Dimension” layer. This defined the outer PCB area – and will be used by the PCB fab house for cutting it.

The next step is to start playing with the various components and find a good arrangement which both fits into the PCB shape, of course, and also follows common sense rules for placement – power, signals, etc. On this lamp, we have a small boost converter, which is a part which can emit tons of EMI. Looking at the AVR reference documentation for the ATtiny43u, a few pages are dedicated to PCB layout suggestions/rules and a few PCB design examples. I decided to follow those closely – again, no point trying to be smarter than the reference doc if you don’t know better.

A few important points:

  • I used a two-layer board which is pretty much the simplest option you can find today if you want to have your board manufactured. The lower layer (called “16 Bottom”) is essentially a ground plane on this design, and is defined as a large round polygon. The PCB dimensions cut this polygon to the PCB shape.
  • I did have quite a few issues to route things properly between imperial and metric components in Eagle: the symptom is traces that nearly connect, but not quite.

On the top-layer, I used a few polygons for the boost converter layout in order to follow Atmel recommendations as close as I could.

  • Don’t forget to place mounting holes on your board, you never know when you will need them!
  • Silkscreen design: everything that is written on the silkscreen is put on layer “21 tPlace”: don’t forget to put sensible labels next to your components so that when you get the boards, it will be easy to know what part goes where. No need to go overboard, just use what’s necessary.

The final design of the PCB looks like this:

Solar lamp PCB

Note that when designing polygons – and ground planes – actual filling is only displayed after clicking on the “Rat’s Nest” button:

PCB Layout with fillings

PCB Layout with fillings

Manufacturing the PCB – v 1.0

With the PCB ready on Eagle, I then had to select a manufacturer. A rapid look at European manufacturers lead to totally crazy prices for samples, and as usual, I ended up looking up shops located in Shenzhen and around. Being a regular follower of “Dangerous Prototypes”, I ended up selecting their subcontractor’s PCB manufacturing service called “Fusion PCB“. It is a simple and no-nonsense small batch manufacturing service, where you send your GERBER files by email to Seeed, they check them, make them and ship them, for very competitive prices for small quantities.

The main steps for getting started are really to read their instructions:

  • Download the rule check file for Eagle: it will allow you to check that your PCB can actually be manufactured by Seeed and respects their tooling’s capabilities. It is not 100% foolproof but if it fails, you are sure that it can’t be manufactured
  • Then download the “CAM” job file which will run a script to generate the correct Gerber files for Seeed.
  • You can then tune the CAM file a little bit to make sure the Gerber will look exactly as you intend, in particular when it comes to Siklscreen.
You can then visualize all those Gerbers – I use “gerbv” on the Mac, from the gEDA package, simple and straightforward – ¬†and select only those that are expected by Seed Studio. Put them all in a ZIP file, and send by email.

PCB reception

After a few days – barely a week, really – I got everything in the mail:

Version 1.0 Prototype PCB

Version 1.0 Prototype PCB

If you read the article carefully, you will notice that this PCB picture does not match the final PCB design described above: this was actually the v1.0 design: that design drove LEDs in ‘source’ mode, and used a pulldown resistor for the switch, which was unnecessary since the ATtiny can have an internal pull-up.

Anyway, the quality of the boards was absolutely perfect. Time to move on to soldering and writing the firmware!

Tagged on:         

One comment on “Solar light project: PCB design

  • March 3, 2016 at 02:42
    Permalink

    I want to congratulate you for coherently presenting a project in a language that is not your Mother tongue. First rate.

    I plagiarised your design and I, too, now have solar lamps dotted around my garden in DakLak Province, VietNam, and illuminate the pathways to avoid tripping accidents. I use Cadence for PCB layout and my practice is to compress designs, within reason, and fill the bare laminate board with as many units as possible.

    Our local herd of elephants seem particularly intrigued – and they haven’t eaten one yet.

    Hopefully the dated article doesn’t mean you have stopped writing!

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *