Using Templates

Download the Using templates guide

You plan to design a BLE sensor of room temperature. The device shall be coin-cell powered and as simple as possible.
The enclosure must mechanically protect the device, but it must be nice looking and vented with reasonably dimensioned openings.

Step One - Choosing the right Template

Open the Templates section from the main menu.

Hardware Design Templates

There are two candidates for the job. The Round sensor node type A and the Medium sensor node, as highlighted in green.

The rounded shape is better, in my opinion. Let us go for the Round sensor node type A.

The enclosure dimension is ∅ 45 mm, as stated in the Template details. This Template will perfectly cover the CR2032 coin-cell holder and a BLE communication module.

Step Two - Schematic creation

The schematic creation is a task hardware design engineers do regularly. For example, the following schematic shall work perfectly for this BLE sensor job.

Hardware Design Template BLE sensor schematic

Step Three - PCB Layout

You can buy Hardware Design Templates here for both KiCAD and Altium Designer. The open-source KiCAD can be a better platform for this demo project. The Template contains the verified PCB project that can be used simply by renaming and copying the .kicad_pcb file into your working project folder.

The particular PCB layout job results in the following outputs:

Hardware Design Templates - BLE sensor

Hardware Design Templates - BLE sensor

Hardware Design Templates - BLE sensor

Step Four - Manufacturing

I chose the regular stencil/paste process for semi-automated reflow soldering for the SME environment.

The hardest to solder is the Raytac MDBT50Q-1M module. This fact i that the side with the module will be soldered in an oven while the other side will be assembled manually.

Hardware Design Templates - Soldering paste application
The circular shape of the PCB makes the fixing harder, but one has to be creative and careful. A few helper PCBs of the same thickness d the trick.
Hardware Design Templates - Pasted PCB
There are only a few components on the same side as the BLE module is located, so the optical check is quick.
Hardware Design Templates - soldered side with BLE module
The other side is to be assembled manually. There is the USB connector, two tactile switches, the LM75 sensor, a LED and the CR2032 cell holder. The entire process is done in a while.
Hardware Design Templates - manual soldering

Step Five - Hardware check

The first step is to check the hardware. A careful optical check is always a must. The DC resistance check follows the optical check. I usually measure the DC resistance between power supply lines and the ground. Two tactile switches are very easy to check with the DC resistance method. Especially small tactile switches could be short-circuited by the solder as an unwanted result of manual soldering.

The DC power supply current from the laboratory DC power supply was about 3 mA from a 3.0 V output connected to +BAT and GND.

Step Six - Programming

CircuitPython needs two-stage programming. In the first stage, the bootloader must be flashed with a JTAG programmer. I use my J-Link by Segger. I believe every J-Link-compatible programmer does a good job here.

Hardware Design Templates - CircuitPython bootloader programming

The flashing command is here:

nrfjprog --program ./UF2/feather_nrf52840_express_bootloader-0.3.2_s140_6.1.1.hex --chiperase -f nrf52 --reset

The second stage is the CircuitPython package uploading into the FEATHRPY device. Just drag and drop the package file. I uploaded the following file:


The rest is pure programming in CircuitPython. If you are rather newbies (as I am), I recommend these information sources:

I implemented the following code:

BLE 1551V11 code

 As a testing application was used LightBlue for iOS.

Hardware Design Templates - advertising demo


Step Seven - Finishing

The last step is to mount the board into the 1551V11 enclosure. As a bonus, I placed a strong magnet into the base of the enclosure. The magnet allows s the device onto the metal surfaces like a fridge, a kitchen extraction air fan etc.

The next step? You can code your mobile app or computer app. You name it.

If you like this project, you can have it

Hardware Design Templates - Magnet sticking

Hardware Design Templates - Mounted sensor

Hardware Design Templates - Sensor at the fridge door

Hardware Design Templates - Sensor at the extraction fan

Do you like more blank templates? Here you are:

 The code job is very simple. After the start, the I2C bus is initialised while reading the temperature data from the LM75 sensor. The User button is configured as the wake-up trigger from the deep sleep of the MCU. The advertising string contains information about the temperature and voltage of the CR2032 cell.