From 146bc44c6202c5b903835165c691030610ed3915 Mon Sep 17 00:00:00 2001 From: andreas Date: Sun, 24 Mar 2024 11:23:44 +0100 Subject: [PATCH] doc for 20240324 --- Readme.md | 18 +++++++++++++++++- doc/Hardware.md | 1 + doc/Sensors.md | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 doc/Sensors.md diff --git a/Readme.md b/Readme.md index da727ef6..e86a938f 100644 --- a/Readme.md +++ b/Readme.md @@ -38,7 +38,8 @@ What is included * a WEB UI to configure the gateway and to show the data that has been received * a USB Actisense to NMEA2000 gateway * a NMEA2000 to USB Actisense gateway -* starting with 201311xx some I2C Sensors +* starting with 201311xx some [I2C Sensors](doc/Sensors.md) +* starting with 20240324 [SSI rotary encoders](doc/Sensors.md) For the details of the mapped PGNs and NMEA sentences refer to [Conversions](doc/Conversions.pdf). @@ -165,6 +166,21 @@ For details refer to the [example description](lib/exampletask/Readme.md). Changelog --------- +[20240324](../../releases/tag/20240324) +********** +* add [SSI rotary encoders](doc/Sensors.md) +* add some options to the converter (RMC rate, RSA parameters) +* support for the [M5 Atomic PortABC](https://shop.m5stack.com/products/atomic-portabc-extension-base) - more grove ports [#58](../../issues/58) +* some restructuring in the hardware definitions +* add SSID to status page [#37](../../issues/37) +* allow to attach i2c sensors to the grove ports in the [build service](doc/BuildService.md) +* add calset and calval config types
+ This requires to write current values of a sensor at the [api](../lib/api/GwApi.h#L191) with setCalibrationValue. + The user can then bring up a calibration dialog and can set the current value as the config value. +* change log flushing to USB port that prevented ESP32 S3 based boards to start if no USB connection was available +* prevent the Web UI from appearing frozen if there was a large amount of invalid NMEA data received [#60](../../issues/60) + + [20231228](../../releases/tag/20231228) ********** * lock AsyncTCP-esphome to 2.0.1 to avoid compile errors diff --git a/doc/Hardware.md b/doc/Hardware.md index 07d76940..af4c8556 100644 --- a/doc/Hardware.md +++ b/doc/Hardware.md @@ -3,6 +3,7 @@ Hardware Configurations This pages describes a couple of the potential hardware configurations you could use with the code. Finally this list is not complete and you can easily define your own set up by adding definitions. Hint: all prebuild binaries can be found at [releases](https://github.com/wellenvogel/esp32-nmea2000/releases). +Additionally you can use the [online build service](BuildService.md) to create binaries for a lot of hardware combinations. The "Build Defines" describe which of the hardware definitions from [Hardware.h](../lib/hardware/Hardware.h) are used. M5 Atom CAN diff --git a/doc/Sensors.md b/doc/Sensors.md new file mode 100644 index 00000000..faf0ec67 --- /dev/null +++ b/doc/Sensors.md @@ -0,0 +1,38 @@ +Sensors +======= +The software contains support for a couple of sensors (starting from [20231228](../../releases/tag/20231228) and extend in consecutive releases). +This includes some I2C Sensors and SSI rotary encoders. +To connect sensors the following steps are necessary: + +1. Check for the supported sensors and decide which base you would like to use. For i2c sensors you can typically connect a couple of them to one i2c bus - so the M5 grove connector would suit this well. If you are not directly using the M5 modules you may need to check the voltages: The M5 grove carries 5V but the logic levels are 3.3V. +Check e.g. the [description of the M5 atom lite](https://docs.m5stack.com/en/core/atom_lite) for the pinout of the grove port. + +2. Use the [online build service](BuildService.md) to create a binary that matches your configuration and flash it. + +3. Use the configuration to fine tune the parameters for the NMEA2000 messages and the NMEA0183 messages. Potentially you also can adjust some calibration values. + +Configuration and Measure Flow +------------------------------ +During the building of the binary a couple of compile flags will control which buses (i2c, spi) and which sensors will be built into the binary. +On startup the software will try to initialize the sensors and will start the periodic measurement tasks. +Measured sensor data will always be sent as NMEA2000. For each sensor you can additionally define some mapping to NMEA0183 XDR transducer values (if there is no native NMEA0183 record for them). +To ensure that the sensor data will be shown at the "data" page this conversion is necessary (i.e. if you disable this conversion sensor data will still be sent to the NMEA2000 bus - but will not be shown at the data page). +For each sensor you can separately enable and disable it in the configuration. +You can also typically select the NMEA2000 instance id for the sensor value and the measurement interval. + +Implementation +-------------- +Sensors are implemented in [iictask](../lib/iictask) and in [spitaks](../lib/spitask/). +They are implemented as [usertasks](../lib/exampletask/Readme.md). + +Bus Usage +--------- +When selecting sensors to be connected at the M5 grove ports in the [online build service](BuildService.md) the system will select the appropriate bus (i2c-1, i2c-2) by it's own. As you can have up to 4 grove ports (one at the device and 3 by using the [M5 Atomic PortABC](https://shop.m5stack.com/products/atomic-portabc-extension-base)) you can use both available i2c buses (and still utilize other groves for serial or CAN). + +Implemented Sensors +------------------- +* [BME280](https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bme280-ds002.pdf): temperature/humidity/pressure [PGNs: 130314,130312, 130313] +* [QMP6988](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/unit/enviii/QMP6988%20Datasheet.pdf): pressure [PGN: 130314] +* [SHT30](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/unit/SHT3x_Datasheet_digital.pdf): temperature and humidity [PGNs: 130312, 130313] +* [M5-ENV3](https://docs.m5stack.com/en/unit/envIII): combination of QMP6988 and SHT30 [PGNs: 130314,130312, 130313] +* [DMS22B](https://www.mouser.de/datasheet/2/54/bour_s_a0011704065_1-2262614.pdf)[since 20240324]: SSI rotary encoder (needs level shifters to / from 5V!) [PGN: 127245]