After assembling a prototype IoT device (in our example, a Wi-Fi relay) on a breadboard and connecting it to the 2Smart Cloud platform, we got a device that can already be used.
At the same time, inconveniences arise even for a DIY user: the device does not look aesthetic, and an additional 5V power supply is required. A device on a breadboard is all the more inappropriate for a vendor that plans to bring a product to market.
To obtain a full-fledged IoT device, it is necessary to modify the circuit so that the device works only from a 220V network. And also, place this circuit on a printed circuit board by placing it in the case.
In the example with a Wi-Fi relay from a DIY developer, there is no severe cost optimization task – it is about a tiny series of devices for himself and his friends. Therefore, we will briefly describe the components selection stage and the circuit board creation.
All materials for creating a Wi-Fi relay are available in the 2Smart Cloud public repository. If desired, you can assemble a similar device using this article as a tutorial.
The only task in changing the circuit of the Wi-Fi relay is the need to give up an additional 5V power supply in the form of a USB cable. The device must operate only from a 220V network, turning on and off the device connected to it – for example, an ordinary table lamp.
To solve this problem, we add an additional element to the circuit – a voltage converter (power module) AC-DC 220V/5V. Instead of the relay module, a conventional relay is installed, which is controlled via a transistor (this upgrade is optional).
Once the final version of the device circuit is obtained, it is possible to create a printed circuit board project. Use any popular board editor for this purpose – for example, easyeda.com.
After creating the project, it remains to order the production of the required batch of printed circuit boards. There are many services for this – for example, jlcpcb.com.
You also need to order the necessary components to assemble a batch of devices.
Knowing the device’s dimensions, you can also create a housing project in any 3D editor and print it on a 3D printer.
Having received ready-made printed circuit boards and components, it remains to assemble the devices with a soldering iron and place them in the housing.
To flash the ready-made devices on a printed circuit board, the same Production code is used as for the prototype device on the breadboard. No changes are needed in most cases.
It makes sense to keep the prototype IoT device on a breadboard for testing new features. And the devices on printed circuit boards should be used in real conditions, upgrading them with new firmware versions if necessary.
When using ESPHome-based firmware, there is inconvenient to have to update each device manually via a USB cable. To automate the flashing process, you need to write a Custom firmware version that allows you to deliver updates over the air. We will talk about this in the following article of this series.
Share with us your business idea and expectations about custom software development for the internet of things.