Archive for the ‘ Sistemas Embebidos ’ Category

Bootloader for PIC18F27J53

1 – Introduction

After mounting my “LoRa Gateway” on the roof, it became impractical to climb up there every time I needed to update the microcontroller firmware.
For this reason I’ve searched online for a suitable bootloader. I’ve immediately looked for Tiny Bootloader as I’ve successfully used it in the past. Nevertheless it did not supported the microcontroller I’m currently using so I’ve decided try to develop my own.

A Bootloader is a program resident on the microcontroller Flash memory (in this case) capable of receiving the new application code through a communication channel (such as RS232, CAN, USB, Ethernet or any other) and writing it to its Flash memory.
In a typical scenario a PC based application communicates with the bootloader to download the new program. In my case this application is a python script as we’ll later see.

Continuar a ler

LoRa Range Test #2 “Miradouro do Caramulinho”

Excited with the success of the previous attempt (read it here) and following the sugestion of a colleague, my aim was now targeted at “Miradouro do Caramulinho” another viewpoint about 70km from my home.

View from the top of “Miradouro do Caramulinho”
Continuar a ler

LoRa Range Test “Miradouro da Bandeira”

In previous posts I’ve been discussing the hardware and software components for a LoRa communication system. In this post I’ll document a range test made with the those components.

Near my place (around 35km from here) there is a small mountain called “Serra da Boa Viagem”, near its highest point (almost 262m) there is a viewpoint called “Miradouro da Bandeira”. I wanted to test if I could send data from there to my place. This location was selected because it should provide line of sight to my home.

To check if it was the case I’ve used Google Earth and added a path with start at “Miradouro da Bandeira” and end at my place. This allowed to check that the distance in straight line is about 27km, furthermore inspecting the elevation profile is possible to check that there is no obstruction from start fo finish.

Path and Elevation profile.
Continuar a ler

Running Gateway SW using Screen

On a previous post I’ve presented the method I’ve used to automatically launch and run the Gateway SW (python script) on the OrangePi. You can read about it here LoRa and LoRa”Gateway”.

The previous method uses Linux cron jobs to start python and execute the script but it poses some limitations such as:

  • Command Line output is not accessible, it can only be written to a log file.
  • If the script stops for some reason a reboot is required so the cron job lauches it again.

The previous limitations can be overcome using Linux “Screen” command. As per the manual “Screen is a full-screen window manager that multiplexes a physical terminal between several processes (typically interactive shells)”. In this application we will create a Screen session (and provide an alias to it) during startup using cron jobs as before. The script will continue to execute in this session and we can reattach to it and check the command line output at any time.

the crontab needs to be changed using the following command:

crontab -e

The following line is added to the crontab:

@reboot screen -dm -S rfstick /home/pi/app/launcher.sh
crontab editor
Continuar a ler

Designing End Node for LoRa

The aim was to develop a small end node capable of reading some sensors and send the information through LoRa. Furthermore the end node is battery powered so power consumption plays an important role.

Continuar a ler

LoRa and LoRa”Gateway”

Introduction to LoRa.

LoRa (short for Long Range) is a type of RF communication designed for low-power and high range. Due to these characteristics it enables small end nodes (typically battery powered microcontrollers and sensors) to send information for IoT applications. LoRa has been developed by Semtech that licenses this technology to other vendors such as HopeRF, ST, Microchip, etc.

LoRaWAN concept illustration by www.libelium.com.
Continuar a ler

Led Display

Neste projecto foram usadas 10 matrizes da Kingbright que contêm 7 linhas e 5 colunas no total de 35 leds por matriz perfazendo 350 leds em todo o painel.
Foram usados 7 shift registers (74HC164) para activar uma linha completa e 7 transístores pnp (visto que o painel é de ânodo comum) para ir comutando entre as diferentes linhas. O controlo do painel está a cargo de um PIC18F2680.

led_controller_assembly
Continuar a ler

VFDclock

Displays VFD (Vacuum Fluorescent Display) são um tipo de display muito usado em electrónica de consumo capazes de mostrar símbolos, texto e números com alto brilho e contraste. São constituídos por um filamento, grelhas de controlo e dígitos revestidos com fósforo. Com o pretexto de usar um destes displays e tendo recentemente adquirido um tubo IV18 decidi fazer um relógio.

vfdclockprojecto
Continuar a ler