Search

Sunday, 25 October 2015

Shopping List for Raspberry Pi Sensors

Hi All,

The response on the book is overwhelming. Thanks to all the readers around. My email is kept buzzed all around by your automated emails from Raspberry Pi. Love you all!

As included in the appendix section, just adding the shopping list for anyone who has purchased the Raspberry Pi sensors book! Here's what you require to purchase.

Basic Requirements

Raspberry Pi [Raspberry Pi 1 Model B or Raspberry Pi 1 Model B+ or Raspberry Pi 1 Model A+ or Raspberry Pi 2 Model B]
Micro-SD Card with SD adapter with storage capacity of 8GB or more
Personal Computer with Windows or Mac OS X or Linux environment
Ethernet Cable (RJ45)
5V 1A or 5V 2A Power adapter with micro-USB connector
HDMI or RCA Cable
Breadboard
Multimeter
Wire Stripper

Sensors

HC-SR04 Ultrasonic Sensor [Quantity: 1]
DHT11 Temperature-Humidity Sensor [Quantity: 1]
LDR or CdS Photocell or Photoresistor [Quantity: 1]
TMP35 or LM35 or TMP36 Temperature Sensor [Quantity: 1]

Integrated Chips

Analog to digital Convertor [Quantity: 1]: MCP3008 Dual-in-Line package or MCP3004 Dual-in-Line package

Components

¼ Watts through hole Resistors [Quantity: 5 each]: 1KΩ, 2KΩ, 270Ω, 330Ω, 470Ω, 4.7KΩ, 10KΩ
Electrolytic Capacitor [Quantity: 5 each]: 1µF-16V
LEDs [Quantity: 5 each]: 2mm or 3mm or 5mm Red/Green/White/Yellow LED

Others

Single stranded wire [Quantity: 1 meter]
Female to Male Jumper wires [Quantity: 15], Female to Female jumper wires [Quantity: 15]
Bergstik connectors [Quantity: 2 each]: (Dual-row male, 2.54mm Pitch), (Single-row male, 2.54mm Pitch)
Female to Female GPIO ribbon cable for RasPi 1 model B (26 pin) or B+(40 Pin), RasPi 2 Model B(40 pin) [Quantity: 1]
General Purpose Circuit Board dual sided solderable
Soldering Iron Pencil type (30-50 Watts)
Soldering Wire with Flux [Quantity: 50gms]
Camera [Quantity: 1]: Logitech C270 USB Web-cam or Raspberry Pi camera



Raspberry Pi Sensors
and
Integrate sensors into your Raspberry Pi projects and let your powerful microcomputer interact with the physical world!

Sunday, 27 September 2015

Obsessed with Internet of Things? Ok. The things are connected. So now what...?

"Total Number of internet connected devices reached 8.7 billion in 2012" - X source

"The growing network of connected objects referred to as the “Internet of Things” is estimated to be in the billions by 2020." - Y Source

"The Internet of Things (IoT) is one of the fastest growing areas of tech – covering everything from consumer wearable devices to high-tech industrial systems." - Z Source

"IoT is completely a disruptive technology according to analysis."  - Z' Source


There are multiple opinions on from different sources which make the world so obsessed with the IoT. But really, Internet of things is far bigger than anyone realizes. Some people tell that it's the term given to the connected things and it's just about providing IPv6 to any "thing" that is available in the vicinity. 
Be it the massive infrastructures, be it your pillow, be it your home, or be it your clothes, it's not about connecting the sensor to the multiple Arduinos and RaspberryPis and connecting it to the internet, It's about building the ecosystem. It's not about connecting relay to the Internet to control the appliances, but It's about the intelligent architecture that very well suits the need of the users, may it be using artificial neural networks or may it be using the multiple algorithms for enhancing the user experience. Honchos are building the Skytran and that is the kind of solutions the world really wants. "Air" is built with the same vision and philosophy. We are here to deliver the extra mile!
When developers are talking about delivering an extra mile to enhance the human living experience, they’re still not thinking big enough to justify the needs of the world. It’s not a lack of creativity; it’s a lack of scrutiny. Future is always within our vision, and you don’t need to visualize or build what’s already there.
"A solitary fantasy can transform a million realities" - Maya Angelou

3 essential rules for IoT Businesses

Here is my take! There may be many rules for the successful IoT business, but I would like to encompass these three as the essentials to build the successful IoT product. It's about M2M and IoT (It took me long to understand difference between M2M and IoT, and if you don't know, Here is a good article) therefore it's all on us, to understand where it's leading to.

 Rule 1: Data


It's just not about delivering the product, It's about leveraging the data which is created from millions of end nodes. Obviously, we would require powerful data storage capability and tremendous remote processing power to understand the sheer amount of collected data and to build the intelligence in the system for better predictions and controls.

Rule 2: Security and Robustness

Who likes it when connectivity becomes unstable? Nobody enjoys the interrupted signals and improper codecs. Thus the connection protocol aspect of IoT is incredibly critical to give users that seamless, “always on and interacting” feel -- what’s the point of always having technology with you if it isn’t going to be always connected? Consumer devices in particular – from fitness trackers to home appliances – are generating more granular information. And when that information is about people or their health, it’s more sensitive.

Rule 3: User Interface/Experience

Similar to the previous point, nobody enjoys the broken user experience. Be it developers or the product end users, they need a flawless system to hack and play around with minimal hassles.
"IoT is not the 'Thing' that gains the Internet, It's that the Internet gains from the Thing." - Patrick Isacson

Accessories

There is an idea of many developers who are working for IoT, to build an ecosystem(SDKs) for the developers to build on their own platform. It may take many skills with many skill resources to design and deliver a successful IoT platform that is both scalable and extensible to be versatile. According to the Reuters "The IoT Platform Companies Database 2015", there are 250+ platforms available to start development on IoT so there are 180+ startups, 45+ SMEs, and 25+ MNCs which offers such platforms. This is really alarming! Who will connect these all platform to make the "ONE internet of things"? This is really needed to leverage the data mining and to provide better analytics. "ONE Internet of things" not only can make businesses more efficient but makes the businesses ready for future!
Why do I call it an accessory? Because, this is currently "announced" as an add-on to almost every internet of things product sold! It is treated as an accessory! As the Internet of things is said so abstract and developers and designers are busy creating their own hardware and software platforms with different open/proprietary protocols, and shouting that their platform having cool X-Y-Z features is too much obsession for the people. This will ignite developers to start talking about the Web of Things! Similarly to what the Web (Application Layer) is to the Internet (Network Layer), the Web of Things provides an Application Layer that simplifies the creation of Internet of Things applications. Web of Things reuses existing and popular Web standards. But I am still concerned at the common/cross-platforms solutions on which multiple devices can communicate. It is an open discussion, though!


Security

Are we ready enough? 
As everyone started turning to Internet of things and as everybody is talking about the IoT, the term "Security in Internet of Things" has become too popular to discuss on every IoT tech geek's breakfast table. Some devices fall short of enough stack in the tiny microcontrollers used as an actuator end-point, or some devices are just about being low power without any security engines running. As users become more reliant on smart devices and wearables, an increasing amount of sensitive data is being accessed through these devices and transferred among them. The developers must strengthen the defenses by taking clues from the smartphone developers and industry.  But it is not easy as to just talking about the security. There's much more work needed for low power and low memory embedded devices.
Product development—at least for products that anyone expects to be successful—has always been iterative, incremental, and collaborative.
Now, it's upon us being the builders, the innovators, the creators or the end user to bring the IoT to a stage where all work on a unified platform. It's a big task to create "ONE internet of things" but filled with too many opportunities for everyone around us to change the world we see today!
Thanks in advance for your Likes and Shares. It would be great to have your added thoughts on this. 

Saturday, 5 September 2015

Electromagnetic Radiation on PCB edges: 20H Rule and Via Stitching

Since past few days I was going through the study on Electromagnetic radiation occurring on PCB edge; here is the brief on what the paper suggests to follow.
One of the primary modes of radiation from printed circuit boards (PCBs) are because of emissions along the edges of PCBs. One of the primary printed circuit board mechanisms [1] that produce radiated emissions from PCB edges are via currents that excite radially propagating electromagnetic waves between power and/or ground plane structures.
When these waves propagates to the edge of the PCB, a portion of the energy radiates into space (usually the cavity of the electronic enclosure housing the PCBs), and a portion is reflected back into the PCB, where it induces currents into the same vias that were the original source of the initial radially propagating wave.
One of the primary modes of radiation from printed circuit boards are because of emissions along the edges.
These induced currents then conductively flow into the components mounted on the surface of the PCB (conductive emission), producing secondary radiation. The waves inside the PCB excite resonant modes whose frequencies are dependent on the width and length of the PCB.

20-H Rule

The 20-H rule [3] states that the power planes are pulled back by edges from the ground planes by about 20 times the distance between the planes. Consider the simple structure consisting of one ground plane and one power plane shown in Figure (a). The 20-H rule structure is represented in Figure (b).
Pulling back one of the power plane forms a smoother impedance transition region. While this increases edge emissions, it reduces PCB resonance effects. Power plane pulling back should be on all the four sides of the PCB.

Via Edge Stitching on the PCB edge

The most common technique of reducing edge radiation is fencing, where a series of shorting vias are used to connect top/bottom ground planes into a Faraday shield. But, this increases internal reflections. 
This is as similar as the ground Via stitching around the critical net track.
For the two-plane structure[4], 20-H rule yields much more radiation than the normal structure. For the multiple plane case, no significant change in radiation is found if the 20-H rule is applied to the internal planes. Also the numerical result shows that the 20H Rule and ground Stitching Vias would cut down the radiation effectively.
References:
[1]: Franz Gisin, Zorica Pantic-Tanner "Minimizing EMI Caused by Radially Propagating Waves Inside High Speed Digital Logic PCBs"
[2]: Gisin, Franz, Pantic-Tanner, Z., “Radiation From Printed Circuit Board Edge Structures”, 2001 IEEE EMC
[3]  Mark I. Montrose, "Printed Circuit Board Design Techniques for EMC Compliance", 1996 IEEE EMC
[4] Huabo Chen et. al. "Effects of 20-H Rule and Shielding Vias on Electromagnetic Radiation From Printed Circuit Boards" 
No content copyright intended. Content belongs to the respective authors. Papers are briefed in to one article for understanding.

Sunday, 24 May 2015

Raspberry Pi hacker? Building a sensor project? Understand electronics first!

(This article is originally published on PACKT Articles, see here.)
In this post, you will see the basic requirements needed for building the RasPi projects. You can't spend even a day without electronics, can you? Electronics is everywhere, from your toothbrush to cars and in aircrafts and spaceships too. This article will help you understand the concepts of electronics that can be very useful while working with the RasPi.
You might have read many electronics-related books, and they might have bored you with concepts when you really wanted to create or build projects. I believe that there must be a reason for explanations being given about electronics and its applications.
Let's cover some of the fundamentals of electronics.

Basic terminologies of electronics

There are numerous terminologies used in the world of electronics. From the hardware to the software, there are millions of concepts that are used to create astonishing products and projects. You already know that the RasPi is a single-board computer that contains plentiful electronic components built in, which makes us very comfortable to control and interface the different electronic devices connected through its GPIO port. In general, when we talk about electronics, it is just the hardware or a circuit made up of several Integrated Circuits (ICs) with different resistors, capacitors, inductors, and many more components. But that is not always the case; when we build our hardware with programmable ICs, we also need to take care of internal programming (the software). For example, in a microcontroller or microprocessor, or even in the RasPi's case, we can feed the program (technically, permanently burn/dump the programs) into the ICs so that when the IC is powered up, it follows the steps written in the program and behaves the way we want. This is how robots, your washing machines, and other home appliances work. All of these appliances have different design complexities, which depends on their application. There are some functions, which can be performed by both software and hardware. The designer has to analyze the trade-off by experimenting on both; for example, the decoder function can be written in the software and can also be implemented on the hardware by connecting logical ICs. The developer has to analyze the speed, size (in both the hardware and the software), complexity, and many more parameters to design these kinds of functions. The point of discussing these theories is to get an idea on how complex electronics can be. It is very important for you to know these terminologies because you will need them frequently while building the RasPi projects.

Voltage

Who discovered voltage? Okay, that's not important now, let's understand it first. The basic concept follows the physics behind the flow of water. Water can flow in two ways; one is a waterfall (for example, from a mountain top to the ground) and the second is forceful flow using a water pump. The concept behind understanding voltage is similar. Voltage is the potential difference between two points, which means that a voltage difference allows the flow of charges (electrons) from the higher potential to the lower potential. To understand the preceding example, consider lightning, which can be compared to a waterfall, and batteries, which can be compared to a water pump. When batteries are connected to a circuit, chemical reactions within them pump the flow of charges from the positive terminal to the negative terminal. Voltage is always mentioned in volts (V). The AA battery cell usually supplies 3V. By the way, the term voltage was named after the great scientist Alessandro Volta, who invented the voltaic cell, which was then known as a battery cell.

Current

Current is the flow of charges (electrons). Whenever a voltage difference is created, it causes current to flow in a fixed direction from the positive (higher) terminal to the negative (lower) terminal (known as conventional current). Current is measured in amperes (A). The electron current flows from the negative terminal of the battery to the positive terminal. To prevent confusion, we will follow the conventional current, which is from the positive terminal to the negative terminal of the battery or the source.

Resistor

The meaning of the word "resist" in the Oxford dictionary is "to try to stop or to prevent." As the definition says, a resistor simply prevents the flow of current. When current flows through a resistor, there is a voltage drop in it. This drop directly depends on the amount of current flowing through resistor and value of the resistance. There is a formula used to calculate the amount of voltage drop across the resistor (or in the circuit), which is also called as the Ohm's law (V = I * R). Resistance is measured in ohms (Ω). Let's see how resistance is calculated with this example: if the resistance is 10Ω and the current flowing from the resistor is 1A, then the voltage drop across the resistor is 10V. Here is another example: when we connect LEDs on a 5V supply, we connect a 330Ω resistor in series with the LEDs to prevent blow-off of the LEDs due to excessive current. The resistor drops some voltage in it and safeguards the LEDs. We will extensively use resistors to develop our projects.

Capacitor

A resistor dissipates energy in the form of heat. In contrast to that, a capacitor stores energy between its two conductive plates. Often, capacitors are used to filter voltage supplied in filter circuits and to generate clear voice in amplifier circuits. Explaining the concept of capacitance will be too hefty for this article, so let me come to the main point: when we have batteries to store energy, why do we need to use capacitors in our circuits? There are several benefits of using a capacitor in a circuit. Many books will tell you that it acts as a filter or a surge suppressor, and they will use terms such as power smoothing, decoupling, DC blocking, and so on. In our applications, when we use capacitors with sensors, they hold the voltage level for some time so that the microprocessor has enough time to read that voltage value. The sensor's data varies a lot. It needs to be stable as long as a microprocessor is reading that value to avoid erroneous calculations. The holding time of a capacitor depends on an RC time constant, which will be explained when we will actually use it.

Open circuit and short circuit

Now, there is an interesting point to note: when there is voltage available on the terminal but no components are connected across the terminals, there is no current flow, which is often called an open circuit. In contrast, when two terminals are connected, with or without a component, and charge is allowed to flow, it's called a short circuit, connected circuit, or closed circuit.
Here's a warning for you: do not short (directly connect) the two terminals of a power supply such as batteries, adaptors, and chargers. This may cause serious damages, which include fire damage and component failure. If we connect a conducting wire with no resistance, let's see what Ohm's law results in: R = 0Ω then I = V/0, so I = ∞A. In theory, this is called infinite (uncountable), and practically, it means a fire or a blast!

Series and parallel connections

In electrical theory, when the current flowing through a component does not divide into paths, it's a series connection. Also, if the current flowing through each component is the same then those components are said to be in series. If the voltage across all the components is the same, then the connection is said to be in parallel. In a circuit, there can be combination of series and parallel connections. Therefore, a circuit may not be purely a series or a parallel circuit. Let's study the circuits shown in the diagram.
At the first glance, this figure looks complex with many notations, but let's look at each component separately. The figure on the left is a series connection of components. The battery supplies voltage (V) and current (I). The direction of the current flow is shown as clockwise. As explained, in a series connection, the current flowing through every component is the same, but the voltage values across all the components are different. Hence, V = V1 + V2 + V3. For example, if the battery supplies 12V, then the voltage across each resistor is 4V. The current flowing through each resistor is 4 mA (because V = IR and R = R1 + R2 + R3 = 3K).
The figure on the right represents a parallel connection. Here, each of the components gets the same voltage but the current is divided into different paths. The current flowing from the positive terminal of the battery is I, which is divided into I1 and I2. When I1 flows to the next node, it is again divided into two parts and flown through R5 and R6. Therefore, in a parallel circuit, I = I1 + I2. The voltage remains the same across all the resistors. For example, if the battery supplies 12V, the voltage across all the resistors is 12V but the current through all the resistors will be different. In the parallel connection example, the current flown through each circuit can be calculated by applying the equations of current division. Give it a try to calculate!
For further reading, follow the link.

Raspberry Pi Sensors

or
Integrate sensors into your Raspberry Pi projects and let your powerful microcomputer interact with the physical world

Thursday, 30 April 2015

From a light ray to a blast : How we moved from electrons to single board computers

It was electricity in the beginning. The people were happy because they did not recognize that it was all around them and could be consumed. That was good. Then Faraday came and established a “missile” Launchpad.
The initial machines using a new sort of energy came into the picture. An extensive time has passed since then and just when the people lastly got habituated to them and stopped giving response to what a novel generation of experts were doing, someone got a spark of an idea that electrons could be a very appropriate “puppet” if we close it in a glass pipe. It was amazing idea initially, but there wasn’t any yield. Electronics was born and the “missile” kept on reaching the sky faster and faster.
A new knowledge – a new learning - new experts. People were getting to know what electronics is. While the rest of humankind were inertly watching in distrust what was going on, the strategists split in two groups - “hardware-oriented” and “software-oriented”. Somewhat younger than their teachers, very excited and full of ideas, both of them kept on working but separate ways. While the first group was developing constantly and gradually, the hardware-oriented folks, driven by achievement, threw caution to the wind and invented transistors. Up till that time, the things were more or less kept under control, but a broad marketing was not aware of what was going on, which soon led to a fatal error! Being innocent in belief that discounted tricks could ramp down technology development and growth of the world and regain the good all days, mass market welcomed the products of Electronics Industry, thus closing a magic loop. A rapid fall in prices made these components accessible for a great variety of people. Now, the “missile” was flying freely.
The first integrated circuits and processors were discovered, which caused computers and other electronics products to drop down in price even further. They could be purchased anywhere. Another loop was closed! Common people got hold of computers and computing era was originated. While this spectacle was going on, professionals and hobbyists, also split in two groups and protected by anonymity, were working hard on their projects. Then, they though to make a universal component that is cheap, easily programmable, and can be used in any field of electronics wherever needed. They thought, technology has been developed enough as well as the market. Why not? So it happened, body and spirit were united and the first integrated circuit was designed and called the microcontroller.
The separation between hardware and software oriented people was now being reduced and the invention of Microcontroller was not enough, they started to build the rapid prototyping boards including the powerful microprocessors with the invention of rapid prototyping boards such as Arduino. The hobbyist world and hacker world got a new tool to play. Along with this hardware world, the Linux had got evolved a lot and people thought to make a rapid prototyping board powered by Linux. The new era in the computing begun. Now, people were talking about the single board embedded computers and then comes the Raspberry Pi and Beaglebone with powerful processor and enough memory to compute and store the data. Software oriented people got an easy access to the hardware built-in libraries, rapidly growing wireless technology and developed the multiple projects so rapidly that we are seeing the Internet of Things era today to connect everything around us. Numerous types of single board embedded computers were designed and they quickly became man's invisible companion. A simple software able to control it all and which everyone can easily learn about has been developed. Their incredible simplicity and flexibility conquered us a long time ago and if you try to invent something about them, you should be knowing that you are perhaps late, someone before you has either done it or at least has tried to do it.
It’s sometimes hard to believe that only 60 years ago, computers were rare and were not available for the wider public. It wasn't until the '80s that computers arrived our homes and - thanks to the microprocessor - really made an impact on the average person's life. Nowadays, modern microprocessors can perform extremely sophisticated operations in areas such as aviation, engineering, meteorology, nuclear physics and, take up small space as well as providing greater performance.
Still, end of the universe (sky? really?) is the limit. Lets see where we reach. Till then, lets keep developing the technology and serve the world for a better cause.
Stats Courtesy: www.microe.com
--------------------------------------------------------

Raspberry Pi Sensors

Integrate sensors into your Raspberry Pi projects and let your powerful microcomputer interact with the physical world