What is MQTT Used For in IOT?

MQTT is short for MQ Telemetry Transport, and is a messaging protocol used in the Internet Of Things (IOT) systems.

It is very simple and lightweight messaging protocol, designed for devices with limited processing power and low-bandwidth, high-latency or unreliable networks.

MQTT was designed to minimise network bandwidth and device resource requirements, whilst also attempting to ensure data delivery reliability and some degree of assurance of delivery.

The MQTT protocol ideal for Internet of things (IOT) “machine-to-machine” (M2M) devices.

This is because bandwidth and battery power are at a premium, in IOT equipment designs.

Sensors for the Internet of Things – a guide

Sensors for the Internet of Things – a guide

Sensors are one of three main components of an Internet of Things, or IOT for short, system.

The first stage in an IOT system, are the sensors, which collect the environmental data.

Using automatic IOT Sensors , not only saves employing staff to manually take readings, but can also be safer in dangerous environments.

Choosing the right  sensors

The type of sensors that you need in order to automate your business operations, not only depends on the processes you wish to monitor, but also the environment that the sensors will be operating in.

Sensors for Damp Environments

Sensors situated in damp environments, whether actually immersed in water, or just located in a damp environment, require appropriate IP.

IP is short for Ingress protection, and is an internationally used rating system for how well a device resists ingress of dust and moisture.

Failure to chose a suitable IP rated sensor can result in premature device failure, causing increased variable maintenance costs for your business. We avoid this by planning a system that is reliable, and meets your business needs.

Sensor types and applications

A sensor is defined as a  Converter that measures a physical quantity and converts it into a signal.

Some examples of sensors that can be integrated by yesway, into your IOT system, are given below.


Airflow is the amount of air passing through a pipe, for instance, over a period of time.

Airflow can be measured by a sensing device, which is integrated into a remote wireless node.

The data captured, is wirelessly sent back to an IOT Gateway device, which then sends it into the Internet Cloud.


Current is defined as a flow of electricity which results from the ordered directional movement of electrically charged particles.

Measuring Current can be useful in Industrial Internet Of Things, IIOT environments, such as Smart Factories.

An example of an industrial machine that you may wish to monitor the current of, is the Induction Motor.

An Induction Motor is a type of electrical motor, widely used in factories, and on board ships.

The Induction Motor runs on Alternating Current (AC), and is available as both ‘Single-Phase’, or more typically ‘Three-Phase’ versions.

A Three-Phase Induction Motor has three supply wires (hence the name), which supply electricity along each of the three ‘phase’ wires.

Each Phase is 120 degrees apart, if you were to look at their Sine waves.

Measuring the Current being drawn by the Induction Motor, down each of the three phase wires, can help identify faults with the Induction Motor, or associated control systems.

Craig Miles (me), who founded our business has lots of experience in manual fault finding of Industrial Induction Motors, and even taught it to International Students.

Why not use our in-house experience to improve your factory operations, by integrating Sensors, to turn your factory into a Smart Factory.


Pushing or pulling forces can be measured using wireless technology sensing.

These include forces being exerted on structures, such as bridges.


Humidity levels can be measured, either as a standalone task, or as part of a Smart City integration.

Humidity measurement is useful, both in an external and internal environment.

Yesway have the ability to engineer a custom solution (if needed), to reliably operate within harsh, or explosive (ATEX) environments.


Thermal heat levels can be measured, and fed to the cloud, where they can be plotted and analysed.


Magnetic sensors are found in applications, such as security systems, where they act as door sensors.

More sophisticated magnetic sensors, are capable of detecting varying magnetic fields.

Other Sensing Abilities

We can integrate many other types of sensing device, and wirelessly get your data onto the cloud.

Below are some more examples of sensors available.

  • Motion & Position
  • Optical
  • Pressure Sense & Transducers
  • Speed Sensors

Written and Copyright (C) Craig Miles 2018. Originally written for Yesway Ltd

What Is Industry 4.0

Industry 4.0

Industry 4.0 is a phrase that you will increasing hear in business manufacturing, but what exactly is it?

According to Wikipedia it is the following:-

“Industry 4.0 is the current trend of automation and data exchange in manufacturing technologies. It includes cyber-physical systems, the Internet of things and cloud computing. Industry 4.0 creates what has been called a “smart factory”. (Source:

Why 4.0?

Industry 4.0 is often described as the Forth Industrial Revolution, so it would be useful to explain what Industry 1,2 & 3 were.

Industry 1.0

Industry 1.0 refers to the first industrial revolution that started around 1780.

The first industrial revolution was powered by water and steam, and was very mechanical in nature.

Industry 2.0

In 1870 the first electrically powered assembly line was introduced, and as the distribution of electricity become widespread, it opened up further opportunities for manufacturing.

This was the start of the era of mass production.

Industry 3.0

From the late 1960s onwards , computerisation started to be introduced into industrial processes.

This started with the Modicon 084 , which was the first PLC, which is short for Programmable Logic Controller.

A PLC is basically an industrial computer, used to control production processes.

By using PLC control, factories were able to improve efficiency, and save time and money.

An example of how a PLC did (and still does) save money is  that the program software can be easily changed and modified, to adapt to manufacturing requirements.

Prior to PLC control, you would need to redesign, and rewire large parts of your factory plant, to carry out the new process.  This was both time consuming , and expensive to do.

Industry 4.0

The latest revolution in manufacturing involves  minimal intervention & involvement by human beings.

Instead what is often described as ‘machine learning’ takes place, where algorithms make decisions based on live input data.

(c) Craig Miles 2018, all rights reserved

Originally written for Yesway Ltd

Internet of Things Training Courses

IOT – Internet of Things Training Courses

I have been involved in technical training for many years, and for the last couple of years have been involved with the Internet Of Things.

The Internet of Things, or IOT for short is part fo the next Internet revolution.

If you think of the first Internet revolution as being about connecting people together, then think of the new revolution, as being about connecting data.

I am the initiator for the Lincoln Internet of Things network (Things Network), which uses Lora-wan LPWAN  technology to connect  environmental data gathering devices to the Cloud.

Fundamentals of the Internet of Things Course

My fundamental  introductory course to the Internet of things, covers the following areas:-

The aims of the course is to train you by the end of the course, to understand the following:

  • To understand what the definition of IOT is
  • Be able to identify the elements of an IOT framework
  • Understand the key technologies that are used in the world of IOT
  • Be able to identify the main security threats, and implications for IOT
  • Examine the importance of interoperability in IoT
  • Consider the potential implications of the General Data Protection Regulation (GDPR) on IoT

More information being added soon, or get in touch.

Lorawan Server

What is lorawan

Lorawan is a wireless wide area network technology, based on Lora  narrowband  Spread Spectrum technology.

What Does a Lorawan Server Do

A lorawan server is in the Internet Cloud, and processes data received from  remote field sensors (measuring environmental factors), which are known as nodes.

The data from the nodes is received by a device called a  Lora Gateway    , which then sends the data to the Lorawan Server.

The Server

There are a number of suitable servers available, and some are open source. Open Source means that you are able to download, use and modify the server code, with some licence restrictions (check first).

For example here is an Open Source Lora (WAN)  server

I intend to install this code, and will be expanding this post with more information, as I go along.

Be sure to check back on a regular basis.


How to Build a Lorawan Gateway

What is  Lorawan

First of all, what is Lorawan.  It is a wireless technology that allows small amounts of data to be sent between a remote sensor (such as a river level detector), and the Internet.

Lorawan technology is very efficient at sending the sensor data over long distances, whilst consuming very little power. This means that a the sensor devices can be battery powered, whilst the batteries last for years.

What is a Gateway then

A Lorawan Gateway is the device that receives the wireless signals containing data, that has been transmitted (using Lora wireless technology) from the remote sensors (river level monitoring, air quality etc).

Once the  Gateway has received the  wirelessly transmitted data, the gateway forwards the data onto the Internet.

Gateway connection to the Internet can be via a variety of means, such as Wifi, Ethernet, 3G, 4G, 5G etc.

Building the Gateway

For beginners to building their own gateway, I would recommend joining, or founding a local Things Network .

The Lorawan Gateway that I am going to describe here, is designed to operate on the Things Network, however other lora networks can easily be installed.

The main components that you will need are:-

1) A Concentrator board from IMST of Germany. The Concentrator board is the wireless communications part of the system, responsible for receiving the wireless data signals, from the remote environmental sensors (Air quality sensors etc).

2) A small computer to store the software that controls the Concentrator board. We are going to use the UK designed Raspberry PI 3.

A Micro SD Card, for holding the software used by the Raspberry PI.  A small 4 GB card is fine.

3) A suitable Antenna (or Aerial), with pigtail connecting cable.

4) A suitable 2 Amp rated power supply, with a micro USB connector.

5)  7 Female to Female connecting leads, suitable for raspberry PI.

4) A suitable case, to house the components.


The first thing I need to make you aware of is the risk of static electricity, to your IMST ic880a Concentrator and Raspberry PI.

Static can damage the sensitive electronic components, therefore it is advisable to take precautions, such as not touching the board components, and wearing an anti static wrist strap.

The first thing you need to do is to format the micro SD card, that will be fitted to the raspberry PI, to hold the gateway software.

The SD card association has a free piece of software, for Windows PC and Mac, to do this. My card was already formatted, so I skipped this step.

The next step is to burn the actual software that will power your gateway, onto the Raspberry PI.

To do this, I used    

I first installed Etcher onto my  linux desktop computer. As most people use Windows PC, or Mac, you will need to find a suitable alternative to Etcher.

I also downloaded the operating system needed to run the Raspberry Pi, which is called Raspbian Stretch Lite , onto my desktop PC.

Put your micro SD card into your computers micro SD card reader. If your computer (like mine) does not have a card reader, then external USB plug in ones can be purchased cheaply (I got mine from my local Asda supermarket for £6).

Fire up Etcher, or whatever card  burning software you prefer, and select the copy of Raspbian Stretch Lite , that you previously downloaded to your PC.

Follow the instructions, and burn the operating system software onto the micro SD card.

Once you have successfully burned your Raspbian Stretch Lite, onto your SD card, insert it into the Raspberry Pi (the slot is on the underside of the Pi).

The next thing to do is to connect your Raspberry Pi to a suitable monitor (I used a TV, that had a HDMI connection), and also connect a USB keyboard, power supply, and mouse.

The power supply should be 5 Volts DC, and Raspberry Pi power supplies are widely available. I used a USB phone charger, with 5 Volts output, and a current rating of 2000mA.

Boot up your Raspberry Pi (connect the power), and you will see lots of computer code scrolling across your screen (if you have done everything successfully, so far).

When the Raspberry Pi asks you for a user name and password, use the following default ones (the  bit after the  ‘ : ‘ ).

Username: Pi

Password: Raspberry

After you have successfully logged in, type:

 sudo raspi-config

Numbered options will now hopefully be on your monitor screen.

Select [5] Interfacing Options, and then P4 SPI

Then select [7] Advanced Options , and then [A1] Expand Filesystem.

You now need to exit the raspi-config utility, either by hitting the ‘CTRL’  and  ‘X’ keys, or by typing sudo reboot

Next you are going to Configure the locales and time zone.

Type this in, to set the locales, and follow instruction.

sudo dpkg-reconfigure locales

Next, type this in to set time zone.

sudo dpkg-reconfigure tzdata

The next stage is to update the raspberry Pi software, do this by typing:

sudo apt-get update

Then install any upgrades to the operating system software, by typing sudo apt-get upgrade

Next we are going to install Git , which is needed to be able to download the Things Network software from Github.


sudo apt-get install git

The next step is to create a user called TTN (the things network).  This user will eventually replace the default raspberry pi user, which we will delete.

sudo adduser ttn

Then:    sudo adduser ttn sudo

Logout, by typing logout

Once you have logged out, log back in using the user name and password that you have just set up, when you added a user.

You can now delete the default Raspberry Pi user, by typing

sudo userdel -rf pi


Set the WIFI  SSID and password details, which can be found on the back of your home router / Hub (usually).

To set the WIFI details type

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf 

Once you have typed in the above text, you should see some code on the screen. Add the following to the end of the existing code, making sure that you enter your SSID and password details, in place of the shown text.




Now we are going to clone the installer from Github. This will download the software which runs the gateway, from the Github repository.  Type each of the following three code lines into your Pi, one at a time, hitting the return key after each line of code.

  git clone -b spi ~/ic880a-gateway
  cd ~/ic880a-gateway
  sudo ./ spi

Identifying the Gateway

The software will give the gateway the default name of ttn-gateway.

This however may need to be changed, to prevent issues with other Things Network Gateways within wireless range.

Wiring it Up

The next step is to connect the Concentrator board, to the Raspberry Pi, and also connect the antenna.

The components including the antenna should be mounted in a protective box,  and the antenna connected to the Concentrator board.

It is very important that the Concentrator board is not powered up, with no suitable antenna connected, of damage could occur to the board.

Once the antenna is connected, then the next step is to connect the Concentrator to the Raspberry Pi.

Connect using female to female connecting wires, as follows:

iC880a Concentrator pin Description RPi physical pin
21 Supply 5V 2
22 GND 6
13 Reset 22
14 SPI CLK 23
15 MISO 21
16 MOSI 19
17 NSS 24


It is important that you identify the correct pins, by referring to the manufactures data sheets (Both IMST & Raspberry Pi).

We accept no liability for loss or damage caused, by following these information only instructions.

For help, as to which pin is which on the Concentrator and Raspberry Pi boards, why not get in touch.

I also offer workshop training, where I can train your students to build their own Lorawan Gateways.


Craig Miles (C) 2018 , all images and content, unless stated separately.

How can I make my diesel engine last a long time

How you can make your diesel engine last a long time

Diesel engines can last for the life of your car or boat, with regular and cost effective maintenance.

Changing the Oil Regularly

Changing the engine oil on a regular basis is important in order to make your diesel engine last a long time.

This is because when the engine is running,  the oil forms a very small  ‘cushion’ between the moving metal engine components.

This ‘cushion’ of oil greatly reduces friction inside the engine.

Friction is the enemy of engine longevity, as it causes premature wear , and failure of the engine components, such as bearings.

Over time, the engine oil in a diesel engine will become contaminated with carbon and microscopic pieces of metal.

The oil will also lose efficiency due to the hard work it has to do, under extreme heat conditions.

Therefore oil should be changed regularly, and never later than the manufacturers service schedule.

The make your diesel engine last a long time, I would recommend that ideally you change your oil more regularly than the manufacturers service schedule.

The reason for this, is that manufacturers may extend the service times, in order to make the vehicle more attractive to buyers.

This often happens with engines fitted to road vehicles, such as cars especially.

Under ideal conditions such as long motorway driving, the oil may well be ok to leave in longer, but many cars sit in traffic jams, or only make short journeys.

Short journeys are especially bad for vehicles, as the diesel engine does not have time to warm up to its correct operating temperature.

Because the engine has not warmed up, the oil will not be working at maximum efficiency, and increased wear can result.

Engine sludge can also occur in engines, regularly only driven short distances.

I personally change my diesel engine oil every 6000 miles, on a vehicle that is supposed to only need changes every 12,000. I start to feel a difference in smoothness at around 6000 – 7000 Miles, and that tells me its ideally due a change.

As most of my driving is long distance motorway, I would probably change it at 5000 Miles, if I did a lot of town driving.

For tips on changing the oil in a diesel engine, check out this link to my page on oil changes.

Fuel Filters

Another important way to ensure your diesel engine lasts a long time, is to regularly change the engine fuel filter.

Your marine diesel may well have two fuel filters fitted, to filter different size particles, however you road vehicle is likely to have one filter.

Fuel can be contaminated with dirt, microscopic organisms and even water, therefore filtering of the fuel is important.

In a diesel engine the fuel will enter the engine via the injectors.

These injectors have a single, or multiple very small holes at their ends, to allow the fuel to pass through.

If dirt is pumped through the injector, via the fuel, the injector can become blocked.

A blocked injector will result in poor running of the engine, and injector replacement, which is quite costly.

Hard Engine Use When Cold

As previously mentioned, the oil and the engine need time to warm up to there normal operating temperature.

Therefore running an engine at high RPM before the engine has warmed up, can reduce the life of the engine.

This is because of increased friction , caused by the oil not being up to optimal temperature.


Fuses in Two Way Radio Installations

The importance of fuses in radio equipment power supplies

A safe two-way radio equipment installation requires the ability to quickly disconnect the supply to the equipment, if a fault develops. Fuses are a cost effective solution, for equipment safety.

What are Electrical Fuses

Fuses are devices that protect equipment installations, from excess electrical current.

Excess current is caused by a fault in the equipment, or system wiring, and can cause equipment damage, or even fire.

The fuse works by ‘blowing’ if a certain current through it is exceeded. When the fuse ‘blows’, the electrical current ceases to flow, due to a physical break inside the fuse, preventing current flow through it.

Types of Fuses

Electrical fuses come in a variety of package types, and current ratings.

For example, package types include ‘cartridge’ and ‘blade’ designs.

Fuses are also made to blow at different current thresholds, so can be matched to the piece of equipment it is connected to.

There are also fuse types known as ‘slow blow’ fuses.

Slow Blow fuses are designed not to blow due to a short spike in electrical current. Short spikes can be caused by surge currents, which is a very temporary increase in current, when a piece of equipment is started.

Importance of correct Fuses

Fitting an incorrect fuse can either reduce safety, or reliability.

For example, if a fuse is fitted that has too high a current blow rating, then if a fault develops with the equipment, the electricity will find another weak point in the system. This weak point could be the radio equipmenmt itself, and the excess current could damage it.

On the other hand, fitting a fuse that has too small a current rating will reduce system reliability.

This is because the current being drawn by the radio equipment is more than the fuse can cope with, and therefore will blow.

Two way radio equipment, draws less current when receiving, than when it is transmitting. Therefore the fitting of a too small fuse, may not become apparent, until the two way radio transmits.

Always refer to the manufacturers equipment specifications to understand the maximum current that the equipment will draw, and select a fuse slightly larger.

If no manufacturers data is available, then using an Ammeter in series with the DC supply, can determine the current drawn. Remember however, to also test on transmit, and with maximum transmit power selected (if an option).

(c) 2018 Craig Miles / Yesway Ltd.

How Does a Marine Diesel Engine Work

How does a marine diesel engine work

Diesel engines are widely used in both road vehicles, and marine installations. But how do diesel engines work ?

Marine diesels, and diesel engines in general are a ‘compression ignition engine’.

Air is drawn into the cylinder, and then compressed.

This compression of the air is caused by the action of the piston in the cylinder, moving upwards.

At an optimal point in this compression of the air, fuel is injected into the cylinder.

The resultant fuel / air mixture, vaporises and becomes heated, due to the pressure in the cylinder.

The fuel / air mixture ignites, and the explosion, forces the piston down the cylinder.

As the piston is attached via a connecting rod, to the Crankshaft, the crankshaft turns.

Engine Efficiency

Approximately 40% of the fuels chemical energy, is converted into mechanical energy. This is the engine efficiency.

Marine Diesel Turbochargers

Turbocharging is a common method of increasing diesel engine performance.

What a turbocharger does, is increase the mass of air, entering a cylinder.


Decided to start blogging about positive thinking and optimism

Positive Thinking, Optimism & Success

After listening to Tony Robins, and other success gurus on youtube, I have decided to create my own optimism and success blog.

If you don’t know who Tony Robins is, I well recommend that you check out his videos on youtube.

Be selective about who you follow

I rate his advice, because he has helped top athletes and company directors, as well as a president of the USA (Bill Clinton).

Other people I listen to are the late Jim Rohn, Dale Carnegie, and Bob Proctor.

In the case of Bob Proctor, he is very much still alive, and prior to becoming a success in the ‘self help’ industry, had built up a international cleaning business.

I think it is important to be selective in who’s advice you listen too, as it seems to me that there are a lot of ‘self help success’ types, that are successful for talking about success.

Bob Proctor had created a ‘real’ business prior to entering the self help industry, and therefore I respect him more for it.

Model success

Tony Robins often talks about ‘modeling success’.

Modeling Success basically means emulating the actions of people who are already successful in an area of life (such as business), that you also wish to be successful in.

For example, if you wanted to be a stock broker, you would study how a successful stock broker acted, talked, even how they stood. Basically acting like the type of person that you wish to become, acts.

Avoid The News

Knowing what is happening in the world around you is important, however it is all too easy to become totally immersed in the in-depth analysis and discussion, that often follows the headlines.

In the age of Social Media, such as Facebook and Twitter, it is tempting to add your opinion to the events of the day.

This in my experience makes you feel less happy, as other people online have different views of the world, and you can quickly find yourself in an argument.

This raises your stress levels, and lowers your happiness levels.

Avoid Social Media

Recently I read an  online article by the guardian newspaper which interviewed a number of people who had given up using social media.

The group interviewed, ranged in ages from 17 to 25 years old.

They all reported feeling happier, and getting more done, as they were not comparing themselves to others, and being under pressure to portray having a great life, all the time.

Yesterday (9th January 2018) I decided to do the same for a month.


My planned month off social media (which may become permanent) will be offset by an increase in exercise, as I will have more time.

Today I am planning to walk to the office and back,  which is approximately five miles each way.