A lot of the projects created here need to communicate with each other, or with other devices.
In order to do this I wanted to implement a standardised communications protocol. Hence any item that is designed here at re-innovation can interface with other items seamlessly.
NOTE: This page has been retired! More up to date information is available here: https://www.re-innovation.co.uk/docs/led-matrix-library/
The protocol used here is based upon the Lightweight Logical Automation Protocol (LLAP) from OpenMicros.
This is a 12 character message which includes a start character, a device ID and the data in the format:
<start> <ID> <Data>
The start character is ‘a’, the device ID can be any two alphanumeric chars and the message must be contained within 9 chars.
In addition to the LLAP list already created, I needed to add a number of bespoke messages, which are listed and explained here. I am trying to ensure that all devices created here ustilise this protocol, then I can work to this standard and ensure that all the devices can ‘speak’ to each other.
Note: In these examples I am using “XX” to signify the device ID and “DDD” to signify any data.
This is a power output in the range 0000W to 9999W.
This is the voltage in 100’s of milliVolts. For example: 0.6V Data = 006 and 24.7V Data= 24. Voltage can be in the range of 0-99.9V
This is the voltage and current output (V is 00.0 to 99.9V DC) (I is 00.00A to 99.99A). This will be an output approximately every second.
This is the Energy from 0000.00Wh to 9999.99Wh (10kWh – is this enough?)
Max power and average power are done by the receiving device. This will be an output approximately every second.
This will change the time to HHMMSS
This will change the date to DDMMYY
This will change the sample period to ????? seconds. Set to 00001 for 1 second data, set to 03600 for 1 hour data.
The minimum is 1 second data. The maximum is 99999 seconds
Each device has an ID number which can be changed. This means more than one pedalog device can be used on a system.
Where the last two values (XX) are the new device ID (from AA to ZZ).
Current Shunt Value
There is a current shunt in the device. This is a very low value resistance which has a voltage drop which is proportional to the current flowing. This is measured on the high side.
The equation for converting from the mOhm value to the current is:
To change this we use the command:
Where the value DDDDD is the resistance in tenths of a milliOhms (eg 50 = 5milliohm)
To read the value from the device we can ask the command:
The voltage regulation set-point controls when the shunt load will switch on. The device will try (as much as possible) to maintain the voltage at this point. Proportional –Integral (PI) control is used to do this.
This sends the command to device DD. The set-point (VSP) is DD.D volts. This is a value from 00.0V to 40.0V (maximum input voltage is 40V DC).
To ask the set-point we can send:
***Note: Problems with using this on a XRF? Will the two conflict?***
You can adjust the parameters of the device using serial commands. These parameters are stored in EEPROM.
This will change the reference number to ??
This is quite a difficult task to achieve without some problems.