GithubHelp home page GithubHelp logo

makervan / powermeter-lorawan-connector Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 3.0 124 KB

LoRaWAN node to send data from the GC90/GC91 DC power meters via TTN (Arduino Pro Mini, RFM95)

Home Page: https://wiki.munichmakerlab.de/wiki/DC_Microgrid/consume01

C++ 100.00%
microgrid powermeter solar lorawan arduino electronics thethingsnetwork hacktoberfest

powermeter-lorawan-connector's Introduction

DC Power Meter LoRaWAN Connector Node

LoRaWAN node to send data from the GC90/GC91 DC power meters via TTN. Based on an Arduino Pro Mini and the RFM95 LoRa module.

Hardware

  • Arduino Pro Mini 3.3V 8Mhz
  • RFM95/96 LoRaWAN module
  • uFL socket or edge mount SMA socket
  • 2 BSS138 MOSFETs (Q1/Q2) and 2x 10k resistors (R3/R4, 0805) for the level shifter
  • USB A socket
  • 2 resistors (R1/R2, 0805) to form a voltage divider for measuring the input voltage (optional, values depending on voltage range)
  • Groove connector (optional)

Payload decoder

If you use the TTN network, you can use the following payload decoder:

function Decoder(bytes, port) {
  // Decode an uplink message from a buffer
  // (array) of bytes to an object of fields.
  var decoded = {};
  decoded.voltage = (bytes[2] << 8 | bytes[1]) / 100;
  decoded.current = (bytes[4] << 8 | bytes[3]) / 1000;
  decoded.usage = (bytes[8] << 24 | bytes[7] << 16 | bytes[6] << 8 | bytes[5]) / 1000;
  decoded.cum_usage = (bytes[12] << 24 | bytes[11] << 16 | bytes[10] << 8 | bytes[9]) / 1000;

  return decoded;
}

License

  • Hardware is based off a design by Doug Larue with additions by me, Severin Schols. It's licensed under Creative Commons Attribution-ShareAlike 4.0 International License (CC BY-SA 4.0)
  • Software (firmware and the payload decoder) are licensed under MIT License

powermeter-lorawan-connector's People

Contributors

tiefpunkt avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

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.