0% found this document useful (0 votes)
95 views

Raspberry Pi Project Board User Manual v1.0

This document provides information about the Raspberry Pi IoT Project Board, including its specifications, hardware details, and onboard interfaces. The board is powered by a Raspberry Pi 3 Model B+ and contains various sensors, modules, and connectors to interface with IoT devices and send sensor data to cloud platforms. It allows students to learn IoT concepts and complete projects by connecting sensors, controlling actuators, and transmitting data wirelessly.

Uploaded by

narendrakumar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
95 views

Raspberry Pi Project Board User Manual v1.0

This document provides information about the Raspberry Pi IoT Project Board, including its specifications, hardware details, and onboard interfaces. The board is powered by a Raspberry Pi 3 Model B+ and contains various sensors, modules, and connectors to interface with IoT devices and send sensor data to cloud platforms. It allows students to learn IoT concepts and complete projects by connecting sensors, controlling actuators, and transmitting data wirelessly.

Uploaded by

narendrakumar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

ADVANCED ELECTRONIC SYSTEMS.

ALS-XT-IoT-PRJBRD-RBPi-01

Raspberry Pi IoT
Project Board
User Manual

www.alsindia.net Sheet 1 of 33
ADVANCED ELECTRONIC SYSTEMS. ALS-XT-IoT-PRJBRD-RBPi-01

CONTENTS PAGE No.

1. INTRODUCTION 3
2. RASPBERRY PI 3 IOT PROJECT BOARD SPECIFICATIONS 4
3. HARDWARE DETAILS 6
3.1. Raspberry Pi 3 Model B+ 6
3.2. Connection Details 7
4. INSTALLATION PROCEDURE 11
4.1. Install the Raspbian OS on SD CARD 11
5. ON BOARD INTERFACES 13
5.1. OLED 13
5.2. MCP3008 14
5.3. Switches & LEDs 15
5.4. Stepper Motor 16
5.5. Buzzer 16
5.6. Relays 17
5.7. UART 17
5.8. ZigBee Module 18
5.8.1 Configuring ZigBee Modules 19
5.9 LM35 24
5.10 Light Sensor 25

6. DEMO PROGRAMS 26
7. EXTERNAL SENSORS SUPPORT 28
8. XTRANS IoT CLOUD 29
8.1. Introduction to Xtrans IoT Cloud 29
8.2. Connecting the device to Xtrans IoT Cloud 31
9. THINGSPEAK CLOUD 32
9.1. Introduction to ThingSpeak Cloud 32
9.2. API Reference 33
10. TROUBLESHOOTING 35
11. REFERENCES 35

www.alsindia.net Sheet 2 of 33
ADVANCED ELECTRONIC SYSTEMS. ALS-XT-IoT-PRJBRD-RBPi-01

1. INTRODUCTION
The Raspberry Pi IoT Project Board designed to be a comprehensive tool to accelerate
learning IoT Fundamentals and apply the concepts to get a Hands-On experience by
performing different experiments. It can also be used by students and faculty alike to
implement projects based on IoT concepts. Flexibility is at the heart of the Kit, and
accordingly the students and faculty can not only use the hardware on the board in
imaginative ways, but also innovatively write programs to try their own use cases. This user
manual provides the descriptions of the features and also examples of use cases, to guide
the students to use it effectively.

This Raspberry Pi Project Board can have a Raspberry Pi 3 Model B+ Controller with wireless
device ZigBee to enable wireless mesh communication. It helps the students to perform IoT
related experiments based on their requirement. It provides all the open ports to connect
various multiple sensors which helps the students to develop number of applications on IoT.
It also supports different hardware communications protocols like i2C, SPI and UART. The kit
has two on board sensors like temperature sensor and light sensor to perform IoT end to
end operation from sensors to cloud. As the kit has internal Wi-Fi module the students can
send the different sensors information to the cloud. One can write the code using different
Python IDEs like Thonny, IDLE and Geany.

www.alsindia.net Sheet 3 of 33
ADVANCED ELECTRONIC SYSTEMS. ALS-XT-IoT-PRJBRD-RBPi-01

2. RASPBERRY PI 3 PROJECT BOARD SPECIFICATIONS

Fig. 2: Raspberry Pi 3 IoT Project Board

Hardware Description:
1. RS232 UART Module
2. OLED
3. Raspberry Pi 3 Model B+
4. MCP3008
5. 5V & 3.3V Power Supply Section
6. Stepper Motor Interface
7. Relay Modules – 2
8. Buzzer
9. ZigBee Module
10. Switches – 2
11. LEDs – 2
12. Light Sensor
13. LM35 Temperature Sensor.

www.alsindia.net Sheet 4 of 33
ADVANCED ELECTRONIC SYSTEMS. ALS-XT-IoT-PRJBRD-RBPi-01

Specifications:
• Board is driven using Raspberry Pi 3 Controller.
• Facilitates MQTT or HTTP application protocol connection to various IoT cloud
platforms such as Thingspeak, AWS.
• It can be connected to a Private Cloud like Xtrans Cloud.
• On board voltage regulator for generating 3.3V from +5V input through power
supply /adapter.
• Internal Wi-Fi connectivity through which board can be connected to internet
through Router.
• Onboard ZigBee device to enable wireless communication.
• On board simple analog sensors like Temperature and Light.
• Onboard ADC MCP3008 to connect analog sensors to raspberry pi 3.
• On board Organic LED Display to display colorful text as well as images.
2 LED's and 2 Switches.
• On board stepper motor driver to drive 5V stepper motor.
• One Buzzer.
• Internal Bluetooth 4.2 to communicate with other Bluetooth modules or mobile
Apps.
• Provided extra connectors for connecting external analog and digital sensors so that
students can explore their projects.
• I2C, SPI communication protocols.
• On board UART connector.
• UART Software serial communication.
• On board Relay to drive external device.
• Several onboard outputs can be accomplished through events from cloud such as
turning on LED’s or sending a test message to the display is possible.
• Outputs can be programmed to be event or threshold driven.
• Performance of IoT experiments and design / implementation of student projects
possible including provision to write their own programs.
• Wireless Mesh Communication is possible.

www.alsindia.net Sheet 5 of 33
ADVANCED ELECTRONIC SYSTEMS. ALS-XT-IoT-PRJBRD-RBPi
RBPi-01

3. HARDWARE DETAILS
3.1. Raspberry Pi 3 B+
Specifications:

• Quad Core 1.2GHz Broadcom


dcom BCM2837 64bit CPU.
• 1GB RAM.
• BCM43438 wireless LAN and Bluetooth Low Energy (BLE) on board.
• 100 mbps Base Ethernet.
• 40-pin extended GPIO.
• 4 USB 2.0 ports.
• 4 Pole stereo output and composite video port.
• Full size HDMI.
• CSI camera port for connecting a Raspberry
R Pi 3 B+ camera.
• DSI display port for connecting a Raspberry Pi 3 B+ touchscreen display.
• Micro SD port for loading your operating system and storing data.
• Upgraded switched Micro USB power source up to 2.5A.

Fig. 3.2: Raspberry Pi 3 B+.


ADVANCED ELECTRONIC SYSTEMS. ALS-XT-IoT-PRJBRD-RBPi-01

3.2. Connection Details


3.2.1. U1 Connector: 40 pin 20X2 Header is connected to the Raspberry pi 3 B+.
Pin Description Pin Description
1 NC 2 NC
3 SDA 4 NC
5 SCL 6 GND
7 P7/GPIO 7 GPCLK0 8 P8/GPIO 15 TXD (UART)
9 NC 10 P14/GPIO 16 RXD (UART)
11 P11/GPIO 0 12 P12/GPIO 1 CM_CLK/PWMO
13 P13/GPIO 2 14 NC
15 P15/GPIO 3 16 P16/GPIO 23
17 NC 18 P18/GPIO 24
19 P19/GPIO 12 MOSI (SPI) 20 NC
21 P21/GPIO 13 MISO (SPI) 22 P22/GPIO 25
23 P23/GPIO 14 SCLK (SPI) 24 P24/GPIO 10 CEO (SPI)
25 NC 26 P26
27 P27/ID_SD(I2C) 28 P28/ID_SC(I2C)
29 P29/GPIO 21 GPCLK1 30 NC
31 P31/GPIO 22 GPCLK2 32 P32/GPIO 12
33 P33/GPIO 23 PWM1 34 NC
35 P35/GPIO 24 PCM_FS/PWM1 36 P36/GPIO 27
37 P37/GPIO 28 38 P38/GPIO 28 PCM_DIN
39 NC 40 P40

3.2.2 J1 Connector: 2 Pin Male Burg connector From LM35.


Pin Description
1 DATA
2 VCC

3.2.3 J1A Connector: 2 Pin Male Burg connector to Raspberry Pi 3 from LM35.
Pin Description
1 A0
2 VCC

www.alsindia.net Sheet 7 of 33
ADVANCED ELECTRONIC SYSTEMS. ALS-XT-IoT-PRJBRD-RBPi-01

3.2.4 J2 Connector:2 pin Male Burg Pins from LDR Module.


Pin Description
1 DATA
2 VCC
3.2.5 J2A Connector:2 pin Male Burg Pins to Raspberry Pi 3 from LDR Module.
Pin Description
1 A1
2 VCC
3.2.6 J3 Connector : 4 Pin Male Burg Pins from OLED
Pin Description
1 VCC
2 GND
3 SCL
4 SDA
3.2.7 J3A Connector : 4 Pin Male Burg Pins to Raspberry Pi 3 from OLED
Pin Description
1 VCC
2 GND
3 SCL
4 SDA
3.2.8 J4 Connector : 5 Pin Male Burg Pins from LED & Switches
Pin Description
1 L1
2 L2
3 S1
4 S2
5 VCC
3.2.9 J4A Connector : 5 Pin Male Burg Pins to Raspberry Pi 3 from LED & Switches
Pin Description
1 P31
2 P33
3 P35
4 P37
5 VCC

www.alsindia.net Sheet 8 of 33
ADVANCED ELECTRONIC SYSTEMS. ALS-XT-IoT-PRJBRD-RBPi-01

3.2.10 JP1 Connector : 3 Way jumper Pin for XBEE


Pin Description
1 P10
2 DOUT
3 TX0
3.2.11 JP2 Connector : 3 Way jumperPin for XBEE
Pin Description
1 P8
2 DIN
3 RX0
3.2.12 JP3 Connector : 2 Way jumper pin for UART
Pin Description
1 P8
2 TX0
3.2.13 JP4 Connector : 2 Way jumper pin for UART
Pin Description
1 P10
2 RX0
3.2.14 J8 Connector : 4 Pin Male Burg Pins from Relays & Buzzer
Pin Description
1 RLY1
2 RLY2
3 BUZ
4 VCC
3.2.15 J8A Connector : 4 Pin Male Burg Pins to Raspberry Pi 3 from Relays &
Buzzer
Pin Description
1 P36
2 P12
3 P38
4 VCC
3.2.16 J9 Connector : 5 Pin Male Burg Pins from Stepper Motor
Pin Description
1 IN1
2 IN2
3 IN3

www.alsindia.net Sheet 9 of 33
ADVANCED ELECTRONIC SYSTEMS. ALS-XT-IoT-PRJBRD-RBPi-01

4 IN4
5 VCC
3.2.17 J9A Connector : 5 Pin Male Burg Pins to Raspberry Pi 3 from Stepper
Motor
Pin Description
1 P16
2 P18
3 P22
4 P32
5 VCC
3.2.18 J12 & J13 Connectors : 2 Pin Male Burg Pins for I2C
Pin Description
1 SDA
2 SCL
3.2.19 J10 & J11 Connectors : 4 Pin Male Burg Pins for SPI Connection
Pin Description
1 D10
2 D11
3 D12
4 D13

3.2.20 J14 & J15 Connector : 15 Pin Male Burg Pins for External GPIO Pins
Pin Description
1 P11
2 P13
3 P15
4 P29
5 SDA
6 SCL
7 P16
8 P18
9 P22
10 P26
11 P27

12 P28

www.alsindia.net Sheet 10 of 33
ADVANCED ELECTRONIC SYSTEMS. ALS-XT-IoT-PRJBRD-RBPi-01

13 P32
14 P40
15 P12

3.2.21 J16 & J17 Connector : 12 Pin Male Burg Pins for External GPIOs
Pin Description
1 P29
2 P31
3 P7
4 P33
5 P35
6 P37
7 P36
8 P38
9 P24
10 P19
11 P21
12 P23

3.2.22 J19 Connector : 10 Pin Male Burg Pins for VCC (5V)
3.2.23 J18 Connector : 10 Pin Male Burg Pins for GND
3.2.24 J20 Connector : 10 Pin Male Burg Pins for 3.3V

4 INSTALLATION PROCEDURE

4.1 Installing Raspbian OS for Raspberry Pi 3 B+


4.1.1 Using Raspbian Stretch OS Image Downloaded in. zip format
1. Download the image file in the form Zip file from the following link
https://www.raspberrypi.org/downloads/raspbian/

www.alsindia.net Sheet 11 of 33
ADVANCED ELECTRONIC SYSTEMS. ALS-XT-IoT-PRJBRD-RBPi
RBPi-01

Fig. 4.12: Download Raspbian Stretch


2. Download the win32 Disk Imager Software to write the image file to SD Card from
the following link. https://sourceforge.net/projects/win32diskimager/
3. Now insert the SD Card in SD card
c slot and connect it to PC/Laptop.
4. Open Win32 Disk Imager, choose the .img or image file you want to write as Image
File and choose the SD drive as Device and press Write.
5. The write may take a while. Once it is done, remove the SD card and insert it int
into the
device you want to use with.

Initial Setup for Raspberry Pi 3 B+

1. Once Raspberry Pi 3 B+ is booted up to GUI, Connect the keyboard and Mouse to


USB slots.
2. Change the following
a. language: English
b. Country and Time Zone: India and Kolkata
3. From menu-->Preferences
eferences-->Raspberry Pi 3 B+ Configuration.
Then Go To Interfaces
Enable Camera, SSH, VNC, SPI, I2C, Serial Port. Don't Enable Remaining Things.
4. Connect to WiFi.
5. Check the date and Time.
6. Open the Terminal.
Execute following default commands.
a. sudo apt-get update
b. sudo apt-get install build-essential
build python-dev python-smbus
smbus python
python-pip

7. Now you can write your programs at Thonny Python IDE.


Menu → Programming → Thonny Python IDE.
File → New ….. You can write your Program here and save.
8. Execute the program at terminal only by following command
sudo python <program
<program-name>.py
ADVANCED ELECTRONIC SYSTEMS. ALS-XT-IoT-PRJBRD-RBPi-01

5. ON BOARD INTERFACES
5.1 OLED Display
The term OLED stands for “Organic Light emitting diode” it uses the same technology that is
used in most of our televisions but has fewer pixels compared to them. It is real fun to have
these cool looking display modules to be interfaced with the Raspberry Pi .In this Kit, we are
using a Monochrome 4-pin SSD1306 0.96” OLED display. This LCD can only work with the
I2C mode. To work with OLED with raspberry pi 3 you have to execute following commands
sudo apt-get install python-imaging python-smbus git
git clone https://github.com/adafruit/Adafruit_Python_SSD1306.git
cd Adafruit_Python_SSD1306
sudo python setup.py install

After open any one the example program from folder and execute it. It will display either
text or Images on OLED.

Fig. 5.1A: Schematic pin diagram of OLED Interface.

Pin Function Name


1 Ground Connection GND
2 Supply voltage VCC
3 Serial Clock Pin SCL
4 Serial Data Pin SDA

www.alsindia.net Sheet 13 of 33
ADVANCED ELECTRONIC SYSTEMS. ALS-XT-IoT-PRJBRD-RBPi-01

5.2 MCP3008
The MCP3008 is a low cost 8-channel 10-bit analog to digital converter. The precision
of this ADC is similar to that of an Arduino Uno, and with 8 channels you can read quite
a few analog signals from the Pi. This chip is a great option if you just need to read
simple analog signals, like from a temperature or light sensor. The MCP3008 connects
to the Raspberry Pi using a SPI serial connection. You can use either the hardware SPI
bus, or any four GPIO pins and software SPI to talk to the MCP3008. Software SPI is a
little more flexible since it can work with any pins on the Pi, whereas hardware SPI is
slightly faster but less flexible because it only works with specific pins.

Hardware SPI
To use hardware SPI first make sure you've enabled SPI using the raspi-config tool. Be
sure to answer yes to both enabling the SPI interface and loading the SPI kernel
module, then reboot the Pi. Check you can see a /dev/spidev0.0 and /dev/spidev0.1
device when you run the ls -l /dev/spi* command before continuing.
Internal wiring the MCP3008 to the Raspberry Pi as follows:

• MCP3008 VDD to Raspberry Pi 3.3V


• MCP3008 VREF to Raspberry Pi 3.3V
• MCP3008 AGND to Raspberry Pi GND
• MCP3008 DGND to Raspberry Pi GND
• MCP3008 CLK to Raspberry Pi SCLK
• MCP3008 DOUT to Raspberry Pi MISO
• MCP3008 DIN to Raspberry Pi MOSI
• MCP3008 CS/SHDN to Raspberry Pi CE0

Run the following commands to install Adafruit MCP3008 library to communicate MCP3008
with Raspberry Pi.
sudo pip install Adafruit_MCP3008

www.alsindia.net Sheet 14 of 33
ADVANCED ELECTRONIC SYSTEMS. ALS-XT-IoT-PRJBRD-RBPi-01

Fig. 5.2A: Schematic Pin Diagram of MCP3008.

5.3 Switches and LED's


Switch and LED's are combination of 2 LED's and 2 switches which are programmed
to operate LED's using the switches.

Fig. 5.3A: Schematic Pin Diagram of Switches and LED's.

5.4 Stepper Motor


Stepping motor is a brush-less synchronous electric motor that converts digital pulses into
mechanical shaft rotation. The motor's position can then be commanded to move and hold
at one of these steps without any position sensor for feedback (an open-loop controller), as
long as the motor is carefully sized to the application in respect to torque and speed.

www.alsindia.net Sheet 15 of 33
ADVANCED ELECTRONIC SYSTEMS. ALS-XT-IoT-PRJBRD-RBPi-01

Fig. 5.4A: Schematic Pin Diagram of Stepper Motor Interface.

5.5 Buzzer
Buzzer is an output module which can be used to show the result of any program as a
sound. Providing VCC to BUZZ
pin will blow the Buzzer.

Fig. 5.5A: Schematic Pin Diagram of Buzzer.

5.6 Relays
A relay works to isolate or change the state of an electric circuit from one state to another.
Relays use an electromagnet to mechanically operate a switch, but other operating
principles are also used, such as solid-state relays. Relay are used to to control a circuit by a
separate low-power signal.

Fig. 5.6A: Schematic Pin Diagram of Relay.

www.alsindia.net Sheet 16 of 33
ADVANCED ELECTRONIC SYSTEMS. ALS-XT-IoT-PRJBRD-RBPi-01

5.7 UART (On Board RS232- UART Using MAX3232)


A universal asynchronous receiver-transmitter is a computer hardware device for
asynchronous serial communication in which the data format and transmission speeds are
configurable. A UART is usually an individual integrated circuit used for serial
communications over a computer or peripheral device serial port. The System Serial Port is
having Voltage Level is 12V. But Micro-controllers like Arduino/Raspberry Pi 3 B+ works with
5V / 3.3V Voltage Level. While using hardware serial port don’t forget to enable hardware
serial port using raspi-config command.

Fig. 5.7A Schematic Pin Diagram of UART.

5.8 Zigbee Module


ZigBee is a wireless technology which provides connection between the devices. It is
the only open global standard to fulfill the needs of low cost, low power wireless
network used for device monitoring and control. The ZigBee standard is based on IEEE
802.15.4. It operates in ISM (Industrial, Scientific, and Medical) radio bands which
include 2.4 GHz, 784 MHz, 868MHz and 915 MHz. Data rate varies from 20 Kb/s to 250
Kb/s. It supports all network topologies such as star, tree and mesh topology. Its
transmission distance is limited to 10 to 100 meters line of sight. It depends on power
output and environmental factors. It can use long distance communication using
intermediate devices. The data is passed through the mesh network of intermediate
devices and it reaches the distant devices. The devices are secured by 128 bit

www.alsindia.net Sheet 17 of 33
ADVANCED ELECTRONIC SYSTEMS. ALS-XT-IoT-PRJBRD-RBPi-01

symmetric encryption keys. So the networking is secure. ZigBee also provides


long battery life, so it can last for several years.

Fig 5.8 Zigbee Device and Pin Diagram

5.8.1 Configuring XBee Modules using XCTU

The XBee module can act as a Coordinator, Router or an End device but it need to be
configured to work in desired mode. So before using the XBee modules with Raspberry
Pi 3, we have to configure these modules using XCTU software.

To connect XBee module with the laptop, a USB to serial cable is used.

NOTE :- CONNECT SERIAL CABLE FROM 9 PIN DB1 FEMALE CONNECTOR IN RASPBERRY PI
BOARD TO PC OR LAPTOP AND SHORT JUMPERS JP1 PIN-2,3 , JP2 PIN-2,3 AND JP3,JP4
SHOULD BE OPENED.

www.alsindia.net Sheet 18 of 33
ADVANCED ELECTRONIC SYSTEMS. ALS-XT-IoT-PRJBRD-RBPi-01

Download the XCTU software from this link and install it. After downloading and installing
the XCTU software, open it and make sure your XBee module is properly connected. Check
the COM port of the Arduino board in device manager.

Step 1:- Now, click on the search button. This will show you all the RF devices connected
with your laptop. In our case, it will show only one XBee module.

Step 2:- Select the Serial port of the Explorer board/Arduino board and click on Next.

Step 3:- In the next window, set the USB port parameters as shown below and click on Finish.

www.alsindia.net Sheet 19 of 33
ADVANCED ELECTRONIC SYSTEMS. ALS-XT-IoT-PRJBRD-RBPi-01

Step 4:- Select the Discovered device and click on Add selected device. This process will add
your XBee module to XCTU dashboard.

www.alsindia.net Sheet 20 of 33
ADVANCED ELECTRONIC SYSTEMS. ALS-XT-IoT-PRJBRD-RBPi-01

Step 5:- Now, you can configure your XBee module in this window. Use either AT commands
or put the data manually. As you can see, there is R showing on the left panel which means
Xbee is in router mode. We have to make it Coordinator for the transmitter part.

First, update the Firmware by clicking on the Update firmware.

Step 6:- Choose the Product family of your device which is available on back of XBee
module. Select function set and firmware version as highlighted below and click on Update.

Step 7:- Now, you have to give ID, MY and DL data to make connection with other XBee. ID
remain same for both the modules. Only MY and DL data interchange i.e. MY for the

www.alsindia.net Sheet 21 of 33
ADVANCED ELECTRONIC SYSTEMS. ALS-XT-IoT-PRJBRD-RBPi-01

receiver XBee becomes DL of the transmitter XBee (coordinator) and DL for the receiver
XBee becomes MY of the transmitter XBee. Make CE as Coordinator and then hit
the Write button. As shown below.

ATDL ATMY ATID


XBee 1 coordinator FFFF FFFE 2244
XBee 2 end device FFFF FFFE 2244

Step 8:- After writing the above data to the transmitter part, plug out it from the explorer
board and plug it in the second XBee module. Repeat the same process as above only
changes are the DL, MY, and CE. As we will make the second XBee as End device so in CE
drop down menu, select the End device and hit the Write button.

Connections:

1. Tx (DOUT) (pin2)of XBee -> Rx Pin of Raspberry Pi 3


2. Rx (DIN) (pin3) of Xbee -> Tx of Raspberry Pi 3
3. Gnd(pin10) of Xbee -> GND of Raspberry Pi 3
4. Vcc (Pin1) of Xbee -> 3.3v of Raspberry Pi 3

www.alsindia.net Sheet 22 of 33
ADVANCED ELECTRONIC SYSTEMS. ALS-XT-IoT-PRJBRD-RBPi-01

Fig: ZigBee Schematic Diagram

Sensors are the devices that are used to detect and respond to electrical or optical signals.
Sensors converts the physical parameter into a signal which can be measured electrically.
Let’s explain the example of temperature. The mercury in the glass thermometer expands
and contracts the liquid to convert the measured temperature which can be read by a
viewer on the calibrated glass tube.
5.9 LM35
The LM35 series are precision integrated-circuit temperature devices with an output voltage
linearly proportional to the Centigrade temperature. LM35 is three terminal linear
temperature sensor from National semiconductors. It can measure temperature from -55
degree Celsius to +150 degree Celsius. The voltage output of the LM35 increases 10mV per
degree Celsius rise in temperature. LM35 can be operated from a 5V supply and the stand
by current is less than 60uA. The pin out of LM35 is shown in the figure below.

Features
Calibrated Directly in Celsius (Centigrade)

Linear + 10-mV/°C Scale Factor

0.5°C Ensured Accuracy (at 25°C)

Rated for Full −55°C to 150°C Range

Suitable for Remote Applications

www.alsindia.net Sheet 23 of 33
ADVANCED ELECTRONIC SYSTEMS. ALS-XT-IoT-PRJBRD-RBPi-01

Low-Cost Due to Wafer-Level Trimming

Operates from 4 V to 30 V

Less than 60-μA Current Drain

Low Self-Heating, 0.08°C in Still Air

Non-Linearity Only ±¼°C Typical

Low-Impedance Output, 0.1 Ω for 1-mA Load

5.10 Light Sensor


A Light Sensor generates an output signal indicating the intensity of light by measuring the
radiant energy that exists in a very narrow range of frequencies basically called “light”, and
which ranges in frequency from “Infrared” to “Visible” up to “Ultraviolet” light spectrum.

The light sensor converts this “light energy” whether visible or in the infrared parts of the
spectrum into an electrical signal output. From “Infrared” to “Visible” up to “Ultraviolet”
light spectrum. Sensitivity can be adjusted through potentiometer.
Specifications:

● Using photosensitive resistance sensor sensitive type.


● Working Voltage: 3.3V-5V.
● Output form: Digital Switch show (0 for Brightness and 1 for darkness).
● Fixed Bolt Hole, easy installation.

www.alsindia.net Sheet 24 of 33
ADVANCED ELECTRONIC SYSTEMS. ALS-XT-IoT-PRJBRD-RBPi-01

6. DEMO PROGRAMS
6.1 To Test LM35 – Temperature Sensor
Connection: Connect J1 to J1A using flying leads
Connected pin details: OUT – MCP3008 Channel0 –A0
Execute the following commands
sudo pip install Adafruit_MCP3008
sudo python lm35.py
Result: It will Display Temperature in Degrees.

6.2 To Test Light Sensor


Connection: Connect J2 to J2A using flying leads
Connected Pin details: Data-MCP3008 Channel 1 – A1
sudo python light.py
Result: Display values between 0-1023 depending on the light intensity.
6.3 To Test Buzzer
Connection: Connect J8 PIN 3,4 to J8A PIN 3,4 using flying leads
Connected Pin details: BUZ – P38
sudo python buzzer.py
Result: Buzzer will ON and OFF Continuously

6.4 To Test Relay 1


Connection: Connect J8 PIN 1, 4 to J8A PIN 1, 4 using flying leads
Connected Pin details: RLY1 – P36
sudo python relay1.py
Result: Relay1 will ON and OFF Continuously

6.5 To Test Relay 2


Connection: Connect J8 PIN 2, 4 to J8A PIN 2, 4 using flying leads
Connected Pin details: RLY2 – P12
sudo python relay2.py
Result: Relay2 will ON and OFF Continuously
6.6 To Test OLED
Connection: Connect J3 to J3A using flying leads
Connected Pin details: SDA – SDA, SCL-SCL
Execute the following commands
sudo apt-get update
sudo apt-get install python-imaging python-smbus git
git clone https://github.com/adafruit/Adafruit_Python_SSD1306.git
cd Adafruit_Python_SSD1306
sudo python setup.py install

www.alsindia.net Sheet 25 of 33
ADVANCED ELECTRONIC SYSTEMS. ALS-XT-IoT-PRJBRD-RBPi-01

sudo python oled.py


Result: It will display Text or image based on your example
6.7 To Test Zigbee Module
TWO RASPBERRY PI PROJECT BOARDS REQUIRED
JP3 AND JP4 SHOULD BE OPENED.
Connection: short JP1-1,2 ,JP2-1,2
Connect J4 2,5 to J4A 2,5 using flying leads
Connected Pin details: DOUT – P10, DIN – P8.
sudo pip install xbee
Result:Take two Raspberry Pi boards configure one Zigbee as a co-ordinator and run the
sudo python zigbeetx.py program and another as end device and run sudo python zigbeerx
program. Send the commands from zigbeetx serial monitor as 1 it receives the values on
zigbeerx serial monitor and LED2 will be ON in zigbee end device, for command 0 LED2 will
be OFF.
6.8 To Test Switches and LED's
Connection: Connect J4 to J4A using flying leads
Connected Pin details: LED1 – P31, LED2 – P33, SWITCH1 – P35, SWITCH2 – P37.
sudo python ledswitch.py
Result: Press switch 1 turn On/Off LED1 and Switch2 turn On/Off LED2.
6.9 To Test Stepper Motor
Connection: Connect J9 to J9A using flying leads
Connected Pin details: IN1 – P16, IN2 – P18, IN3 – P22, IN4 – P32.
sudo python stepper.py
Result: Stepper Motor rotates anti clockwise continuously.
6.10 To Test UART-BUZZER Module
NOTE:JP1 AND JP2 SHOULD BE OPENED.
Connection: short jumper JP3,JP4 and Connect J8 Pin 3, 4 to J8A Pin 3, 4 using flying leads
Connected Pin details: RX – P10, TX – P8, BUZ-P38
Open COM Port Through one of the App like Hyper Terminal / Hercules. Set the baud rate to
9600 and Force on Local Echo.
sudo python uart-bz.py
Result: It can communicate (Send/Receive) from laptop/ PC through RS232 to UART
Converter to Raspberry Pi Serial Monitor. Send 1 or 0 from the serial port. The Buzzer will on
when it is 1 and the buzzer will off when it is 0. The status is also displayed on the console
monitor. You can terminate the program by entering “^C”.

www.alsindia.net Sheet 26 of 33
ADVANCED ELECTRONIC SYSTEMS. ALS-XT-IoT-PRJBRD-RBPi-01

7. EXTERNAL SENSORS SUPPORT


External sensor can be connected directly to the available Relimate socket or Male Berg
pins. The below sensors will support both Arduino UNO R3 and Raspberry pi 3B+ modules.
Listed below are some sensors that can be connected externally to the IoT Development Kit.
These are given as examples only. More sensors available in the market can also be
connected.

1. IR distance sensor
2. Thermal detection sensor
1. SW-420 Motion Sensor/ Vibration switch
2. Humidity and Rain Detection Sensor
3. Speed Sensor
4. IR Flame Detection Sensor
5. SEN-0052 Magnetic Reed Sensor
6. Touch sensor
7. R305 Optical Fingerprint Sensor
8. Sound detector
9. Magnetic switch
10. Non-invasive AC current sensor
11. 3-Axis Accelerometer Sensor
12. Optical Dust Sensor
13. RFID Reader
14. Voltage / current meter
15. Hydrogen Gas Sensor
16. pH Sensor
17. Muscle Sensor
18. Pulse Sensor
19. Single Lead Heart Rate Monitor
20. Gyroscope
21. Sunlight Sensor
22. Water Temperature-DS18B20
23. Body Temperature

8. XTRANS IoT CLOUD


8.1 Introduction to Xtrans IoT Cloud
Welcome to our Xtrans IoT Cloud, a Private cloud designed and implemented by Xtrans
Solutions, specially tuned for the IoT Development Kit. We will help you to connect your
devices and applications to the Xtrans IoT Cloud. Using http://alpha.iot.xtranssolutions.com
this link you can connect to the Xtrans IoT Cloud.

Here are the few screenshots of Xtrans IoT Cloud.


Dashboard:

www.alsindia.net Sheet 27 of 33
ADVANCED ELECTRONIC SYSTEMS. ALS-XT-IoT-PRJBRD-RBPi
RBPi-01

Fig. 10.1: Dashboard Page

Device:

Fig. 10.2: Device Page

Sensor:
ADVANCED ELECTRONIC SYSTEMS. ALS-XT-IoT-PRJBRD-RBPi
RBPi-01

Fig. 10.4: Sensors Page

Fig. 10.5: Sensor Values Page

Welcome to Xtrans IoT Cloud REST API documentation. API allows for programmatic access
to your accounts resources, including devices, variables, values and others.

8.2 Connecting the Device to Xtrans IoT Cloud

There are two ways to connect your device to Xtrans IoT Cloud. They are
1. Using HTTP
2. Using MQTT

8.2.1 Connecting the Device to Xtrans IoT Cloud through HTTP


API access can be made over HTTP. Use the following endpoints for the Xtrans IoT
Cloud.

Sending Data from Your IoT Device to Xtrans Cloud

Domain: "alpha.iot.xtranssolutions.com"
End-point:
point: "/device/(device-label)?id=(device-id)”
"/device/(device
Port: "3000"
Body: "[{"sensor": (sensor
(sensor-label), "value": (sensor value)}]"

Where:
device-name:
name: label of the device.
Device-id: ID of the device.
ADVANCED ELECTRONIC SYSTEMS. ALS-XT-IoT-PRJBRD-RBPi-01

8.2.2 Connecting the Device to Xtrans IoT Cloud through MQTT


API access can be made over MQTT. Use the following endpoints for the Xtrans IoT Cloud.

Sending Data from Your IoT Device to Xtrans Cloud

Domain: "alpha.iot.xtranssolutions.com"
Topic: "/device/(device-id)"
Port: "1883"
Body: "[{"sensor": (sensor-label), "value": (sensor value)}]"

Where:
Device-label: label of the device.
Device-id: ID of the device.

9. THINGSPEAK CLOUD
9.1 Introduction
ThingSpeak is a cloud platform providing various services exclusively targeted for building
IoT applications. It offers the capabilities of real-time data collection, visualizing the
collected data in the form of charts, ability to create plugins and apps for collaborating with
web services, social network and other APIs. We will consider each of these features in
detail below.
The core element of ThingSpeak is a ‘ThingSpeak Channel’. A channel stores the data that
we send to ThingSpeak and comprises of the below elements:

• 8 fields for storing data of any type – These can be used to store the data from a
sensor or from an embedded device.
• 3 location fields – Can be used to store the latitude, longitude and the elevation.
These are very useful for tracking a moving device.
• 1 status field – A short message to describe the data stored in the channel.

To use ThingSpeak, we need to sign up and create a channel. Once we have a channel, we
can send the data, allow ThingSpeak to process it and also retrieve the same. Let us start
exploring ThingSpeak by signing up and setting up a channel.
Usinghttps://thingspeak.com/the link user can connect to the ThingSpeak Cloud.

Here are the few screenshots of ThingSpeak Cloud.


Create Channel: Once the user login to ThingSpeak account. Tap on the channel tab in the
menu. follow these steps.
New channel button > Fill the details > Save Channel.

www.alsindia.net Sheet 30 of 33
ADVANCED ELECTRONIC SYSTEMS. ALS-XT-IoT-PRJBRD-RBPi
RBPi-01

Fig. 11.1: Create New Channel

Channels

Fig. 11.2: All Channels

Fields Data
ADVANCED ELECTRONIC SYSTEMS. ALS-XT-IoT-PRJBRD-RBPi-01

9.2 API Reference


ThingSpeak is an IoT platform that uses channels to store data sent from apps or devices.
With the settings described in Channel Configurations, you create a channel, and then send
and retrieve data to and from the channel. You can make your channels public to share
data. Using the REST API calls such as GET, POST, PUT, and DELETE, you can create a channel
and update its feed, update an existing channel, clear a channel feed, and delete a channel.
You can also use the MQTT Publish method to update a channel feed and MQTT Subscribe
to receive messages when a channel updates. Learn more about when to Choose between
REST API and MQTT API while updating a channel.

MATLAB analysis and visualization apps enable you to explore and view your channel data.
ThingSpeak enables you to interact with social media, web services, and devices.

REST API: Use REST API calls to Create and update ThingSpeak Channels and Charts.
MQTT API: Use the MQTT API to update ThingSpeak channels.

9.2.1 REST API:


Representational state transfer (REST) is an architectural style designed as a request-
response model that communicates over HTTP. ThingSpeak, an IoT platform, uses the REST
API calls GET, POST, PUT, and DELETE to create and delete channels, read and write channel
data, and clear the data in a channel. A web browser or client sends a request to the server,
which responds with data in the requested format. Web browsers use this interface to
retrieve web pages or to send data to remote servers.
Sending Data to ThingSpeak Cloud
GET /update? api_key="+ <write-api> +"&field1="+<field1-value>
<write-api>: Write API Key of particular channel.
<Field1-value>: sensor data.
Retrieving Data from ThingSpeak Cloud
GET /channels/<channel-id>/fields/<field-number>/last.json?api_key=<read-api-key>
Channel-id: ID of the particular Channel.
read-api-key: Read API key of Particular channel.
For more information about API, please refer the below link
https://thingspeak.com/channels/456119/api_keys

9.2.2 MQTT API:


The ThingSpeak IoT platform enables clients to update and receive updates from channel
feeds via the ThingSpeak MQTT broker. MQTT is a publish/subscribe communication
protocol that uses TCP/IP sockets or Web Sockets. MQTT over Web Sockets can be secured

www.alsindia.net Sheet 32 of 33
ADVANCED ELECTRONIC SYSTEMS. ALS-XT-IoT-PRJBRD-RBPi-01

with SSL. A client device connects to the MQTT broker and can publish to a channel or
subscribe to updates from that channel.

Publish:

Publish to Channel Feed Publish message to update multiple channel


field simultaneously.

Publish to Channel field Feed Publish message to update single channel


field

Subscribe:
Subscribe to Channel Feed Subscribe to updates from a channel feed
with MQTT

Subscribe to Channel Field Feed Subscribe to channel updates from a


particular field of a channel with MQTT

User can refer the below link for the complete information of ThingSpeak cloud document.
https://in.mathworks.com/help/thingspeak/

10 TROUBLESHOOTING:
Here are some guidelines to troubleshoot some typical problems. Problems in field,
however, can vary, depending on field conditions.

1. MCP3008 is not responding.


• Make sure that you have connected SPI is enabled.
• Make sure that you have Installed Adafruit_MCP3008 Library
• Still not working then reboot your raspberry pi.

2. ZigBee Module is not working


• Make Sure that connection are correct
• Make sure you have already set your ZigBee module in “coordinator mode”
while transmitting or “end device mode” while receiving the messages.
Otherwise please follow the configuration steps provided in chapter 5.9.

11 REFERENCES
1. https://www.raspberrypi.org
2. https://thingspeak.com/
3. https://xtranssolutions.com/
4. https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html

www.alsindia.net Sheet 33 of 33

You might also like