You are on page 1of 37

Introduction

The smart e-bike monitoring system (SEMS) is a platform for the real-time
acquisition of usage data from electrically-assisted bikes (also called pedelecs or e-
bikes). It is autonomous (runs off the bike battery), replicable (open source and
open hardware), scalable (different fleet sizes) and modular (sensors can be added),
so it can be used for further research and development. The system monitors
location (global positioning system), rider control data (level of assistance) and
other custom sensor input in real time. The SEMS data feeds an online interface for
data analysis, for riders to view their own data and for sharing on social media. The
basic system can be replicated by other researchers and can be extended with
modules to explore various issues in e-bike research. The source code and
hardware design are publicly available, under the General Public License, for non-
commercial use. SEMS was implemented on 30 bikes and collected data during 10
months of real-word trials in the UK. This study details the design and
implementation of the hardware and software, discusses the system use and
explores features for future design iterations. The SEMS turns singular e-bikes into
a networked fleet and is an example of the internet of things in the cycling context.
Module Design and Description

Component used

ESP32 is a series of low-cost, low-power system on a chip microcontrollers with


integrated Wi-Fi and dual-mode Bluetooth. The ESP32 series employs
a Tensilica Xtensa LX6 microprocessor in both dual-core and single-
core variations and includes in-built antenna switches, RF balun, power amplifier,
low-noise receive amplifier, filters, and power-management modules.

 Memory: 520 KiB SRAM


 Wireless connectivity:
 Wi-Fi: 802.11 b/g/n
 Bluetooth: v4.2 BR/EDR and BLE
 Peripheral interfaces:
 12-bit SAR ADC up to 18 channels
 2 × 8-bit DACs
Arduino

Arduino is an open-source hardware and software company, project and user


community that designs and manufactures single-board
microcontrollers and microcontroller kits for building digital devices and
interactive objects that can sense and control both physically and digitally. Its
products are licensed under the GNU Lesser General Public License (LGPL) or
the GNU General Public License (GPL),[1] permitting the manufacture of Arduino
boards and software distribution by anyone. Arduino boards are available
commercially in preassembled form or as do-it-yourself (DIY) kits.
GSM module

This is an ultra compact and reliable wireless module. The SIM900A is a complete
Dual-band GSM/GPRS solution in a SMT module which can be embedded in the
customer applications.Featuring an industry-standard interface, the SIM900A
delivers GSM/GPRS 900/1800MHz performance for voice, SMS, Data, and Fax in
a small form factor and with low power consumption. With a tiny configuration of
24mmx24mmx3mm, SIM900A can fit in almost all the space requirements in user
applications, especially for slim and compact demand of design.

 Dual-Band 900/ 1800 MHz


 GPRS multi-slot class 10/8GPRS mobile station class B
 Compliant to GSM phase 2/2+Class 4 (2 W @850/ 900 MHz)
 Class 1 (1 W @ 1800/1900MHz)
 Control via AT commands (GSM 07.07 ,07.05 and SIMCOM enhanced AT
Commands)
 Low power consumption: 1.5mA(sleep mode)'
 Operation temperature: -40°C to +85 °C
 Status indicator(D5):It will flashes continuously whenever the call arrives
otherwise it is left ON.
 Network LED(D6):This led will blink every second which indicates that the
GSM module is not connected to the mobile network. Once the connection is
established successfully, the LED will blink continuously every 3 seconds.
Lcd

A liquid-crystal display (LCD) is a flat-panel display or other electronically


modulated optical device that uses the light-modulating properties of liquid
crystals. Liquid crystals do not emit light directly, instead using
a backlight or reflector to produce images in color or monochrome.[1] LCDs are
available to display arbitrary images (as in a general-purpose computer display) or
fixed images with low information content, which can be displayed or hidden, such
as preset words, digits, and seven-segment displays, as in a digital clock. They use
the same basic technology, except that arbitrary images are made up of a large
number of small pixels, while other displays have larger elements. LCDs can either
be normally on (positive) or off (negative), depending on the polarizer
arrangement. For example, a character positive LCD with a backlight will have
black lettering on a background that is the color of the backlight, and a character
negative LCD will have a black background with the letters being of the same
color as the backlight. Optical filters are added to white on blue LCDs to give them
their characteristic appearance.
Rfid

WHAT IS RFID?
RFID is an acronym for “radio-frequency identification” and refers to a technology
whereby digital data encoded in RFID tags or smart labels (defined below) are
captured by a reader via radio waves. RFID is similar to barcoding in that data
from a tag or label are captured by a device that stores the data in a database.
RFID, however, has several advantages over systems that use barcode asset
tracking software. The most notable is that RFID tag data can be read outside the
line-of-sight, whereas barcodes must be aligned with an optical scanner. If you are
considering implementing an RFID solution, take the next step and contact the
RFID experts at AB&R® (American Barcode and RFID).
HOW DOES RFID WORK?
RFID belongs to a group of technologies referred to as Automatic Identification
and Data Capture (AIDC). AIDC methods automatically identify objects, collect
data about them, and enter those data directly into computer systems with little or
no human intervention. RFID methods utilize radio waves to accomplish this. At a
simple level, RFID systems consist of three components: an RFID tag or smart
label, an RFID reader, and an antenna. RFID tags contain an integrated circuit and
an antenna, which are used to transmit data to the RFID reader (also called an
interrogator). The reader then converts the radio waves to a more usable form of
data. Information collected from the tags is then transferred through a
communications interface to a host computer system, where the data can be stored
in a database and analyzed at a later time.
RFID TAGS AND SMART LABELS
As stated above, an RFID tag consists of an integrated circuit and an antenna. The
tag is also composed of a protective material that holds the pieces together and
shields them from various environmental conditions. The protective material
depends on the application. For example, employee ID badges containing RFID
tags are typically made from durable plastic, and the tag is embedded between the
layers of plastic. RFID tags come in a variety of shapes and sizes and are either
passive or active. Passive tags are the most widely used, as they are smaller and
less expensive to implement. Passive tags must be “powered up” by the RFID
reader before they can transmit data. Unlike passive tags, active RFID tags have an
onboard power supply (e.g., a battery), thereby enabling them to transmit data at all
times. For a more detailed discussion, refer to this article: Passive RFID Tags vs.
Active RFID Tags.
Smart labels differ from RFID tags in that they incorporate both RFID and barcode
technologies. They’re made of an adhesive label embedded with an RFID tag
inlay, and they may also feature a barcode and/or other printed information. Smart
labels can be encoded and printed on-demand using desktop label printers, whereas
programming RFID tags are more time consuming and requires more advanced
equipment.
ARDUINO

Arduino is an open-source platform used for building electronics projects. Arduino


consists of both a physical programmable circuit board (often referred to as
a microcontroller) and a piece ofsoftware, or IDE (Integrated Development
Environment) that runs on your computer, used to write and upload computer code
to the physical board.

The Arduino platform has become quite popular with people just starting out with
electronics, and for good reason. Unlike most previous programmable circuit
boards, the Arduino does not need a separate piece of hardware (called a
programmer) in order to load new code onto the board – you can simply use a USB
cable. Additionally, the Arduino IDE uses a simplified version of C++, making it
easier to learn to program. Finally, Arduino provides a standard form factor that
breaks out the functions of the micro-controller into a more accessible package

An Arduino board consists of an Atmel 8-, 16- or 32-bit


AVR microcontroller(ATmega8, ATmega168, ATmega328, ATmega1280,
ATmega2560), but other makers' microcontrollers have been used since 2015. The
boards use single-row pins or female headers that facilitate connections for
programming and incorporation into other circuits. These may connect with add-on
modules termed shields. Multiple, and possibly stacked shields may be
individually addressable via an I²C serial bus. Most boards include a 5 V linear
regulator and a 16 MHz crystal oscillator or ceramic resonator. Some designs, such
as the LilyPad, run at 8 MHz and dispense with the onboard voltage regulator due
to specific form-factor restrictions. Arduino microcontrollers are pre-programmed
with a boot loader that simplifies uploading of programs to the on-chip flash
memory. The default bootloader of the Aduino UNO is the optiboot
bootloader. Boards are loaded with program code via a serial connection to another
computer. Some serial Arduino boards contain a level shifter circuit to convert
between RS-232 logic levels and transistor–transistor logic(TTL) level signals.
Current Arduino boards are programmed via Universal Serial Bus (USB),
implemented using USB-to-serial adapter chips such as the FTDI FT232. Some
boards, such as later-model Uno boards, substitute the FTDI chip with a separate
AVR chip containing USB-to-serial firmware, which is reprogrammable via its
own ICSP header. Other variants, such as the Arduino Mini and the unofficial
Boarduino, use a detachable USB-to-serial adapter board or cable, Bluetooth or
other methods, when used with traditional microcontroller tools instead of the
Arduino IDE, standard AVR in-system programming (ISP) programming is used.
The Arduino project provides the Arduino integrated development
environment(IDE), which is a cross-platform application written in the
programming language Java. It originated from the IDE for the
languages Processing andWiring. It includes a code editor with features such as
text cutting and pasting, searching and replacing text, automatic indenting, brace
matching, and syntax highlighting, and provides simple one-click mechanisms to
compile and upload programs to an Arduino board. It also contains a message area,
a text console, a toolbar with buttons for common functions and a hierarchy of
operation menus.
NodeMCU

The ESP8266 is a low - cost Wi-Fi micro chip with full TCP/IP
stack and microcontroller capability produced by manufacturer Espressif
Systems in Shanghai, China.

NodeMCU is an open source IoT platform. It includes firmware which runs on


the ESP8266 Wi-Fi SoC from Espressif Systems, and hardware which is based on
the ESP-12 module. The term "NodeMCU" by default refers to the firmware rather
than the development kits. The firmware uses the Luascripting language. It is
based on the eLua project, and built on the Espressif Non-OS SDK for ESP8266. It
uses many open source projects, such as lua-cjson and SPIFFS
Dynamo

A bottle dynamo or sidewall dynamo is a small electrical generator for bicycles


employed to power a bicycle's lights. The traditional bottle dynamo (pictured) is
not actually a dynamo, which creates DC power, but a low-power magneto that
generates AC. Newer models can include a rectifier to create DC output to charge
batteries for electronic devices including cellphones or GPS receivers.

Named after their resemblance to bottles, these generators are also called sidewall
dynamos because they operate using a roller placed on the sidewall of a bicycle
tire. When the bicycle is in motion and the dynamo roller is engaged, electricity is
generated as the tire spins the roller.

Two other dynamo systems used on bicycles are hub dynamos and bottom bracket
dynamos.

Advantages over hub dynamos

No extra resistance when disengaged

When engaged, a dynamo requires the bicycle rider to exert more effort to
maintain a given speed than would otherwise be necessary when the dynamo is not
present or disengaged. Bottle dynamos can be completely disengaged when they
are not in use, whereas a hub dynamo will always have added drag (though it may
be so low as to be irrelevant or unnoticeable to the rider, and it is reduced
significantly when lights are not being powered by the hub).
Easy retrofitting

A bottle dynamo may be more feasible than a hub dynamo to add to an existing
bicycle, as it does not require a replacement or rebuilt wheel.

Price

A bottle dynamo is generally cheaper than a hub dynamo, but not always.

Slippage

In wet conditions, the roller on a bottle dynamo can slip against the surface of a
tire, which interrupts or reduces the amount of electricity generated. This can cause
the lights to go out completely or intermittently. Hub dynamos do not need traction
and are sealed from the elements.

Increased resistance

Bottle dynamos typically create more drag than hub dynamos. However, when they
are properly adjusted, the drag may be so low as to be trivial, and there is no
resistance when the bottle dynamo is disengaged.

Tire wear

Because bottle dynamos rub against the sidewall of a tire to generate electricity,
they cause added wear on the side of tire. Hub dynamos do not.

Noise

Bottle dynamos make an easily audible mechanical humming or whirring sound


when engaged. Hub dynamos are silent.
Switching

Bottle dynamos must be physically repositioned to engage them, to turn on the


lamps. Hub dynamos are switched on electronically. Hub dynamos can be engaged
automatically by using electronic ambient light detection, providing zero-effort
activation.

Positioning

Bottle dynamos must be carefully adjusted to touch the sidewall at correct angles,
height and pressure. Bottle dynamos can be knocked out of position if the bike
falls, or if the mounting screws are too loose. A badly positioned bottle dynamo
will make more noise and drag, slip more easily, and can in worst case fall into the
spokes. Some dynamo mounts have tabs to try to prevent the latter.
Gas Sensors

Gas sensors interact with a gas to initiate the measurement of its concentration.
The gas sensor then provides output to a gas instrument to display the
measurements. Common gases measured by gas sensors include ammonia,
aerosols, arsine, bromine, carbon dioxide, carbon monoxide, chlorine, chlorine
dioxide, diborane, dust, fluorine, germane, halocarbons or refrigerants,
hydrocarbons, hydrogen, hydrogen chloride, hydrogen cyanide, hydrogen fluoride,
hydrogen selenide, hydrogen sulfide, mercury vapor, nitrogen dioxide, nitrogen
oxides, nitric oxide, organic solvents, oxygen, ozone, phosphine, silane, sulfur
dioxide, and water vapor.

Measurement Specifications

Important measurement specifications to consider when looking for gas sensors


include the response time, the distance, and the flow rate.

The response time is the amount of time required from the initial contact with the
gas to the sensors processing of the signal.

Distance is the maximum distance from the leak or gas source that the sensor can
detect gases.

The flow rate is the necessary flow rate of air or gas across the gas sensor to
produce a signal.
Sensor Output

Gas sensors can output a measurement of the gases detected in a number of ways.
These include percent LEL, percent volume, trace, leakage, consumption, density,
and signature or spectra.

The lower explosive limit (LEL) or lower flammable limit (LFL) of a combustible
gas is defined as the smallest amount of the gas that will support a self-propagating
flame when mixed with air (or oxygen) and ignited. In gas-detection systems, the
amount of gas present is specified in terms of % LEL: 0% LEL being a
combustible gas-free atmosphere and 100% LEL being an atmosphere in which the
gas is at its lower flammable limit. The relationship between % LEL and % by
volume differs from gas to gas.

Also called volume percent or percent by volume, percent volume is typically only
used for mixtures of liquids. Percent by volume is simply the volume of the solute
divided by the sum of the volumes of the other components multiplied by 100%.

Trace gas sensors given in units of concentration: ppm.

Leakage is given as a flow rate like ml/min.

Consumption may also be called respiration. Given in units of ml/L/hr.

Density measurements are given in units of density: mg/m^3.

A signature or spectra measurement is a spectral signature of the gases present; the


output is often a chromatogram.
Common outputs from gas sensors include analog voltage, pulse signals, analog
currents and switch or relays. Operating parameters to consider for gas sensors
include operating temperature and operating humidity.

Standards

The International Society of Automation (ISA) specifies standard ISA 12.13.01


which describes test methods that apply to portable, transportable, and fixed
devices for the detection and measurement of flammable gas or vapor
concentrations in air.
MQ5

The working principle behind the MQ-5 gas sensor is as follows: The sensor has a
sensitive filament made of SnO2. In the presence of clean air, this filament tends to
have lower electrical conductivity. When a combustible gas such as LPG is
introduced, the filament’s conductivity rises, and the amount of change in it’s
conductance/resistance can be used to indicate the equivalent gas concentration.
This effect tends to be particularly pronounced at higher temperatures, and
resisitive heating element is present as well. SnO2 is particularly sensitive to
Methane, Butane and Propane, but is also sensitive to other combustible gases as
well.

The Technical specifications for the MQ-5 sensor are tabulated here:

Table 1 – Technical Specifications of the MQ-5 Gas leakage sensor.


The working of the MQ-5 sensor can be explained using Pic 1. The heating coil H
is in contact with the SnO2 filament. In the presence of clean air, the resistance
across the heating coil does not vary, but when a combustible gas is present, the
resistance of the SnO2 filament drops, which results in a corresponding rise
in Output Voltage (Vout), and this output voltage can be measured to indicate the
concentration of any combustible gas that is present.

Pic 1 – Structure of the MQ-5 Gas-leakage sensor.

The MQ-5 has an analog (voltage) output. We connected the MQ-5 sensor to a
WSN1101L. Data from the MQ-5 sensor could now be transmitted to a
WSN1101C gateway and used to monitor a given space for gas leaks etc.

We tested the circuit using a partly-opened Cigarette lighter to introduce


combustible gas near the gas sensor. See the rise and fall of O/P voltage on Pic
4. (Note: The MQ-5 sensor requires a 48-hour initial heating period as part of it’s
calibration process).
Pic 4 – Sample Output from the Wireless Gas-leakage sensor module.

This was part of a complete home-automation system that we built.The other


modules we built included a wireless system to remotely monitor Load-cell output,
a wireless system to remotely monitor temperature and humidity, and a wireless
system to remotely monitor soil humidity.
MQ series sensors use a small heater inside with an electro-chemical sensor in
order to measure different kind of gases combinations. They can be calibrated, but,
in order to do that a know concentration of the measured gas or gasses is needed
for that. For industrial purpose calibrations are done in special metrology
laboratories with accurate probes and tests. In our case, we will test it as it comes
from the producer without any additional calibration or settings. The main idea
before ordering this kind of sensor was to build a homemade alarm sensor, which
should make some alarming noise or light whenever someone forgot the cooker
stove one, or my little kid learned to play with stove switches, or there is a leak in
my gas installation. To accomplish that, I wanted a methane gas, simple to use, and
also compatible with arduino platform. Producer says that MQ4 sensor can sense
methane / natural gas easily with a range sensitivity from 300 to 10000ppm , costs
are very low, and can be easily plugged with Arduino boards.

MQ4 sensor pinout connections and power consumption

Arduino MQ4 sensor specifications

This model comes with 4 pins:

1 pin VCC 5v

1 pin GND
1 pin DO (digital output) TTL digital 0 and 1 (0.1 and 5V)

1 pin AO (analog output) 0.1-0 .3 V (clean), the highest concentration of voltage


around 4V

MQ4 model must be powered with stable 5v and needs at least 150mA (best to
have 250mA) according to the datasheet declaration, to be able to work properly.
Also before getting stable measurements, this model needs at least 1 minute to heat
up. Be aware that in some datasheets use the term “preheat”, which means that
some versions needs from 12h to 24h to burn-in the sensor. Only after this you will
be able to get consistent data. Also this kind of devices, which have internal heater,
are pretty sensible to ambient influences like humidity or moisture.
MQ7

MQ-7 gas sensor applies SnO2 which has a lower conductivity in the clear air as a
gas-sensing material. In an atmosphere where there may be carbon monoxide in a
certain density, the conductivity of the gas sensor raises along with the
concentration of carbon monoxide increases. 2. Applications This module can be
applied to household and industrial gas leakage alarm, portable gas detecting
device, etc. 3. Interfaces Pin No. Symbol Descriptions 1 DOUT Digital output 2
AOUT Analog output 3 GND Power ground 4 VCC Positive power supply (2.5V-
5.0V) 4. How to use We will illustrate the usage of the module with an example of
carbon monoxide detection by connecting a development board. Download the
relative codes to the development board. Connect the development board to a PC
via a serial wire and the module to the development board. Then, power up the
development board and start the serial debugging software. Here is the
configuration of the connection between the module and the development board.
Port STM32 MUC pin DOUT GPIOA.4 AOUT GPIOA.6 GND GND VCC 3.3V
Project preparation

You might also like