Micro controllers

Matrix representation of an ellipse

Its nice to know how we can represent an ellipse and then an ellipsoid in the form of matrix. Such matrix represenation will help us develop various concepts of normal distribution while trying to fit an ellipse around datapoints.

 

I am placing this link here for reference.

 http://www.cs.mtu.edu/~shene/COURSES/cs3621/NOTES/geometry/simple.html

Principal Component Analysis

I was just looking for some information on ISOMAP . I had then hit by the terms PCA and MDA a multiple times that i decided to give it a good glance . Though i am looking for somehting on machine learning , currently i am into a work with one of my professors who wants to implement AI into some kind of pattern recognition in flow cytometry.

So I have started looking at these topics and i am really amazed at the statistics involved in pattern recognition. So i just give a link here to a tutorial that provides a very clear explanation about PCA method of reduction of high dimentional data.

THE LINK
http://csnet.otago.ac.nz/cosc453/student_tutorials/principal_components.pdf

Hope it amuses some of you too

-Madan

Micromouse contest – on the way!!!!

This was on my mailbox and i just felt the need to keep my readers aware of it.

Welcome to MindSpark 07! MindSpark is the annual technical festival of College of Engineering Pune. MindSpark will be conducted this year on 5th, 6th and 7th October. We have a host of events lined up as part of MindSpark including Robotics, Paper Presentation, Business Plan contest, programming contests, Contraptions and Circuit design competitions. COEP is proud to associate with IITBombay Techfest in their Nexus initiative.

The Robotics event has three competitions Micromouse (the standard autonomous robot competition), Dogfight (Manual robots slug it out against each other in a pick-and-place competition) and IITB Techfest Nexus. The preliminary round for Techfest Vertigo will be held at COEP under Nexus, the winner gaining a direct entry at the IITB Techfest in January.

The prize money for Micromouse and Dogfight is a cool total of Rs.70,000 (20k + 15k for each event). Accomodation facilities will also be provided on the college campus with a nominal fee of Rs.150 per participant for three days. Online registrations for the competitions has started. Register yourself as early as possible.

See you at MindSpark!

for more details –
www.mind-spark.org
www.robotics.mind-spark.org

Contact – Vineet 09823743030 (Co-ordinator, Robotics)

My friend pratap is one of the co-ordinators of this event, and he is a very friendly person so i take the liberty of posting his contact too.Guys have fun participating!!!

Pratap Tokekar
Co-ordinator, Events
MindSpark 07
COEP
09423234455

Php to Excel

This is one sweet code to export your variables and pass it on to a downloadable excel file. As of now i am working on an resume maintenance project and that needs this aspect. I googled for the simplest and efficient code.

I use a wamp localhost and faced warnings with all classes and codes that use the fopen(xls://FILENAME) format. This particular code was so cool enough to not read and open any existing file but just provide a  new file that you’ll name at runtime and download.

Its  more like writing the file on flyby!!

If you were one among those who googled for excel to php/php to excel/php write excel files/write excel files in php  and came here, trust me its a standalone simple code below. Just copy paste and it will start working.

<?php
$line1=”ID\tProduct\tColor\tSales\t”;
$line2=”1\tPrinter\tGrey\t13\t”;
$line3=”2\tCD\tBlue\t15\t”;
$line4=”3\tDVD\tRed\t7\t”;
$line5=”4\tMonitor\tGreen\t4\t”;
$line6=”5\tTelephone\tBlack\t2\t”;
$data=”$line1\n$line2\n$line3\n$line4\n$line5\n$line6\n”;

header(“Content-type: application/x-msdownload”);
header(“Content-Disposition: attachment; filename=extraction.xls”);
header(“Pragma: no-cache”);
header(“Expires: 0”);
print “$header\n$data”;

?>

The code is pretty self explanatory with /t for column break and \n for line break.

Cya
Madan

Heard of Multiplexing?? what about Charlieplexing!

Well as you know multiplexing is a method to communicate more data with a lesser existing channel or time. Just to sound similar because of a analogy char…plexin is called so.

 

Charlieplexing is method to drive more number of LED’s from very less number of pins. Now there are loads of pages talking about this method on the internet. I found most of the very vague. I have tried to assimilate them together here on my page. So here it goes,

 

It is a method of driving many number of Led’s with lesser number of drive pins. One simple analogy being, if you wanted to drive 6 Leds in some sequence how many microcontroller pins would you want?You would say 6. Why just you!! most would say 6.

 

These days we have 40 Pin microcontrollers which makes the value of each I/O pin really less. But first let me explain you the context. in small series of microcontrllers which would just have 5 pins, it is impossible to drive 6 Led’s with our concept of using a single pin for one LED.

 

Well i can hear you say that you can use a multiplexer!! a 3 to 7 Mux or something?? well i would say you are not wrong, charplieplexing provides an amazing method when in goes to huge numbers.

Concept:

Say we have 3 pins A,B,C of a microcontrollers. We can connect 6 LED’s in a combination such that,

 

When A=5v , B=0v we’l have LED1 glowing and all other LED’s off
When A=0v, B=5v we’l have LED2 glowing and all other LED’s off

 

Pair LED1 and LED2 are a complimentary pair. Similarly we can have 3 such pairs and control all 6 led’s form 3 pins.

 

I am very sure you are not clear about the concept.. Well you must read this to understand the concept completely. Link goes to instructables

Swimming Snake Robot !!


Here and there at times i post few videos from you tube. even if they are my own videos i do host them to youtube and embed here in wp. Well just browsing i found this video of a swimming snake robot. I have seen many beam based land robots that twist and turn around to move. This one is a masterpiece. It swims in the water with elegance and absolutely gentle . The video doesnt give a complete design details of the bot, but the author does explain and show few things on the videos. I just mean to give my blog readers some new input of the way robotics is proceeding. Have a look.

 

 

Madan

Share Internet connection in a network – Part 2

By now you must have completed the intial setup as described in part 1
A) On the host computer

1) Goto : Start > Settings > Control pannel

control pannel

2) Click on ‘Network Connections’
3) Right Click ‘Local Are Connection’ and click on properties.

prop.gif

4) In the ‘General Tab’ Select from ‘This connection uses the following items’
Select ‘Internet Protocol TCP/IP’ and click properties.

pr.gif

5) In the properties window fill the following ip configurations and click ok

ip.gif

B) On the Client Computer

1) Repeat steps 1 to 5
2) In stpe 5 change the ip address to : 192.168.0.2
3) Change the Default gateway to : 192.168.0.1

By doing this your client computer will connect to the internet with the default gateway of 192.168.0.1 which is your host computer.

Share Internet connection in a network – Part 1

STEPS TO SHARE INTERNET CONNECTION OVER A LAN

Do you want to connect two computers over a LAN using a ethernet cable and use a single internet connection on both computers? Then this topic is just right for you. You can connect computers and laptops – one to one conncetion using crossover cables. Crossover cables can be built with parallel ports and serial ports. But here i discuss the simple method using the ethernet cable.

Requirements:

1) Both computers must have a ethernet card and the socket.

First decide on which computer is going to act as the host computer and which computer will be the client.

Procedure To setup LAN with internet connection facility:

Setup host Computer:

Goto start>programs>accessories>communication>Network setup wizard wizard
1)Next
2)Next
3)Specify This computer connects directly to the Internet.

ics_serverwiz01a1.gif

4)If the computer has more than one network connection, this screen appears. Specify Let me choose the connections to my network and click Next.

ics_serverwiz03a.gif

5)Select the connection to the ICS server and click Next.

ics_serverwiz04a.gif


6)
Enter a computer description and computer name. The description appears in My Network Places or Network Neighborhood on other networked computers. The computer name must be unique on the network. For maximum compatibility with all versions of Windows, use 1-12 alphanumeric characters, with no blanks.

ics_serverwiz05a.gif

7)Enter a workgroup name, which should be the same on all of the networked computers. Once again, use 1-12 alphanumeric characters, with no blanks. Be default, the Wizard uses the name MSHOME. If your network uses a different name, enter it here.

ics_serverwiz06a.gif

8)The Wizard displays the settings that you’ve made. Scroll down the list to see all of them. To change a setting, click Back. To accept the settings, click Next. To stop running the Wizard, click Cancel.

ics_serverwiz07a.gif

9) The Wizard then configures the computer’s network settings. The process may appear to stop for a time, but let it continue to completion.

ics_clientwiz08a.gif

10) If the Wizard is running on a Windows XP computer, this screen appears. Specify Just finish the wizard and click Next.

ics_clientwiz09a.gif


11)
When the configuration is complete, the Wizard’s Completion screen appears. Click Finish to exit
.

ics_clientwiz10a.gif

12) Restart the computer when prompted

ics_serverwiz141.gif

Set the client computer:

Goto start>programs>accessories>communication>Network setup wizard wizard

1)Specify This computer connects to the Internet through another computer (the ICS server), and click Next.

ics_serverwiz01a.gif

2)If the computer has more than one network connection, this screen appears. Specify Let me choose the connections to my network and click Next.

ics_serverwiz03a.gif

3)Select the connection to the ICS server and click Next.

ics_serverwiz04a.gif


4)
Enter a computer description and computer name. The description appears in My Network Places or Network Neighborhood on other networked computers. The computer name must be unique on the network. For maximum compatibility with all versions of Windows, use 1-12 alphanumeric characters, with no blanks.

ics_serverwiz05a.gif

5)Enter a workgroup name, which should be the same on all of the networked computers. Once again, use 1-12 alphanumeric characters, with no blanks. Be default, the Wizard uses the name MSHOME. If your network uses a different name, enter it here.

ics_serverwiz06a.gif

6)The Wizard displays the settings that you’ve made. Scroll down the list to see all of them. To change a setting, click Back. To accept the settings, click Next. To stop running the Wizard, click Cancel.

ics_serverwiz07a.gif

7) The Wizard then configures the computer’s network settings. The process may appear to stop for a time, but let it continue to completion.

ics_clientwiz08a.gif

8) If the Wizard is running on a Windows XP computer, this screen appears. Specify Just finish the wizard and click Next.

ics_clientwiz09a.gif


9)
When the configuration is complete, the Wizard’s Completion screen appears. Click Finish to exit.

ics_clientwiz10a.gif

10) Restart the computer when prompted

ics_serverwiz141.gif

After both computers are restarted: Test the connection :

To test if the connection is established , goto run>command
Then type : Ping 192.168.09.2 from the host computer. it must return values and results and not say time out!!!.

This test will just test the connectivity of both computers . The final step is yet to be followed where we will share our internet connection..If you have completed till this step you will be able to share datas over the LAN connection.

Reverse engineering

Internet provides so many cool ideas and projects with PIC microcontrollers and other Uc’s . Unlike in this blog , most examples will contain pre-compiles ASM or machine codes along with the example. All you will be able to do is just burn it into your Uc and use. The logic thoug explained will not be clear in the program.

What reverse engineering am i talking about?
If you didn’t know , All latest microcontrollers have their code written in ‘C’ Language. Softwares called compilers convert them into machine code and ASM.

Now i am looking for a product that can convert the ASM/machine codes given in those examples to understandable ‘C’ code. Thus making  understanding and upgradation easier.Hope to see one such product soon online!!