The Building Block includes everything you need: a low-consumption, powerful microcontroller, based on the Atmel ATmega644 microcontroller, which benefits from a host of tools and Integrated Development Environments (IDE) already available for compatible platforms such as Arduino, and the wireless LoRa chip. The microcontroller chosen for this Building Block is, in our view, a better choice than those including the likes of Arduino (ATmega328), as it provides double the capability from the memory point of view:
64K of In-System Self-Programmable Flash
8Kbytes Internal SRAM
The microcontroller on this board runs on a 8Mhz Crystal, and it is fitted with a low-consumption, 250mA voltage regulator that allows the module to be powered by an external power source of up to 12V through the RAW pin. The internal operating voltage is 3.3V. The VCC pin allows to bypass the voltage regulator, requiring then an externally regulated 3.3V power source.
The LoRa module is based on a SX1278 (433Mhz) or SX1276(868Mhz and 915Mhz) which is internally connected through the PCB to the microcontroller using the SPI lines (MISO, MOSI and SCK)
This module does not come with any firmware (or bootloader) pre-loaded, either for the microcontroller or the LoRa module. Programming would need to be done through the In-circuit Serial Programmer (ISP) header (SPI connection), an ISP external device and an Atmel-compatible tool, such as avrdude. For more information, visit https://www.arduino.cc/en/Tutorial/ArduinoISP. The board is fully compatible with Lauszus’ Sanguino bootloader and hardware profile definition, which can be downloaded from https://github.com/Lauszus/sanguino.
If you opt for the bootloader option, you can upload sketches through the UART interface (accessible through a header), using an USB to TTL serial adapter – I would recommend those based on the FT232RL over the CH340G, since the latter tend to cause a bit of a headache depending on the Operating System, but that is your choice. These are readily available and quite inexpensive, for instance on eBay – just search USB to TTL converter.? If they give you the option to power the module with 3.3V, you can also use that power source whilst uploading your sketch.
Serial communication lines between the microcontroller and the LoRa? module (SPI: MISO, MOSI and SCK) are already wired on the PCB. Other LoRa lines required need to be wired through the available pin headers, which include: NSS (Chip Select), Digital I/O and RESET.
The LoRa antenna pad allows the module to be connected to a spring antenna (soldered) or to an external antenna through a u.FL connector.
Since the board uses a 3.3V voltage regulator, the fuses for the ATmega644 should be programmed so that the microcontroller uses the external (8Mhz) crystal and the brown-out detection is configured for an internal operating voltage of 3.3V, as per below:
- Low Fuse: FF
- High Fuse: DE
- Extended Fuse: FF
The above can be achieved using Atmel’s avrdude utility, with the following command line, once the hardware profile has been installed:
avrdude -C<avrdude conf file> -v -patmega644p -c<programmer used> -P<device file> -b<bauds> -U lfuse:w:0xff:m -U hfuse:w:0xde:m -U efuse:w:0xff:m
For more information of Atmel AVR fuses, check the online fuses calculator on: