Skip to content

Commit

Permalink
Sensorbox2 ESP firmware and schematic
Browse files Browse the repository at this point in the history
Sensorbox2 standard firmware and schematic
  • Loading branch information
mstegen committed Aug 29, 2021
0 parents commit a80116a
Show file tree
Hide file tree
Showing 13 changed files with 2,182 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Sensorbox-2
Sensorbox2 measures the current(A) and current direction for up to three phases with CT's and a MAINS voltage input.
It can also receive these measurements directly from a (D)SMR5 smart meters P1 port.
These measurements are then sent every two seconds to the connected SmartEVSE(s).

The Sensorbox2 uses a PIC microcontroller which currently does all the processing. It takes the measurements from the CT inputs and P1 port and can send the data over the RS485 bus.
It will be programmed initially by the ESP32 module. At powerup the ESP32 looks for a Sensorbox2.hex file in the /data folder and, when found programs the PIC18F26K40 microcontroller.

Please note that this also means that the PIC has control over the RS485 bus. If you want full controll, keep the PIC in reset by holding the PIC reset line low.

I'll release a version of the PIC firmware soon that will only do the CT measurements, and will not use the RS485 bus, nor use the P1 port.
On this version the ESP32 will handle everything else.



6 changes: 6 additions & 0 deletions Sensorbox2_ESP/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.pio
.vscode
.pioenvs
.piolibdeps
.clang_complete
.gcc-flags.json
67 changes: 67 additions & 0 deletions Sensorbox2_ESP/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Continuous Integration (CI) is the practice, in software
# engineering, of merging all developer working copies with a shared mainline
# several times a day < https://docs.platformio.org/page/ci/index.html >
#
# Documentation:
#
# * Travis CI Embedded Builds with PlatformIO
# < https://docs.travis-ci.com/user/integration/platformio/ >
#
# * PlatformIO integration with Travis CI
# < https://docs.platformio.org/page/ci/travis.html >
#
# * User Guide for `platformio ci` command
# < https://docs.platformio.org/page/userguide/cmd_ci.html >
#
#
# Please choose one of the following templates (proposed below) and uncomment
# it (remove "# " before each line) or use own configuration according to the
# Travis CI documentation (see above).
#


#
# Template #1: General project. Test it using existing `platformio.ini`.
#

# language: python
# python:
# - "2.7"
#
# sudo: false
# cache:
# directories:
# - "~/.platformio"
#
# install:
# - pip install -U platformio
# - platformio update
#
# script:
# - platformio run


#
# Template #2: The project is intended to be used as a library with examples.
#

# language: python
# python:
# - "2.7"
#
# sudo: false
# cache:
# directories:
# - "~/.platformio"
#
# env:
# - PLATFORMIO_CI_SRC=path/to/test/file.c
# - PLATFORMIO_CI_SRC=examples/file.ino
# - PLATFORMIO_CI_SRC=path/to/test/directory
#
# install:
# - pip install -U platformio
# - platformio update
#
# script:
# - platformio ci --lib="." --board=ID_1 --board=ID_2 --board=ID_N
Loading

0 comments on commit a80116a

Please sign in to comment.