NAM 0.4 – LoRaWAN enabled – part 1

This is time to start reveal our next iteration of NAM boards. I have decided to not having totally new design but to keep as possible similar to 0.3 line. So what have stayed? Size and case. We are using exactly the same case and housings for BME and still are using HECA for conditioning inlet air.

What has changed? NAM 0.4 is built with Heltec Wireless Stick Lite – that mean it is ESP32 based. And, since it is Wireless Stick feature – it has LoRa radio on board – NAM 0.4 supports sending data via LoRaWAN (The Things Network):

Other important changes include – step-down module which now provides 5V, so NAM can be now powered with higher voltage. Also it does not care if it is 9V or 12V. There is logic level conversion on I2C bus, so now you can safely mix devices connected to I2C bus and there is no risk that pull up form 5V device will destroy SDA/SCL ports on devices with 3.3V logic only.

In this post I will provide you with instruction how to solder module. Since I wanted to keep as much as possible from previous, 0.3.x design soldering instruction from 0.3 will be also very handy. You can review it before, especially if you have not soldered 0.3 version.

Generally start with parts with lowest profile. First is step-down module. You can try to solder it as SMD part, but I was not pleased with results when I tried to do it that way. So I prefer to use goldpins. Place 4 1×2 goldpins in NAM PCB, place step-down module. Make sure it’s orientation before placing is correct.

Place it on goldpins. I have used clothespin to make sure it won’t fall out when I turn PCB upside down to solder it.

That way you can easily solder each pin. When it’s done – logic level convert is next on list. I had much less problems with soldering it, so I didn’t need anything to keep it in place during soldering. Again, this orientation of this module is important. Look at PCB – there are marking HIGH and LOW. They have to match HV/LV markings on MOD-636.

Now You can solder it. Now it is good time to solder all small THT elements – I2C sockets and IDC16, SDS socket and power related elements – screw terminal, power socket, TVS and fuse. Don’t solder capacitor yet. All this is exactly the same as in NAM 0.3 so linked earlier instructions apply.

Now it is time for sockets for Wireless Stick and ESP32 module itself. Wireless Stick is longer than previously used Wemos board. As such it get under SDS011. That means I had to mount SDS011 using longer standoffs to find a space for longer board. I strongly suggest to keep it that way – any module replacement will be easy. Soldering it directly into PCB won’t save much space (Stick has components and battery socket on bottom side of PCB). This project is in beta state and I plan add some additional features in future. Having ability to remove Wireless Stick from board will allow you migrate to newer board without need to buy new Wireless Stick. De-soldering 40 pin module is not easy if you don’t have proper equipment nor experience. So solder sockets and keep it as in this guide.

As usual with elements having more pins in single row – solder first one pin, then reverse board and check if it is soldered straight. In case of need do correction use soldering iron to melt solder and adjust element by pressing it with finger. When soldered more than one pin any adjustment are much harder.

Now solder capacitor – it is highest element and as such it is best to solder it as last element.

Screw all standoffs to prepare mounting point for SDS011. On first picture here you can find 3 standoffs, for SDS011. Due to my mistake I haven’t screwed standoffs for LCD. Don’t skip this. While LCD wont fit in NAM case due to SDS011 mounted higher it is good to have some additional mounting points. Adding them later will require you to get NAM board from case. Standoffs are part of kit, so don’t skip this.

Now screw board inside NAM case and connect antennas. Connector with markings HF near to it is for WiFi antenna second one is for LoRa antenna. For now I suggest to place LoRa antenna below device and use vent holes to get it inside the case.

Now it’s time to put firmware on Heltec.

Visit releases on GitHub NAMF project page and find most current release (NAMF-47rc1 when I write this post) download ESP32 version (latest_en_32.bin) and upload it to ESP32 using esptool:

esptool.py --port /dev/ttyUSB1 -b 921600 write_flash 0  latest_en_32.bin

Replace /dev/ttyUSB1 with right USB port and you may need add some path before latest_en_32.bin but I assume you can use esptool in your system.

Now it is time to mount SDS011. Since it is mounted on 18 mm standoffs not 8 mm like in NAM 0.3 solution for connecting it with 1×6 long header does not work. But will work with two such headers :) Pay attention to one thin when bending one of headers. It should be bent directly near to plastic body. If you bending place will be further away – you will have troubles placing all elements in case. As you can see from next picture I have learnt that hard way. Just try to bend it somewhere where red circle shows.

I assume you are familiar with NAM 0.3 soldering and skip some details which are exactly the same like for 0.3 version. If you are not familiar or just don’t remember then just read soldering instructions.

OK, so we have arrived to point where you can add HECA and BME. This part of process is the same like for NAM 0.3 so go to docs site to finish soldering/assembling sensor.

In part 2 we will configure it to send data over LoRaWAN. You have to be in TTN range and have some way to get callbacks from TTN backbone when packages from NAM arrive (technically speaking – address to receive POST HTTP request).