Sunday, March 26, 2017

Autostart python program at boot time in raspberry pi

 

  1.  Save your program which has to be execute  in boot time at   home/pi 
  2. Go to terminal box and enter the command 
     
    sudo nano /etc/rc.local
     
  3. Enter the program  name using following command. Be sure to leave the line exit 0 at the end,
     
    sudo python /home/pi/your_program_name.py 
     
    For example  
    
    https://32414320wji53mwwch1u68ce-wpengine.netdna-ssl.com/wp-content/uploads/2014/11/test1.png
  4.   To save and exit by pressing Ctrl+X, " Y", ENTER
  5.  Test it out. In the terminal type           sudo reboot     press"Enter"
    
 

Tuesday, March 7, 2017

Mobile Sensors

Sensor Name

Application

Accelerator or Accelerometer

Used to detect the  tilting motion and orientation

E-compass

e- compass is usually based on a magnetometer sensor which provides mobile phones with a simple orientation in relation to the Earth's magnetic field

Proximity Sensor

Used to disable accidental touch events

(lights off when mobile  bring near to ear)

Ambient Light Sensor

Adjusts the brightness of your display according to the external environment.

Fingerprint

--

Geomagnetic Sensor

Magnetometer which measure the strength and direction of magnetic fields

Hall Sensor

·      Hall effect sensors are used for proximity switching, positioning, speed detection, and current sensing applications.

·      Hall effect sensor is used to detect flip covers and to automatically switch the screen on or off depending on whether the cover is opened or closed, respectively.

Gyroscope

Rate of rotation around the x,y and z axis

Ambient Light Sensor

An ambient light sensor is mounted in mobile phones to automatically measure the amount of light in the environment and adjust screen brightness accordingly

Barometer

A barometer in a mobile phone helps the GPS chip get a faster lock by delivering altitude data

Gesture Sensor

Gesture sensor is used to detect and recognize meaningful gestures from the parts of the human body such as hands, arms, face, and head. Most of the gesture sensors are mainly based on image sensor.

HRM Sensor

Heart Rate Monitor

RGB Ambient Light Sensor

Used as backlighting controls in any number of LCD display applications from consumer electronics to automotive, and by automatically adjusting display brightness, they can conserve battery life

Geo-magnetic Sensor

Usually based on a sensor called magnetometer provides mobile phones with a simple orientation in relation to the Earth's magnetic field

UV Sensor

Ultraviolet sensor to remind people when UV is at dangerous level and warn them about sunburn

Backside Illumination Sensor

A back-illuminated sensor, also known as backside illumination (BSI or BI) sensor, is a type of digital image sensor that uses a novel arrangement of the imaging elements to increase the amount of light captured and thereby improve low-light performance

Digital Compass

(magnetometer sensor)

To check orientation in relation to the Earth's magnetic field

 

 

Saturday, March 4, 2017

Raspberry Pi First Program on LED Blink using Python

 1.Install Python Module RPi.GPIO
   sudo apt-get install python-dev python-rpi.gpio

2. Open Terminal (Command Prompt)
3. Launch IDLE IDE by typing in terminal
        sudo idle

4.  After the IDLE launches, open a new window by FILE>OPEN or Ctrl+N
 5. Type the code below in the window 

LED Config (Source:https://electrosome.com)

import time
import RPi.GPIO as GPIO       ## Import GPIO library
GPIO.setmode(GPIO.BOARD)      ## Use board pin numbering
GPIO.setup(11, GPIO.OUT)      ## Setup GPIO Pin 11 to OUT
while True:
 GPIO.output(11,True)  ## Turn on Led
 time.sleep(1)         ## Wait for one second
 GPIO.output(11,False) ## Turn off Led
 time.sleep(1)         ## Wait for one second
 
6. Save the code by FILE>SAVE or Ctrl+S 
7. Run your code RUN>RUN or Ctrl+F5 
8. The Led will start blinking now.

Saturday, March 5, 2016

ASK Modulation Simulation in Multisim


 What is ASK modulation?
Amplitude shift keying refer to a type of amplitude modulation in which the amplitude of carrier sinusoidal is modified according to binary input data.  

Design of ASK modulation  
Transistor is need to be operate as a switch hence choose saturation values from data sheet 
i.e VCE(sat) = 200mV VBE(on) = 700mV   hFE = β = 50, Ic=10mA and assuming that Ic=IE.
  
  
Calculation of RE
Calculation of RB
Vpeak = Vcc=VCE + IERE
 5V= 200m + 10m RE   
 RE= R2=480 Ω
VB=IBRB + VBE + IERE
10= (10m /50) RB + 700m + 10m X 480 
RB = R2 = 22.5KΩ

               



  • Like Amplitude modulation, an ASK is also linear and sensitive to atmospheric noise, distortions,propagation conditions on different routes in PSTN, etc.
  • The ASK technique is also commonly used to transmit digital data over optical fiber. For LED transmitters, binary 1 is represented by a short pulse of light and binary 0 by the absence of light.
  • In case of Laser transmitters normally have a fixed "bias" current that causes the device to emit a low light level. This low level represents binary 0, while a higher-amplitude light wave represents binary 1.
  • The ASK operates as a switch, using the presence of a carrier wave as a binary one and its absence/-ve to indicate a binary zero. This type of modulation is called on-off keying (OOK), and is used at radio frequencies to transmit Morse code
Design of Demodulation
The demodulator circuit works as a low pass filter, it allows low frequency signal source 500Hz and filter out carrier frequency 5KHz.
Hence assume Xc=R and C=0.1uF  corner frequency fc=500Hz  

  


 

 
                       Original message signals is recovered form demodulator by using opamp.