Arduino for Radon Measurement
-
Upload
goingforward77 -
Category
Documents
-
view
179 -
download
4
description
Transcript of Arduino for Radon Measurement
Arduino Programming
Radon Measurement System
By:
Mazhar Hussain Muhammad Amir Yousaf
mazhar.hussain @miun.se [email protected]
2011-11-02
1
[email protected] [email protected]
for
Outline
Background
Introduction to Arduino
What is Arduino Platform?
What can it do?
Arduino Hardware
Development Environment
Programming Arduino
Objectives
Live Demonstration
2
[email protected] [email protected] 2011-11-02
Background
Measurement system for Radon.
2011-11-02 [email protected] [email protected]
3
Shaping
Amplifier
Particle Sensor
Charge
Sensitive
Amplifier
Detector-bias
200V
Presentation
Storage of data
Amplitude
Measurement
U-controller
Temp. Moisture
reset
http://apachepersonal.miun.se/~go
rthu/ass/
Present on my
Computer
Make alarm in
critical situations
Ventilation
Programming Background
Do you have experience with Microcontroller
programming with C / C++ ?
2011-11-02 [email protected] [email protected]
4
Programming at
register level
Read datasheets
DDRB =
(1<<DDB3)|(1<<DDB2)|(1<<DDB1)|(1<<DDB0);
Microcontroller
What is Arduino Platform?
• Arduino is an open-source electronics prototyping platform based on flexible, easy-to-
use hardware and software. It brings simplicity to developer.
– Simplicity in Hardware, Development Environment and Language.
• It can sense the environment by receiving input from a variety of sensors and can affect
its surroundings by controlling lights, motors, and other actuators.
• Arduino projects can be stand-alone or linked with software running on computers.
2011-11-02 [email protected] [email protected]
5
Arduino
UNO
Arduino
NANO
Arduino
MEGA
http://www.arduino.cc/
What can it do?
Smell Pollutants:
Arduino interfaced with gas sensors. It can smell
ethanol, methane and a bunch of voilatile organic
compounds.
http://www.instructables.com/id/How-To-Smell-
Pollutants/
2011-11-02 [email protected] [email protected]
6
Mini Segway Using the Arduino:
A self balancing segway-like robot is build by using
arduino, a couple of LEGO motors and sensors.
http://hacknmod.com/hack/make-a-mini-segway-using-
the-arduino/
Arduino NANO Hardware
Specifications:
• Based on Atmega 328
• Operating Voltage 5V
• 32 KB Flash Memory
• 2 KB SRAM
• 16 MHz clock speed
• Dimensions 0.73" x 1.70"
2011-11-02 [email protected] [email protected]
7
http://www.arduino.cc/en/Main/A
rduinoBoardNano
Arduino NANO Hardware
2011-11-02 [email protected] [email protected]
8
Arduino Peripherals
• 14 Digital I/O Pins
• 8 Analog Input Pins
• External Interrupts (on
D2 and D3)
• PWM (D3, 5, 6, 9, 10,
and 11)
• Serial port & FTDI
USART to USB
converter.
• SPI, I2C
• Buttons and LEDs
http://www.arduino.cc/en/Main/A
rduinoBoardNano
Development Environment
2011-11-02 [email protected] [email protected]
9
• Download from:
http://www.arduino.cc
/en/Main/software
• Double click the file
from the folder to
open IDE.
Development Environment
2011-11-02 [email protected] [email protected]
10
Install USB driver
System Properties Hardware Device Manager Ports
Mini-B USB
Your computer
http://arduino.cc/en/Guide/Arduin
oNano
Development Environment
2011-11-02 [email protected] [email protected]
11
Steps to Program
1. Configure
2. Write Program
3. Compile Program
4. Upload and Execute
1
2:- Write program
here.
1a
1b
3
4
Programming Arduino
• Open example program:
File Examples Basics
Blink
• Arduino Sketch
o Setup()
Initialization (run once at
beginning )
o Loop()
Run repeatedly
2011-11-02 [email protected] [email protected]
12
Programming Arduino
• No need to write Hardware Abstraction Library (HAL) for accessing microcontroller‟s
peripherals. That make it extremely simpler to program in Arduino.
• All peripherals are in access with provided libraries e.g.
To configure pin as output or input: pinMode()
To set a digital pin high/low: digitalWrite()
To read a digital pin‟s state: digitalRead()
To read an analog pin: analogRead()
To write an “analog” PWM value: analogWrite()
Wait an amount of time delay()
• Complete library references:
http://arduino.cc/en/Reference/HomePage
http://www.arduino.cc/playground/Code/HardwareAbstraction
2011-11-02
[email protected] [email protected]
13
Programming Arduino
• Arduino Refernce Homepage
http://arduino.cc/en/Reference/Home
Page
has every thing you need to create a
program from scratch.
2011-11-02 [email protected] [email protected]
14
http://arduino.cc/en/Reference/Ho
mePage
Programming Arduino
• Creating a program to write message on serial port.
– Visit „Arduino Refernce Homepage‟.
– Click over „Serial‟ link and find a list of functions as shown.
– Use function to implement your requirement.
– Clicking over the function name gives the details with examples.
2011-11-02 [email protected] [email protected]
15
Objectives
Measurement system for Radon.
2011-11-02 [email protected] [email protected]
17
Shaping
Amplifier
Particle Sensor
Charge
Sensitive
Amplifier
Detector-bias
200V
Amplitude
Measurement
U-controller
Temp. Moisture
Presentation
Storage of data
reset
http://apachepersonal.miun.se/~go
rthu/ass/
Objectives
2011-11-02 [email protected] [email protected]
18
Amplitude
Measurement
U-controller
ADC
read
Reset
reset
Measurement system for Radon.
Objectives
2011-11-02 [email protected] [email protected]
19
U-controller
Temp. Moisture
int chk = DHT11.read(DHT11PIN);
Community
Contributions
A DHT11 Class for Arduino.
http://arduino.cc/playground/Main/D
HT11Lib
DHT11 is a temperature
and Humidity Sensor
with single data line.
Measurement system for Radon.
Data Storage and Presentation(1)
• For representing data in an intuitive way,
LabView provide a powerful user interface
along with its Microsoft Office toolkit for Data
storage.
• Through LabView you can control Ardiuno
based Radon Measurement device via serial
link.
• Post processing could be done in LabView to
avoid long code inside Processor.
• Report generation in Excel..
• Go to HELP in LabView and have a look on
“Find Examples”….
2011-11-02 [email protected] [email protected]
21
U-controller
Temp. Moisture
Presentation
Storage of data
Data Storage and Presentation(3)
• By using MS office toolkit in
LabView, you can generate detail
report of your measurements
including tables and graphs.
2011-11-02 [email protected] [email protected]
23