A Storm in the making

A Storm In the Making

Ken takes us through the pilot manufacturing run in Shenzen along with its inevitable hiccups..

Before rushing into mass production of any new product it is sensible to carry out a pilot production run – to make sure that everything works – before you commit to the expense of full production.

My career for the last 20 years has taken me through several such pilot production runs, for various companies and individuals around the world. In many cases I was the hardware engineer on the project – and it was therefor expected that I would oversee the pilot and main roduction runs. As a consequence, I have been travelling to Shenzhen, China, many times since 1999.

Over the years, I have worked with many great people over there, who have gone out of their way to ensure that production runs smoothly, and to ease the stress of meeting tight deadlines in a very foreign country. As a result, I have made many good friends, who are willing to get involved or help out, however they can, in any new project.

The tight timescales of the myStorm Project meant that we would have to combine the Pilot Production with an immediate small run of production units, and this naturally put extra demands on time and resources. However, I am pleased to report that everything went as smoothly as expected, and we now have a batch of 50 myStorm boards heading back to the UK.

In this blogpost, I’ll try to give a flavour of some of the challenges we have faced over the run up to and then Pilot production run.

Sourcing the Components.

I needed to source at least 50 sets of components for the Pilot Production, and this was further complicated in that some of these were sourced in the UK and needed to be shipped across to Shenzhen in time for production. I then found out from a contact at RS Exports Department, that Chinese Customs were cracking down on small shipments – and as such I would be heavily penalised for import duty, or components would be delayed or confiscated in Customs. This was not what I wanted to hear, as any uncontrolled delay might jeopardise our chances of getting the goods back into the UK by Friday 2nd September.


My task was to source the sets of ICs that would be used on myStorm. This included the ICE40 4K FPGA and the ARM Cortex microcontroller and a couple of smaller parts.

The ICE40 was in short supply in the UK, so I had to purchase from Mouser in the USA and have 33 parts shipped across. These arrived on Thursday 11th August, and were repackaged and ready to ship on Monday 15th, along with the other ICs.

I found the Chinese Customs site very confusing – so I decided to sent the ICs to my friend Eva, in Hong Kong, so that she could fill out the necessary customs declaration in Mandarin, and choose a local courier company who could deliver the ICs across to Toby in Shenzhen.

The distance between Hong Kong and Shenzhen is barely 20 miles, but with the complication of “1 Nation 2 systems” this courier process took about 5 days to complete. Toby received all of the ICs on Monday 22nd August.

Meanwhile, Toby had been visiting the Shenzhen Electronics Market and purchasing all of the smaller items on the BOM – such as the passives, connectors, switches, LEDs etc. These items are seriously cheap in China – as most of them are locally produced, whereas ICs generally still come from Western Suppliers, and tend to have little price advantage when bought in China.

The Road to Production.

Not quite a dark Tom Hanks movie, but still with enough twists in the plot to challenge the small team we have working in China.

With the components sourced, it was time to deliver them to the pcb assembly factory- so that they could be placed on the solder pasted pcbs and run through the reflow oven.


On Thursday, Toby messaged me to say that the “plate” – the foil stencil used to apply solder paste to the pads, had a problem and would have to be remade. This would cost $45 and take 24 hours. Not a huge monetary expense, but a delay in production to Friday/Saturday, leaving us just 5 days to ship the goods out of Shenzhen and back to the UK in time for the FPGA course at OSHCamp 2016.

The solder stencil arrived at the factory late on Friday, and a couple of trial pcbs were made to ensure all was well – and that the voltage regulator circuit was producing a stable 1.2V for VCC and 3.3V as the main digital supply rail. I had insisted that we do these tests before placing the expensive main ICs – that represent about $15 per board. The reason for this is that we had seen issues with the dual su[pply switcher in the prototype and wished to lower that risk.

The voltage regulator tests went well, and so I was happy to comit to the 4 panels of 12 boards to be fully populated with all components and run through the assembly and reflow process. Toby worked until 9pm Friday – to ensure everything was good to go – for an early morning start on Saturday to get the batch of boards completed.

In order that I could be online to assist – it meant me getting up very early Saturday morning – about 4am, which is 11am in Shenzhen. Toby informed me that the factory were complaining that the pads used for the 0402 components were oversize and that some of the very light 0402 components were “Tomb-stoning”. This is the process where the solder paste on 2 pad components does not melt evenly, and the surface tension effects of the first pad to melt causes the component to erect vertically – just like a tombstone.

This was not good news – and I assured Toby that I had used the standard footprints for 0402 as supplied by EagleCAD. However – this was probably where I went wrong, and should have read some of the online guides about pad sizes and preventing tombstoning.


Fortunately the problem was not excessive, and any components that did tombstone were easily corrected manually with a soldering iron. By 6pm Shenzhen time, the pcbs were finished and ready for collection.


Toby and I could then relax – after what had been a long and stressful week.

Summary of additional costs:

Shipping ICs to Hong Kong from UK $85
Shipping ICs to Shenzhen plus Chinese import duty (17%) $165
New solder stencil $45
Shipping goods by DHL Express to UK

Lessons for the Future

Shipping ICs around the world often attracts additional costs of import duty – worsened if you then need to pay again when they arrive back in the UK. However because many of the ICs were sourced in the UK and US – we had no real option. Part of the way through this traumatic 2 weeks, I found out that Mouser have a Chinese Division and that almost all of the Western sourced ICs could be bought from Mouser in Shenzhen – and not attract additional charges. This will be the preferred way – moving forwards into volume production.

Because of delays in the Pilot Production, it left us little time to ship the boards back to the UK – and so a more expensive Express service had to be employed. With a little more time and a little less rushing around – this would have saved a bit of money.

The Lull before the Storm?

Ken provides an update for the ongoing myStorm build …

Riders on the storm
Riders on the storm
Into this house we’re born
Into this world we’re thrown
Like a dog without a bone
An actor out on loan
Riders on the storm

myStorm is an open source platform for FPGA development which makes use of Clifford Wolf’s Open source Tool chain “Project IceStorm“. Originally conceived over a beer in late May, we are working to an accelerated timetable, and minimal funding to produce working boards by early September. In this post I describe some of the behind scenes activity and look at ways in which you might wish to engage with the project.

The schedule we are working to is to deliver a small batch of factory built myStorm boards by the beginning of September, and as such, we have had to pull out all the stops to achieve this. The initial design began in early June, and my small contribution was the assignment of the pin-out to the FPGA footprint, and deciding which pins should form the interface for the closely coupled fast 10ns SRAM device. The remainder of the design and layout was done by Alan, during the 2 week period that I was on an early summer holiday. On my return, we kicked the can down the road a few times, tidied up a few points -but really made no major changes to what was actually quite an optimal design.
On July 21st we were hapy with the final layout, and sent the Gerber files across to our friend in Shenzhen, Toby Yu, so that he could get a first batch of pcbs made plus 2 sets of solder paste stencils. These were quickly produced, such that I had stencils and one panel of boards in my hand just one week later on July 28th.
In the run up to the pilot production – Toby had been trawling the Shenzhen Electronics market to purchase the components.
There are a vast range of specialist stalls – each with a huge range of components – on display for you to choose what you need.
Toby had been lining up a local PCB Assembly factory to run our boards through on the 22nd of August. They have recently been manufacturing various LCD display products – and had spare capacity on their pick and place and reflow lines.
LCD_ assembly
The cost of this exercise was approximately $25 for each of the stencils (4 made) and $0.55 for the pcbs – 5 panels of 12 boards made.
Over the weekend of 29th July to 31st we built up three prototypes and tested them at a basic level see Brewing up a storm. Followed by Alan working on further testing and loading firmware, as wells as some initial myStorm Pmod design and build work.


Meanwhile, my job was to create the final Bill Of Materials (BOM) and then purchase sufficient components to allow Toby to build up approximately 50 pcbs in Shenzhen.


Whilst Toby was going to source the 100 or so small passive components and connectors in Shenzhen – literally only about $2 worth per board, I had the task of finding a source of 50 sets of ICs and getting them sent out to Toby in time for the intended production date of 22nd August. The factory would assemble the pcbs in 2 days and then they would be shipped via DHL to Andrew Back in Hebden Bridge – in time for the Open Source Hardware Camp FPGA Workshop on 3rd and 4th of September.


Whilst the majority of the components came from RS Components, they only had 17 of the ICE40HX4K FPGAs in stock – with no stock until November.  I therefore had to buy the balance of the FPGAs from Mouser in the US, and these arrived conveniently on August 12th.


Pete Wood of RS Components DesignSpark had generously offered to sponsor the OSHCamp, and as such he supplied sufficient components to make up 25 myStorm boards. I then approached RS Export for the remaining 25 sets of ICs – as they would be able to cheaply ship the parts across to Toby in Shenzhen.
It was at this point that the wheels started to fall off the otherwise perfect wagon. I was advised by RS Export that the Chinese Customs were clamping down on imported goods, and I would have to do a full customs declaration – an unenviable task if you look at the Chinese Customs online site!


It was now approaching Friday afternoon, and I was no closer to sending the ICs across to Toby. The clock was ticking – and I really did not want to fall to the mercy of the Chinese Customs inspectorate.


In a moment of inspiration I decided to “phone a friend” and made contact with Eva based in Hong Kong, who I have known ever since my first trip to Shenzhen in 1999. Eva and I have worked on various products over the years, for various masters, and she is well versed in how to run the logistics of the Hong Kong/Shenzhen electronic manufacturing business. Producing a customs declaration would not be a problem.
I got the various ICs packed into a box and on Monday 15th 8:30am took one package of ICs to my local DHL agent in Epsom (Mail Boxes Etc). Meanwhile my associates at RS Export had been given Eva’s company address and contact details – and they would ship the components to her in Hong Kong on Monday afternoon.
On Monday evening the DHL tracking information started to come in, suggesting that the components would be delivered to Eva’s Company, Kontoz Ltd by close of business on Wednesday 17th August.  A sigh of relief – I was back on track with the tight pilot production schedule.


Wednesday 17th -The ICs were delivered to Eva at 09:45 on Wednesday morning – local Hong Kong time! – and will be out for delivery tomorrow.  The wheels are back on the wagon again!  With Eva’s assistance, Toby should have the ICs in Shenzhen, in time for a pilot production of 50 boards at the start of next week. Phew!


Working at this accelerated rate is OK for a small pilot production run, but not  really sensible for the main run. Buying ICs in low volume from Mouser, paying UK VAT, DHL shipping charges and Hong Kong and Chinese import duty and courier charges is not big and it’s not clever. However – if you choose to make omelettes – you can’t afford to get squeamish about cracking eggs. Getting things done faster invariably incurs additional expenses.


The bottom line however is that 50 myStorm boards will have been produced for an expenditure of about $2000, in just 14 weeks and test our basic manufacturing partners!

Building the Team – and the Community of “Storm Troopers”

With any complex project, it is necessary to assemble a team of movers and shakers, to get things done on time. I won’t say on budget – because we currently have no budget, and we are all going through the development cycle, unpaid – because they believe in what we are building, and see a future for the myStorm project as a whole.

So far, myStorm has been managed by Alan, Toby and myself, but this weekend we enlisted the help of Mark, an embedded firmware engineer friend of mine, who wants to get involved in the open source FPGA platform. Mark and I worked together for 3 years on STM32 ARM based products – He is a real addition to the team and it couldn’t of happened at a better time for us.

In order to build the community around the myStorm platform we are looking for developers with varying disciplines around Linux, Python, low level Arm based C and Verilog. The initial myStorm package will be a Special Early Adopter edition (myStorm SEA) aimed primarily at low level developers and will be somewhat hardcore until we get the software wrappers tied up and organised around it. We are looking for developers keen to get their hands on one of the 25 SEA boards and help  with development in the early stages. We have a mailing list just about to go live and this will allow interested parties to get in touch and join the waiting list. If you would like to get involved – please use the mailing list to tell us a bit about what you’d like to do, and we can use the list to coordinate our development work.

Vanilla or Raspberry Ripple?

One of the things that has been on my mind this week is the eventual choice of the STM32 microcontroller – there are just so many variants out there, plus the exceptionally low cost ones from Giga Device. The 64 pin LQFP footprint that we have put on the board is fairly generic – a trick I learned from the STM Nucleo range of dev boards – on board fits all family members in the 64 pin LQFP package.

This gives tremendous scope for customised boards – but in the early stages of the project does make for some difficult choices – of the Sophie’s Choice kind – which do you keep, and which do you eliminate from the mix?

The Cortex M3 STM32F103 is a good all round workhorse – and this is what we have chosen for our basic build. However there are some much newer M4 parts, which are starting to offer much more appeal – and possibly be overall more cost effective. There are some cheap STM32F103 devices apparently available in China – but these might be fakes, and fakes lead to expensive mistakes!

Here are Mouser’s prices for 1000+ parts

STM32F103RET6 512K flash $5.17

GD32F103RCT6 256K flash $1.92 – low cost device from Giga Devices in China

STM32F373RCT6 256K flash $2.87 – has benefit of 3 x 16 bit ADCs, programmable gain amplifier, comparators etc.

STM32L476RGT6 1024K flash $5.11

STM32F401RET6 512K flash 96K RAM $3.80

STM32F411RET6 512K flash 128K RAM $4.11

STM32F412RGT6 1024K flash 256K RAM $4.88

As you can see – there are lot’s of devices to choose from – and clearly the STM32F103RET6 no longer represents the best bang for one’s buck!


In the next post we will reveal the long-awaited mailing list and get the public discussion up and running.

The Storm Expands

In order for myStorm to have practical use as a rapid FPGA  development system we need to support many peripherals commonly used in modern digital electronics, inputs, outputs and patches. Our early design constraint around size, complexity and cost restricted the number of peripherals available on myStorm to a very minimum, namely a few LEDs and buttons. The thinking here is that we would provide the maximum connectivity in a format that is simple and accessible, this would in turn enable a peripheral strategy that could be community based. It is simply impossible to build all of the peripheral support directly ourselves, the task is just to enormous to cover everything everybody would want.

Expansion of myStorm

The myStorm design encompasses several discrete peripheral features to maximise connectivity. The first is a dual row 40 pin 0.1″ header to primarily communicate with a Linux embedded device like a Raspberry Pi, this also has a secondary GPIO function with shared pins of the Arm Cortex microcontroller. The Arm Cortex micro controller also has it’s own private GPIO expansion in the popular Arduino Shield configuration, this allows Arduino shields to be used with myStorm via the Arm Cortex controller, there are an enormous number of shields available in the market place to chose from and myStorm can take advantage of that diverse peripheral library. The third tier in or expansion strategy for myStorm is the direct FPGA GPIO connectivity which consists of a dedicated LED array/user interface dual row 16 pin 0.1″ header and a dual row 34 pin 0.1″ Olimex like header. Concurrent with these connectors is myStorm’s “Piece de resistance” 13 Pmod channels formed around 3 x 6 pin 0.1″ and 5 x 12 pin right angled female sockets, providing a total of 52 GPIOs. The key reason for choosing Pmods are as follows:

  1. Pmods are already available and commonly used in FPGA development boards
  2. Pmods have a really handy number of GPIOs 4 for single and 8 for double formats, kinda of a goldilocks number not to big or small!
  3. Pmods are simple to implement, they use standard 0.1″ right angled headers either single or double rows, single versions can be prototyped on strip or patch boards
  4. Pmods can be made  economically on low cost 2 layer PCBs services in Europe, USA or Asia

Pmods have 6 pins; +3v3, ground and 4 GPIOs, the double Pmod is just a pin repetition on another row above. I am designing a couple of eagle templates so you can design your own, they will be optimised for myStorm.

It was therefore an obvious choice for myStorm and it is what we decided to go with as a standard. The rest of this post will focus in on the pmods that I am currently working on.

Pmods for myStorm

Although we are not expected to create every kind of  pmod required, I figured we should at least get the ball rolling and start putting together some useful low cost pmod hardware plugins for myStorm single and double pmod port factors. The first thing I did then was knock up some simple pmod designs and selected Oshpark to do manufacture of the prototype PCBs. Oshpark are an excellent choice for prototyping pmods, their low cost pricing for small one off boards is very competitive and you get 3 of each design you submit (Great for Mr Yellow, Black and White!). I was also lucky enough to get a free super swift upgrade from them meaning my boards arrived in double quick fashion over the weekend.


The plan is to describe all of the pmods I design and provide an overview post and documentation in supporting repositories format alongside the myStorm repository. In order to do this properly however I need the myStorm toolchain fully operational which is still a little way off right now. However, I can introduce some of the the more basic and generic myStorm Pmods in order to kick things off.

I will be sharing these Pmods fully in their own repository very soon, in the meantime the PCBs have been shared on Oshpark so you can order them, directly yourselves if you wish to start building your myStorm deveopment chest. Please be aware that most of these have not been fully tested yet and maybe subject to changes and modifications.

Breadboard Pmod

The purpose of the breadboard pmod is quite simple to allow myStorm to connect to one or more breadboards for hacking, making and general prototyping purposes. It is really useful to have a breadboard kicking around, despite the SMD nature of modern electronics I still use breadboards on a regular basis they still come in really handy sometimes.

What the Pmod breadboard adaptor does is simply connect the 4 GPIO lines of a single Pmod to 4 columns on the breadboard, It also provides a decoupled +3v3 supply and Ground onto the breadboard bus rails. It is actually really simple and does not try to do anything else. here it is in action:


The myStorm Pmod Breadboard Adaptor adaptor can be obtained directly from Oshpark for makers who want to get building straight away.

The Pmod Proto

The Pmod Proto is similar to a regular patch/proto board with 0.1″ hole spacing in a double Pmod form factor. The Pmods Proto’s raison d’etre is simply to act as a substrate for making pmod prototypes, great for just knocking up a soldered/patched peripheral of some sort.


It has a double Pmod header space on the left, a 0.1″ 2 x 4 headers space and  and 0.1″ spaced pads/holes in between to place wires and parts for your prototypes. Both headers have their pads replicated to adjacent pads to make wiring more convenient.  This Pmod also features a set of PCB mounting holes with a 2.5mm diameter which can be used for standoffs or similar as it is a little longer and may need support. Below you can see it in plugged into one of Mr White’s double Pmod sockets.


You can find Pmod Proto on Oshpark if you want to start build some of your own prototype board or peripherals for myStorm ready for yourself or others.

So That is the first part about myStorm expansion, I will follow up with more Pmods and expansion peripherals over the next few weeks along with supporting Verilog (and sketches if needed) where relevant.

Storm in a Pint Pot

Ken follows up part 2 of the myStorm low down, digging deeper into the design choices:


Makeup of myStorm

Following a successful assembly of the first three myStorm pcbs last weekend – I now go into some more of the details of the hardware.


In this part I take a closer look at the target hardware describing some of the main connectivity and features and describe the way in which we are now able to achieve a $30 selling price.
myStorm is a unique combination of Open Source digital hardware – supporting some of the most current, popular devices.
At the centre of the design is the Lattice ICE40 HX4K-144  FPGA connected to an ARM Cortex M3 microcontroller. To complete the set, we have an optional Raspberry Pi or Pi Zero $5 computer which can be used to support the open source programming tools.
The ARM Cortex is used to program the bitfile into the FPGA, from it’s flash memory as well as providing support functions  – such as 5V tolerant GPIO and 12-bit analogue to digital converter channels – when the myStorm is to be used in a standalone usb mode.

ARM Cortex M3 Section

The ARM microcontroller performs several basic functions at different times in the application development cycle.
  • As a non-volatile Flash memory device for holding the FPGA bitfile.
  • As a FPGA programmer communicating the bitfile to the FPGA via an SPI interface.
  • As a general purpose I/O/ADC slave processor – by way of serial or fast 8-bit parallel interface
  • As a system controller for applications where the Raspberry Pi  is not present.
The microcontroller needs a flash memory of at least 256K bytes. This can be initially met with an STM32F103RCT7 – a Cortex M3 in a 64 pin LQFP package. This gives plenty of available I/O for the various support roles, 8-bit communications bus, UART to the Raspberry Pi, usb to PC- and also allows up to 20 digital GPIO lines and 6 x 12 bit analogue inputs to be brought out to Arduino style headers.
I have had experience of the STM32 range of microcontrollers – so these were the obvious first choice – but with a tight budget, not stretching to a $4 mcu, we were obliged to follow an alternative strategy.

Some months ago, through my association with the STM32Duino group, I got to hear about some low cost ARM M3 parts from a vendor in China, apparently binary and pin compatible with the STM32 parts . At first, these appeared to be rip-offs of the STM32F103 series, produced by Chinese vendor Giga Devices.  However, further investigation revealed that they were actually a legitimate new design, which employed a neat idea to produce a low cost, volume range of ARM Cortex M3 microcontrollers for the Chinese market. Because Giga Device is a Flash Memory manufacturer, their M3 Cortex parts have up to 3Mbytes of flash “on-chip”. One advantage of the GD series of microcontrollers is that they are available with very large (2MB, 3MB) flash memories – allowing multiple FPGA bitfiles to be stored in the single device. The four user DIP switches B0-B3 can be used to select which bitfile image is loaded –  or what mode the myStorm boots up in when power is first applied.

Of primary interest for the initial myStorm, however, was their low cost – a 256Kbyte ARM M3 Cortex by Giga Device – the GD32F103 which sells in 1 off for about $2.00, saving us about $2 on a device from ST.
Here are the important breakout of the Arm provision:
  • The 5V tolerant GPIO lines and  are brought to “Arduino” style pin header, shield connectors  – so that external shields may be fitted.
  • 6 Analogue Input Lines AN0 – AN5 with 12 bit resolution brought to shield headers.
  • UART (with bootloader facility) TX, RX – jumper linked to the UART output of the Pi Zero – to allow communication and serial bootloading
  • Up to 18 digital lines – including I2C and SPI
  • USB 2.0 connection for programming, data and power – when the board is used “standalone” without a Raspberry Pi connected
  • 8 bit bidirectional bus interface to FPGA and Raspberry Pi with handshaking lines
  • SPI bus for programming FPGA from bit file.
  • Up to 120MHz clock available using GD32 parts.
  • Several microcontroller options available from GD32 or STM32 product range – allows greatest versatility in ROM, RAM & peripherals
  • For example – up to 3 differential input 16 bit ADC channels (If STM32F373 optional mcu is fitted in place of STM32F103xx)

Raspberry Pi section

When the Raspberry Pi Zero was released in November 2015, it was heralded with a blaze of publicity as a $5 fully functioning Linux computer. Just add keyboard and display with the O/S stored on a microSD card, therefore including a Standard 2 x 40 Raspberry Pi GPIO header for myStorm was a no-brainer, along with an EEPROM for PI-Hat identity.

With its small size of just 64 x 35 x 5mm, and unbeatable value, it appears to be the ideal solution for a low cost development system.  On the left side of the board we have placed the standard 2×20 way pin header that is common on all recent Raspberry Pi boards.  The Pi Zero can be placed directly onto this connector, whilst a Pi 2 or Pi 3 can be connected using a short 40 way IDC cable, providing full linux add on choices.


Some of the GPIO pins made available on the expansion connector form the 8-bit communications bus that is common to both the Arm Cortex M3 and the FPGA.
The other signals available on the GPIO header are to access to the UART on the Raspberry Pi and the I2C – which can be used to identify the myStorm as a Pi Hat.  This is another use of myStorm – where the combination of the ARM Cortex M3 with its 5V tolerant GPIO and the full flexibility of the FPGA and accompanying fast SRAM can be used to form a really versatile I/O expansion board for the Pi – it’s like having an Arduino on “Digital Steroids” attached.

FPGA Section

The Lattice ICE 40 series of FPGAs are low cost and ideal for small, low power FPGA applications. With the advent of Clifford Wolf’s open source tool chain – Project ICE Storm – back in December of 2015 we now have everything we need to create open source FPGA designs using entirely an open source toolchain. This is a monumental achievement, and both Alan and I, working on the myStorm project are deeply indebted to those who have worked tirelessly to make this happen.
From a hardware perspective – we have strived to achieve maximum connectivity from the LQFP-144 packaged FPGA.  To do this we  have brought out the FPGA pins to a variety of standard connectors:
  • 3 single PMOD connectors (3 x 4 GPIO)
  • 5 double PMOD connectors (5 x 8 GPIO)
  • 34 pin Boxed Header “Olimex” style 2 x 17 connector
  • 2 x 8 header for direct connection to 32 x 32 RGB matrix display, or to a VGA output expansion board shared with 2 double PMODS.
In addition to the various on board connectors , we achieve further inter-device connectivity from the 8 bit bidirectional bus to Raspberry Pi and ARM Cortex M3.
For clocking the FPGA we use a standard 100MHz clock oscillator. For additional RAM, we have closely coupled a 64K x 16 fast SRAM to the FPGA on the underside of the pcb. This SRAM can be upgraded to 512K x 16 for memory intensive projects, such as video display etc.

Other Hardware Features

  • Efficient dual voltage switching regulator – provides 1.2 volt Vcc for the FPGA plus the 3V3 for FPGA IO, SPI, memory and ARM microcontroller.
  • 4 USER dip switches
  • 5 USER LEDs  4 connected to FPGA outputs – allowing ‘Traffic Light’ display,  plus one connected the ARM microcontroller – for ‘blinky’ or  ‘programming’ purposes.
  • RESET switch
  • BOOT  header – caters for the boot requirements of both the STM32 and the GD32 microcontroller.
All I/O connectors have been arranged on a 0.1″ grid – wherever possible – allowing simple shields to be constructed using stripboard or perf-board.

Cost Reduction

Keeping the cost down was a primary concern, yet we wanted to make a board that was both genuinely useful and accessible.
To achieve this, Alan came up with a unique strategy:

  1. Low cost FPGA with open source tool chain
  2. Low cost ARM Cortex – to act as “system integrator” and glue.
  3. Optional On board Pi Zero – to host the open source FPGA tools – user supplies this at $5.00 or even add their own existing Raspberry Pi.

Having settled on the ICE40HX4K – as the largest ICE40 available in an LQFP package – and thus capable of being routed on a 2 layer board, we set about identifying the other key components.
Having seen James Bowman’s J1a Forth Processor – a soft core running in an ICE40HX1K part, I wanted to add a fast (10nS) 16 bit wide SRAM – which in a TSSOP-44 package allows parts between 64K and 512K words. With this combination comes the ability to create a number of soft core processors, of which the 16 bit simple processor described in the “Nand to Tetris” course would seem a very suitable candidate.
Other applications include digital instrumentation that require large arrays of fast memory – such as digital oscilloscopes and logic analysers.
The lynchpin in this design is the use of a low cost ARM device, not only to provide stand alone USB communications,  storage (in flash) of the FPGA bitfiles, but also provide a series of spi slave ADCs and  5V tolerant GPIO pins and peripherals to augment the FPGA architecture.


We believe that if an FPGA board sells for around $30 then it will attract a fair bit of attention.
This was going to be tricky – so we set ourselves a BOM on a very tight budget of arount $10 based around the principal components – costed in 100 and 1000 off quantities. LOP relates to “Labour, Operations and Profit” – which is the sum our Shenzhen manufacturing Partners will charge us for the pcb assembly and Far East logistics. This is often quoted at about 25% of the total BOM cost.
            100 off            1000 off
FPGA        $5.56               $5.37
ARM         $1.92               $1.00
SRAM        $1.69               $1.22
PCB         $0.88               $0.49
Connectors  $0.50               $0.40
Remainder   $0.50               $0.40

Sub Total   $10.33              $8.88
LOP         $2.58               $2.22
Total       $12.91              $11.10
Pi Zero     $5.00               $5.00

So in 1000 of quantity, the BOM and manufacturing (LOP = Labour, Operations Profit) comes to a total of around $11, which allows a selling price of about $30.

The customer provides their own Raspberry Pi or Pi Zero, from as little as $5.00.
The myStorm will be provided with a full connector set – but these will be not fitted to the pcb – allowing the user maximum flexibility in the choice of connector options.
Alan has already developed a range of PMOD modules which can be plugged directly into the myStorm board.  These include buffers, mosfet outputs and drives for small dc motors he will follow up with some post around these shortly.

Brewing up a Storm

This weekend Ken and I have been engaged in the very first build of the myStorm board, Ken recalls the last 24 hours – over a well earned pint……


Brewing Up a Storm

This week we saw the arrival of the first batch of myStorm pcbs from Toby in Shenzhen.  The gerbers were sent on Thursday 21st July and pcbs  – plus solder stencil arrived the following Thursday lunchtime – quick work.


Meanwhile Alan and I had been out shopping for the BOM parts – with enough components to build up a small prototype batch of about 5 boards.

We got together on Friday evening at the Surrey and Hants Makerspace and managed to spend a couple of hours painstakingly placing the 80 or so 0402 parts onto the freshly screen-stencilled – solder pasted sample pcb.

In fading light we retired with more than half the SMT components placed, with a view to completing the task in the fresh morning light – when both our eyes and hand co-ordination would benefit from a good night’s sleep.


The placement continued for another 2 hours in the morning and by 11:30 we had a fully placed board.


After some basic checks for IC alignment – we turned on Alan’s home made hotplate – an aluminium block, with a cartridge heater and a cheap temperature controller.


Setting the temperature to about 220C – within 5 minutes the board was starting t show positive signs of solder paste reflow.



The pasting operation had been not 100% successful,  – the definition of the solder pads around the pins was far from perfect – but with the application of heat – and the miracles of surface tension – the solder flowed beautifully – leaving perfectly soldered pins and 0402 components.


A quick bit of remedial work to fix any “tombstoned” components, I was onto the last leg of this demanding race – and soldering the PMOD and Arduino connectors into the remaining through-hole locations on the board.


Initial Tests

Check, check and check again – then correct the things you missed.


First we checked for supply to ground shorts – and the 3V3 was connected to 0V  – because a single 0402 100nF decoupling capacitor had moved sideways across its pads and was shorting across them. Easily fixed – but not so easy to spot  in the first place. A few solder bridges between pins on the 64 pin LQFP ARM package – again easily fixed with the soldering iron and a dab of water-solvent based SMT  flux.

Then it was time to apply the 5V power and test the power rails. All appeared well with 1.2V for the Vcore and 3V3 as the digital supply to the ARM and the FPGA.

On first power-up some of the LEDs glowed dimly – and the power light glowed yellow.


Next we had to find a way of getting some life into the ARM chip – an STM32F103RC – the same as used on the Nucleo dev board. I opted to get “Blinky” running – using mBed to program the board.

Downloaded the ST Link Utility – which included the latest drivers and the programming application.  Once this was down loaded it was relatively easy to use the blink example, change the port Pin to PA_15 and flash the LED!


A first success!


Tomorrow – there are 2 more prototype pcbs to populate and bake.  Once you have done the first one – fixed the snags – the rest is easy.

If you are interested in getting involved with myStorm you can register on the myStorm forum for announcements about workshops, events and product shipping or early access to products etc..

Also there is a good background as to the why of soft hardware in the Quickening

The Quickening

Why is an opensource HDL toolchain like IceStorm combined with low cost  FPGA kits important for opensource hardware and the community?

Modern digital electronics is hard, not just because of the mixed disciplines of engineering and computer science, rather it is the physical nature of the components, PCBs, assembly and testing. Manipulating atoms in the real world is totally unlike manipulating bits in the virtual world. PCBs have to be laid out and designed using CAD tools, boards have to be ordered and manufactured, components chosen and purchased, then we have to wait for them to be delivered before we can solder and assemble them ready for basic testing, inevitably we then repeat this cycle fixing any issues we discover. It is a time consuming and costly process that has many side effects in terms of design and production costs not to mention time to market for any product idea, it is anything other than agile…

Therefore anything that can be done to improve this situation is likely to result in great dividends for the engineers working on a project and likely improve turn around time as well as time to market for ideas. Compounding this, electronics tooling mostly produces monolithic design media and CAD files making it very difficult to manage in a modern fashion. The process lacks modularity, reuse and resists parallel design team strategies. Contrast this with software development with its flexible libraries, modular coding and distributed version control allowing geographically independent concurrent development. It is not hard to see why electronics design appears as if in slow motion compared to it’s agile algorithmic cousins in software development. This modern flexibility is what has helped to power the Arduino and Raspberry Pi communities, what if we could take this further, much further and see how deep this rabbit hole really goes…

The challenge

With FPGA chips we have a near blank slate on which to paint and compose our digital electronic designs and we can do so not using atoms but by using bits instead, this is incredibly powerful, it is to  electronics as the PC was to software. More importantly we are not confined to our restrictive CAD tooling during the design process, rather we have HDL languages which offers us many of the advantages software engineers have taken for granted over the last few decades. So what are these advantages and why are they important in opensource practices and communities?

The solution 

Anyone having developed even the simplest software whether a basic assembly routine, a simple C file or a large web based application will be familiar with the power of modular programming languages, build text files, compilers and linkers. Opensource compilers, linkers and libraries like GCC and binutils have democratised software development and have provided concrete foundations on which impressive opensource projects such as Linux, Apache and Firefox have been built. GCC , supporting tools and libraries have singularly changed the game, combined with low cost PCs and servers, they enabled an opensource revolution. Opensource tools wrapped around modern software development practices like agile with distributed version control , testing and continuous build have enabled software to literally takeover the world! Breakthrough tools like compilers and libraries therefore are the key enablers for opensource community development, proliferation and exponential growth, with GCC, git, bin utils you can change the world.

The Quickening 

Enter stage right ‘IceStorm‘ supporting a Verilog design chain to describe hardware, synthesis and simulation. That is, one can describe the electronics design in a modular fashion using simple text files composed using algorithmic language and build files. This allows significantly more complex designs to be rendered and tested in a fraction of the time of the torturous CAD design cycle. Right now opensource hardware is experiencing it’s GCC moment in the form of Yosys and supporting tools in IceStorm. These are the means and facilitation that will now impart their power and agility within the opensource hardware community development, allowing us to build radically different types of projects combining Verilog with FPGA chips upon the new low cost development boards of our new PC like canvas. This breakthrough  combination allows agility, modularisation and co-operation, allowing divide and conquer strategies that opensource communities excel at, quite naturally, It will also encourage the traditional opensource practice of standing on the shoulders of giants by using sharing and openness, this is then ‘The Quickening’ for opensource hardware and community, the beginning of it’s true exponential growth.


A Perfect Storm

My partner in crime working on myStorm – Ken Boak (@monsonite) has written a guest post about myStorm from his perspective, it’s rather less hand wavy than the quickening groundwork I laid down, focusing in on our first real product and it’s features, enjoy..

myStorm is the perfect combination of a $5 Raspberry Pi Zero, a $1, 32-bit ARM microcontroller and a $5 versatile low power FPGA – an open hardware platform –  brought to life with innovative open source software.

As a low cost development platform for digital devices based on FPGA and ARM technology, myStorm aims to achieve a price point, previously unavailable in FPGA boards.
Aimed at Engineers, Hobbyists and Students of Electronics and Computing Science, myStorm offers a versatile FPGA platform that can be used as a system building block within physical computing devices.

The Story Begins…

I had been wanting to create an FPGA board for some time – especially now since Clifford Wolf’s open source ICE Storm toolset has become available.

The opportunity presented itself a couple of months ago, when following a discussion with fellow embedded hardware engineer,  Alan Wood (@folknology on Twitter) who came up with the concept and philosophy,  over a post-OSHUG beer, we decided that we would produce a small FPGA board using the Lattice ICE40HX4K part.

This dev-board will be needed for a forthcoming FPGA workshop to be held in early September at OSHCamp – held in Hebden Bridge, near Halifax, Yorkshire.

We wanted a “no-nonsense” FPGA development board that would encourage open source hardware enthusiasts to take their first steps with low cost FPGAs and verilog or VHDL. The emphasis would be in producing a low cost board that provided the greatest versatility and connectivity possible – and would form a useful platform that was cheap enough to be built into other projects.  So we aimed to hit the $30 price point – which is the sweet spot for open hardware designs.

Make it So….

The board had to be 2 layer, fit the size constraints of EagleCAD Lite, and use components that could, if necessary, be soldered at home – by those DIY’ers experienced with Surface Mount parts. For this reason we chose a 144 pin LQFP package for the FPGA rather than a BGA – as BGAs are neither very friendly for 2 layer pcb layout, nor for soldering.

Alan did the preliminary system design, whilst I looked at finding an efficient means of routing the on board SRAM to the FPGA for minimum signal skew. The solution was to put the SRAM on the underside of the pcb – directly beneath the FPGA package.

After several Saturday lunctime pub-meetups we settled on an overall design, with which we have played ping-pong on GitLab for the last week or so, slowly refining the layout between us – but is now ready to go for prototype pcb manufacturing.


Low Cost – Achieving a price-point breakthrough!

Seldom do you get much of an FPGA board for under $50 – with the $22 Lattice ICE Stick setting the current lower limit.

But the ICEStick is limited by the HX1K part, and very little accessible I/O.

Like a lot of FPGA boards, it also uses the FT2232 USB to serial bridge to provide programming and communications, but this IC costs around $5, to me has always seemed a rather expensive solution. Something would have to be done to eliminate the FT2232.

Alan had the brilliant idea of using an inexpensive ARM microcontroller to provide the FPGA support role – acting both as the programmer, the store for the bitfile in it’s Flash and as a versatile ADC/COMS slave processor, this also allows standalone operation with a PC via usb.

We believe that with this approach we achieve a board selling price of $30 (£23) which will provide a highly versatile FPGA platform that is cheap enough to be embedded into other projects – it’s the “Arduino” of FPGA’s.

Raspberry Pi integration

A Raspberry Pi Zero (or regular Raspberry Pi) – which can host all of the FPGA  and ARM development tools, provides an integrated design environment for FPGA and ARM  –  at a novel concept in hardware hacking projects.

The Pi can be used to host the Project Ice Storm tool chain, and if fitted via the 40 pin connector on the left to the myStorm board provides a complete integrated FPGA development system without a PC.

In addition to being used as a host system, the Pi has full access to the FPGA via a bidirectional 8 bit bus. The FPGA can if required act as the complete I/O sub-system to the Raspberry Pi. This allows the myStorm board to be used in sophisticated projects, for example digital instrumentation, digital storage oscilloscopes, logic analysers, protocol analysers, waveform synthesis, graphics generators etc etc.

It is unlikely that this level of advanced system “building block” has been previously achievable to the hobbyist for around the $35 price-point.  (A Raspberry Pi Zero can be supplied by the user for  as low as $5)


Connectivity is a key feature, and so the board uses some old familiar friends – including Arduino “Shield” headers to provide access to a rich mix of GPIO.  The GPIO and ADC lines connect directly to the ARM microcontroller, and the digital pins are 5V tolerant.

The ADC pins provide up to 6 channels of 12 bit ADC.  In some projects the STM32 will act mainly as an I/O and coms slave, and for this it can be programmed using the STM32-Duino variant of the Arduino IDE or using mbed – where it can appear as a Nucleo 103.

The Arduino Shield connectors have a further 6 pins available on the “power” connector. These are connected to the STM32 pins but additionally via link resistors to 4 of the FPGA pins. These may be used where you need only a few lines of direct connection to the FPGA.

For small projects, the “Arduino” headers will accept a variety of shields or proto-boards, including the 50mm x 50mm sub-shields that I have developed over the last year.

Whilst many existing FPGA boards tend to be loaded with other hardware – such as LED digits, switches, VGA connectors and audio – we have chosen not to put these on board, but allow them to be added externally.

Our connectors have been placed as far as practically possible on an 0.1″ grid spacing. This allows a 75mm x 75mm “super-shield” to be placed on top – accessing the majority of the I/O lines.

The  industry standard connector for FPGA dev-boards is the PMOD connector – devised by Digilent – so our board has up to 13 of these available, either in the 6-pin single row PMOD, or double PMOD version.

Another recent ICE40 FPGA board by Olimex has defined a large general GPIO IDC header for expansion – and so this 34 pin connector can be added as an alternative to the PMODS on the right hand edge of the board.

Finally, for a bit of fun, we have also included a connector to directly drive 32 x 32 RGB LED panels. These are now available cheaply from several sources – and provide a very graphical way of seeing the output from the FPGA.

On Board ARM Microcontroller

As you can see from the pcb layout, we have included a microcontroller, to the left of the FPGA.

This is the popular STM32F103 part – an ARM Cortex M3, which gives the board a lot of its versatility and GPIO peripherals by providing 12-bit ADC channels and communications interfaces – including USB, UART, SPI and I2C.as well as providing a large flash array, into which a bitfile for programming the FPGA will be stored.

The STM32 is linked to the FPGA by an 8 bit wide bidirectional data bus, complete with handshaking lines.

The Lattice ICE40 series FPGA with a large SRAM attached, connected to an ARM M3/M4 Cortex microcontroller provides the ideal platform for developing soft core cpu designs.

The STM32 can be programmed using STM32Duino – a variant of the Arduino programming IDE.

Other Features

Taking our inspiration from IceStick and the Olimex boards – they both use an ICE40 HX1K part which is about $1 cheaper, but we felt that this might ultimately prove to be a bit too small for hobbyist projects – so we opted for the HX4K part.

We have also made provision on the underside of the pcb for a 16-bit wide fast (10ns) SRAM. Olimex use a 256K x 16 SRAM, and we have stretched this out with an extra address line to allow for 512K x 16 SRAMs.

Some of the design features – summarised:

  • Open Source Hardware and Software
  • Low cost – suit even the smallest budget – about $30
  • A Usb connector for direct programming from a PC or laptop.
  • Compact 75 x 75mm – but with a useful range of connectivity signals available
  • Lattice iCE40HX4K  – 144pin LQFP package with up to 52 I/O lines  – arranged on industry standard PMOD ports
  • PMOD and double PMOD connectors on 0.1″ grid spacing for easy interfacing
  • Arduino compatible shield headers – giving 5V tolerant GPIO, 12 bit ADC and peripherals
  • An onboard ARM M3 for handling USB comms, GPIO and ADC channels and FPGA loading
  • FPGA provided in an LQFP package – for easier layout and possibility of home assembly
  • A fast 64K x 16 SRAM (512K x 16 maximum) – allows soft core cpu system
  • Standard Pi 40 pin (2 x 20) GPIO header – allows optional attachment of Pi-Zero for programming and development – either using a cable or direct header connection to Raspberry Pi or Pi Zero
  • A connector to directly drive 32 x 32 RGB LED panels
  • The ARM Cortex M3 (M4) holds the bit-file for the FPGA in flash, and uploads it to the FPGA on power-up.
  • Raspberry Pi 8-bit Host Port  – an 8 bit bidirectional bus for high speed data transfers between the FPGA, the ARM Cortex M3 and the Pi.
  • 3rd party development open source software – eg  ICE Studio graphical design environment.
  • ARM M3/M4 Cortex provides a USB interface to a PC, plus the following I/O and peripherals:
    • 72MHz/120MHz  64 pin ARM Cortex M3/M4 processor:
    • Arduino compatible with STM32-Duino extension
    • 256Kbytes Flash
    • 32Kbytes SRAM
    • Up to 37 GPIO lines with 5V tolerance  (20 digital I/O available on Arduino style headers)
    • Up to 10 ADC inputs with 12bit 1MHz (2 ADCs)
    • Three 16-bit differential input SD-ADCs (optional – with STM32F373 mcu)
    • 3 UARTS
    • 2 SPI
    • 2 I2C
    • Many 16/32 bitTimers

Following up the first myStorm builds can been perused at Brewing A Storm

Part 2 “A Strom in a pint pot” looks at the task of achieving the $30 price breakthrough