The low cost Raspberry Pi makes a good low cost DAQ server. A DAQ data acquisition system comprises the following
Acquisition – for the raspberry daq, one solution is to connect the EMANT380 Bluetooth DAQ module by plugging in a bluetooth dongle
Analysis – as the OS for the pi is a variant of debian, python and its numerous scientific libraries are now available for use. Now you are now able to simplify the front end data acquisition and do the powerful processing on the pi
Presentation – with web.py you can now present the results to any smartphone, tablet or PC using the browser. With different consuming devices, the model has moved from a platform where Acquisition, Analysis and Presentation are on the same platform to one where production (Acquisition, Analysis) and consumption (Presentation) is now separated. Thus you can consume the information using different devices.
The raspberry pi and daq with python makes for a good platform. Best of all, the software needed to do all this is freely available.
“Android continues to fire on all cylinders,” said Ramon Llamas, senior research analyst with IDC’s Mobile Phone Technology and Trends program. “The market was entreated to several flagship models from Android’s handset partners, prices were well within reach to meet multiple budgetary needs, and the user experience from both Google and its handset partners boosted Android smartphones’ utility far beyond simple telephony.”
According to the International Data Corporation (IDC) Worldwide Quarterly Mobile Phone Tracker, Android amassed a commanding 68.1% market share of all smartphones shipped in the second quarter of 2012 (2Q12).
Android’s success in the market can be traced directly to Samsung, which accounted for 44.0% of all Android smartphones shipped in 2Q12 and totaled more than the next seven Android vendors’ volumes combined. Meanwhile, the next seven vendors were a mix of companies re-establishing their strategies or growing volumes within key markets. Also not to be overlooked was the growing relevance of Android 4.0 Ice Cream Sandwich with the release of numerous models worldwide.
The symptoms of critical conditions going unnoticed can be brought to surface with an alert device. With these applications (mentioned below) readily available on your smartphone, results can be generated instantly.
In this project, we propose a prototype of pervasive mobile health system for monitoring patients’ biomedical data (such as body temperature and heartbeat) both indoor and outdoor environments. The system uses Bluetooth DAQ (data acquisition) device to detect and collect the patient’s data and sends it to an Android Smartphone. The data is stored and processed in Sensor Cloud. The prototype is developed in Python using Scripting Layer for Android (SL4A).
The first application of the project was built on the idea of monitoring body temperature not rising beyond 40 Degree Celsius as prevention for heat stroke. For every 10 minute intervals, the system will detect the body temperature via a thermistor patch. If a temperature reads 39 Degree Celsius, a SMS will be sent to his/her superior to indicate that a high temperature was being measured. In an event that the body temperature exceeds 40 Degree Celsius, the superior will receive a total of three SMS. The first SMS comprises of victim’s latest temperature and his/her current location. Next SMS will provide victim’s particulars that were registered during the initial set‐up stage. Lastly, a URL will be given which links it to a sensor cloud website that previously recorded the body temperature measured during the entire duration of activity.
The other application is an Electrocardiogram (ECG) application based on a concept to detect the body condition if a person is overworking to a point where the heart beat per minute (BPM) exceeds a dangerous value. If the BPM goes above that critical value, it will send an alert via text message to the superior. At the same time, this data will be stored in a database to constantly monitor the records if needed. This application allows a person to have his/her heartbeat and ECG waveform examined by placing their hands on a pair of hand‐held electrode. The signals received from each electrode are recorded and shown in a graph‐form on the smartphone.
On 16th of June 2010, heavy rains in Singapore’s central shopping district in Orchard Road caused several basement shopping malls and car parks to be submerged in water. Over 70 members of the public needed to be rescued from danger. Another significant flooding in December 2011 caused the basement area of Far East Shopping centre and Lucky Plaza to be flooded. This resulted in the loss of millions of dollars worth of electrical goods, jewellery as well as customer patronages. It also caused the temporary closing of the recently opened burger chain store Wendy’s.
Using an Android smartphone with the EMANT380 DAQ module, a group of students from NTU EEE tackled the problem of mass alert to interested persons. By measuring the flood water level and tweeting the results allow those affected by the flood to take preventive actions. Twitter is a better mass broadcast system (and FREE) compared to existing SMS solutions.
Scratch is a graphical programming environment that makes it easier for kids (ages 8 and up) to create their own interactive stories, games, animations, and simulations. The new Scratch Sensor app for the Android Smartphone allows kids to now interact with their favorite stuff toy.
Connections between Scratch and other programs are made using the Scratch networking protocol. With this feature turned on, a program can also send broadcasts and global variables into Scratch. The Scratch Sensor uses the Scratch networking protocol to send the Android Smartphone accelerometer and compass sensor information and broadcast two states (jump and walk) to Scratch.
A 4 hour workshop was organised for 11 2nd year engineering students from Republic Polytechnic on using the Android Smartphones and DAQ to solve real life problems. These students have learnt Python during their first year and have completed one semester of analog electronics and digital electronics. However they are unfamiliar with DAQ and have no prior Android programming experience.
They brought along their personal notebooks and 3 of the students owned Android smartphones from Samsung and Sony Experia. They were formed into 3 teams and given the following problem.
Heat Stroke Notification
“An NS man collapsed during jungle training and died of heat stroke in Brunei”. Heat stroke is defined as a body temperature of greater than 40.6 C due to environmental heat exposure with lack of thermoregulation. This is distinct from a fever, where there is a physiological increase in the temperature set point of the body.
Design a system where a person’s body temperature is monitored and when 40.6 C is exceeded, an emergency SMS with a map URL is sent. The recipient of the SMS should be able to click on the link to see on a map the location of the victim.
Although not every student had an Android smartphone, nonetheless the RemoteControl feature of the Python for Android scripting environment allows every student to complete the task using only their notebook with bluetooth (to communicate with the EMANT380 Bluetooth DAQ) and the android emulator. After testing on the notebook, they then copied their solution unmodified to one of the 3 Android smartphones for the field test.
One team’s solution is shown in the following video
To encourage its member-companies to develop M2M solutions or products, SIAA has set up a M2M Service Portal that has the common functions of analysing and managing the data, as well as generating reports and sending out alerts through the public networks.
Working with SIAA, Emant Pte Ltd has created a demonstration kit that allows users to measure temperature, light intensity and switch status using either the USB DAQ Training Kit or the Bluetooth DAQ Starter Kit (for a wireless solution). A logger program written in Visual Basic 2010 running on the Windows platform is available for online installation. This logger program allows the DAQ modules to make the measurements and post the results to the M2M Service Portal. It takes about 30 minutes to complete the setup procedure.
Also included in the demonstration kit is the Visual Basic source code which will allows the user to understand and modify the code if customisation is required.
With a Nokia N82 smartphone and Bluetooth DAQ Starter Kit (with EMANT380) running Python on Symbian S60 OS, measure temperature and light intensity and write the measurements to www.sensor-cloud.com
Using Beta Python Driver for the EMANT380 Bluetooth DAQ for the Symbian S60 3rd Edition. The driver is incomplete. (For PyS60 1.9.7 and later)
Note: If you are new to Symbian S60 Python programming, please familiarise yourself with the environment before attempting to run the following examples. You should install Python on your SD Drive. Due to security, some file areas are hidden. The Python folder on the SD Drive can be browsed when you connect your phone to the PC. Copy all the files in this folder to the Python folder on your phone including the lib folder. Don’t change the name.
Run the Python examples provided by Nokia. Only when you can successfully run their examples, should you attempt the middaq.py script
Download the middaq.py script from info.emant.com. We will modify the middaq.py script using notepad on the PC.
Change the Network Access Point to the one you will be using
The default time delay between each measurement is 10 minutes. You can change the delay here
Finally enter your geolocation. You can also make use of the GPS info from the Nokia phone. Reading the internal GPS Location may require signing the shell when you are installing the PyS60 in your device. You can get the shell signed at the “Symbian Online Signing”.
Transfer the modified middaq.py script to your Nokia smartphone.
Check if you have paired the EMANT380 to the Nokia phone. If you have not, do it now
Run the middaq.py script. When the program runs, it will connect to the EMANT380, retrieves and displays its firmware ID. Next it will write the light intensity and temperature measured to www.sensor-cloud.com. The status of the write will also be displayed.
Most alarm systems provide a switch to indicate an alarm status. This example uses the EMANT380 Bluetooth DAQ and a Windows Mobile smartphone (HTC Touch) to send an SMS when the switch is closed.
This example requires
Bluetooth Starter Kit – comprises EMANT380 Bluetooth DAQ with Light Application Adaptor
Windows Mobile 6 Professional Smartphone (we tested with a HTC Touch)
The example program was created using Visual Basic 2005 (no Express) and running on the Windows Mobile 6 Professional Platform. Note that if you are using another Windows Mobile platform, you can change the platform in the example.
enter the phone number you want to send the SMS to.
change the Digital Input to 3 if you want to use the switch on the Light Application Adaptor (it is connected to D3). If you want to use your own switch you can connect it to the terminal named SCK (which is D7) and GND. See the Light Application Adaptor specifications for more information.
press send to arm the program
When the switch closes, an SMS will be sent out and the program disarms. Either rearm or exit the program
Some key points of the code
You need to pair the Bluetooth DAQ. In our example, after pairing, we set the outgoing COM port to COM1
Enable the digital IO of the EMANT380 to all inputs
If (Not Emant3001.ReadDigitalBit(Int(NumericUpDown1.Value))) Then
Timer1.Enabled = False
Dim VBMobileSMS As New SmsMessage(TextBox1.Text, TextBox2.Text)
Label1.Text = "Unconnected"
This is the code that checks the state of the digital input, sends out sms when digital input is low (switch is closed) and disables the timer thereby disarming the program.