How to install Chromium browser in Raspberry Pi debian ?

By default, there will not be any browser included in the debian OS for raspberry Pi. Chromium is one of the best browser for raspberry pi. We can install chromium browser in raspberry pi debian OS using the following simple steps,

sudo apt-get update
sudo apt-get install chromium-browser

Now after doing this, check the home icon in raspberry pi and you will be able to see an additional option “Internet” and on expanding, you can see chromium browser. All set 🙂

Covid-19 patient monitoring using Raspberry Pi

Image Source: CBC Canada

A team from the University of Toronto has created a new way for health-care workers to monitor COVID-19 patients — without having to set foot in their hospital rooms.

The university got a call from Mount Sinai hospital with a requirement to figure out a way to monitor vital signs both continuously and remotely.

The students developed a raspberry pi based continuous remote monitoring system for monitoring the status of the patients without the direct intervention of the nurses.

They attached a standard fingertip probe, already in use in hospitals to monitor vital signs, to a “very, very small computer about the size of a credit card,”

That simple computer, called a Raspberry Pi, can then connect to the internet — allowing health-care workers to check on patients from any nursing station computer, or on their smartphone.

The concept is very simple, the finger clip monitors the respiratory status of the COVID-19 patients. The clip detects the light absorbed by the patient’s blood. The colour vary depending upon the oxygen level in the blood and this is the key factor to monitor. This data will be captured from the finger clip by the Raspberry pi and it gets transmitted to the devices in the nursing station.

The prototype was successful based on several trial deployments made in the Mount Sinai hospital.

References:

https://www.cbc.ca/news/canada/toronto/u-of-t-covid-19-monitoring-system-1.5540089

University of Toronto supports COVID-19 patient monitoring with Raspberry Pi

 

 

Realtime Temperature Monitoring System using Raspberry Pi

Realtime temperature sensing is one of the common requirement. There are a lot of digital thermometers and temperature monitoring devices available in online shopping sites. But most of them just monitors and displays the realtime values. It does not have any intelligence.  The one we are going to build is a smart temperature monitoring system. This system can be used for monitoring atmospheric temperature as well as liquid temperature.

The following blog post explains the set up of a digital temperature monitoring system.

Digital Temperature Monitoring System

We will enhance the above system by adding analytical capability. So that we can analyse and show the temperature trends. The block diagram below shows the high level architecture of the system.

temperature_monitoring

As shown in the above diagram, the system has three blocks.

  • Edge Device & Sensor (Raspberry Pi & Sensor)
  • Data Storage Server
  • Dashboards for the end user

The following are the software components required for this project

  • MQTT for sending the data from the edge to the server.
  • PostgreSQL for storing the data in the server.
  • Python based backend
  • HTML Web UI

I am not going to explain the working of MQTT in this blog post. This was already explained in one of my earlier posts.

Before we start implementing the solution, lets summarize the story line.

  • The requirement is to perform realtime temperature monitoring and analyse the trends & patterns using the historic data.
  • A temperature sensor is attached to a Raspberry Pi which acts as the edge device.
  • Need provision to support multiple edge devices.
  • Capability to monitor the temperature from anywhere

Bird’s eye view of the system

Here we have considered multiple edge devices and also considered the provision of web and mobile application.

temperature_monitoring_full

Data Model Design

In the PostgreSQL database, we need two base tables for storing the data. We will be able to store data from multiple edge devices located at different locations using this data model. This is a very basic data model. We can enhance this based on our requirement.

  • device_info – This has the metadata of the edge devices. This includes the location details of the device. The column names are given below
    • device_id, device_name, location
  • temperature_data – We store the temperature data from each of the edge devices in this tables. The column names are given below.
    • device_id, timestamp, value

Now let us start developing the application from the edge device. We will modify the program to send the messages to an MQTT topic with the timestamp. The temperature readings will be sent to the server once in every minute. The message format will be as follows. We will be using epoch timestamp in seconds and temperature in Degree Celsius.

{"device_id":"xxx", "timestamp":1584284353, "value": 27.01}

Now lets develop a small python program that send this values to the MQTT topic. For this, we need an MQTT broker to be up and accessible from the Raspberry Pi

Here my central server is a CentOS 7 server and I will be using mosquitto MQTT. The installation steps are explained very detailed in this blog post.

In the central server, these messages will be collected and stored in the database tables.

A sample view of the temperature_data table is shown below.

device_id timestamp value
device_01 1587825234 27
device_02 1587825234 28
device_03 1587825234 23
device_04 1587825234 28
device_05 1587825234 30
device_06 1587825234 26
device_07 1587825234 22
device_08 1587825234 28
device_09 1587825234 32
device_10 1587825234 29
device_11 1587825234 31

Now from this table, we can query and get the required information based on the user requirement. We can either develop custom visualization using javascript or we can query the DB using workbenches or we can even connect & visualize data using visualization tools like Apache Superset, PowerBI etc.

timeseries_chart01

With this I have explained the highlevel architecture and implementation of a sample IoT system. This system can be scaled further by using a proper time series database instead of the Postgres DB.

How to check whether a Raspberry Pi is 32 bit or 64 bit ?

The latest version of Raspberry Pi comes with 64 bit CPU, but prior to that it was with 32 bit CPU. Some softwares and applications are dependent on CPU and OS architecture.

There are various options to check the architecture.

Method 1:

type the following command and check the response

uname -m

You will get a response something like armv7l or armv8.

ARMv7 and below are 32-bit. AMRv8 introduces the 64-bit instruction set.

Method 2:

Install lshw using the command

apt-get install lshw

Then type the command lshw.  You will be able to find the architecture from the response of the command.

Raspberry Pi 3 released.

Raspberry Pi 3 got released this week. Still remembering the moment before 3 years, my colleague introduced me about this magic device. Then I googled about this device and read the details. I am using this device from the past one year . I have used Raspberry Pi B+, Pi2 and now waiting for the delivery of Pi3 from element14. It is one of the superb devices that I have ever used. I can use my electronics knowledge and computer science knowledge using this. Now the Pi3 came with builtin wifi and bluetooth module so that it can be connected to a wifi or a bluetooth device without any external peripheral. Physical appearance is same as that of Pi2, but this version is more powerful. Now we can say Good Bye..!!! to wifi adapter modules. This will be a very big hit in the IoT market. Expecting more wonders from element14. 🙂

Wifi Adapter Set up for Rasperry Pi

For connecting Raspberry Pi with internet, we have three options, one is through LAN cable, another is using a supported internet dongle and the other way is to using a wifi adapter. Here explaining about the steps that I did for configuring a Netgear N150 WNA1000MV2 wifi adapter with Raspberry pi. Raspberry pi supports lot of wifi adapters. The list of the hardware supported by raspberry pi is available in this url. I had one Netgear Wifi adapter (N150 WNA1000M) and it was working fine without any config changes. Because of that reason, I bought another wifi adapter with the same model number from an online shopping site. But when I unpacked it, I realized that they upgraded the product and a new version of the same product came with model number WNA1000MV2. When I connected it with the pi, it was not working. My raspberry pi OS was Raspbian.

Raspberry-Pi

Netgear1

A portion of the output of dmesg command that contains the details of the wifi adapter is shown below.

dmesg

[ 3.401856] usb 1-1.2: new high-speed USB device number 4 using dwc_otg
[ 3.523552] usb 1-1.2: New USB device found, idVendor=0846, idProduct=9043
[ 3.532493] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 3.541771] usb 1-1.2: Product: WNA1000Mv2
[ 3.547744] usb 1-1.2: Manufacturer: Realtek
[ 3.553858] usb 1-1.2: SerialNumber: 00e04c000001

To make this working, we have to do some modifications.
Add the following contents to the /etc/rc.local file

modprobe 8192cu
echo "0846 9043" > /sys/bus/usb/drivers/rtl8192cu/new_id
ifdown wlan0
ifup wlan0

Then add the following contents to /etc/modprobe.d/netgear_n150.conf file

install 8192cu /sbin/modprobe --ignore-install 8192cu; echo "0846 9043" > /sys/bus/usb/drivers/rtl8192cu/new_id

This worked perfectly for me. Hope this will help..!!!

Some keys do not produce the correct characters in Raspberry Pi

I have a raspberry pi B+ with raspbian OS installed. In this set up, most of the keys were not producing the proper characters. Among the characters, ‘|’ was the character that I missed a lot, because I was not able to do any grep in the linux command line. I tried re-configuring the keyboard, but that didn’t helped me. Then I found the solution.

I changed the keyboard layout to US.

The command for doing the same is given below.

setxkbmap -layout us

If the above solution is not working, you can manually edit the following file and change the keyboard layout. Change the layout to US (use small letter).

/etc/default/keyboard