Wednesday, July 22, 2015

How Ragworm helped me create a STM32F746 breakout board in under 2 weeks

EagleCAD Layout


Last time I described how ST Microelectronics had finally released their long awaited STM32F7xx series of ARM Cortex M7 microcontrollers, and how, conveniently for the hobbyist, that a device was available in a 100 pin LQFP package.  All that was needed was a suitable break out board so that the new device could be evaluated and built into cool projects.

The Solution

The solution was to design a simple breakout board, and so the idea of BOB - the STM32F746 break out board came to fruition.

I wanted a fairly rapid turn-around on this board - so without delay I set about the CAD design - commencing after lunch on Tuesday July 7th.

Mini-Projects like this can be undertaken quickly and cheaply by the hobbyist  by using free to use (eg KiCAD, EagleCAD) printed circuit design tools that run on all common platforms.  An idea can readily be turned into a real pcb and a real design with the use of these tools plus the relatively recent online pcb manufacturing services offered by a number of companies.

Previously, I had looked at some of the very low cost pcb services - like SeeedStudio Fusion pcb - which is a Hong Kong/Shenzhen based outfit which will offer very economical pcbs - provided that your design will fit into a 5 x 5cm or 10 x 10cm board size. Outside these board formats, things become a lot more expensive. In addition, overseas shipping charges from mainland China, may cost more than the actual pcbs. Whilst these services will deliver very cheap pcbs - it may take 3 weeks or more from sending the files, to getting the boards in your hand.

Fortunately, there are a number of local suppliers in the UK, who have set up services aimed specifically at the hobbyist and prototyping marketplace. They offer typically a 10 day turnaround for 2 layer, plated through boards.  Provided that your design rules are not too extreme - and you are happy with a minimum track and gap size of 6 thou, and a minimum drill of 0.5mm then these services are fast and economical.

The Design.

The schematic design took an afternoon, as I had to create a new symbol for the STM32F746. Another half day of pushing tracks around and the layout was nearly finished.

This is an easy board as boards go - as the dual row header connectors are almost an exact 1:1 match to the pin-out of the 100 pin LQFP mcu package.  I just had to add the crystal, RTC backup super capacitor and the connectors for connecting FTDI and USB.

It was then a case of finalising the board layout in EagleCAD and then sending off the gerber files to a local pcb manufacturer.

The Sting

Departing from my supplier of over 10 years, who had become increasingly expensive, and had recently made a number of manufacturing errors and delivery cock-ups, I decided to move my business elsewhere and choose a new pcb supplier.

The Worm

This time I chose Ragworm, based in Kent, whom I had had recommended by a number of fellow open source hardware enthusiasts, in particular Glyn Hudson at Openenergymonitor - who regularly uses them for his designs.

The Ragworm operation is one part of a small family run firm, with a traditional pcb manufacturing operation, that has developed an online service specifically aimed at the needs of hobbyists or those that need a small quantity of  economically priced pcbs.

Ouch!

I first checked my existing supplier's prices,  5 off, 2 layer pcbs size 66mm x 66mm on a 10 day turnaround. The price came back at £92.66 - however this is not the full story - once you add 20% VAT and £10 for shipping we have a bill of  £121.19.

By contrast, the Ragworm online ordering process is a breeze - just enter the X and Y dimensions of the pcb and the quantity required, upload the zipped gerbers and the price you see, is the price you pay. In the case of the Bob board  the grand total was £81.02 - a saving of just over £40.  This  33% saving was such a no-brainer, and with the payment process handled by PayPal made the whole process very quick and easy.

The order was placed on the morning of Thursday 9th July, and at all stages of the process, I was kept updated by email by one of the team at Ragworm.  On the afternoon of July 16th, I was informed by email that my pcbs were to be dispatched that day - barely a week after I sent the order. A 10 day service turned around in only a week!

One of the ways in which Ragworm keep their shipping costs down, is by using UK 2nd class post. This is not the fastest service - but under the circumstances it was not a problem, and my boards arrived on the morning of Monday 20th July.

The freshly minted board back from Ragworm

The bare boards were exceptionally well made, with good definition both of the tracking and the screen printed legend.  In talking with Stacey Driver at a local Raspberry Pi event, I found out that this is because they were using a better type of white screen printing ink - that gives better clarity.  It stands out well against the orange background. Whilst these boards use ROHS compliant HASL (hot  air solder leveling) this is ideal for prototype boards  - making them easy to solder by hand.


The next challenge was to make up the pcb to the point where it would run code.  This involves soldering down the processor, the crystal, a voltage regulator and a few decoupling capacitors and connectors.  The picture above shows the minimum build of the board. Not fitted at this stage were the boost regulator (to allow operation from a Li Ion battery) and the USB components.

The board has been designed to provide a STM32F7  equivalent of the STM32F4 Discovery board. This means that almost all of the 80 or so GPIO lines are brought out directly to the dual row 50 way header connectors underneath the board.  For those familiar with the F4 Discovery board - this is a very close copy - with the important interfaces unimpeded by additional hardware. The only thing missing is the ST-Link programmer section - but if you already have a Discovery or a Nucleo board, you can use this to program and debug the board.

Initial Testing.

The FTDI cable provides a source of 5V to power this board - as well as a serial debug port.  The on board 3V3 regulator provides a source of VDD and VDDA.  Remember to connect VDDA - otherwise the PLL and clock circuit will not work, and your board will appear lifeless.

A single orange LED, connected to PC13 shows that there is life.

I had hoped to use mbed to program this board - but their compiler (at the time of writing) does not yet support the STM32F7. Instead I downloaded the 32KB codesize limited version of Keil's uVision 5 - as this provided all the toolchain and libraries that I needed.

After hacking their blinky example - so that it uses PC13 instead of PI1, I very soon had the orange led winking at me - and with the fundamentals of the pcb proven to be working, it was time to get down to some more serious code development.

I hope to use the STM32 HAL libraries to give "Arduino-like" functionality to this board. Additionally, I am recutting the Bob design onto a n Arduino MEGA compatible footprint. This will be the subject of a future post.

In the spirit of open source hardware - if you you would like the EagleCAD design files for the STM32F746  BOB board - you can find them here.  Unfortunately I cannot offer any assistance at this stage with firmware, except for the most simple of Blinky code.

The next blogpost will have more details of how I managed to get some simple firmware running on this board - plus some speed tests - relative to the Arduino.

If you are in the UK, please consider using Ragworm for your latest pcb projects.



From Ragworm - with Love :)


Thanks to Stacey, Stephanie, Adam and all the pcb staff at Ragworm, who turned this mini-project around in record quick time.

Ragworm can be found at the following site: http://www.ragworm.eu/ and also have Twitter presence @ragworm




1 comment:

Rob H. said...

"Mini - Project"?
To a newbie to PCB manufacture like me, this is a Motherboard! LOL.
Great project and nice story.