Hydro2Motion#

About#

Introduction#

Kotori powered the telemetry platform for the Hydro2Motion team at the “Shell Eco-marathon europe 2015” in Rotterdam. This is a fine project from Labor für Systemtechnik fame at the Munich University of Applied Sciences.

They have an article about the event at their blog: Hydro2Motion at Shell Eco-Marathon 2015 in Rotterdam. We also have some impressions:

On the way

On the way#

Getting ready

Getting ready#

Racing

Racing#

The vehicle#

Mission

The fuel cell#

Their vehicle is powered by a hydrogen fuel cell.

Fuel cell component

Fuel cell component#

Fuel cell in vehicle

Fuel cell in vehicle#

Its auxiliary equipment emits telemetry data.

Fuel cell schematics

Fuel cell schematics#

Ethernet Packet out (Typ 1), 2013-10-25#

Offset

Size

Variable

Transfer

Unit

1

2

MSG ID

1-9

3

6

V FC

0 - 40000

mV

9

6

V CAP

0 - 40000

mV

15

6

A to Eng

0 - 16000

mA

21

6

A to CAP

0 - 16000

mA

27

4

T Air in

0 - 500

°C*10

31

4

T Air out

0 - 900

°C*10

35

4

T FC H2O out

0 - 800

°C*10

39

5

Water in

0 - 999

mg/l (luft)

44

5

Water out

0 - 999

mg/l (luft)

49

2

Master SW

0/1

Hauptschalter

51

2

CAP Down SW

0/1

Ladeabsenkung

53

2

Drive SW

0/1

Fahrschalter

55

2

FC state

0/1

Zellenzustand

57

2

Mosfet state

0/1

Mosfetzustand

59

2

Safty state

0/1

Sicherheitskreis

61

4

Air Pump load

0 - 100

%

65

4

Mosfet load

0 - 100

%

69

4

Water Pump

0 - 100

%

73

4

Fan load

0 - 100

%

77

5

Acc X

+- 999

mg

82

5

Acc Y

+- 999

mg

87

5

Acc Z

+- 999

mg

92

5

Stearing angle

+- 200

°*10

97

9

GPS x

+- 6999999

m

106

9

GPS y

+- 6999999

m

115

9

GPS z

+- 6999999

m

124

4

GPS Speed

0-200

m/s * 10

128

4

V Safty

0-200

V*10

132

4

H2 Level

0-150

%

136

5

Eng. RPM

0-9999

1/min

Note

Hydro2Motion presented a part of its design process - the Case study of simulation-driven designed components for a hydrogen-powered prototype vehicle - at the ATC 2015 conference in Paris.

Environment#

Let’s have a look at the environment:

  • Mbed is a popular embedded computing platform used intensively here.

  • Telemetry data is transmitted from sensor nodes over a GPRS/UMTS/LTE cell network uplink. The network transport is UDP/IP, the data serialization format is plain CSV:

    24000;15718;75813;1756;15253;229;220;204;811;1769;0;0;0;0;0;1;0;12;0;0;0;-18;0;4011;417633984;85402624;472851424;0;12242;43;42;0;0
    

System overview#

// Hydro2Motion system overview digraph hydro2motion { // Options rankdir=LR; ranksep=0.5; // Style //graph [splines=ortho]; node [pin=true, shape="box", fontname="Verdana"]; edge [fontname="Verdana"]; // Graph nodes represent system components "mbed" [label="mbed MCU"]; "gprs" [label="GPRS"]; "kotori" [label="Kotori"]; {rank=same; "influxdb"; "grafana" }; "influxdb" [label="InfluxDB"]; "grafana" [label="Grafana"]; "browser" [label="Browser"]; "rickshaw" [label="Rickshaw"]; "leaflet" [label="Leaflet"]; // Graph edges represent communication paths "mbed" -> "gprs"; "gprs" -> "kotori" [label="UDP/CSV"]; "kotori" -> "influxdb"; "kotori" -> "grafana"; "influxdb" -> "grafana"; "kotori" -> "browser" [label="WAMP"]; "browser" -> "rickshaw"; "browser" -> "leaflet"; }
  • Receive telemetry messages over UDP in CSV format.

  • Manually decode messages in a Python callback handler.

  • Convert, munge and enrich data by using imperative code, no DSL in sight.

  • Store measurements to the InfluxDB timeseries database.

  • Automatically create Grafana panels for instant telemetry data visualization.

    Live telemetry with Grafana

    Live telemetry with Grafana#

  • Publish telemetry data to the WAMP bus.

  • Subscribe to WAMP data streams inside the web browser and process the data points.

    Live telemetry with GPS position on map

    Live telemetry with GPS position on map (article in german)#

    • GPS map: Draw a pin on a map widget at the GPS position of the vehicle using Leaflet.

    • Oscilloscope: Display received data points in an “osci-style” widget, based on Rickshaw.

Note

While this communication layer was based on CSV-over-UDP, the next iteration is based on Binary-over-UDP. This transport communicates more efficiently while still retaining a maximum of convenience: We managed to send opaque binary blobs over air and wire but can decode the payloads from knowledge of information of a standard C/C++ header file. See also the data acquisition system for vendor “LST” for more information about this.

Platform operations#

This section is about running the whole platform on your own hardware. Please be aware this is a work in progress. We are happy to receive valuable feedback for improving things gradually.

Attention

This section is just a stub. Read the source, luke. As a start, please have a look at Setup.

Run Kotori#

Crossbar router:

crossbar start

Main application:

kotori --config=etc/hydro2motion.ini

Receive telemetry data#

  • Open Browser at http://localhost:35000/.

Send telemetry data#

  • Fixed data:

    h2m-csv-udp-client "24000;15718;75813;1756;15253;229;220;204;811;1769;0;0;0;0;0;1;0;12;0;0;0;-18;0;4011;417633984;85402624;472851424;0;12242;43;42;0;0"
    
  • Random data:

    h2m-csv-udp-fuzzer
    
  • Continuously send random data:

    watch -n0.5 h2m-csv-udp-fuzzer
    

Platform usage#

The platform is hosted at the Kotori Telemetry Dashboard for Hydro2Motion.

URL entrypoints#

Components#

Query InfluxDB#

export INFLUX_URI=http://localhost:8086/query?pretty=true
curl --silent --get $INFLUX_URI --user admin:admin --data-urlencode 'db=hydro2motion' --data-urlencode 'q=select * from "telemetry";' | jq '.'