Due to WordPress’s abysmal handling of code blocks this blog post is now hosted at https://majenko.co.uk/blog/
So I heard you were thinking about designing your own development board. That’s nice. But do you know how?
It’s one thing to go “I’d like to build my own development board”, but it’s quite a long step from there to “I have built my own development board and it works”.
There’s a number of steps you should go through before you even set pen to paper.
Why build another development board?
There’s millions of development boards out there. A mountain of them are all based on one or two chips (the ATMega328P) thanks to the Arduino making people think that is the only chip you can use. Of that mountain there may only be minor differences between them all. Maybe a slightly different shape. Maybe a different colour. Maybe an additional connector, or one more extra chip on there or something. Really small differences.
So before you start designing your board you have to ask yourself: is there a board out there already that does what I want? Chances are there will be – or something very close that won’t need much adding to it to do what you want.
I’m not saying don’t design a new board, I’m saying you should have a clear picture of exactly what you want your board to achieve, and if there is something that already achieves it, where is the benefit in making yet another one that does the same thing?
Who exactly is your target market? If it’s just a board you’d like for your own personal use and you don’t know if anyone else would find it useful then it really doesn’t matter what you do with your design. If you’re not wanting to sell it to others, or don’t care whether others want to buy it or not, then by all means just go ahead and make whatever you want. However if you want other people to see it and want it then you need to make them want it.
What exactly will set your board apart from the mountain of other similar boards?
One common option is to add extra peripherals to a pre-existing design. Such as taking an Arduino board and adding motor drivers to it for robotics (already been done many times). Basically melding an existing development board plus one or more add-on boards (Arduino users call them shields for some reason) into one single board.
And that’s all very well, but you then dictate, to a certain extent, what the board will be used for. You no longer have a general purpose development board, but instead have a board designed for using in specific projects. That narrows your market, but can also increase the desirability of the board within that market. However, if it doesn’t do anything any different to existing boards out there why would anyone want to buy your new board rather than sticking with an existing one that already has other people using it and thus a certain level of community support? Yes, your board may, in minor ways, be better than the others, but to get people away from the status quo and use your board instead it will have to really be considerably better.
So how can it be that much better? Let’s think…
Can you make it a lot cheaper? Probably not. You certainly can’t compete with the price of mass-produced Chinese imports. So don’t even consider trying. If there are cheap Chinese clones of the board you are trying to improve upon then you have no chance and you may as well give up right away. That is unless your board will be so much better that people want to buy it regardless of price
Do you know what problems people have with the existing boards? What are their main gripes? What are the things they do most often that could be made simpler? In short – how exactly can using your board improve the quality of life of the users, and would it be a big enough improvement to make them want your unknown board over an established and supported board?
Designing a development board for general public consumption is a big commitment. You can’t just design, produce it, and throw it out there for people to use. You have to support it. A board that has no support behind it will not be used. The “community” won’t support it as they don’t know the board. Only you can do that, and that will take a big chunk of your resources – answering users’ questions, creating software resources, writing documentation – it’s all a big drain. If your board is to take off be prepared to handle users with problems. Eventually, if you are lucky, those users you have helped will then go on to help others and your burden will gradually reduce, but it will never go away. There will always be questions which only you, as the designer, will be able to answer.
So you are firmly resolved to build your own development board. You have a clear idea of who is going to use it, how they are going to use it and, more importantly, why they are going to use it. Now you want to start designing it. But before you start you need to have, again, a clear idea about the design. You may know what you want from it, but not having a clear picture in your head of how the whole thing will fit together from the start could be fatal.
So you start with looking at who is going to use it. What is their average technical level? Are they entry-level users who are most at home in the Arduino IDE writing (I hate this word) sketches? Are they more advanced users that are better using a real IDE like MPLAB-X or AVR Studio? Is your board going to be little more than a glorified Arduino, including the Arduino bootloader and associated hardware, or are you going to build in a hardware programmer and debugger for advanced users? How you interact with the board, from a programming perspective, has a huge bearing on who is going to use your board.
Advanced users scoff at the idea of Arduino-like boards because of the lack of proper debugging facilities, both in the board itself and the support software. Arduino users are lost when it comes to using hardware debuggers and advanced IDEs.
If you shop around you’ll notice one thing: Professional development boards (typically from MCU manufacturers) are generally big and expensive. Arduino-like boards are small and cheap. Why is this so? Because the professional ones are aimed at professionals. The support circuitry alone is considerably more extensive – better power subsystems, built in debugger and programmer, more interfaces, often multiple additional peripherals for demonstration purposes, etc. Arduinos tend to be a chip on a board with a linear regulator. About as basic as you can get, really. The design difference (and difficulty) between the two is huge.
The majority of new designers though will be Arduino based since they are progressing up the ladder. So we’ll assume that from here on in.
If you have come this far then you must have a good idea of what you want to design, who will use it, why they will use it and, importantly, how they will use it. So now to design it.
This is actually the easy part. You know what you want to make, and most of it has already been made in some form or other – it is just now down to you to stick all the bits together. A bit like playing with LEGO®. It is mainly a case of finding an existing board and add-on boards that do what you want and combining their schematics together. That of course is assuming that they are all open source and you are allowed to do that. Most are, these days. Especially as most low-end base boards are little more than a chip on a board, and many add-on boards are just the reference schematic from the datasheet for the core chip on the board.
One big pitfall with that way of working though is that often some things are overlooked – especially when it comes to power management. The default power circuitry on many development boards is not wonderful. Linear regulators abound and, while they are cheap, when you start adding more hardware they do tend to struggle. Building a new board with built in hardware while still using the original power supply from the development board you decided upon can often lead to failure as the regulator overheats from the extra strain you have put on it – especially if you then expect users to add more hardware to it themselves as well. However designing a good switching (aka Buck) regulator circuit is itself a troublesome task. Get it wrong and you get bad performance, noisy power rails, bad EMI emissions, etc. If you don’t mind paying the premium there are modules out there that make life easier by including things like inductors within them making layout less fraught, but they can be quite expensive. Maybe having multiple linear regulators would be a better solution for your design? One to power your core circuitry, one to power the users’ external components, etc. Spread the load. I reiterate: the power circuitry on any new design needs careful consideration and design. It’s not something you can just rely on in an existing design that you have built upon.
The choice of chip to base the board upon can be a deal maker or deal breaker too. Yes, you can take an ATMega328P based board and add a load of peripherals to it. However is that really the best choice? You don’t get a whole lot of IO pins on a ‘328P, so once you have added your peripherals do you leave enough pins free for the user to interface to? Have you used all the internal peripherals of the chip communicating with your peripherals leaving nothing for the user to use? Remember, you have to account for not only what you want to connect the main chip to within your board, but what the end user might want to connect to. So choosing a different chip may be a better plan. Many boards are designed with the ‘328P just “because”, and it’s the easy option. It’s what every one else is using so it’s what they used. And that just adds to the “everyone is using it” problem. Just because everyone is using a chip doesn’t mean it’s the right chip for your project. Maybe stepping up to a bigger chip, such as the ATMega2560 would be a better fit. Or do you even really need to stay with AVR? There are a myriad of options out there from different manufacturers, many of which are fully supported by plugins to the Arduino IDE. There’s a huge pile of ARM based boards out there now using various plugins to the IDE. Arduino themselves make some. There’s PIC32 boards using the chipKIT plugin. The list goes on.
And of course you also have to write the support software for your board. A bootloader may need to be specially compiled, depending on the chip chosen. Board definitions for the Arduino IDE will have to be made. Many boards based around the ‘328P say “just use the Uno board in the IDE” which to my mind is just pure laziness on the part of the designer. The pin definitions will be just plain wrong because of the presence of the extra peripherals. Working out which IDE pin maps to what will frustrate users (they are, I have noticed, generally too lazy to look things up in manuals). It is just unprofessional. To get wider recognition of your board you want a real definition for it and, if at all possible, liaise with the authors of the plugin (or Arduino directly) to get your definition included in the default distribution (often that is just a pull request on github away – it’s free advertising). Or with the boards manager system in the IDE (a poor copy of UECIDE’s system which came first by a long time) you can publish your own definitions as an easy to install plugin. There really is no excuse any more for “just use the Uno board and hope”.
So now you have read all that, are you man enough for the task?