Electronics News

Friday Fun: Self-Adjusting Dartboard

Tomi Engdahl's ePanorama blog - Fri, 2017-03-24 08:19

No aim? No worries! That’s because YouTuber Mark Rober has a solution: self-adjusting dartboard that automatically reposition itself so you hit the bullseye nearly every time.

The setup uses six infrared cameras to track the dart’s motion, then calculates a final position using an NVIDIA TX1 development kit.


Categories: Electronics News

LoRa for IoT

Tomi Engdahl's ePanorama blog - Thu, 2017-03-23 20:47

hen it comes to Internet of Things, connectivity to the internet is the primary area of focus.  The sensors on the IoT devices, wearables and electronic devices need to get connected easily – preferably wirelessly. IoT LPWA market is expected to grow at an annual rate of 90 percent. It is expected that in 2021 the market size of about EUR 24.5 billion. SigFox and LoRa have been competitors in the LPWAN space for several years.

I earlier wrote about Sigfox LPWA system.  It was pretty simple story. Now it is time to take a look at the competing technology LoRa. It is a more complicated, and maybe more interesting story.

LoRaWAN tries to bridges the gap between WLAN and cellular networks while allowing low power operations (sensors can work years with batteries). LoRaWAN is a Low Power Wide Area Network (LPWAN) and allows for Internet of Things connectivity making way for secure bidirectional communication. LoRa offers good bidirectionality because of the symmetric link.

LoRAWAN and LoRa radio

LoRa system consists of two parts: LoRaWAN media access control and LoRa physical layer technology.

LoRaWAN is a media access control (MAC) layer protocol designed for large-scale public networks with a single operator. It is built using Semtech’s LoRa modulation scheme. LoRaWAN as a protocol is strictly for wide-area networks.

LoRa as a lower-level physical layer technology (PHY) can be used in all sorts of applications outside of wide area. No, you do not need a gateway for applications that don’t need to connect to Internet. You can easily implement simple protocols using LoRa, either with modules or with the chips themselves.

There are two options to use this type of radio technology: LoRa and LoRaWAN

  • LoRa contains only the link layer protocol and is perfect to be used in P2P communications between nodes in the 868 and 900MHz bands. LoRa modules are a little cheaper that the LoRaWAN ones.  For details Go to the LoRa Tutorial.
  • LoRaWAN includes the network layer too so it is possible to send the information to any Base Station already connected to a Cloud platform. LoRaWAN modules may work in the 868/900/433MHz bands. For more details Go to the LoRaWAN Tutorial.

Nice thing about LoRa’s open standard is its potential to be very flexible; it’s not going to be driven by a specific company. The LoRa Alliance strategy is that the specification that governs how the network is managed is relatively open. You can download the specifications and join the LoRa Alliance, and any hardware or gateway manufacturer can build a module or gateway that conforms with the LoRa specifications. While the ecosystem itself is open, it does have a closed element: currently the only company that makes the radio for LoRa is Semtech. (They’ve announced licensing to other silicon manufacturers in the future).

If you need command-and-control functionality—for, say, electric grid monitoring—LoRa is your best option. It has true bidirectionality because of the symmetric link.

LoRa radio details

LoRa communications systems for IoT consists of LoRa (a chirped modulation format) and LoRaWAN (a MAC-layer protocol) . LoRa is a spread-spectrum technology that uses quite wide band (usually 125 kHz or more). Its frequency-modulated chirp utilizes coding gain for increased receiver sensitivity.

The great performance of LoRa in 3 features (good sensitivity, low path loss, good obstacle penetration) makes LoRa a disruptive technology enabling really long range links. Because LoRa receiver looks at quite wide amount of spectrum (so receiver gets much more noise than narrowband systems like SigFox), it needs to elevate noise due to a larger receiver bandwidth is mitigated by the coding gains. Practical link budgets are about the same for SigFox and LoRaWAN. For example Semtech SX1272 LoRa transceiver IC promises 157 dB maximum link budget. With more realistic sensitivity of -134 dBm and +14 dBm we get 148 dB link budget, that should be able to provide more than 22km (13.6 miles) in LOS links and up to 2km (1.2miles) in NLOS links in urban environment (going through buildings).

LoRa is a unique modulation format that can be generated by Semtech LoRa parts, including the SX1272 and SX1276 transceiver chips. It’s a really inexpensive, efficient way to get processing gain in a small chip-scale transceiver. LoRa is a spread spectrum technology, but it is not a direct sequence spread spectrum technology. LoRa uses an unmodulated carrier in an FM chirp, which has similarities to M-ary FSK. Other notable LoRa’s features are long preambles and variable bit rates.

LoRaWAN data rates range from 0.3 kbps to 50 kbps (some chips can offer bit rate up to 300 kbps). To maximize both battery life of the end-devices and overall network capacity, the LoRaWAN network server is managing the data rate and RF output for each end-device individually by means of an adaptive data rate (ADR) scheme.

You can transmit and receive the LoRa modulation at many frequencies between 150 MHz and 1 GHz. The Semtech basestation architecture is designed to operate only at 850 MHz to 1 GHz. Most typically LoRa is used in 868 MHz (Europe) and 915 MHz (USA) unlicensed frequency bands. LoRaWAN modules may work in the 868/900/433MHz bands.

In radio communications at license free there are limits on transmitter duty cycles. In Europe, 863 to 870  MHz band has been allocated for license-free operation with transmission duty cycle of 0.1%, 1% or 10% (or other control means like LBT and AFA). At 868 MHz the duty cycle is 1%. For other regions, quite similar limitations apply.

There are also other recommendations, for example TTN Fair Access Policy limits the data each end-device can send, by allowing:  An average of 30 seconds uplink time on air, per day, per device. At most 10 downlink messages per day. A good goal is to keep the application payload under 12 bytes, and the interval between messages at least several minutes (application packet size can vary between 51 bytes for the slowest data rate, and 222 bytes for faster rates).

LoRa has so far relied on unlicensed spectrum to provide connectivity for sensors used in smart meters, asset-tracking devices and other “Internet of Things” (IoT) networks, but it is also heading to licensed frequencies as well?. Mobile operators that have made investments in LoRa networks are now looking at using licensed spectrum to support the technology. Running the technology over licensed spectrum could help operators overcome one of the main drawbacks of the technology — the interference and congestion that can occur in unlicensed airwaves.“The only benefit carriers have is that they can guarantee quality of service because it’s a licensed band,” said the mystery mouthpiece.  Going to other than ISM bands should not be a big problem, because for example The SX1272 LoRa transceiver covers a frequency range of 860 to 1,020 MHz and SX1276 transceiver spans a frequency range from 137 to 1,020 MHz.

LoRaWAN details

LoRaWAN includes the network layer too so it is possible to send the information to any Base Station already connected to a Cloud platform. LoRaWAN was designed for the centralized architecture of telecom operators.

LoRaWAN network architecture is typically laid out in a star-of-stars topology in which gateways is a transparent bridge relaying messages between end-devices and a central network server in the backend. Gateways are connected to the network server via standard IP connections while end-devices use single-hop wireless communication to one or many gateways. All end-point communication is generally bi-directional, but also supports operation such as multicast enabling software upgrade over the air or other mass distribution messages to reduce the on air communication time. For some more details, read Go to the LoRaWAN Tutorial.

In LoRa system both the endpoint and the basestation are relatively inexpensive. This is primarily because you can use the same radio for a receiver on the basestation and at the endpoint. Typically LoRaWAN basestation tends to be more expensive than the endpoint.

Advantages and disadvantages of LoRaWAN

Following are the advantages of LoRaWAN:
➨It uses 868 MHz/ 915 MHz ISM bands which is available world wide.
➨It has very wide coverage range about 5 km in urban areas and 15 km in suburban areas.
➨It consumes very little power and hence battery will last for long duration.
➨Single LoRa Gateway device is designed to take care of 1000s of end devices or nodes.
➨It is easy to deploy due to its simple architecture
➨It uses Adaptive Data Rate technique to vary output data rate/Rf output of end devices. The data rate can be varied from 0.3 kbps to 27 Kbps for 125 KHz bandwidth.
➨The physical layer uses robust CSS modulation (Chirp Spread Spectrum). It uses 6 SF (spreading factors) from SF 7 to 12. This delivers orthogonal transmissions at different data rates. Moreover it provides processing gain. LoRa modulation has constant envelope modulation similar to FSK modulation (easy for PA design)
➨LoRaWAN supports three different types of devices viz. class-A, class-B and class-C.

Following are the disadvantages of LoRaWAN:
➨It can be used for applications requiring low data rate i.e. upto about 27 Kbps.
➨LoRaWAN network size is limited based on parameter called as duty cycle. This parameter arises from the regulation as key limiting factor for traffic served in the LoRaWAN network.
➨It is not ideal candidate to be used for real time applications requiring lower latency and bounded jitter requirements.

Security is important. National wide networks targeting internet of things such as critical infrastructure, confidential personal data or critical functions for the society has a special need for secure communication. This has been solved in LoRaWAN system by several layer of encryption as detailed in this picture from LoRa Alliance.


The security model uses several keys: Unique Network key (EUI64) and ensure security on network level, Unique Application key (EUI64) ensure end to end security on application level and Device specific key (EUI128). Some discussion on LoRaWAN security can be found at Security of an IoT network using AES (LoRaWAN) web page:MIC (Message Integrity Code) for each message and the end-to-end (application to application) ciphering of the payload both use AES 128 bits key.

Pictures of some LoRa products

Here is LoRa dev board by Espotel.

Here is Jaakko Ala-Paavola from Espotel showing LoRa demo that uses their LoRa dev board and commercial LoRa gateway (also uses Node-RED to implement control logic).


The Things Network

The Things Network is a global, crowdsourced, open, free and decentralized internet of things networkThe Things Network (TTN) comprises a number of internet connected LoRaWAN gateways deployed by enthusiastic supporters in a growing number of areas around the world.

Because the costs of LoRa technology are very low, the idea is that we do not have to rely on large telco corporations to build such a network. For example  the city of Amsterdam was covered with only 10 gateways at the cost of 1200 dollars each – a single Gateway can serve thousands of devices. If you don’t already have local coverage, then you can deploy your own gateway and connect it to TTN. While gateways are expensive at around $500 each, many local funding opportunities exist.

Although the goal of The Things Network is to support for any protocol that can be useful for the community, the focus is currently on LoRaWAN. LoRaWAN is perfect for the Internet of Things as it is low battery, long range, and low bandwidth.

The Things Network is about enabling low power Devices to use long range Gateways to connect to an open-source, decentralized Network to exchange data with Applications and Platforms.

Gateways form the bridge between devices and The Things Network. Devices use low power networks like LoRaWAN to connect to the Gateway, while the Gateway uses high bandwidth networks like WiFi, Ethernet or Cellular to connect to The Things Network. All Gateways within reach of a device will receive its messages and forward them to The Things Network.

The network will deduplicate the messages. The Backend handles the received data.The aim is make the different backend components as decoupled as possible, so there is a clear separation of the responsibilities of each component. The Things Network’s different routing service components:
Gateway, Router, Broker, NetworkServer, Handler and Application

LoRaWAN is a “network-intensive” protocol, intensive in the sense that due to the simple and minimalistic approach for devices, the backend systems are responsible for most of the logic. Firstly, there are some Gateway-related functions such as scheduling and managing the utilization of the gateways. Scheduling is needed because a gateway can only do one transmission at the same time. The utilization information is used to evenly distribute load over different gateways and to be compliant with the European duty cycles. Another important feature is monitoring the status of each gateway. We also need device-related functions that manage the state of devices in the network: Addressing is such that device address are non-unique, so the network has to keep track of which addresses are used by which devices in order to map a message to the correct device and application). Other things the network must keep track of are the security keys and frame counters. The Handlers need to know how to interpret binary data, and bridge to higher-layer protocols, such as AMQP and MQTT. As The Things Network will be a distributed network, there has to be functionality that supports this distribution.

The default Handler implementation simply publishes a JSON representation of uplink messages to a topic <app_eui>/devices/<dev_eui>/up on an MQTT broker. This allows applications to simply subscribe to the same MQTT topic and process the data in any way.

EXAMPLE: From the following message, the application could for example see that the temperature measured by device 001122334455667788 was 12.86 degrees:

Topic: 0102030405060708/devices/001122334455667788/up { payload: 'BQY=', fields:{temperature: 12.86 }, port: 14, counter: 1234, metadata: [ { frequency: 868.1, datarate: 'SF7BW125', codingrate: '4/5', ... longitude: 6.55738, latitude: 53.18977 } ] }

The public community network will probably stick with this API and format, but this behaviour can be easily adapted to other use cases.  After publishing the uplink message to MQTT, the Handler will determine whether it is necessary to reply to the device with a downlink message.

In an open network with many different end-devices (nodes), which are not connected but just start sending when they need to (ALOHA-like protocol), and all have a different data need and connection quality, there are many limiting factors to keep things working.

The data rate and maximum packet size roughly depend on the distance to the nearest gateway and the type of data to be sent. For the European 863-870MHz band, the application packet size varies between 51 bytes for the slowest data rate, and 222 bytes for faster rates  (LoRaWAN protocol adds at least 13 bytes to the application payload). When an end-device is far away from a gateway, it needs to use a low data rate to ensure at least one gateway receives its data. But a lower data rate implies a longer air time for each byte. For the European EU 863-870MHz ISM Band limits the duty cycle to 1% for data. For other regions, quite similar limitations apply. For 1000 nodes per gateway and dutu cycle limitations, we end up approximately 30 seconds per node per day. With this Fair Access Policy for 10 bytes of payload, this translates in (approx.): 20 messages per day at SF12 or 500 messages per day at SF7.

By default, gateways transmit with maximum allowed TX power (14 for EU-868). Every device has the same transmit duty cycle, gateways are no exception, so gateway must have less than 1% transmit duty cycle.


IoT device end: Semtech SX1272 LoRa transceiver IC provides SPI interface to communicate with it. RN2483LoRa module from Microchip connects over a serial interface.

The Things Network backend:  The default Handler implementation simply publishes a JSON representation of uplink messages to a topic <app_eui>/devices/<dev_eui>/up on an MQTT broker. This allows applications to simply subscribe to the same MQTT topic and process the data in any way.


Categories: Electronics News

A Better Way to Organize the Internet: Content-Centric Networking

Tomi Engdahl's ePanorama blog - Thu, 2017-03-23 16:29

The Internet is more than 45 years old, and it’s starting to show its age. To be sure, it has served us wonderfully well. Its underlying technologies delivered the World Wide Web (still a young adult at around 28 years old) and our global communications network. Even as its user base has swelled to 3.4 billion, these technologies have scaled admirably.

Today, however, all of those users demand a level of performance that the Internet was never designed to deliver.

Read more details how Internet could be improved here:


Categories: Electronics News

Stack Overflow Developer Survey 2017

Tomi Engdahl's ePanorama blog - Wed, 2017-03-22 13:01


Each year since 2011, Stack Overflow has asked developers about their favorite technologies, coding habits, and work preferences, as well as how they learn, share, and level up. 


Categories: Electronics News

Introduction to Developing a New Wireless Product

Tomi Engdahl's ePanorama blog - Wed, 2017-03-22 02:03


There are many thing to consider in modern wireless device design. I have done some design work to several devices with wireless communication and can agree on many details..

Categories: Electronics News

Sequential Programming Considered Harmful? – IEEE Spectrum

Tomi Engdahl's ePanorama blog - Tue, 2017-03-21 16:03


Today, multicore processors power our laptops and cellphones. Distributed cloud servers or supercomputer clusters process large data sets.

To take full advantage of these systems, you need parallel algorithms. “It’s a parallel world,” 

Why is no one teaching a course in parallel algorithms to freshmen? 

Currently, most introductory computer science courses start with sequential programming, 

Categories: Electronics News

Cheap fiber optic visual fault locator

Tomi Engdahl's ePanorama blog - Tue, 2017-03-21 14:10

The Visual Fault Finder is a visible laser light source used to check continuity, locate breaks, poor mechanical splices and damaged connectors in fiber optic cabling. It can be used to verify continuity, test and find breaks in fibre links, locate pinched fiber strands in termination cabinets, or anywhere fiber optic cables are terminated and subject to mechanical damage. It is often used as a stand-alone first-line basic troubleshooting tool. Typically with it the breaks in fiber optic cable will be seen as a conspicuously glowing or blinking red light area.

Visual fault finders are available from many sources and at different price ranges (typically from tens of dollars to hundreds of dollars). I found one very cheap ($12) visual fault locator to test: 1mW 5KM Red Light Pen Visual Fault Locator Fiber Optic Laser Cable Tester Meter.

1mW 5KM Red Light Pen Visual Fault Locator Fiber Optic Laser Cable Tester Meter puts out highly visible red light into a fiber optic cable. It has day light visible 650 nm laser diode which can operate either in continuous or flashing mode. It is fitted with 2.5 mm universal connector that accepts ST, SC and FC optical connectors. The laser power is said to be 1 mW, which should be useful over a distance of approximately 5km (3.1mi) into multi-mode fibre and single mode fiber. Aluminum alloy body, strong and durable.

Closer look at the durable aluminium body. The fiber end has cap that protects he fiber connector agains mechanical damage. Dust-proof end design keeps fiber connector clean when the device is in use and stops the laser beam if the device gets accidentally turned on while not in use.

This device is powered with two AA batteries

Continuous, off and flash are selected with switch.

There is proper power rating marking on the device.

Laser warning makes sense because laser can be dangerous. Fortunately this device is quite low power (1 mW) and beam spreads quite quickly. Be careful with laser, but I would consider this somewhat less dangerous than normal red laser pointer (they have typically 1-5 mW small beam).

Light output shows how the laser output spreads without fiber conneced.

The universal fiber connector worked well with single-mode fiber terminated with SC connector (expect to work also with ST and FC as they use same ferrule).

Bent fiber – breaks in fiber optic cable will be seen as a conspicuously glowing or blinking red light area.

This device was designed for glass fibers terminated to suitable connectors, but it also seems to works OK also with bare POF (Plastic Optical Fiber) cable.

One question on technical specifications, as the data says 1mW on the cover and on the device itself. but later on the page it says 30mW. I seem to get almost 1 mW to power meter on the other end of few meters of single mode fiber optic cable. So seems to give something in range of around 1 mW to connected fiber (meter shows 651 microwatts on the end of single mode fiber, measurement is not completely accurate because the laser 650 nm wavelengh does not match the power meter 850 nm setting – the closest setting I could find on the meter).

The end result is that this 1mW 5KM Red Light Pen Visual Fault Locator Fiber Optic Laser Cable Tester Meter seems to do well what it is designed to do. It fells well built. This device is cheap, but does not feel cheap in any way. At this price it does not make sense trying to hack yourself something for this task.

Here is a bonus that shows out how to use visual fault locator (different looking device but works the same):

FOA Lecture 21 Visual Fault Locator Demonstration

This is Lecture 21 in the FOA series of lectures on fiber optics. In this video, we will review the use of visual fault locators and demonstrate how they show stress loss in a typical patchcord.


Categories: Electronics News

Security in the Age of Open Source

Tomi Engdahl's ePanorama blog - Mon, 2017-03-20 17:17


Dramatic changes in the use of open source software over the past decade demands major changes in security testing regimens today. 

Categories: Electronics News

7 considerations to make when securing your Raspberry Pi

Tomi Engdahl's ePanorama blog - Mon, 2017-03-20 15:54


IoT has been huge for experimentation and innovation. But as projects get rushed to completion, there have been severe consequences for ignoring security. And this applies both to commercial products and hobby projects.

Categories: Electronics News

Exploring the open development method | Opensource.com

Tomi Engdahl's ePanorama blog - Mon, 2017-03-20 13:00


Among the most “oversold as a cure” methodologies introduced to business development teams today is Scrum, which is one of several agile approaches to software development and introduced as a way to streamline the process. 

Scrum has become something of an intractable method, complete with its own holy text, the Manifesto for Agile Software Development, and daily devotions (a.k.a., Scrum meetings).
But the World has changed over the years, and so should software development practice. 

Categories: Electronics News

When your Employer Can See Your Banking Information: Decrypting SSL | AlienVault

Tomi Engdahl's ePanorama blog - Sat, 2017-03-18 01:10


Enter Next Generation firewalls and SSL Decrypts. In the traditional catchup game played between good guys and bad guys, the end user usually ends up in the thick of the action. With SSL decryption, that padlock might not be protecting you at all.

First let’s take a look at how SSL decryption is setup. It works in two ways: Inbound and outbound.

Categories: Electronics News

Freday Fun: The Internet is Going Crazy Over This Artist’s MIDI Drawings

Tomi Engdahl's ePanorama blog - Fri, 2017-03-17 11:52


Musician and composer Mari Lesteberg creates animaation using keyboard and a MIDI (Musical Instrument Digital Interface) connection. 

Categories: Electronics News


Subscribe to RF world aggregator - Electronics News