LoRaWAN End node – Smart Lighting


 

 

What we do
What we need
How we do (Hardware)
How we do (Software)
Still shots Outcome
What we do

If you haven't got any Gateway set-up or around your,  please click the following button to see how to make LoRaWAN Gateway via The Things Network.

(In case of you can find any gateways around you, you can also just use that Gateway to trasmit your end node data.)


LoRaWAN Gateway

 

As you can see from other community sites (i.e TheThingsNetwork) or commercial websites (i.e quite a lot),

There are tons of commercial end devices (including Gateway) available out there and you can buy it for your business or something.

 

But the cost is a bit high and might be burden on people who just want to learn electronics or are hobbyist.

I believe many kinds of LoRa End device can be DIY-made.

 

So, here my post has a reason to exist. 🙂

 

At this post, we're going to make another LoRa End Device for 'Smart Lighting'.

 

This is actually the extension of Smart Home projects.

However, there are difference in hardware, technologies and distance, too!

 

Let's get into it! 🙂

How we do (Hardware)

How we do (Software)

Once you've prepared all the necessary parts such as Arduino pro mini, RFM95W, LED strip and cables, and next step is to make your Arduino pro mini to be uploadable.

 

The upload can be done via 'FTDI Basic Breakout Board', but I didn't mention details here.

If you need how-tos, just click the following button to see how you can upload program into Arduino pro mini.

 

Prepare Pro Mini

 


  • Sneak peek on Software part

 

Once your Pro mini is ready,

 

1. Include some necessary headers

2. Specify Pins and Pin mapping being used

3. Implement some functions to get distance via ultrasonic sensor attached to device

4. Enable Serial and LMIC and initialization

Still shots Outcome
  • Depends on the degree of brightness and darkness, LED strip is turned ON and OFF automatically.

 

 

  • Currently there are 4 status LED Light can be set automatically

 

  • and some outcomes in TTN console where we can check the status of smart lighting. 🙂

LoRaWAN End node – Smart Parking


 

What we do
What we need
How we do (Hardware)
How we do (Software)
Still shots Outcome
What we do

If you haven't got any Gateway set-up or around your,  please click the following button to see how to make LoRaWAN Gateway via The Things Network.

(In case of you can find any gateways around you, you can also just use that Gateway to trasmit your end node data.)


LoRaWAN Gateway

 

As you can see from other community sites (i.e TheThingsNetwork) or commercial websites (i.e quite a lot),

There are tons of commercial end devices (including Gateway) available out there and you can buy it for your business or something.

 

But the cost is a bit high and might be burden on people who just want to learn electronics or are hobbyist.

I believe many kinds of LoRa End device can be DIY-made.

 

So, here my post has a reason to exist. 🙂

Let's make the simple LoRa End Device at this time and it's for 'Smart Parking'!

 

I'd like to explain some background story before I go on.

When you park your car in the shopping centre, you might be able to see some flat and small device attached to the ground in the parking area.  Have you seen them?

There are various kinds of commercial parking detection sensor available already, but there are a few differences between them and what we're going to make here.

 

First of all, I'd like to say the Hardware.

The commercial ones are using dual methods such as magnetic field and RSSI.

For robustness of their product, they might have to use dual method to manage smart parking I think. 🙂

 

However, we're going to use simple sensor such as Ultrasonic sensor. so we can calculate the distance from sensor to , for example, your car by placing this end node in your garage or outside wall.

(I don't recommend your device on the ground like commercial ones as that gonna be broken soon! 🙂 )

 

I might be able to make the same hardware as commercial one's using later, but at this time I'd like to stick to more suitable ones for DIYers.

 

Secondary, Different model or Applications

We're going to use and utilize the very good established Network, whch is TTN(TheThingsNetwork) on our projects. TTN is quite common and famous world-wide as you already know.

However, there are some difference between technologies and business models when it comes to commercial products.

 

For example, LoRa VS Sigfox.

For years, Sigfox and LoRa were the major competitors in the LPWAN space. Their business models and techologies are quite different.  you can find a few product using Sigfox on the market easily.

 

so, good to know!  It's time to go!

How we do (Hardware)

How we do (Software)

Once you've prepared all the necessary parts such as Arduino pro mini, RFM95W, Ultrasonic sensor and cables, and next step is to make your Arduino pro mini to be uploadable.

 

The upload can be done via 'FTDI Basic Breakout Board', but I didn't mention details here.

If you need how-tos, just click the following button to see how you can upload program into Arduino pro mini.

 

Prepare Pro Mini

 


  • Sneak peek on Software part

 

Once your Pro mini is ready,

 

1. Include some necessary headers

2. Specify Pins and Pin mapping being used

3. Implement some functions to get distance via ultrasonic sensor attached to device

4. Enable Serial and LMIC and initialization

Still shots Outcome

LoRaWAN End node – GPS Tracker


 

What we do
What we need
How we do (Hardware)
How we do (Software)
Still shots Outcome
What we do

Have you done or built your own Gateway from previous post?

then Now It's time to make end nodes! 

 

If not, you just need to click the following button to see how to make LoRaWAN Gateway.

(In case of you can find any gateways around you, you can also just use that Gateway to trasmit your end node data.)

 

LoRaWAN Gateway

 

There are lots of and many kinds of LoRaWAN nodes (can be purchased) out there as tons of companies are making commercial products for their profits these days.

However, we're going to make one of end nodes by using cheaper solution at this blog. 🙂

 

What we're trying to make is the kind of Tracking device.  so what are we tracking? 🙂

Whatever, whoever actually everything if we can attach this end node on.

 

Many people are using Tracking Device, so called 'Tracker' or 'Asset Tracker' for their important things or people.

This can be older people, dog or cat, even your car ...

 

Think about this situation. you have a dog , but she disappeared all of sudden. so what can you do?

If you have already attached any tiny tracking device to her collar, then you're on luck!

 

I hope this post would be helpful to make your own end nodes.

How we do (Hardware)

 

How we do (Software)

Once you've prepared all the necessary parts such as Arduino pro mini, RFM95W, GPS module and cables, and next step is to make your Arduino pro mini to be uploadable.

 

The upload can be done via 'FTDI Basic Breakout Board', but I didn't mention details here.

If you need how-tos, just click the following button to see how you can upload program into Arduino pro mini.

 

Prepare Pro Mini

 


  • Sneak peek on Software part

 

Once your Pro mini is ready,

 

1. Include some necessary headers

2. Specify Pins and Pin mapping being used

3. Implement some functions to get coordinates

4. Enable Serial and LMIC and initialization

Still shots Outcome

 

Connect wires : Arduino Pro Mini, RFM95W module and GPS module.

 

 

Once we finished connection , then let's power it. 

and go to TTN console to see GPS datas are coming in!!! 🙂

 

 

 

LoRaWAN Gateway (TTN – TheThingsNetwork)


 

What we do
What we need
How we do (Hardware)
How we do (Software)
Still shots Outcome
What we do

Have you heard about LoRa, LoRaWan and LPWAN? 

 

What is LPWAN?

A low-power wide-area network (LPWAN) or low-power wide-area (LPWA) network or low-power network (LPN) is a type of wireless telecommunication wide area network designed to allow long range communications at a low bit rate among things (connected objects), such as sensors operated on a battery.

 

What is LoRa and LoRaWAN?

LoRa is a wireless data communication technology that uses a radio modulation technique that can be generated by Semtech LoRa transceiver chips.

The LoRaWAN protocol is a Low Power Wide Area Network (LPWAN) specification derived from LoRa technology standardized by the LoRa Alliance.

LoRa and LoraWAN belong to the category of non-cellular LPWAN wireless communication network protocols and players, operating in the license-free spectrum. Other technologies that operate in the license-free frequency bands include Sigfox, Ingenu and several more.

 

LoRa and LoRaWAN Network Topology

The LoRaWAN networks laid out in a star-of-stars topology have base stations relaying the data between the sensor nodes and the network server.

Communication between the sensor nodes and the base stations goes over the wireless channel utilizing the LoRa physical layer, whilst the connection between the gateways and the central server are handled over a backbone IP-based network.

 

 

End Nodes transmit directly to all gateways within range, using LoRa.
Gateways relay messages between end-devices and a central network server using IP.

Network servers can be cloud based platform solutions like The Things Network (TTN) or LoRIOT. The network servers connect to the gateways and de-dup data packets, and then routes it to the relevant application.

 

We're able to make Gateway, End nodes, but going to use TTN(TheThingsNetwork) as Network Server and Application Server. 🙂

 

so at this post, Let's make a Gateway first!

 

How we do (Hardware)

 

  • Connection between LoRaWAN Gateway module and LoRaWAN Converter board

 

 

  • Connection between Raspberry Pi 3 and the above (LoRa Gateway module + LoRa Converter board)

 

 

  • Connect  Antenna to LoRaWAN Gateway module

  • Connect GPS antenna to LoRaWAN Converter board

  • Connect Power to Raspberry Pi 3
How we do (Software)

  • Sneak peek on Software part

 

First of all, you should prepare Raspberry Pi.

Please click these buttons to look into other posts for prerequisite learnings.

 

Prepare RaspberryPi

 

Once your Raspberry Pi is ready,

 

1. update and upgrade
2. pre-steps on raspberry pi
3. Install Git
4. Install TTN packet forwarder
5. run script and test (debugging)

 

The full details are explained in the enclosed docs. (HowToSetupGateway.txt)

Still shots Outcome

The last step, you need to go The Things Network and complete sign up.

and then create your own gateway setup and register. 

Here are some screenshots of mine. 🙂

 

As you can see from the screen shots, there are nothing in the Gateway traffic. 

This is correct because i didn't add any node(end node) yet which can transmit some data to Gateway. 

 

so , now it's time to go next post to add end node to make our Gateway useful! 🙂

Once you add end nodes to your gateway, then we'll be able to see some data coming in like the following.