I have decided to make a line follower robot which sound easier but viewing the arena of it.makes me confuse how to make control over robot for deciding the right path as give here in end.http://www.grafest2011.com/pdf/line.pdf

Simpler approach would be to use IR Emitter/Detector sensors. Sensors on the rear of the robot would ensure that bot is on the track and sensors on the front side would be used for junction detection.

How pls explain and i am using parallax quick start board Spin code...

As shown in the image below, IR Sensors can be placed next to robot corners (depends on the width of the line it has to follow). Such configuration lets robot understand if the line followed is dead under it. If robot drifts to one side or the other, sensor will be triggered sending signal to the MCU to adjust bot's position so that none of the sensors are detecting white (black) line. So, for robot steering You can use rear end sensors.

Now, for junction detection You can use front end sensors, because when junction is approached, right of left sensor will be triggered letting MCU know that there is right/left turn available.

There are many different implementations of IR Detector/Emitter pairs for line following, this is just a very rough explanation of basic principle.

I want a solution regarding repeating loop and testing condition( spin code)for eg:-If defied inputs are matched with statement the outputs goes high in one loop but repeating this loop 2nd time the uC should again check this condition and work...

Till now i have used CASE, IF else statement and waitpeq....they only work once after this they 2nd check condition .

please reply and figure out the problem.

NOTE:- I am testing the inputs to uC with DIP not using sensors just for now and all outputs are seen on paralax QS board LED.

I still don't follow You as first You asked something related to if statements and now You are talking about PID.

OK, please forget of PID at the movement.

I was testing my code in uC board itself.....I was trying to write code with dozen of case or if else statement and waitpeq ( wait for pin too go as per logic it pause the up i.e. Cog) these all are syntax.

The code was working well on first attempt mean 1st loop ..after continuing second loop it forget the condition and run on previous value.

I am using DIP switch which are taking position of LDR sensors just for testing code.!!So, problem is that the code should check the condition in every loop and process the output not blind outputs.

code was working well on first attempt mean 1st loop ..after continuing second loop it forget the condition and run on previous value.

Here we go, now I get it To be perfectly honest, I have never done anything related to Spin code or Parallax, so probably I'll be of little use for You. If You run same code in a loop and code is set to read value of the pin every time it is executed, then it should do that. By any chance You could post Your code here, or at least the part of code which implements the loop and pin reading.

Logged

"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

please help me to design a good mechanical structure which don't exceed 24cm x 24cm.

Robot in the image above is 240mm x 240mm, so it fits the specs. It is driven by 4 motors (servos), so some feedback is necessary to make sure all 4 wheels keep the same speed. What sort of drive do You have in mind yourself? Is it the one You've sketched?

« Last Edit: October 27, 2011, 02:00:16 AM by newInRobotics »

Logged

"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Robot in the image above is 240mm x 240mm, so it fits the specs. It is driven by 4 motors (servos), so some feedback is necessary to make sure all 4 wheels keep the same speed. What sort of drive do You have in mind yourself? Is it the one You've sketched?

The sketch is drawn by me the robot size can be small also but not exceed.....

Hi again,Because i was not aware of the instuction some people on another forum have figure out the syntax error.

Quote

I don't know weight of Your bot and radius of it's wheels, hence i cannot know.

Bot SpecificationsDimensions and FabricationAutonomous bot -1. Only one autonomous bots per team are allowed. A team may enter with only 1 autonomous bot.2. The top view of each autonomous bot must fit within a square of dimensions 240mm x 240mm (l x b).3. Bot must be started individually by only 1 on board switch. However, a team may have a separate on board switch for restart.4. The autonomous bot(s) must be stable and must stand on its own at the beginning of the run when put in the starting point. Bots not fulfilling this criterion will be disqualified.5. During the run, the autonomous bot can expand itself provided it does not damage the arena in anyway. However, it is not allowed to leave anything behind or make any marks while traversing the arena. Bot found damaging the arena will be immediately disqualified. The final decision is at the discretion of the organizers.6. The autonomous bot should not separate or split into two or more units. All bot/units which are touching each other or are in the starting point will be considered as one bot.The teams are allowed to use ready-made micro-controller boards/ready-made sensor kits. However they are not allowed to use lego kits or any similar assemblies.

I have give the link of motor in above post it has images of motor and tire and battery also.the size of Tyre is 6cm diameter and .5cm width...

then torque of the motor should be around 0.53kgf.cm. Motors You've chosen are rated @ 1.9kgf.cm - so they are all right. Motor seller states that motors are rated @ 375rpm, this gives You 4.23km/h (3.85feet/s), if that is satisfactory - You are good to go.

Logged

"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

The 375 RPM is of no load so it will decrease.....if the speed create a problem we will add some series resistance, etc.... please give me a good design so that today i can ordered it in my local market ( they don't make robot only boxes of etc uses)

One more question how should i charge my lithium battery, i have not buy any ready made charger for it.

According to details you've provided - each motor has almost 4x more torque than it's required; You are going to use 2x motors, hence ~8x more torque than it's required. Knowing that - RPM will not fall much.

if the speed create a problem we will add some series resistance, etc....

Bad idea, as voltage drop created by resistor will not only decrease RPM, it will also reduce torque. As You'll be using microcontroller (unless You hope to build beam bot line follower which can make decisions on every junction (which would be really difficult to achieve (if possible at all))), it's a good idea to drive motors using PWM; that way You can controll motor speed without sacrificing torque.

please give me a good design so that today i can ordered it in my local market ( they don't make robot only boxes of etc uses)

Completing design stage is homework that has to be done by You and only You, because You and only You know exactly what You want to achieve and implement. There are many line follower designs online to assist You. Start by using Your best friend Google Also, good design takes long time to develop, hence do not expect other people to do it for You. When You have primary design ready, specific question can be asked in forum in order to perfect it.

One more question how should i charge my lithium battery, i have not buy any ready made charger for it.

You cannot charge Li-Ion battery without a proper charger. Charging Li-Ion without setting something on fire is art in its own right. Charging single Li-Ion cell is relatively difficult, when it comes to battery packs, one has to employ witchcraft So, either You have to buy ready made charger, or be really competent in electronics to build one Yourself.

Logged

"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

You cannot charge Li-Ion battery without a proper charger. Charging Li-Ion without setting something on fire is art in its own right. Charging single Li-Ion cell is relatively difficult, when it comes to battery packs, one has to employ witchcraft Grin So, either You have to buy ready made charger, or be really competent in electronics to build one Yourself.

Mate, You have to do decent amount of research before You start any project. Previously You've posted a link to battery pack You are willing to use, go to that page and You will find compatible chargers.

Logged

"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W