Introduction: Connected Orientation Bracelet

This academic project, the connected orientation bracelet, was realized by four students from the engineering school Polytech Paris-UPMC : Sébastien Potet, Pauline Pham, Kevin Antunes and Boris Bras.

What is our project ?

During one semester, we had to create a connected bracelet which will be use by a runner. His race course will be oriented by several points where he will tag, and this will allow to record its course. Those data will be stored on a cloud in real time.

This product can give the temperature, the humidity, and the orientation. Moreover, we have three buttons including one which send a GPS position in case the runner has a problem (SOS button), that is why we need it in real time. The second allows to tag and the last one to turn off the bracelet because we want a low power product.

We had a bugdet of 120€. To realize a connected orientation bracelet, follow our tutorial!

Step 1: Material Needed

List of components :

- STM32L432KC-Nucleo Ultra Low Power

- SigFox module TD1208

- RFID reader 125 kHz

- Temperature/humidity sensor HTU21D

- Accelerometer module 3-axes ADXL345

- Compass module 3-axes HMC5883L

- Screen OLED ADA938

- GPS module Grove 31275

- Battery 1.5 V LR6

- Tension regulator Pololu 3.3V U1V11F3

- Some control buttons

Step 2: Programming Part

First of all, we programmed each components with the mbed developer site. For that, we used a microcontroler STM32L476RG-Nucleo which is a low consumption.

The screen, the temperature/humidity sensor, and the compass work in I²C communication. The RFID reader and the accelerometer work in Serial communication. For each component, you had to add their own library.

For the temperature/humidity sensor, the compass and the accelerometer, you need to call a defined function on their library to get the datas.

The RFID reader works on serial communication, you have to use the function "getc()" because the tag return data in char.

All codes are available as a file, except the code of the screen OLED.

Step 3: Electronic Assembly

After programming each components, we took a labdec plate and we wired them on the STM32L432KC-Nucleo. Follow the wiring diagram in attachment to assemble all components, or every PIN is detailed on the code assembly.

We added three buttons with three 10 Kilo ohms resitances : one send the GPS position in case of danger, one to switch on/switch off, and the last one to allow the runner to tag the point. We added a buzzer when you press the SOS button.

The file "braceletOrientation" in attachment is our project on Fritzing. This is a summary file of our components and our wiring on labdec as well as on PCB. Furthermore, we added the assembly code of all components.

Step 4: Data Acquisition

Actoboard

Actoboard is a dashboard-based tool. It displays all the data sent by the Sigfox Module. It will then send via URL this data to nodered in order to be inserted in the database.

  • Send the data :

To send the data via your code, firstly you need to declare the PIN (Tx, Rx) of the module Sigfox (you can see it in our code). After that, thanks to this command : "sigfox.printf("AT$SF=%02X%02X%02X%02X%02X%02X \r\n", lat_deg, long_deg, lat_10s, long_10s, lat_100s, long_100s);", this example send the data of the GPS to Actoboard.

  • Receive the data :

After you're setup your Data sources in relation with your Sigfox module, you need to setting your Data format for receiving the data fro your code. For the same example than before (GPS) you need to set the data format like that : "lat_deg::uint:8 long_deg::uint:8 lat_10s::uint:8 long_10s::uint:8 lat_100s::uint:8 long_100s::uint:8".

Be careful with the type and the number of bits, you need to have the exact same length. So I recommand you to cast your data in your code like that : "lat_deg = (int8_t)lat_deg;".

Be also careful with the number of digit, in this example we only transmit data with 2 digits max. But if you want to transfer a bigger data like "%04X" you may know that Actoboard is going to inverse the digit. For example if you transmit 0x3040, Actoboard is going to understand 0x4030. So you must inverse the digit before send a data format that exceed 2 digit.

  • Edit Dashboard :

For edit your data in a Dashboard on Actoboard, you just have to add a widget. There is a list of widget, you must chose the one who correspond the best for your system. And after you just have to chose which data is going to fill which widget.

  • Transmit to nodered :

To transfer all the data you receive on Actoboard to nodered via URL, you just have to fill in the "forwarding url" box in your settings with your nodered project URL. For example, we have fill the box with "https://noderedprojet.mybluemix.net/projet".

Step 5: Data Base

Bluemix

  • Nodered :
  • Receive the data form Actoboard

To get the data form Actoboard, you need to add a "websocket" input that you have to set up the method by "POST" and specify your URL (example in photo).

  • Formatting data

You need to extract the data you want to add in your database (cloudant) and formatting them. for that, you must add a "function" bloc. See the photo in attachment for understand how to do that.

You can add geomtry things on a map, for example, we got a function that add a point with the GPS coordinate on a map and link them. We use this function to create the race and after, we switch the another function which is going to create polygon arround the point if you check an RFID TAG.

  • Send to cloudant

After the formatting of your data, you need to send them to your cloudant DataBase. For that, you must add a "cloudant" storage bloc and specify the settings like the name of your DataBase, the operation "insert" see our example in attachment.

Don't forget to "Deploy" your nodered for your system to work.

  • Cloudant :

In your cloudant Database, you can now see all the data you have send with the sigfox and formatting in node red. You can chose which information you want to see like "date, device, TAG RFID, GPS".

And you can visualize the geomtry things you have create in the nodered funtion in the menu "gps --> Geospatial Indexes"

Step 6: Demonstration

To sum up, we had four Interfaces Human-Machine controled by four push-buttons.

The basic interface indicates the temperature, the humidity, the tag's number, a chronometer and the magnetic direction.

On one of the push button action, you will find a real interface compass. A circle will be drawn on the screen with the direction well positioned.

On another push button action, you will send a SOS message which it send your location to the data base. Moreover you will hear a SOS message in morse code.

In addition, on the last push button action you will wake up the RFID tag. After that you have five secondes to tag your crossing point. Then you will hear a beep. This action increases a counter on the display and send the tag with the time on our data base. Finally, all tags will draw the ride on a map.

The automomy of our watch is about 4h30 (about 660mA/h). It depends on the tag number checked.

To conclude after the race, you will find all runner actions on our data base bluemix.

Comments

author
Swansong (author)2017-02-06

Thanks for sharing :)

About This Instructable

205views

5favorites

License:

More by PaulineP17:Connected orientation bracelet
Add instructable to: