COVID HACKS #2 - ShareIt - Shared Mobility for the Post-COVID world

 

A shared mobility ecosystem that allows safe use of public vehicles

 

ShareIt - Shared Mobility for the Post-COVID world

The Problem

People have become really paranoid of public micro-mobility services like using bicycles or e-scooters for short commutes. This is creating great losses for the service providers and people are being forced to walk great distances or purchase their own mode of transport. Again this is proving too costly for middle-income individuals.

 

Solution

There is no solution in the market that solves this great issue. Sanitising scooters after every ride is not possible. To solve this, I wish to create a paper dispenser at parking lots of these services. The paper can be used to cover the points of contact of the person to the micro-mobile like the seat and the handles. The paper would have perforations pre-made so that perfectly sized cutouts are obtained. Bins would also be placed at the parking lots for safe disposal. The quantity of paper, sanitiser and the amount of garbage would be logged for disposal and maintenance.

 

Implementation

The customer would book the cycle or scooter in question as usual and make the payment. After payment, a sequence of coloured blocks would be displayed on the customer's copy of the mobile application. The customer would need to hold the screen in front of a module on the dispenser fitted with a TQ320 color sensor. If the code is found to be correct a servo motor rotates a paper roll to expose the free end.

The paper can then be torn off to cover the contact points like the handle and the seat and disposed of while returning the cycle or scooter.

The servo motor is controlled by the Arduino MKR 1010 Wifi board which also checks the color code and communicates with the mobile application of the customer over Wifi to give necessary instructions. By connecting to the Arduino CLoud, it logs data about the transaction which can then be used by the operator for managing fleets. Also, an IR sensor fixed perpendicularly to the paper roll checks if a refill is needed and sends a notification over Wifi to the operator. A dustbin fixed below this module is mounted on tip with another IR LED pair that detects if the bin is full and sends an appropriate notification.

 

Things used in this project

Hardware Components

1. Arduino MKR WiFi 1010

2. SG90 Micro-servo motor

3. Seeed Grove - Infrared Reflective Sensor v1.2

4. Jumper Wires (generic)

5. Paper Rolls (generic)

6. Glue Stick (generic)

Software apps and online services

1. Arduino IDE

2. Ubidots

3. MIT App Inventor 2

Hand tools and fabrication machines

1. Soldering Iron (generic)

2. Hot glue fun (generic)

 

The Build

Plan of action

- Creating web app for sending data to Paper dispenser

- Box for dispensing paper

- Security Mechanism build

- Android app development for booking


 

Connecting to Ubidots Cloud over HTTP

Download the Ubidots library and click on Sketch -> Include Library -> Add .ZIP Library. Then, select the .ZIP file of Ubidots and then click on "Accept". Finally, close the Arduino IDE and open it again.

Sending (POST) Data to Ubidots

In order to POST data to Ubidots, first you have to select the board and port in the options Tools of the Arduino IDE bar.

https://hackster.imgix.net/uploads/attachments/1182447/image.png?auto=compress%2Cformat&w=740&h=555&fit=max

After make sure your board is successfully connected with the computer, open the Arduino IDE and paste the sample code below. Once you have pasted the code, you will need to assign your Ubidots TOKEN, SSID (WiFi Name) and Password of the available network.

// This example sends data to multiple variables to
// Ubidots through HTTP protocol.

/
****************************************
* Include Libraries
****************************************/

#include "Ubidots.h"

/****************************************
 * Define Instances and Constants
****************************************/

const char
* UBIDOTS_TOKEN = "...";  // Put here your Ubidots TOKEN
const char* WIFI_SSID = "...";      // Put here your Wi-Fi SSID
const char* WIFI_PASS = "...";      // Put here your Wi-Fi password

Ubidots ubidots(UBIDOTS
_TOKEN, UBI_HTTP);

/
****************************************
* Auxiliar Functions
****************************************/

// Put here your auxiliar functions

/****************************************
 * Main Functions
****************************************/

void setup() {
 Serial.begin(115200);
 ubidots.wifiConnect(WIFI
_SSID, WIFI_PASS);
 // ubidots.setDebug(true);  // Uncomment this line for printing debug messages
}

void loop() {
 float value1 = random(0, 9)
* 10;
  float value2 = random(0, 9) * 100;
 float value3 = random(0, 9)
* 1000;
  ubidots.add("Variable_Name_One", value1);  // Change for your variable name
  ubidots.add("Variable_Name_Two", value2);
  ubidots.add("Variable_Name_Three", value3);

  bool bufferSent = false;
  bufferSent = ubidots.send();  // Will send data to a device label that matches the device Id

  if (bufferSent) {
    // Do something if values were sent properly
    Serial.println("Values sent by the device");
  }
  delay(5000);
}

  • UPLOAD the code into your “Arduino MKR WIFI 1010”
  • To verify the device's connectivity and the server response, open the serial monitor by selecting the "magnifying glass" icon in the top right corner of the Arduino IDE to check if the data is being send correctly.

After you follow the above steps, you would be able to see a response in the serial monitor like the one below.

 https://hackster.imgix.net/uploads/attachments/1182456/image.png?auto=compress%2Cformat&w=740&h=555&fit=max

  • Finally in your Ubidots account you will be able to see the data posted in your device.

Note: You will see that the device is automatically recognised by the platform.

Creating Dashboards for seeing data in UbiDots

Every Dashboard has certain elements with which it organises information. Every widget has a different set of configuration options. Depending on the widget, you might be able to add one or several variables. For instance, the metric widget only supports one variable, while the line chart widget supports multiple variables.

  • Static Dashboards are used to visualize data from predetermined devices and variables. Static dashboards display the same device and variable data at all times.
  • Dynamic Dashboards utilize a primary and replica (master/slave) technology to visualize data from different devices and variables, using a drop down menu in the settings bar. By selecting different devices from the settings bar, a dynamic dashboard will refresh with the underlying device and variables populating each widget's visualization according to the device selected.

https://hackster.imgix.net/uploads/attachments/1182656/2019-10-11_18-10.png?auto=compress%2Cformat&w=740&h=555&fit=max

Types of Widgets - Static and Dynamic

Ubidots allows you to combine static and dynamic widgets at will.

The following table better outlines the differences between the types much more clearly.

https://hackster.imgix.net/uploads/attachments/1182659/image.png?auto=compress%2Cformat&w=740&h=555&fit=max


 

Creating a Dashboard (static or dynamic)

Step 1: To create a dynamic dashboard, go to "Data" –> "Dashboards"

https://hackster.imgix.net/uploads/attachments/1182660/image.png?auto=compress%2Cformat&w=740&h=555&fit=max

Step 2: Click on the "dashboard" icon in the top-left of the user interface:

https://hackster.imgix.net/uploads/attachments/1182661/2019-10-13_18-39.png?auto=compress%2Cformat&w=740&h=555&fit=max

Step 3: Then click on the "+" icon:

https://hackster.imgix.net/uploads/attachments/1182662/2019-10-13_18-43.png?auto=compress%2Cformat&w=740&h=555&fit=max

Step 4: Assign a NAME to your dashboard and provide some general settings:

  • Default time range: The first load corresponds to the predetermined time interval when the dashboard is loaded, otherwise it corresponds to the last selected time range.
  • Dynamic Dashboard: Enable it if you're creating a dynamic dashboard. Disable it if creating a static dashboard.

Most of the things are self-explanatory and I am not increasing the length of this already long project account. If you have issues do reach out to me in the comments below.

IMPORTANT NOTE: Customizing your Date format.

You can enter your own Date format using a parsing string as described in the Moment JS library. Below you can find quick parsing strings and examples:

https://hackster.imgix.net/uploads/attachments/1182663/image.png?auto=compress%2Cformat&w=740&h=555&fit=max

Examples:
– "D/MMM/YY H:m:ss.SSS" – "22/Feb/19 14:57:40.369"
– "YYYY-MM-DD hh:mm:ss A" – "2019-02-22 03:01:08 PM"

Notice that non alphanumeric characters such as "/", ":" or "–" are parsed literally to the resulting Date format.

Finally, click on the green icon in the lower right of your screen to save the configuration and create a new dashboard.

https://hackster.imgix.net/uploads/attachments/1182664/2019-10-13_19-49.png?auto=compress%2Cformat&w=740&h=555&fit=max

Creating a Static Widget

Step 1: To create a static widget, click on the “+” icon in the top-right corner of the dashboard user interface.
Step 2: Select the type of Widget from the available options, or create your own with the HTML Canvas.
Step 3: Select Static Widget
Step 4: Assign a Variable for the widget by selecting "+ Add Variables"
Step 5: Configure the widget appearance and save

1.00

Creating a Dynamic Widget

Step 1: To create a static widget, click on the “+” icon in the top-right corner of the dashboard user interface.
Step 2: Select the type of Widget from the available options, or create your own with the HTML Canvas.
Step 3: Select Dynamic Widget
Step 4: Click on "+ Add Variables" to enter a Variable label
Step 5: Configure the widget appearance and save

 

Every widget has a different set of configuration options. Depending on the widget you might be able to add one or several variables. For instance the metric widget only supports one variable, while the line chart widget supports multiple variables.

Some of these widgets also give you the option to override the dashboard's time range (a.k.a "Set by dashboard"), allowing you to force the aggregation to always be computed for a predetermined time range:

https://hackster.imgix.net/uploads/attachments/1182671/2019-10-16_10-04.png?auto=compress%2Cformat&w=740&h=555&fit=max

Widget Appearance

Every widget has a different set of options for appearance, the most common ones being:

  • Name: The text label to appear in the upper left corner of your widget.
  • Font: Option to change the font used inside the widget.
  • Decimal points: The amount of decimals for non-integer values.
  • Date Format: Choose between different date formats. If "Custom date" format is selected, the same rules apply as in Dashboard settings in section 3.
  • Color: Every widget has a default color ("Set by widget" option), predetermined by Ubidots. You can override this default color by selecting the option "Variable's default", which will use the variable's color.

 

The Prototype

The prototype was made according to this circuit diagram made on Fritzing

https://hackster.imgix.net/uploads/attachments/1183397/clor_qDQ10xCUXp.png?auto=compress%2Cformat&w=740&h=555&fit=max

On top is the main controller of the paper dispenser, ie, the hobby servo motor

On the top right is the Sharp IR distance sensor which acts as a proximity sensor and checks if the dustbin in which people dump paper is full or not

The TCS 230 color sensor is on the bottom right and is used for verification of the user`s shared mobility booking

At the center is our very own Arduino MKR1010 Wifi Board that acts as the brain for this project and provides Wifi connectivity.

Finally, the power source is a 7.4V Li-ion battery which supplies power into the VIN and GND rails through an LM7805 regulator


 

The actual assembly

Placement of components in main unit

Placement of components in main unit

 

 Placement of TCS sensor in bin

Placement of TCS sensor in bin

 

front view

front view

 

paper dispensed after verificationdispensed paper

paper dispensed after verification

proximity sensor

proximity sensor

The proximity sensor`s job is to raise an alert in case the bin becomes full.

Bin for collecting trash

Bin for collecting trash


 

Monitoring my Things

Final Dashboard

Final Dashboard

The ubidots Dashboard helps service providers keep track of paper stock in the dispenser and the waste in the basket so that suitable and timely action may be taken.

 

Improvements

As you might expect, I'm not pleased with the final design, which I was forced to create due to a lack of time. The project can be improved by strengthening the enclosure (Obviously this was meant to be a prototype and that only). The current device is so weak that when I tear the paper from the roll, the entire shaft shakes. Aside from that, the aesthetics could be much better.

I'm not going to stop there; I'm going to keep improving this.

Keep an eye out for future updates to this project!!

 


 

Parting thoughts

Micro-mobility has taken a great hit especially in urban areas, where people rely heavily on it. My solution though crude helps keep the virus at bay with a very simple and cost-effective mechanism.

This makes my project scalable and widely deployable. I am already in talks with a senior from my university who has a startup in this domain to start rolling this out in India. However, first I guess I will improve my prototype further and then approach him.

For that, I urge you to please provide your valuable feedback in the comments below.

Thanks a lot for reading this long post!!

 

References

https://ubidots.com/

https://fritzing.org/

Schematics

https://hackster.imgix.net/uploads/attachments/1182725/clor_osoBOVJTwU.png

 

This blog has been submitted by KRSSG, IIT-Kharagpur under the Robocraze Club Outreach Program.

Author: Moinak Ghosh

 

 

 

Leave a comment

Please note, comments must be approved before they are published