Monday, July 4, 2011

ChaserDesigner - A professional approach for fancy light design

This project is published in July 2011 th issue of Electronics For You (EFY) magazine (Page no: 94 to 98) titled:"Microcontroller-Based Light Chaser". Thanks to EFY for publishing this. You can read full article from EFYmagonline or purchase one.

ChaserDesigner is a useful project for fancy light designer professionals  as well as enthusiast who want to make their own LED patterns while decorating home during festivals. It's hardware part is simple one which uses 8051(or any variants of 8051) and a handy software part based on Qt. In the GUI, you need to specify how the pattern appear on LEDs(or connected higher loads) and it will automatically generate the source code for 8051(in assembly language). Only you need to do is that, burn the program in to the micro and put it on the circuit. Then the LEDs start to glow in the designed pattern. This is very handy and there are some tools provided to easily make your own patterns. The software works in Linux, Windows, or MAC and hardware components chosen are almost ubiquitous. In case, if any component found unavailable, please comment, I will try to recommend any alternative if any. I have put source code,circuit diagram and all other associated diagrams free for download.

1. contents.zip - Article before published, circuit diagram, images etc.
http://www.4shared.com/file/MolWxWP_/content.html

2. chaserdesigner_src.zip - Software source code.
http://www.4shared.com/file/zY9fz6LF/chaserDesigner_src.html


3.chaserdesigner1.0.zip - Windows XP executable file
http://www.4shared.com/file/3WmVxoaF/ChaserDesiner10.html


4.videos.zip - videos describing, how to operate the software and hardware.
http://www.4shared.com/file/EagoltHS/videos.html


Note: Since it is published by EFY,  it is better to read this article in EFY to get more pretty article with PCB layout also.

Saturday, June 11, 2011

One day PyBrain came to power....

Recently, I went straight away to PyBrain and found it is useful to AI researchers and enthusiasts. Python rocks once again. PyBrain is a modular library for python. As far as PyBrain developers is concerned, it is Python Based Reinforcement Learning, Artificial Intelligence and Neural Network Library. PyBrain is opensource and it is licensed under BSD software license.
PyBrain simulates neural networks inside our brain in a computer. Once you created the neural networks, you need to train it for a particular task. Sometimes training of more than thousand times is required to properly get done it's job. Sometimes, training will be frustrating especially when you didn't give proper degree of freedom to the neural network structure. However, I found pyBrain interesting.
It is good idea to start with pyBrain documentation. In the beginning of the tutorial, they provide a simple example of training for an X-OR gate. But it will take a lot of training steps to work properly. But for the same neural network structure, if you are trying to simulate an AND gate or an OR gate, you probably get everything done.

Wednesday, March 9, 2011

Story of a 'spinning lady'


Did you notice the figure above? To see the spinning lady, click this link and return back. Is it a spinning lady? In which direction, you feel the lady is spinning? clockwise or counter-clockwise? One can feel the spinning of the lady in either clockwise or counterclockwise. But once you feel lady spin in one direction, your brain continues in that state and insist to be in that state. If you feel that the lady is spinning in clockwise, it is too difficult to see the motion in counter-clockwise direction. But sometimes our brain switches from one state to other state automatically, but changing the state of feeling of brain is difficult to achieve manually.
This is a beautiful eye illusion. Do you know how that beautiful lady, cheated your brains?
Answer is, the lady didn't cheat you, but the cheater is her shadow. Actually, the image shows the shadow of a spinning lady. In this, a 'shadow' plays in important role in cheating you. The pure shadow of an image will not provide the entire information about an object to the brain. From a shadow, we can't predict whether the front side or backside of the object we are viewing. If you didn't understand what I just said, please go through an example.
Look at the picture below.
The middle picture is photo-shot of the spinning lady. Concentrate on the picture and tell what you are viewing- the frontside or backside? It may be both. Look at the left picture. It is the modified version of middle one by adding eyes in her face. Now you feel that you are viewing the front side of the lady. At the same time, you see the backside of the lady in the right picture, but that also a modified version of middle picture with marking of a hair bud. This is important to be noted. While you are viewing the middle picture only, your brain fall in to the mess of finding whether the shadow is of the front side or backside. Then your brain 'randomly' choose one possibility (not actually). But in other pictures, your brain has powerful proof that indicates the state of the lady's body.
Now the problem associated with the spin direction of the lady is not vague. If your brain 'assumed' a side of the lady's body you are viewing, this will determine which direction, she is spinning.

Monday, February 14, 2011

Make yourself a Qt Hacker

A presentation of Qt for beginners was held in Jyothi Engineering College for ISTE students. It was taken by me and I have just put the presentation and the associated files here and think it may be useful for those people who have attended. For any doubts, feel free to ask me.
Download files here

Saturday, November 27, 2010

Just bought an Arduino, What's next?


This article briefly explain what is to be done just after purchasing an Arduino board. Even though the prerequisites of Arduino is less compared to other development boards, I think this article will be useful because Arduino is being popular among beginners. This article deals with the latest version of Arduino at the time of writing - it is Arduino UNO.
Setting up drivers
Connect Arduino to your computer via USB cable. It will power up from USB power. Now start Arduino IDE. If you have not Arduino IDE download from here. No need to install the software. Just extract using your favourite decompressing utility (my favourite is 7zip) and run the executable named 'Arduino'. Now you have to set up your IDE to work with your Arduino UNO. First select your hardware from Tools -> Board -> Arduino UNO (or your exact hardware name. If it is not listed, try to download the latest version). Next, select your serial port from Tools -> Serial Port. Selecting serial port is in different way different OS.
Linux
If the 'Serial Port' menu is not active, probably, your device is not connected properly. Try to reconnect. If more than one serial ports are shown in the menu, we need to find out which is the correct one. To do that, disconnect your arduino first. Then you probably need to restart the IDE. Then look at the 'Serial Port' menu and note down the listed COM ports. Then reconnect your device and track the newcomer. This is the easy way. Select it.
One of the problem I suffered while playing with arduino in my Ubuntu 10.04 LTS was that, the compilation of the program was a failure. It was a dependancy problem. So what I did is that, installed Arduino IDE as described here. But it was an older version and my device UNO is not listed in it. Then downloaded the newer version from the downloads page. That was really a tricky step!
MS Windows
In Windows, just after connecting your device to the PC, a device driver wizard appears and try to find the appropriate device driver for the device. It will take a while and at the end of the fight, it fails to find an appropriate driver. Close the wizard and go to 'Device Manger' (Either via Control Panel or by right clicking 'My Computer' then 'Manage'). Then you can find Aduino UNO as the unknown device. Right click on that and choose the option to manually install the driver. Then locate the directory where you have installed Arduino IDE. Then the system install the appropriate driver and now you can see your device on the list named 'Ports' in the Device Manger. In parenthesis, there will be the curresponding COM port number (eg: COM 4) . Then choose that COM port in the Arduino IDE.
Starting with 'Hello World'
The commonly accepted 'Hello World' in embedded devices is LED blinking. There is an example in the IDE itself. Open the file from File -> Examples -> Basics -> Blink
Look at the program. For an average C programmer, the program seems self-explanatory. To compile your program, choose Sketch -> verify/compile. Then to upload the executable to your device, choose,File -> upload to I/O board. If everything you have done is correct, you will get your Arduino programmed and starts working just after burning the program using the USB power. Disconnect it from USB and use in your standalone applications.
Read more..
Arduino Lanugage reference
Arduino Playground

Sunday, November 14, 2010

SMS email alert in mobile phone

One of the major disadvantage while handling e-mail services is that we need to check mails by intervals. Most people checks their account more than once a day. Some people start up their computer to only check the e-mail and finds that 'No e-mail today' and continue their frustrating work after a couple of hours. This type of services are 'pull-email' type services. Conversely, there's a 'push e-mail' service which will send the mail to your mobile devices. But this service is not available in all mobile phones or services. So here is a method which can be used virtually in any mobile phone. This service will alert you whenever you get a new mail with some information about the sender. The alert is done by sending an SMS. Unfortunately, this method can only be applied in INDIA. Sometimes, all mails receiving in your mailbox including spam may not be important to alert. So by setting up your gmail, you can select which type of mails should be alerted.
I assume you have a gmail account. If not, either you can make a new gmail account or a similar approach will work on your other accounts also- explore it. Moreover, you need to have an account in way2sms.com . Register on way2sms (The service of way2sms is currently limited to India only). You will get your own free email address in way2sms domain.
Setup in gmail account
Go Settings->Filters
Click 'Create a new filter'. Then a box will appear which shows that which type of mails are to be forwarded to way2sms.com. For example, if you type user@gmail.com in the 'from line-box', all mails from user@gmail.com will be filtered. There are several other options also. You can test your filter by clicking 'Test Search'.
Click 'Next Step' button. Then a new box will appear. Check 'Forward it to' option and enter your way2sms email address.
Click 'Create Filter'.
Now onwards, all your filtered mails will be sent to your way2sms email.
Set up in way2sms account
Log in to your way2sms account.
Click 'Mail Alerts' link in the top right corner of the page. Here you can activate mail alerts for 14 days. After 14days, it will be automatically deactivated. So it is needed to activate the alerts in every two weeks. You can deactivate it at any time.
Done. Now you will get an alert SMS whenever you receive a new e-mail.

Sunday, November 7, 2010

Set up Toshiba L650 laptops after ubuntu installation

This article explains how to set up device drivers after installing Ubuntu in Toshiba laptops. Most probably Ubuntu will not support LAN, WiFi, Bluetooth and in some systems, anomaly in working of fan, battery are reported. Some of my problems like LAN setup, WiFi and Bluetooth have overridden and my battery is still showing some problems. I hope these instructions will be helpful for Toshiba Laptop users. Note that this article is a "how I did" type article rather than a "how to".
Some models of Toshiba Satellite are preloaded with Windows and some are not. In pre-installed models, try to make the system dual boot. There are a lot of tutorials for that and in Ubuntu, this is pretty easy compared to other distros. Anyway, I assume you have Toshiba system with a fresh Ubuntu installed. I used Ubuntu 10.04 LTS on by Toshiba L650-i5310.
Setting up Ethernet
My ethernet card was from Atheros Communications. A driver for Atheros is available from http://linuxwireless.org/download/compat-wireless-2.6 . Download and unzip the file. Then in terminal, cd into that folder. Then type the following code:
scripts/driver-select atheros
make
sudo make install

Then reboot the system.
Setting up Wireless
My Wireless LAN card was from Broadcom Corporation. The driver is readily available from ubuntu repository.
sudo apt-get install bcmwl-kernel-source
echo wl | sudo tee -a /etc/modules

Reboot the system.
Setting up Bluetooth
In bluetooth, I did nothing in Ubuntu and I installed a bluetooth driver from Toshiba in Windows 7. After that incident, my Ubuntu also start detecting bluetooth adapter and don't know how this happened.