Wednesday, November 26, 2008

CORRECTOMUNDO

Ok....the reason why we haven't been writing for a long time is there's been nothing to write about....which means we've been working on the same thing since november 6 without ne success...but for today

now what the thing is...i aint gonna tell....coz the idea itself is so novel...itll be a shame risking revealing it for the sake of a show -off blog entry

just tht me and ankush have been working on the code for two weeks...and were partially successful and dhruv was completely successful with his hardware...

now today with ankush in solan and dhruv (our man in Amsterdam) forgetting his lenses...it was up to me to try my luck at the poker table (read Keil U-vision) ..now ive been at many WPT final tables....but this one was like playingPhil Hellmuth heads up...and i, well finally managed to get the better of him.

Special thanks here to Deepak and G Sid for helping modify a section of the code...which i always knew was wrong but never had the guts to change....

Now for the Chassis.......which of course shall be built using every trick learnt in VM Physics

Thursday, November 6, 2008

Second time with the ADC

Seems like someone's been on a shopping spree. After the half yearlies we were greeted in the lab with new ADCs, LCDs and of course wire strippers.

Saturday
Replaced the ADC in the previously made circuit. To display the reading, dropped the (disastrous) idea of using LEDs and opted for the LCD. I ended up with a circuit which reminded me of spaghetti. On plugging the µC we noticed it did not have a potential drop of 5V across the Vcc and Gnd but something of the order of 4.8V. Sir suggested we had fried the µC (yet again) and as we had no spares..... had to spend the rest of the day listening to 7th graders asking me "bhaiya yeah kya hai?" (pointing to the spaghetti).


Monday
Ankush and Vishesh worked on the code and finaly managed to make the compiler admit and display "0 Errors ; 0 Warnings".

Teusday
Ankush promplty brought 3 8052s neatly arranged in a round box (and exclaimed with gleaming eyes "teen aur ghar par pade hain"). Even after replacing the µC, the 4.8v potential drop persisted so we tried using a new 7085 voltage regulator IC. This worked like a breeze and the circuit began to work in expected ways. With two hours of school left, the LCD finaly showed us some readings and they changed according to the IR sensor! Now that was a true "tell your grandchildrens" moment. We finally got some indication that we were on the right track. Though in subsequent attempts the LCD displayed nothing at all (i wondered wether i had knocked some wire out, while exclaiming "Booya!"). Using the multimeter me and ankush checked each and every connection while vishesh worked on the code. Found a suspicious connection, but as school was almost over , we packed up and called it a day.

Wednesday
After wracking our brains over what could have gone wrong with the circuit (and sawing a 8052 in half), finally mustered up the will to resolder the "suspicious" connection and it worked!
I had bought my camera so i busied myself in making a video while the dudes worked on displaying the output of all the three sensors on the LCD (right-left-center).
This too worked superbly. All in all was a super day for us.



Wednesday, October 8, 2008

I didn't know about it, seriously!

check the following link. the guys at IIT Bombay have put up the inventory of about everything we need:
http://techfest.org/competitions/techtronics/micromouse/Tutorial%20Micromouse.zip

zzzz!

Wednesday, October 1, 2008

Important considerations

Some important factors/ features we need to consider, as pointed out by sir while we design the mouse are as following:

  • the voltage drop across the collector and the emitter in a BC 547 is 0.6 V, hence we can consider AC197 - germanium tranistor which has a voltage drop of 0.2 V.
  • Light sensor can be given 3.7 V directly from the Li-ion battery as compared to 5V it is currently getting though 7805 IC.
  • As LCD is only required for debugging and not every time we can put a manual switch to control its On/Off state.
and we need to search around for suitable battery pack and its charger, or we can make one with Nokia battery - BL-5F or BL-5C. but then we would need a custom way to charge the battery pack.

Tuesday, September 30, 2008

LCD

well...it started with a series of phone calls at 9:00pm and some rumours tht sir was going to bring the lcd the next day

we all thought that programming an lcd was the most difficult thing in the world (after making a micromouse and convincing monica bellucci to go out on a date with you (for the other guys not for me))....so we all turned up expecting a hard days work...sat around with the mazidi....figured out what rs, rw en etc meant (though we still do not know what strobing a pin means)...nebody who has an idea may kindly leave a comment

pleasantly surprised when malhotra finished the hardware in about 5 minutes( or was it 6) and then tried to be modest about it.....the programming part was quite easy...especially since we have got the hang of C

now for the adc....lets wait and watch

Saturday, September 27, 2008

MOTORS AND BATTERY

what about the torque of the motor....and how did u get the dimensions...if theres ne mail tht i dont have pls send it to me

also the 2000mah battery pack means tht we need about 3-4 battery packs so we can run the mouse around for enuf time

and about the adc....dont worry its gonna work....we know the software is correct..so is the hardware

First time with the ADC

Finally laid our hands on an ADC chip. After looking up the datasheet on the net, I tucked myself in a cosy corner of the lab and got to work. The next one and an half hour was spent soldering wires and fixing the microcontroller to the sensors and ADC. The idea was to use one ADC for the three light sensors. The three IR Leds always remained ON and a transistor (base connected to the µC) in each of the sensors was used to start the phototransistors in a cyclic fashion (to get the readings of the three sensors one after another).
Three Leds were used to tell us the range of the output given by the ADC (for the light sensor whose phototransistor had been activated).
After the cricuit was done, Ankush and Vishesh got down to write the program (in C).
Apart from the fact that they were using C to control the µC for the first time (i think), they had major difficulties due to the peculiar behaviour of our lab's computer. Now whenever this computer senses that some important work is being done on it, and the user has forgotten to do the Ctrl+S routine it for some reason realises that to shutdown at that very moment will be a good idea. After a few tries they had to retreat to another PC (Win 98) and do their coding using Turbo C++. (and transfer it to the other computer to burn it onto the µC).

The circuit did not work in the first try (like always). We figured there could be many reasons- ADC wasn't working, wiring was loose, some problem with the code, we hadn't connected the ADC properly or weren't using it in the right way etc.

One confusion was regarding the "Vref/2" pin in the ADC. On thursday when we had tested the light sensors, they were giving an output range of 0V to 5V (for this range the datasheet required the Vref to be connected to ground). But on checking again, we found to our surprise that the output had now changed to 0V to 1.2V (and this required the "Vref/2" pin to be connected to +o.7V). We used a potentiometer to serve the purpose but the circuit was in no mood to work....

To close in on the victim, we connected 8 visible Led's to the ADC's output (hoping to observe some pattern) but all the Led's glowed continously (which meant the ADC was giving a value of 255 at all times). This confirmed our suspicions about the ADC - it wasn't working! and (as sir pointed out), the way we had tried to connect the three sensors to the ADC wasn't exactly correct.

With 30 minutes of school left (and a fried ADC) the only thing we could do was to see if the code was working, some tweaks here and there and we discerned that it was working perfectly (good work guys!).

All in all a SHIT day for me, hoping the singapore GP chirps me up... (go Kimi!)

Friday, September 26, 2008

Tracking battery and motors..

Sir mailed the pics of steppers motors and battery pack. The size of the motor as mentioned is 4.8cm x 4.2cm x 4.2cm (L x B x H when shaft is horizontal)....i think that should fit in the cell as when two motors when combined back to back will be 4.8 = 9.6 ~ 10 cm and the breadth of the cell is 18 cms.

The battery pack is Li-ion and power is 2000 mAh






These are the motors.

(the motors do look sturdy)

and today we have been working on ADC with Dhruv displaying his great hardware skill (yet again); I must say the wiring was very complex and doing it on the bread board makes it harder.
Though it didn't work successfully but I do expect good results once we change the ADC chip.

Thursday, September 25, 2008

MY first post

1. i cant believe we just changed the url from 35c2435.blogspot
2. i cant believe that im actually coming to school tomorrow (my first time this year tht im coming for 5 days in a week)
3. and pls i need atleast 1K of ram.....find a dip 40 with the max possible ram

The Light Sensors

For the light sensors we initially decided on an IR Led and TSOP pair. My brother had worked with them for a line following robot so i called him up and he told me that IR Led's are very "moody" so to make them work we have to use TSOP 1738 (38 kHz) and a 555 oscillator circuit to generate the 38kHz wave.
The circuit was taken from the first link we got on Google searching "TSOP 1738". (can be seen on the right)

Next day in school it turned out that our sir had already worked with TSOP's (for a car alarm or something) and suggested we use two 555 oscillators. This, due to the fact that the TSOP 1738 doesn't detect a 38Khz signal but infact a "change" in it.
So the first 555 oscillator was to generate the 38Khz wave and the other to make a much bigger wave (as in wavelength).

Sir's schematic

This circuit obviously had a lot of chunks we did not need so the final circuit was divided into a receiver and a transmitter. (having fried an IC in the past week we kept things simple and tested the circuit by a putting a LED across the transistor)
.

We began making the light sensor on the bread board with vigor and after countless tries and misses the sensor finally started working at a decent range but
1) the circuit was no good in measuring distance (to make sure the mouse moved straight) it just told us wether there was a wall or not.
2) gave a discontinuous output (a pulse) which we realized posed a major problem
To check the value from the sensor we could no longer simply compare the value and check, the pulse could be read both as a 1 and a 0 by the microcontroller. To resolve this, we found two ways out- using interrupts in the microcontroller (of which the IC we were using only had 2) or using a circuit to convert the pulse into a continous signal.

Things looked good till Ankush had the marvelous idea of mailing one of our seniors, (who also had tried making the micromouse) Mohit Taneja. In his reply he suggested we use an IR Led and Phototransistor pair and an ADC (analog to digital converter) to sense distance. (He suggested quite a lot of stuff but maybe thats another post..).

We unanimously decided to junk the old circuit (who dare not heed the advice of mohit taneja?) and replace it with a new one which looks like the one on the right (we just replaced the 22oohm resistor with a variable one).

After checking the circuit on the bread board (and boy does she work smoothly) we have now made three of these light sensors and mounted them on an acrylic wheel.

Today, as Ankush mentions in his post, we tested them and tried to calibrate their readings.
We were successful in doing so with two sensors but the third one was showing an altogether different range of output values so i guess we'll use that one as the front sensor and the other two on the right and left.


The Readings (which Ankush hoped so much that I'll post)
The first column is for the distance from the light sensor (in cms). Notice how he jotted them down on the first thing he could lay his hands on.

AT89C51AC3 dropped

As an analog-to-digital converter (ADC) was required for the light+distance sensors we were looking for a 8051 variation which had on chip ADC and at least 1kb of RAM. We (myself and vishesh) finally chose AT89C51Ac3 for the purpose but we (myself and Dhruv; ie Vishesh still doesn't know about it) finally decided on the good old 8051 DIP 40 as it quite easier and we already have a programmer kit in the robotics lab.
tomorrow the class is going out for some CSIR workshop hence we can sit back in the lab and get down with interfacing ADC with 8051 ie if sir can get the chip tomorrow...
The light sensors were sucessfully mounted and tested today. i do hope Dhruv will post the "observation table" of the sensors' readings.

...and i like that name - gunsngears

Wednesday, September 24, 2008

First Post

Finally decided on the URL.
Made the blog in the english period... math's next so keeping the first post short