Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
BY ANKIT DEORA
FIRST
WEEK
WORK
Proposed various sensors we can use for interaction with smart
home gadgets.
VISUAL
BASED
INPUTS :
facial expressions,
hand gestures, body
postures,
eye movements
SENSORS :
passive infrared
sensor(PIR),
capacitive sensor,
proximity
sensor, ping sensor
HUMAN MACHINE
INTERACTION
AUDIO BASED
INPUTS :
human made noise,
sound, speech, laugh,
cry, musical notes,
clap sound, whistle
SENSORS :
Microphones,
clapper, speech
recognition, sensors,
etc.
SENSOR
BASED
INPUTS :
using some other media
like mouse, keyboard,
Remote, joystick, touch
screen phones, pressure
sensors
SENSORS
:
Inductive sensor,
dexterous glove, etc.
STUDIED :
Studied about RF24 module features like : air data rate, current
consumption in different power modes, packet handling, enhanced
shock burst mode, pipe multiCeiver, etc. from the datasheet.
Studied about various functions and parameters that control the RF
modules using software from RF24 library.
Communicated two RF modules by connecting them with two Arduino
UNO boards and tested following codes successfully :
1. led_communication
2. print_joystick_values
3. send_number
NODES IN A WIRELESS
In a wireless network NETWORK
data transmission takes place through
electromagnetic waves. For transmission to be possible
transmitter and receiver nodes must be in range of each other.
When direct transmission is not possible between two nodes
then it takes place by hopping which require intermediate
nodes.
Nodes in a wireless network may be static as well as dynamic
(mobile).
Static Nodes : These nodes remain stationary with respect to
each other and they know the address of other static nodes.
Mobile Nodes : Position of these nodes vary with time. These
POWER
DRAWN
10
-6dBm
9.0mA
RF24_PA_MAX
11
0dBm
11.3mA
ABOUT LIBRARY
When a mobile node enters the network, it gets authenticated by the central
controller by making call to authentication().
After it, the mobile node decides it parent by making call to broadcast().
Node replying first to the broadcast message is made parent of the mobile
node, now the mobile node sends message to its destination node via its
parent node.
When the mobile node looses communication with its parent node, it calls
find_parent() in search for a new parent node.
Firstly, send and broadcast functions are called in low power mode, if task is
not completed then high power mode functions may be called.
Messages are sent in the form of a 32 byte buffer named buffer_packet which
contains the source and destination addresses and other information about
the data packet.
Ref : https://drive.google.com/file/d/0BzUNiVUsn1W2cEpTenVhTjlZa0k/edit?usp=sharing
VARIABLES USED
Parent_address
Self_node_address
Broadcast_address
Buffer_packet
Message_count
:
no. of messages sent to a particular
parent node.
Broadcast_msg_type
These variables are kept private so that functions other than the class cant
modify them.
FUNCTIONS USED
MobileNode()
: Constructor for the class MobileNode, initializes
different addresses, radio, buffer, etc.
Authentication() : Mobile node asks central controller to permit it to be a
part of the wireless network.
Broadcast() : used to send a message in search for a new parent node.
Receive() : reads data from the receiving pipe and returns the bool value
of receipt.
Send() : writes buffer data on writing pipe and returns the bool value of
the task completion.
Putint64() : puts a 64-bit value in the 32-byte buffer at a specific location.
Takeout() : take out a 64-bit value from the 32-byte buffer from a specific
location.
INACTIVE
MODULES
ACTIVE MODULES
WAKING
SOURCES
IDLE
External and
internal interrupts
(WDT and timer
interrupts)
ADC NOISE
REDUCTION
MODE
External and
internal interrupts
(WDT and timer
interrupts)
POWER DOWN
POWER SAVE
WDT interrupt,
timer interrupts and
This code shows how watchdog timer can be used to awake the MCU
from sleep mode.
This code was tested for power down mode on Arduino UNO, Idle
mode can be tested using this code by replacing the parameter
SLEEP_MODE_PWR_DOWN with SLEEP_MODE_IDLE in the function call
set_sleep_mode() .
The MCU enters the sleep mode after the function call do_sleep() .
In this code MCU remains in sleep for 4 seconds and after that, WDT
interrupt wakes up the MCU.
Since the reset mode is not used in this example, after waking up, the
CURRENT MEASUREMENT
USING MULTIMETER
CURRENT CONSUMPTIONS
Current consumptions in both boards are different as no boards can be perfectly
identical. If output resistance seen by the supply is different for both boards then the
currents consumed will be different also. This resistance difference may occur due to
minor differences between the structure of various components on the Arduino board.
MODE
CURRENT CONSUMPTION IN
BOARD A
CURRENT CONSUMPTION IN
BOARD B
NORMAL
38-39mA
54-55mA
POWER DOWN
33-34mA
47-48mA
IDLE
35-36mA
49-50mA
*NORMAL MODE +
RF MODULE
CONNECTED
50-52mA
67-69mA
CURRENT CONSUMPTION
WHEN WDT IS ACTIVATED IN SLEEP MODE
For measuring current in this mode, I programmed the board B with the below
code.
Link to code : https://
drive.google.com/file/d/0BzUNiVUsn1W2SUJMalNkc2dpVmM/edit?usp=sharing
Now since this program has WDT timer set for 4 seconds, MCU does not remain
in the sleep mode always, it wakes up after every 4 seconds.
Thus current consumption is different during the sleep mode and the wakeup
mode, thus we dont see a constant reading on the multimeter, instead we
observe a periodic reading.
Current remains low for 4 seconds and then there is a sudden rise for a very little
WDTdue
ACTIVATED
MODE
DURING SLEEP
WHILE AWAKE
time
to wakeup.
CURRENT
CONSUMED
Readings
I got
:
47-48mA
54-55mA
CURRENT MEASUREMENT
WITH RF MODULE CONNECTED
Current was measured by connecting RF modules on both boards shown
in figure on page 14.
Since RF modules draw a current of 11-13mA in active mode, current
consumption for board B was observed around 67-70mA.
For debugging purpose, serial monitor was used which showed whether
response was received by the other RF module or not.
Two or three times there was some errors obtained in serial monitor.
error 1 : other RF module received wrong response ( screenshot1)
error 2 : communication failed, response time out (screenshot2 )
Link to the code used in this example : https://
drive.google.com/file/d/0BzUNiVUsn1W2d01QWnVTaWYyZ2s/edit?usp=sha
ring
DISCUSSION
Current measured in different sleep modes on Arduino boards was quite high
in the range of 30-60mA because Arduino boards have a lot more components
other than pins and atmega MCU like voltage regulators, IC for serial
communication with PC, RX/TX leds, etc. which consumes a good amount of
power resulting in high current consumption.
Normally the current consumption in MCUs (atmega or Attiny) is in the range
of 1-5mA in active modes and RF modules consume 11-12mA in active mode
so together they will consume around 10-15mA if measured by powering VCC
and GND of the MCU.
Two RF modules takes a time range of around 20-50 milliseconds for one
complete cycle of data communication, so if we set the IDLE mode in MCU
using WDT timer for 100 milliseconds, then this might reduce the power
consumption by 40-50% which means almost doubling the battery life.
THANK YOU