Results 1 to 3 of 3

Thread: my first micromouse

  1. #1
    Senior Member Android
    Join Date
    Apr 2008

    Default my first micromouse

    hello friends.....

    i have just completed my first micromouse...... it wasn't great but OK..... i got to learn a great deal from this experience.....

    here i am giving a very detailed walkthrough of my project journey. its not a report or overview so those who r in a hurry may skip it.... those who have read my earlier posts know that i love to elaborate things upto their roots... so just don't get angry because this one is also not an exception.......

    this illustration is not very useful for those who r searching for something they can copy.... there is nothing so good here .... but yes , it will help u to know what to do and what not to do during ur project....

    before i started this project i was complete beginner in this field.... i had only done some small circuit projects (during my training) , programming 8085 (in college), and one minor project (stepper motor control using parallel port).....

    things started when i decided that i am going to make a micromouse for my major project...... i started to collect material from net and thats when i first came across this great site..... i downloaded many videos of micromouse and was amazed to see their precision and speed. i spend many nights dreaming of those machines and that i am going to make one such cute little mouse.........

    i divided the project into 4 parts

    1) motor and its driver circuit
    2) brain (microcontroller)
    3) mechanical structure
    4) sensors

    1) motor and driver circuit

    my search yielded me only one resilt for choosing motors- the STEPPER... as i have already used them i give no second thought before i rushed to the shop to buy two steppers.... there is only one type of stepper available here.... i think that they extract it from floppy drives because there were hundreds of steppers lying there, identical, each with identical head attached to its shaft and identical attachements for mounting......

    the motor didn't had even a letter written on it... from my earlier experience with those motors i knew they are 12v, 5-wire unipolar, 75 ohm per coil, 1.8 degree per step.......

    you can count this as my first mistake... i should have choosen moter with higher current rating.... but these were the only steppers available here so i have no other option....

    i also choose the same circuit i had used earlier... optocouplers (4n35) followed by the uln2803..... this time i also attached 8 leds before the optocouplers to facilitate me in testing..... they proved out to be really helpful.....

    2) microcontroller

    i knew i am good at programming so it will not take more than 2 days to learn any language... still i decided to use assembly code because till that time i didn't knew how we can convert c code into hex.... what i have done in lab include writing a program in assembly, converting it into hex code using a chart and then feeding them into 8085 using a hex keypad.... i have an idea that their r softwares that can do this thing for u , but did't knew which... also as this was my first time with any microcontroller ever, i was standing in front of an ocean full of different microcontrollers , programming kits and softwares and it was becoming difficult for me to choose one out of them......

    so i decided to check the availability of the resources near me..... i confirmed with my college and found out that there is only one programmer kit available which can be used with any atmega uc...... my incharge suggested me of using atmega16..... that was the first mistake i made(excluding above one)..... atmega16 proved out to be too complex for a beginner like me... it took me about a week to understand its 100 page datasheet.... things like fuse bits, jtag, usart, sleep mode, timers etc proved out to be complete alien to me.... to start with, i wrote a simple flashing led program in assembly, checked it on avr studio and took it to my incharge for burning..... but the kit was not with him... he told me that we can easily make the programmer kit at home. it only need few wires and resistances.... so i came back home and started searching for the circuit and the software combination... i tried ponyprog, atmel avr isp, image craft iccv with all the circuits i could find on net..... nothing worked. then i tried avrdude.... for the first time i got my uc programmed... i write it, read it verified it.... all good until i quit avrdude. at the end it asked "fuse bits u want to keep them?" i pushed no.... next time when i tried to program it, it said no device found.... i bought another atmega16.... it didn't even burned 1 time.... i was using the same circuit still the program said no device found..... i spend 2 weeks trying to program it, but no sucess...

    finally i decided to switch to lower families. i choose 89c51.... the programmer kit was not available in our college so i have to get it programmed from the outside. the name of the institute was TISHITU. Mr tarun, its owner is a very helping person and they allowed us to use the programmer kit for rs 10 per burn...... programming was not a problem and was completed easily..... the problem came in circuit. i got the minimum working circuit and get it verified with him. still no results... after 1 week of trials i figured out that problem was in crystal.... i was using the same 4Mhz crystal i had bought for atmega16.... it was on the lower limit for 89c51. so i replaced it with 12Mhz.... the situation was better but still not good. when i put the input- output program in it , it was working great but with flashing led program it was not moving to second instruction. i concluded that it is stucking on the first instruction and not miving to next line.... the problem as far as i could see is in crystal.. may be its not generating good signal... i replaced it with 11.0592Mhz (value i always found on net).... still no result. i changed the values of result. after few days of struggling i decided to check the uc on his development board. to my surprise it was working great.... now i knew problem is in my circuit.... i checked the components of his development board.... there was no difference between his circuit and mine..... the only difference was that there was a huge capacitor on it..... BINGO.... i asked tarun sir and he confirmed that a huge capacitor is must to stop ripples.... finally i got my uc work for me.... after that it never gave any problem to me.....

    3) mechanical structure

    this was the most difficult part for me. i am from electronics stream. the only experience for me in this field was the household repairing works...... so i thought of keeping it as easy as possible..... i made a design ---- two steppers places back to back, wheels mounted on them, both hanging on the cardboard, a castor wheel in front.....

    i got the castor from college. my incharge suggested me to keep the free wheel at the back and make the two wheels with motor the front...there was some mechanical advantage... no problem.... i did it..... i got the wheels from market. they were nor very good but OK... not very circular.... you could easily sense the non uniformity if u roll them on ground.... but i thought it won't create much problem.....

    the next problem which i faced was how to mount the tyres on motor.... as i already told, the motors came with a head on its shaft... the head was bigger than the tyre hole.... i thought of 3 solutions.... 1) use a drilling machine to widen the holes 2)using lathe to grind the extra head 3) somehow remove the head..... as i dont know how to use lathe option 2 scaled out... widening the hole was a destructive idea so i postponed it and put my attention to 3rd idea.... i tried to pull the head out using "plass" (that's what we call it in local language) .... but it was very tight... i tried to struck it with hammer but the whole shaft moved a little outside.... i hammered it inside again..... now there was no other option but to open the motor.... i had a spare motor which my friend had given me so i didn't hesitated before taking any step... i opened the screws and detached the coil . the shft with permanent magnet and the head was in my hand.... it used the plass to hold the shaft and give 2-3 hard strokes with hammer on the head and after 1 minute it was in my hand..... i reassembled the motor and tested it... it was fine... i did the same with other motors also...then i mounted the wheels, mounted this assembly on a cardboard, attached the castor wheel and my assembly was ready by evening....

    i was happy with the assembly, but it had one big drawback which i came to know in the end and which stopped my mouse from becoming a great project.... lets keep it a suspense for now...

    4) sensors

    i knew sensors r the most important part of micromouse... my search yielded 4 results--- led+ldr, ir-led+ ir transistor, led+photodiode, ultrasonic sensors......... ultrasonic sensors and photodiode were not available, so i bought 3 pairs of ir-Tx-Rx..... i got a circuit from net.... it was written to check the glow of ir led using webcam... i had no webcam so i tried mobile camera.. it didn' show any glow.... i made the circuit and checked it...... no results..... i was not sure whether the clear transparent led-like structure is actually emitting ir light or not.... there was no way i could find the answer so i decided to use led+ldr....

    i made various circuits available on net but nothing worked for my case..... the switching between light and dark was not satisfactorily.... i thought the problem is in biasing of transistor so i needed to use a switch packed in ic form.... the solution was already in front of my eyes but i could figure it out after 2 days.... 4n35 did the magic... i was already using it as a switch so why i can't use it here...... i tested it.results were better. it goes completelty off in dark but the output in light was not very good... the testing led which i was using to monitor the output was glowing very dim....i put the light source directly above the ldr. now led glow perfectly.... so the problem was the output is weak..... the idea to solve the problem was quick. use an amplifier at the output.... think of amplifier and transistor came to ny mind... but i was already exhausted in using transistor in it active region so this time also i start seraching for some ic.... by luck this time also the solution was in front of my eyes and this time i figured it out on few minutes only.... the solution was ULN2803.... its datasheet says its an array of darlington pair.... hmmmmm darlington pair..... the word seems familiar.... i took out my boylsted and eureka its a high gain amplifier..... i attached it at the output of 4n35 and my sensor was working great... i inserted a variable resistor on series with the ldr to adjust for ambient light..... the final result was very very excellent. the sensor could detevt the presence of thermocole (my wall material) from 10cms........

    combining the four parts:

    every part was working fine... so i started to assemble them.... after a few small troubles they were together...... my mouse was standing in its wheels with the circuitry mounted over it..... i was still using the power supply i made ( transformer+7805/12) to drive it.... as soon as i started the supply hoping the mouse to take its first step i was strucked by a new problem.... the motor was slipping... cause - too much weight..... solution - use more voltage, reduce weight........i tried using 7824 also but no change.... the problem was also posted by me on this site and i got quick replies..... i found out 2 problems in my power supply.... i was using small transformer and 78xx (L series) can only give about 250mA..... the problem was solved by using batteries.....i used 8 ni-cd batteries, put them in series, with same ground i give supply from 4 batteries to circuitry and 8 battery supply to motor.... SO my mouse moved on its wheels for the first time...... i was happy.... now the only thing i had to do is to callibrate it for 90degree turns and forward step equal to cell size....

    the dimensions of my mouse were 10cm in width and 12 cm in length(HINT:the big problem starts here)....i made a 4X4 maze using thermocole, each cell 16cmX16cm, so that i will have a margin of 2cm both sides..... i used parallel port to find out the different values.... i got 15*4 steps for 90degree turn and 2*4 steps for each cm in forward direction.... thats too slow but i don't mind.... it was working fine with a step delay of 20ms but to be safe i kept it 30ms...... the mouse can start from any corner and can reach and stop at the diagonally opposite corner, that was my plan.... program was correct and working fine... yhen started my testing of final run... i put it at one corner, it detected the left wall moved one step front, another step front, detected way on the left, started to turn, turn was almost 90degree, but after the turn it was having a lateral shift in one direction????????
    i got quickly that this is going to be big problem... and i was correct... a little inspection proved my mechanical skills totally useless... i paid no attention to the term centre of rotation before that day, no one even reminded me, and as a result a day prior to my final submission, i was having a mouse with centre of rotation at its front side...... a big problem....

    well, what is an engineer who can't face problem ..... the only thing which came in my mind was to increase the size of the cell.... i made it 25cmX25cm..... now i have a margin of about 5cm... it was already morning, so i had no time for the final test..... i took out my batteries from charger, put them in mouse, packed it and went to college..... my final run was not very good.... in the first try, it started moved a few steps and jammed... led was glowing and program was stuck, it was not moving to next instruction.... i stopped it... kept it again at start.... second run was better... it detected left wall, moved front, turned left , front, front.... ( o o o oh, my 90degree was not actually 90 degree or may be it missed one step)... i had made no provision for run time correction of direction so my mouse banged in the wall..... thats the end of my robot's life as micromouse.... later i presented it as a simple obstracle detector robot........ still everyone praised me for my effort and because of the fact that it was the only project from the entire class which was made by student himself... i saw other projects, each of them had one thing in comman, a red transparent plastic board... and the examiner knew where they have got them built..... so the end's well....

    today, after 4 days , when i am writing this blog, i am no more a college student, i have to join some stupid software company for the sake of my living in december..... so i have 5 months for myself..... hmmmmm i am smelling another robot.... what it will be????? lets find out, but till then keep guessing.......


  2. #2
    Super Moderator T-1000 docel's Avatar
    Join Date
    Sep 2005
    Blog Entries


    :!: Congrats Ashish!!!
    Good show there :lol:
    And thanks for sharing your experience with all of us !!!
    ^Anything is possible..
    after YOU prove it!!

  3. #3
    Senior Member Android
    Join Date
    Apr 2008


    Excellent story sir
    it is enough to provide required momentum to amateurs in robotics. It proves everything is possible only if you believe in it.
    Thanks and congratulation

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts