Project tutorial
Emergency Power Bank

Emergency Power Bank © GPL3+

How to make this Emergency Power Bank.

  • 4,792 views
  • 1 comment
  • 14 respects

Components and supplies

Abx00014 featured xjsqphgdlv
Arduino MKR Fox 1200
×1
GPS module
×1
18650 Li-Ion battery
×2
USB Li-Ion battery charger
×1
Step-up to 5V with USB
×1
Button
×1
09590 01
LED (generic)
×3
12702 01
SparkFun Solder-able Breadboard - Mini
×1
Pin header
×1
Wires
×1
OLED display
×1
E switch eg1218 image 75px
Slide Switch
×2
Mfr 25frf52 10k sml
Resistor 10k ohm
×3
Mfr 25frf52 100r sml
Resistor 100 ohm
×1

Necessary tools and machines

09507 01
Soldering iron (generic)
Prusa i3 MK2
Hy gluegun
Hot glue gun (generic)

Apps and online services

Sigfox logo rgb j7ilnvhq6o
Sigfox
Ide web
Arduino IDE
Ide web
Arduino Web Editor
DesignSpark Mechanical 2.0

About this project

I worked on the Emergency Power Bank. Emergency Power Bank has many functions:

  • Power Bank
  • Flashlight
  • Emergency Button
  • Sigfox conection
  • GPS

When you need help (you get stuck in the woods, you're hurt in the mountains) you press "Emergency Button" to ask for help. This will send your location information to family, friends and others for help.

When using only OLED, GPS and Sigfox, Power Bank will be able to operate for two days. When you charge your mobile and use OLED, GPS and Sigfox, it will work for one day.

1. Case

I designed the box in DesignSmark Mechanical. I printed it on 3D printer Prusa i3 MK2 from white PLA.

2. Installing components

I have connected everything according to schematic. I disconnected the LEDs from the charging module and replaced them with the LEDs on the top cover. Everything is fixed with hot glue.

3. Upload code

https://create.arduino.cc/editor/TAD2000/b59e3598-6ccc-494d-9946-9a5ca2935db8

4. OLED display

The display shows:

  • time
  • number of satellites
  • voltage on batteries
  • speed
  • course

5. Completed Emergency Power Bank

6. Sigfox settings

  • Decoded the message
latitude::uint:16:little-endian longitude::uint:16:little-endian speed::uint:16:little-endian course::uint:16:little-endian 

When you receive a message, you see:

  • When a message arrives, send an email.

Code

CodeArduino
#include <SigFox.h>
#include <TinyGPS++.h>
#include <Wire.h>
#include <Adafruit_SSD1306.h>

#define OLED_RESET 4
Adafruit_SSD1306 display(OLED_RESET);

uint16_t lat;
uint16_t lng;
uint16_t speed;
uint16_t course;

#define DEBUG 1
TinyGPSPlus gps;
#define gpsModul Serial1

void setup() {
  Serial.begin(9600);
  if (!SigFox.begin()) {
    if (DEBUG){
      Serial.println("Sigfox module unavailable !");
    }
    return;
  }
  gpsModul.begin(9600);
  pinMode(5, INPUT);
  display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
}

void loop() {

  int analogValue = analogRead(A1);
  int a = 2;
  float b = 0.00322265625; // 3.3 / 1024
  float voltage;
  voltage = analogRead(A1) * a * b;

  if(voltage < 2.800){
    display.clearDisplay();
    display.setTextColor(WHITE);
    display.setTextSize(1);
    display.setCursor(0, 0); 
    display.println("Turn off and");
    display.setCursor(0, 10); 
    display.println("charge the"); 
    display.setCursor(0, 20); 
    display.println("power bank."); 
    display.display();
  }
  else{ 
    if (gpsModul.available()) {
    gps.encode(gpsModul.read());
    }

    if ((gps.location.isUpdated()) && (gps.altitude.isUpdated())) {
      lat = gps.location.lat() * 1000;
      lng = gps.location.lng() * 1000;
      speed = gps.speed.kmph() * 1000;
      course = gps.course.deg() * 1000;

      display.clearDisplay();
      display.setTextColor(WHITE);
      display.setTextSize(1);
      display.setCursor(0, 0);  
      display.println(gps.time.hour());
      display.setCursor(12, 0);
      display.println(":");
      display.setCursor(18, 0);
      display.println(gps.time.minute());
      display.setCursor(30, 0);
      display.println(":");
      display.setCursor(36, 0);
      display.println(gps.time.second());
      display.setCursor(60, 0);
      display.println(gps.satellites.value());
      display.setCursor(85, 0);
      display.println(voltage);
      display.setCursor(115, 0);
      display.println("V");
      display.setCursor(0, 10);  
      display.println(gps.speed.kmph());
      display.setCursor(35, 10);
      display.println("km/h");
      display.setCursor(0, 20);  
      display.println(gps.course.deg());
      display.setCursor(45, 20);
      display.println("course");
      display.display();
      }


      if(digitalRead(5) ==HIGH){
        SigFox.begin();
        SigFox.debug();
        SigFox.beginPacket();
        SigFox.write(lat);
        SigFox.write(lng);
        SigFox.write(speed);
        SigFox.write(course);
        SigFox.endPacket();
        SigFox.end();
        }
      }
    }

Custom parts and enclosures

Power bank part 1
Power bank part 2

Schematics

Schematics
2017 11 11 18 06 35 fweagddelo

Comments

Similar projects you might like

Programmable Pocket Power Supply with OLED Display

Project tutorial by Shahariar

  • 6,322 views
  • 6 comments
  • 28 respects

Sigfox kWh Meter

Project tutorial by jassak

  • 6,113 views
  • 7 comments
  • 15 respects

Fox Advisor

Project tutorial by Celia Garrido Hidalgo

  • 3,166 views
  • 2 comments
  • 12 respects

Arduino101 / tinyTILE BLE: Match-Making Sunglasses

Project tutorial by Kitty Yeung

  • 11,335 views
  • 2 comments
  • 35 respects

IR Remote Controlled Power Switch for Rapsberry Pi 3

Project tutorial by Vilém Kužel

  • 1,084 views
  • 1 comment
  • 5 respects
Add projectSign up / Login