{"id":2734,"date":"2023-04-07T15:20:35","date_gmt":"2023-04-07T15:20:35","guid":{"rendered":"https:\/\/embedwiz.com\/?p=2734"},"modified":"2023-04-10T02:24:23","modified_gmt":"2023-04-10T02:24:23","slug":"arduino-prototypepto-final-product","status":"publish","type":"post","link":"https:\/\/embedwiz.com\/arduino-prototypepto-final-product\/","title":{"rendered":"Arduino Prototype to Final Product: How To Build a Manufacturable Product After Prototyping"},"content":{"rendered":"\n
In this article, we will look at how to advance from the Arduino prototype to the final product<\/strong> after proving your project works.<\/p>\n\n\n\n Arduino boards are ideal for rapid prototyping, but you can\u2019t use them to build the final manufacturable product because they are huge. <\/p>\n\n\n\n Picture fitting an Arduino Nano or UNO in a smartwatch. Impossible, right?<\/p>\n\n\n\n So after fine-tuning the project and ensuring it works, you have to move to the next step of making the final production product. <\/p>\n\n\n\n Here s a breakdown of the steps you need to follow.<\/p>\n\n\n Since you used an Arduino microcontroller, the first step in transitioning to a final consumer product is to design a custom microcontroller circuit to replace the one used in the board. <\/p>\n\n\n\n And the easiest way to go about this process is to pick the same microcontroller as the one used in the Arduino model you used in your project.<\/p>\n\n\n\n All Arduino models (except for the 101<\/a>) run on Atmel microcontrollers, and most of them have Atmel AVR 8-bit microcontrollers, such as the Atmel ATmega328p<\/a>.<\/p>\n\n\n\n A pinout diagram of the ATmega328p<\/em><\/p>\n\n\n\n Found in the UNO, this chip is a thru-hole dual-inline package (DIP) version that plugs into a socket. <\/p>\n\n\n\n The socket allows easy replacement if the microcontroller gets damaged in the development kit.<\/p>\n\n\n\n But a socketed chip is not a good idea for the final product because it will take up too much space. <\/p>\n\n\n\n A surface-mount package is tinier than the DIP, and the lack of a socket makes it even more compact.<\/p>\n\n\n\n And besides size, SMT packages are cheaper than thru-hole components, and their assembly costs are lower. <\/p>\n\n\n\n So the production process will cost less when mass-producing the finished products if they have SMT chips.<\/p>\n\n\n\n An Arduino LCD project (note the ATmega328p chip on the board)<\/em><\/p>\n\n\n Yes. And you can get a more powerful chip with more memory, such as an ARM 32-bit Cortex-M microcontroller, which is cheaper than the ATmega328p.<\/p>\n\n\n\n But since the chip is not the same one present in the Arduino board, you might have a more challenging time or work when transitioning from the Arduino prototype to mass production.<\/p>\n\n\n\n However, if you know your way around electronic products and coding, you can use the more advanced chips.<\/p>\n\n\n Whether you use the Arduino Leonardo, UNO, Mega, etc., you must analyze the board schematic to determine which other components you need.<\/p>\n\n\n\n The good thing is that Arduino has an open-source architecture, meaning you can get these PCB layouts<\/a> for free. Let\u2019s look at the Arduino UNO PCB design.<\/p>\n\n\n\n On the board\u2019s schematic diagram, you will notice it has two integrated chips: U3 and ZU4. U3 is an ATmega16U2 chip, while the ZU4 is the ATmega328p.<\/p>\n\n\n\n Since the ATmega328p does not feature a USB programming port, the ATmega16U2 handles USB to UART conversion.<\/p>\n\n\n\n An Arduino UNO board connected to a computer via its USB port<\/em><\/p>\n\n\n\n So if you want to build a commercial product that requires USB communication via a USB port, you\u2019ll have to include the U3 in your PCB prototype.<\/p>\n\n\n\n But the best option is to use a microcontroller with a built-in USB port, such as the ATmega32U4 found in the Arduino Leonardo. However, the chip is pricier.<\/p>\n\n\n Another critical factor to consider is the support circuitry around the primary microcontrollers. <\/p>\n\n\n\n While still considering the UNO, each of the two chips has a 16 MHz clock, several serial interfaces & GPIO pins, decoupling capacitors, etc.<\/p>\n\n\n\n But one of the critical areas to look at is the power supply circuit. The board features a dual operational amplifier<\/a> (U5), one being a DC voltage comparator that determines if the board is getting its power from a USB port or 6-20V DC input.<\/p>\n\n\n\n An op-amp circuit symbol<\/em><\/p>\n\n\n\n If it\u2019s coming from the 6-20V DC input voltage, the onboard linear regulator converts it to a 5V power supply. Otherwise, the board switches to USB power.<\/p>\n\n\n\n Using a linear regulator is okay for some products but is inefficient for battery-powered products or those that consume high current levels.<\/p>\n\n\n\n So we don\u2019t recommend using the NCP1117 if the input voltage from the power source is significantly higher than what you need to run the circuit.<\/p>\n\n\n\n Consider using a switching regulator instead, which is more efficient. But there is a catch. This regulator is more complex than the linear type. <\/p>\n\n\n\n So if the battery voltage that flows into the device is slightly higher than 5V, you can consider using a linear regulator.<\/p>\n\n\n\n Arduino also creates 3.3V, and we can use a linear regulator for this process because the differential voltage from the 5V already produced by the switching regulator (buck converter<\/a>) is minimal (5V-3.3V=1.7V). <\/p>\n\n\n\n So the energy losses are minimal.<\/p>\n\n\n\n Voltage regulator modules in a PCB<\/em><\/p>\n\n\n\n The UNO uses the LP2985 LDO<\/a> regulator from Texas Instruments for this task, and you can use the same for the PCB prototype.<\/p>\n\n\n Once done with the Arduino board, check the design schematics for any shields you have used for your project.<\/p>\n\n\n\n While you can custom design some shields, such as for sensor and motor control, we don\u2019t recommend doing the same for wireless connectivity shields due to their complexity. <\/p>\n\n\n\n These include Wi-Fi, Bluetooth, GSM, and GPS shields.<\/p>\n\n\n\n An Arduino board with a shield stacked above it<\/em><\/p>\n\n\n\n Buying a surface-mounted module and soldering it directly to the board is a safer alternative. <\/p>\n\n\n\n So consider leaving provisions (pins) for connecting the component to the circuit.<\/p>\n\n\n\n Another benefit of soldering external pre-certified modules is it simplifies the process of certifying your finished consumer product.<\/p>\n\n\n After laying out the microcontroller, power, and shield schematics, the next step is to integrate the design into a compact printed circuit board for the final product.<\/p>\n\n\n\n Designing microcontroller circuits running at 16 MHz is simple, but things become more complex once you integrate wireless functions and fast clock speeds that hit hundreds or thousands of megahertz.<\/p>\n\n\n\n PCB designing using CAD software<\/em><\/p>\n\n\n\n For instance, you must correctly lay out the wireless antennas for proper matching to ensure maximum power transfer. <\/p>\n\n\n\n And you\u2019ll most likely need a pi-matching network for tuning the antenna to achieve maximum efficiency.<\/p>\n\n\n\n Two other things you have to consider are the following.<\/p>\n\n\n\n The clock should be near the microcontroller pins, while the decoupling capacitors should be close to the pin requiring decoupling.<\/p>\n\n\n Once you complete the PCB design, contact your PCB manufacturer to get the initial prototypes made. <\/p>\n\n\n\n You can ask your manufacturer to help you review the design using their in-house team of engineers or look for another expert to give an independent schematic and PCB design review before fabrication.<\/p>\n\n\n\n An unassembled PCB prototype<\/em><\/p>\n\n\n\n Getting an independent design review is to help detect and rectify as many errors as possible before production because they can be expensive later. <\/p>\n\n\n\n Although you can spot these faults when testing the PCB prototypes, the earlier you detect them, the better.<\/p>\n\n\n\n Once everything looks good, order 5-10 prototypes for testing and debugging.<\/p>\n\n\n This step involves porting your Arduino code into the native firmware code for the microcontroller. <\/p>\n\n\n\n The process is easier if you are dealing with a chip in the same family as the one in your Arduino board.<\/p>\n\n\n\n It is vital to note that Arduino embeds an In-System Programmer<\/a> (ISP) or In-Circuit System Programmer (ICSP) into their boards to allow USB-port programming via a USB-to-UART converter.<\/p>\n\n\n\n But you\u2019ll have to use a serial port like SPI, UART, JTAG, or SWD to program the custom microcontroller circuit. <\/p>\n\n\n\n And you\u2019ll need the ISP hardware to connect to the microcontroller.<\/p>\n\n\n\n Also known as a debugger, this programming device lets you view the microcontroller\u2019s inner workings after porting the code to debug any errors.<\/p>\n\n\n\n Remember that software development on the Arduino IDE gives you several library functions to simplify coding. <\/p>\n\n\n\n So you must port the library codes for these functions to the microcontroller code to make the software work.<\/p>\n\n\n It is rare to have the first electronic prototype working seamlessly unless the product design is simple. <\/p>\n\n\n\n So test and debug the prototype PCB circuits while improving the circuit design. <\/p>\n\n\n\n If you feel the changes have fixed the issues, order the second batch of 5-10 PCB prototypes using the improved circuit designs and repeat the process until you get everything right.<\/p>\n\n\n In conclusion, migrating your project from the Arduino prototype to the final product consists of a few steps, with the three initial stages being the most critical. <\/p>\n\n\n\n Once you get a functional prototype, porting the code is relatively easy, especially if you use a microcontroller in the same family as the one on your Arduino board. <\/p>\n\n\n\n That\u2019s it for this article. Comment below to let us know your thoughts and sentiments about the piece.<\/p>\n","protected":false},"excerpt":{"rendered":" In this article, we will look at how to advance from the Arduino prototype to the final product after proving your project works. Arduino boards are ideal for rapid prototyping, but you can\u2019t use them … Read more<\/a><\/p>\n","protected":false},"author":9,"featured_media":2735,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[32],"tags":[],"yoast_head":"\nTable of Contents<\/h2>\n
\n
Design the Microcontroller Circuit Schematic Diagram<\/h2>\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
Can You Use Other Microcontrollers?<\/h3>\n\n\n
Arduino Prototype to Final Product: Board Schematic<\/h3>\n\n\n
<\/figure>\n\n\n\n
Arduino Prototype to Final Product: Power Circuitry<\/h4>\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
Design the Shield Circuit Schematic Diagram<\/h2>\n\n\n
<\/figure>\n\n\n\n
Design the PCB<\/h2>\n\n\n
<\/figure>\n\n\n\n
\n
Order the Initial PCB Prototypes<\/h2>\n\n\n
<\/figure>\n\n\n\n
Develop the Software and Firmware for the PCB Prototype<\/h2>\n\n\n
Test and Debug your Prototype<\/h2>\n\n\n
Wrap Up<\/h2>\n\n\n