Making My Own PCBs
I can certainly say that over the years electronics has changed a lot. For example, in the late 80’s when I started making my own hobby projects it was all through hole leaded parts and using strip board, plastic boxes (even recycled ice-cream tubs) and scrapped electronics boards out of VCR’s etc to build some crazy idea you had. Far too many years later and a career of designing electronics products later I wanted to get back to that original hobby way of working and making projects at home. The problem is not only have the parts become surface mount, a lot smaller but my eyesight is far from what it was. So, I asked myself, how do you go about making hobby electronics today and on a budget?
One thing for time having past is that not only have I learned a lot more but the tools like schematic capture and layout are a massive leap forward from what I had back then. I picked up KiCAD as the go to tool when it comes to hobby electronics despite using Altium in my day job, KiCAD is free, powerful and full of support from the online community. Certainly, when I stared out with Cadstar or EasyPCB there was a user guide, and you got on with it. So, it seemed perfectly reasonably to use a free tool for hobby electronics.
In order to test out how to make a hobby electronic boards I decided to start with something very simple. A microcontroller, onboard regulator and a few connectors for access to a UART, I2C and analogue input etc. I have in the past used Microchip parts but also been a fan of the mbed boards based on the ARM core. So, when looking around I came across Phils Lab, a design engineer who has some really good guides on designing electronics but also a video on using KiCAD. His guide / design uses a STM32 part that also has an ARM core and so that basically that made my mind up and I followed along.
As I said at the start the big challenge for me is getting a PCB made and fitting the small parts at home. I know people used to use acid chemicals and UV light to etch PCBs at home but that’s horrible stuff. However, the trend is to use online rapid PCB manufactures like JLC and PCBway. I certainly remember this idea starting off around 10 years ago when you could use PCBtrain in the UK to get cheap PCBs. The video I was following along with used JLC but I had heard a number of people recommend PCBway. I also saw that Phils Lab in later video was also sponsored by PCBway. So, I decided that I would opt for PCBway – its good enough for him after all.
When designing a board with small parts under 0603 you really start to struggle to solder them without good equipment. The STM32, the Crystal and the USB connector have very small 0.5mm pitch or pins you just cannot access. So, there was no way I was fitting them, therefore I basically had to choose having a PCB made and parts fitted.
I was well impressed with the results having the boards delivered in a few weeks at a good price too. OK a little more than you may pay for a round of drinks or a meal out, but I guess electronics as a hobby has never been super cheap.!? I received 5 off boards and all were perfect. But I then wondered if I could get the cost of making my own boards even cheaper?
The next project I started on was again using the same main parts including the STM32, this time using a USB-C connector and with strip pins along the side so I can plug it into a bread board. This time I decided that I would have a go at placing the parts by hand, but not solder them instead I would try out using a stencil and solder paste along with a hot plate.
Having sent off my design and finding that cost was down around 33% I ordered the parts I needed from DigiKey and waited for them to arrive. In all along with parts I was still saving money and in my mind, I only had to fit parts to the boards I wanted to. You get a minimum of 5 PCB from PCBway and I could just build 1 or 2 if I wanted and keep the parts for another project.
I also obtained the MHP-50 from PCBway. It’s a small 50mm x 50mm hot plate for reflow work and about the same size of the board I had on order. It also has a nice feature of an added reflow profile. This allows you to ramp the temperature up and follow the same profiles the big SMT manufactures use.
With everything in hand, I tried applying solder paste! Let me tell you it’s not that easy! I tried a few methods of sticking the stencil in place and using scrap boards to support it etc. Any search on YouTube will show you people banging out good results. I think I went through a number of boards before it stopped smudging and getting a constant covering. Then come placing the parts and with the help of a USB microscope I also made just as bad a job of placing them. When I tried the reflow, I ended up with solder shorts or bad joints. It took a while, but I found the MHP-50 has a temperature sensor under the hot plate that was not making contact, and the hot plate was way over temperature.!
Having fixed the hot plate my placement of parts was improving. Thankfully I had this time picked larger parts to place but personally found getting the STM32 aligned on its pads the hardest part. With lots of experimentation, I did finally get a working board but at the expense of a few dead STM32’s and a few burnt PCBs.
The few that I got working all worked well and I can’t be critical of PCBway with the quality of the PCBs or the stencil as it was just down to my abilities. I did then spend some time looking at how to apply solder paste better and some basic tools for placing parts however I felt this was going beyond my budget for a hobby?
I decided to reorder the boards but this time with PCBway doing the assembly. These arrived and worked perfect however I did get hit by an import duty for customs. I guess I hit some limit on the cost but will be looking at this in more detail next time as was certainly an unexpected cost.
So how hard is it to make electronics now? Well, I found KiCAD very good and using someone like PCBway to make your boards was also a good experience. I feel I lost the experience of the whole “building it yourself” is lost when you work this way, but I guess that’s how the world has changed? I would like to find someone that can make a single PCB populated with parts even if you get a few extra blanks as having five made puts the price up I feel. I understand that the company has to have a minimum spend or build but I would really like to see what other people have found and look at other options. I will also spend some time looking at the whole reflow process and self-assembly as I think that’s where I can save some more cash.
What’s next – well I’ve made some extra boards that I’m going to sell off and will most certainly be making some more project so watch this space!
The Most Powerful Debugging Tool Ever – The LED
There was a time when debugging was not easy. In this blog I want to share some of the stuff I used to do to debug code and hardware – the hard way. So going back to when I started out in the 80’s there were few fancy debugging tools and the ones that were around were expensive.
There was a time when debugging was not easy. In this blog I want to share some of the stuff I used to do to debug code and hardware – the hard way.
So going back to when I started out in the 1980s there were few fancy debugging tools, and the ones that were around were expensive. In my first job we used Z80 processors, which was good because I’d used them when playing around with my ZX81 and ZX-Spectrum. Getting a board to work the first time was not easy. Current micros can be loaded with code, but a processor needs RAM, ROM etc. to get you started.
Once the first board was made, I’d put some basic code in to just loop. To test if it was working, I would disconnect the clock and run it from a 555 timer at about 3Hz. Yup that’s right, very slow! I would have LEDs hanging off the Data Bus and Address Line. In fact, I had a header that would fit between the CPU and the board. This way I could see the lines of code running. After that I would progress to getting an I/O line working, slowly adding more and more code, testing each part of the board bit by bit.
Over time, we got a working CPU board that would run code and address RAM and ROM correctly. It was not a massive task to test and develop, but it was important to get right early on. After this and getting an I/O port working, you get to the point where we are today with current micros and can have a blinking LED – the first universal debugging tool!
Many of my designs still have a place for a LED on an I/O pin. This is normally used as a heart beat indicator. That is, every time the code loops around, you toggle the LED and are able to see that the board and micro is still running.
The blinking LED is, however, a very important debugging tool that I think people forget about today even with modern circuit debugging tools. Consider this: The faster your LED blinks, the quicker your code is looping! Now hook this to an oscilloscope and you can monitor your loop time for the micro and detect when big step changes happen during events.
Another use of our Blinky LED is for interrupts. Turn the LED on when entering an interrupt and off again when you exit. From a visual point of view the more your LED is on, the longer you are spending inside your interrupt code resulting in less time running normal functions. On a scope you can monitor what percentage of time your code is spent inside the interrupt code and if external events affect it. All this from an I/O pin output!
After the LED, we used to hook up a Display or a UART for serial communication to a PC. This then allowed for visual monitoring of values inside the chip and software. Today this can be done with in-circuit debugging tools connected directly to dedicated code or hardware in the chip. At one point in time I even designed my own in-circuit debugging tool for a Z80 CPU that allowed single stepping of code. However, I still feel that by far, the most useful debugging tool is a single I/O pin and a blinking LED.
The Dyslexic Engineer
I found out I was Dyslexic when I started secondary school at the age of 12. By the time I left I had poor grades and was told I would not amount to much. However Dyslexia is not a disability or have something missing in our brains, its just the way we are wired up. So how does someone with dyslexia get by in a world or words and what magic powers have some of us harnessed that has given us an advantage over others, like me in becoming an electronics design engineer.
I found out I was Dyslexic when I started secondary school at the age of 12. By the time I left I had poor grades and was told I would not amount to much. However Dyslexia is not a disability or have something missing in our brains, its just the way we are wired up. So how does someone with dyslexia get by in a world or words and what magic powers have some of us harnessed that has given us an advantage over others, like me in becoming an electronics design engineer.
At the beginning I can remember looking at black boards or pages of text having no idea what other kids around me were seeing. For me the pages may have well as been blank for all I could gleam from them. However I was lucky as when I started my secondary school my teacher spotted what I was having problems. I was tested for Dyslexia and found to have a mild form. The approach for me in my English lesions from my teacher was not to learn to read although that was a part of it, but more to focus on the things that dyslexics and autistic people have, the ability to see things differently. For me I was able to rotate images in my head and look at drawings and describe what could not be seen or how it would look form a different angle. I also found i could memorize chucks of maps, drawings etc in a almost photographic type way. My teacher encouraged these skills and gave me and others more confidence which lead us to start learning to read more and more. By the time I left school at 16 I had reading age of around 10.
Over the years I have slowly got better at reading and writing but its still painfully slow compared to the speed my brain wants to run at. Computers and PCs were just entering homes and when I started my ONC in electronics at collage I know I would have never finished it or my HNC without Word and a spell checker!
Since then I've relied heavily on computers to get by in my working day. Lists are important to me and where I work we have an internal wiki which I use to assemble ideas. Just more recently I have found www.workflowy.com which is a really nice little online tool for generating lists. I have also used a package called Bugzilla which is fab at tracking faults, bug or issues on software projects. Bugzilla however is quite flexible and can be used on hardware projects or even just you day to day life. Being dyslexic meant I had to be better at project managing my day at work - unfortunately I've never quite got it to work at home.!
Another really good tool I use is to block out my calender in Outlook using bright colours. each colour means a different type of task and allows me to look and see quickly what I've got planed. I also block out my whole day, not just for appointments or meeting, but anything I want to get done. This way I don't forget what I have planed and have already set aside time to do it.
Many of these things may look and sound like project management tools. In away I have stolen them from this area of business but you will find that these techniques are being taught to people today with dyslexia. these are methods of giving back Dyslexics some control.
There was recently a program on the BBC called "Don't Call Me Stupid" which follows the UK actress Kara Tointon who explain just what it like to be dyslexic and for anyone who watches it you will also see the emotional impact that it can have on a individual too. For me I forgot just how hard I found it to get though school and now having tools and work grounds I don't get those feelings of depression and frustration anymore.
For me I now find Dyslexia a gift. I do not think I could come up with design ideas and play around with stuff in my head if I was not like this. I now talk around with large chunks of circuits and software in my head that I can think over, try ideas and work stuff out. It’s like having a 3D whiteboard in my head. I still need pen and paper but in a funny way I like being dyslexic. I can get by with the reading and writing and getting my words mixed up, however I think I've come out better off in my career because of the way my head is wired up.
I would say to anyone who is dyslexia not to give up. The program link above has links to good sites that can help. Many are told that they will never come to much and give up too easy. I have always aspired to be more, maybe because I'm dyslexic,and so should others.
UPDATE March 2014 - Since writing this post I have become a Chartered Engineer. It was a big deal for me, to be seen by other engineers (The IET) as having what it takes to be a quality engineer. I feel that this shows that someone with dyslexia can achieve their dreams!