A Journey into Building Your Own Electronic Hardware – Part II
We continue with Part II of the series “A Journey into Building Your Own Electronic Hardware.” After we reviewed the first four steps in Part I here, we are now ready to build the first physical prototype of our new hardware!
5. Prototyping
Time estimation: 3 to 8 weeks (including international shipping if needed)
Just like you can use a 3D printer to quickly prototype the mechanical enclosure you want, there are many off-the-shelf prototyping solutions in the electronics world that you can throw together to build a prototype. If you need small and low power microcontrollers to read sensors and control various devices, there are endless options of modules and development boards from Hexabitz, Arduino, Sparkfun, Adafruit, Espressif and many others. If you need more computing power to build mini embedded webservers or run machine learning and image processing algorithms there are many single-board computers from Raspberry Pi, Beagle Bone, Nvidia, Intel etc. Also, if you are working with advanced microprocessors or analog and digital chips, virtually all manufacturers and OEMs have their own development and evaluation solutions to get you started.
This is not the kind of prototyping we want to talk about here though. Hooking up different development boards and off-the-shelf solutions together should be done in Step 1: Research and Concept Development. Once you test your concept with off the shelf solutions, you should move on to custom-made solutions for the following reasons:
- Most investors and stakeholders won’t invest in your project if you’re completely dependent on off-the-shelf solutions. Their first reaction is, what prevents anyone else from copying your product if it’s readily available? You need to create some barrier to market by investing in your own custom-made design.
- It’s unlikely that available solutions can serve your needs exactly. Sometimes, you can achieve the required functionality with off-the-shelf development boards but their size, cost and formfactor make them practically unusable in real-life testing scenarios.
- Going through a prototyping round for your custom-made hardware design teaches you invaluable information about the cost, time and challenges involved in developing and manufacturing your hardware. This insight is sometimes as useful as the hardware device itself because it directly affects your business plans and chance of success.
Prototyping high quality PCBs is usually a lengthy and costly process as special molds, called Stencils, need to be laser-cut for various PCB layers. Manufacturers usually combine multiple orders together in a single batch to reduce the cost of operating their production lines. Usually fabricating the PCB itself can take between 24 hours to 6 weeks for HDI and rare/complex PCB stacks. The biggest question here is whether you build your PCB inshore or offshore. There’s no denying the fact that building a PCB in China or India is much cheaper than building it in Europe or the US at the same exact quality. It’s a decision of time vs. money. You can build same PCB in the US for $4000 and receive it in 3 days while it costs you in China less than $1000 (with shipping included) but it’ll arrive in 3 weeks. For larger corporations, $3000 is a steal for saving two weeks. However, to most startups saving $3000 is a big deal. You are not going to beat your competition and save the world in these two weeks. And unless you’re a startup swimming in VC money, saving $3000 is important for your runway and survival. I’m not advocating here for offshore vs. inshore. There are always optimal options for each scenario. However, the main point here is that early-stage startups need to optimize cost vs. time. Saving a few weeks shouldn’t break the bank. We will discuss more about prototyping in a future article including sourcing components for your prototypes and the magical relationship between quantity and cost.
6. Firmware Development
Time estimation: 2 to 8+ weeks (can run partially in parallel with other tasks)
It’s hard to imagine an Embedded Electronics System these days that does not use a form of computing. It can be small, low power Microcontrollers, or large power-hungry Microprocessors, or ultra-fast FPGAs or complex System-on-Chips (SoCs) combining all these technologies and many more. All of these embedded computing technologies require some sort of programming and this is called firmware. Firmware development is becoming increasingly the most important and most complex part of developing cutting-edge electronic hardware mainly because:
- All sorts of electronic systems need to have a form of computing to implement simple or complex algorithms. These algorithms give the device its true functionality and differentiating features.
- Competitors can easily copy hardware design (PCB and mechanical). However, firmware is much more difficult to hack and copy, which is why companies invest most of their creative IP in the firmware side.
It is typical that firmware development takes more time than hardware. Starting with a few weeks but might reach a year or more when dealing with complex Microprocessors. It’s common as well to assign multiple firmware engineers on the same project splitting design work in parallel to accelerate development time. Some people specialize in developing firmware for a specific type of computing platforms (MCUs, FPGAs, Linux MPUs, etc.) However, hardware platforms aside, firmware development can be divided into four main categories in genral:
- Device drivers: This is the part of the code that deals directly with computing hardware. For example, performing basic mathematical calculations, reading/writing to memory, reading analog sensor values, communicating with digital peripherals, and controlling power consumption, among other tasks.
- Middleware: This is a higher firmware layer that performs tasks that are not related to hardware but required to perform the correct hardware functionality. This may include handling TCP/IP protocols to connect your hardware to the Internet, implementing file storage systems to deal with various storage media or scheduling various tasks to operate in real-time via an embedded real-time operating system (RTOS).
- Algorithms: This is the part responsible about most value-added features in your system. This may include algorithms that process electrical signals, filter and formulate data, control other devices or produce nice visualizations. The field of algorithms is vast and includes machine learning and artificial intelligence (AI), digital signal processing (DSP) algorithms, control theory, compression and security algorithms and many others. This task is usually shared with the software development team as many algorithms can be shared and ported between the two domains. However, the power, memory, and processing resources available in embedded systems are usually much more limited than standard computers adding more constraints on porting such algorithms from software to firmware.
- Bootloaders: This is the part of the code responsible for updating firmware code itself, either on the production line, or later when the device is being used. Sometimes critical bugs and mistakes are discovered, or simply more features are developed and it’s useful to deploy them to all existing devices in the field. Upgrading software on a computer is relatively easy. However, upgrading firmware on thousands of embedded devices already used and embedded in our daily lives is a complex and risky task. Delivering the new firmware to the device itself is a challenge on its own as reliable Internet connection might not always be available in its native environment. The upgrade process itself is risky though, as errors in the process can render the device unusable and permanently unfixable without return to the manufacturer (manufacturer recall). It is the worst nightmare of any manufacturer to impose a firmware update on thousands or even millions of devices in-field that results in bricking all these devices. It is the kind of mistake that bankrupts the company.
We will delve more into the mysterious firmware development world in a future article.
7. Software Development
Time estimation: 2 to 8+ weeks (can run partially in parallel with other tasks)
Software development entails developing programs that run on computers (PC, Mac, Linux, etc.) as well as servers (your own or in the Cloud). It also expands to other devices such as smartphones and single-board computers. Although you are building your own hardware device, these days your hardware is expected to interface to most, if not all, computing systems including computers, mobile phones and Internet servers. Software engineers are also concerned with developing algorithms that process data and make something useful of the processed information whether these algorithms run on your own embedded hardware or on a distant server.
Hardware platforms aside, software development can be divided into five main categories in genral:
- Frontend Software: This is the software part that interfaces with human users. Usually called Graphical User Interface (GUI) or User Interface (UI). Sometimes it’s expanded with User Experience (UX). Since this is the software part that interfaces directly with your users, it’s important to give it enough attention. You might have a superb hardware product but fail to attract customers due to badly designed UIs. UI/UX development can span a wide range of computing systems from smartphones and smartwatches to tablets and industrial terminals.
- Backend Software: This part of software does not interface with human users but with other machines. It’s responsible for configuring the computing hardware, communicating with other machines and all sorts of other activities that do not deal directly with human interpretations or visualizations. It may run on personal computers, servers, or any other computing nodes such as Raspberry Pi single-board computers or smartphones.
- Smartphone Apps: Smartphone usage, these days, is so pervasive that you cannot imagine a hardware system that does not want to talk to a smartphone to report information or receive commands. Smartphone Application development has taken a path on its own inside the software world. Usually, development here is also split into frontend and backend and it comes back to either building an Android or iOS application or both.
- Databases: Almost any software is either processing or storing data or doing both. Data storage and handling within databases is a required task for most software applications, especially those dealing with Internet-of-Things (IoT) devices. Databases can be created locally on your computer or smartphone or in a remote server in your enterprise datacenter or in the Cloud.
- Algorithms: This is a cross-disciplinary task that spans both the software and firmware domain as we mentioned earlier. Algorithms include machine learning and artificial intelligence (AI), digital signal processing (DSP) algorithms, control theory, compression, and security algorithms and many more that span a wide array of mathematical origins and applications.
We’ll talk more about software development for hardware products in a future article. Up to this point, our hardware prototype is up-and-running and can be demoed to potential users to collect feedback and improve (or exit the market before you invest more time and efforts!) If you want to bring your product to the masses, though, there’s still more work left until you can manufacture it and sell it through. We’ll go through the remaining size steps in the third and last part of this series.