Thursday, February 6, 2014

Quadcopter: Learning Phase


I have decided to build a Quadcopter. Of course i will just be interested in the core electronics part of it and very less in the mechanical part of it so don't expect my project to be a help. Although i do plan to add a lot of features to it to make it more useful when it is in the air. In the mean time i purchased some components that will be rehired to build it and decided to write what learnt from them.

I got the following component 
1)MPU6050 Gyroscope and accelerometer. It is a nifty device and very cheap. 
2)RF 433Mhz transmitter receiver pair.

Interfaced a MPU6050 sensor to an Arduino over I2C and obtained its raw readings. These readings were then used to change frequency of blinking of 4 LEDs dependent on boards alignment. This was done as a prototype to test a stabilization algorithm for a quadcopter. Further an ultrasonic distance sensor was connected to the board and the distance on the sensor was used to further vary LED blink pattern. The ultrasonic sensor adds another dimension to the stabilization algorithm by given the altitude of the quadcopter. This project was essential in understanding various key skills like I2C protocol, sensor fusion algorithms, and sensor interfacing. 
For the Rf module i also used two ATtiny25's and decided to do a micro project.

A RF link was setup between two ATtiny25 micro-controllers, using a 433 MHz transmitter receiver pair. The micro-controllers were programmed, using an AVR Dragon via ISP,  they were programmed so that a switch on the transmitting side turned on and off the LED at receiving end. This project was done to understand radio communication and further develop into a universal remote for home appliances, with the help of relays. 

Arduino Wireless Remote

Designed a system to control various home appliances using a mobile phone. Using Arduino, an InfraRed LED and pulse width modulation.  My first hands on on Arduino and electronics.
Reversed engineered the RC-5 commands from the IR remotes of various home appliances, using a logic analyzer. I then decoded them by hand and programmed them on the Arduino and connected to the IR LED and was able to control devices using my laptop. Later I connected the Arduino with a bluetooth module and was able to control the devices using my mobile phone by sending signals over bluetooth to the Arduino via my mobile phone. The experiment helped me to understand Bluetooth and Arduino platforms.

Raspberry Pi part 2

Wireless Printing:
The second most amazing use i found for the Pi was that it could act as a printer host and i could convert my USB printer (Brother HL 2130) into a wireless printer hence allowing anyone on the local network to print to it. The server i installed for this was the CUPS server. Setting up the cups server and adding my printer by editing their configuration file. This allows my Pi to not only allow wireless printing within the local network but also open the possibility to print from anywhere on the globe because my Pi is connected to the internet.

Security System:
After i found  a logitech Webcam lying around the house i decided to connect it to my Pi and see what i could do with it. I installed a motion server that allowed me not only to access the camera but also to monitor the live feed from a server webpage. This allowed me to store on the Pi snaps taken from the camera after every 1 sec. Also the motion server has a built in motion detector (duh!) that allows the software to run a specific app for every time it detects motion. My plan is to setup the Camera such that it faces the outside of my house and get motion activity on my phone via the internet. Of course this requires a lot of setting up and scripting that should be easy.

Raspberry Pi. Part 1

Raspberry Pi.
My experiments with Raspberry Pi have included a lot of different projects and here i will document them and explain them.

Running headless, SSH and avahi:
I have always preferred to run the Pi headless as it makes it more convenient for me to access everything from my Macbook Air and not having to manage a cluster of keyboard and screen in my room.
The RPi connects directly to my router via the LAN port. Of course if you have a basic SSH setup you would realise remembering the Pi's local IP every time you want to log on can be a pain especially if your local router resets the addresses every time it resets(which is far too often due to power cuts ) ,hence the first service i setup on it was the avahi daemon. Of course this was my first time working with command line Linux so i came across a lot of new concepts including apt-get and Git. Reading about them and the various RPi tutorials on the Internet got me setting avahi daemon.



Of course after setting up avahi accessing the pi becomes a a breeze. In-fact you can connect it to the internet and power and leave it on the corner of your table and forget about it.