GithubHelp home page GithubHelp logo

adrianvazquezmejia / edge-node Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 1.59 MB

This project has the software implementation of the edge node regarding the LoRa based energy-meter network

CMake 0.43% Makefile 0.36% C 98.81% Dockerfile 0.30% Shell 0.09%

edge-node's Introduction

Description

This software is the code for an ESP-32 MCU that will work as an edge node in a network used to monitor energy consumption.

This node has also the capability of Modbus comunication as a Slave and Master RTU serial.

In additon, comunication with a LoRa device is also available.

INDEX

System description

Diagram

docs/images/Architecture.png

Tasks

Each task can be enabled separately, so his node can be used as master or slave, can have connected the LoRa or not, and can other modules can be added

The task does not communicate directly to echa other, they only share the same resource, which is memory.

Modbus shared memory

  • Holding registers hold the node specific settings
  • Input register holds the energy measure.

Settings

  • Settings can done through Modbus

Installation

1.Clone the repository:

git clone https://gitlab.com/electr-nica/desarrollohardware/edge-node.git

2.Open the project in the terminal and build the menuconfig:

make menuconfig

3.Navigate to custom configuration and select with the key y what modules do you what to enable as well as the baudarate and serial port if apply. Then save and close.

  1. Build the project:

make all

  1. Flash the MCU:

make flash

  1. Enjoy!

Collaboration

If you use eclipse as IDE, after you properly installed esp-idf and the tool chanin of xtensa you just need a few steps to fully set up your project.

  1. Open your project in a workspace.

  2. Go to properties in your project folder, then go to environment in the C/C++ Built. Change the paths to match with your paths.

  3. Clean and Build. Make sure you made make menuconfig in your project through the terminal.

  4. Enjoy!

This software is the code for an ESP-32 MCU that will work as an edge node in a network used to monitor energy consumption.

Installation

  • Clone the repo git clone https://gitlab.com/electr-nica/desarrollohardware/edge-node

  • Go to the project folder cd edge-node

  • Build menuconfig make menuconfig

  • Go to Serial Flash Cofig and set your serial port to flash

  • Go to Custom Config to choose the mode and parameters of the RTU

  • Go to __Serial Flasher Options __ and set the Flash size to at least 4MB.

  • Finally, go to Partition Table and select __Custom Partition Table __ and set the file partitions.csv

Hardware specs to test in dev board

Make sure you have selected HARDWARE (TEST) in the menuconfig to flash the code into devboards.

Uart IOs for RS-485

```c
#define TXD_PIN     33
#define RXD_PIN     26
#define RTS_PIN     27
#define CTS_PIN     19
```

Uart IOs for LoRa

```c
#define TXD_PIN     13
#define RXD_PIN     15
```

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.