go away spammer

Author Topic: algorithm for line tracer  (Read 3991 times)

0 Members and 1 Guest are viewing this topic.

Offline superchikuTopic starter

  • Supreme Robot
  • *****
  • Posts: 952
  • Helpful? 5
  • cooll
algorithm for line tracer
« on: March 11, 2008, 01:23:26 PM »
i need some efficient algorithm for a line tracer tracing white lines using 3 sensors

as iam using the normal if value<threshold do this else do that kinda algorithm , it is not that efficient coz as the battery dries up the sensors get less voltage and sometimes my adc can give reading below threshold even if it is moving on a white line coz the reference voltage is decreasing so i need some kind of effiient algorithms to implement my line tracing function by handling such situations

plzz specify the algorithm/....
JAYDEEP ...

IT AND ROBOTICS ENGINEER

"IN THE END IT DOESNT EVEN MATTER"

Offline HDL_CinC_Dragon

  • Supreme Robot
  • *****
  • Posts: 1,261
  • Helpful? 5
Re: algorithm for line tracer
« Reply #1 on: March 11, 2008, 09:17:35 PM »
thats really the most efficient way to do it if im not mistaken. What you need to do is get yourself a battery pack with a lot of Ah(Amp Hours).
I read in another one of your posts that your only using a few NiCd cells, am I right?

Not sure how much you know about batteries so Ill start with the basics:
One AA battery has 1.5v and x amount of mAh(milliamp hours).
If you put 2 AA batteries in series with each other, you get 3v and x mAh
If you put 2 AA batteries in parallel with each other, you get 1.5v and 2x mAh
see what I mean?
for a better example, I have a 12 volt battery that supplies 18Ah or 18 amps for an hour(18000mAh). That means, If im running a 12 volt circuit and that circuit is using a constant 18 amps, the battery will only hold up for one hour until it needs to be recharged. So if I had a second battery just like it and I put the 2 in series, I would get 24 volts and 18Ah. If I put the two in parallel, I would get 12 volts and 36Ah which means that now if I was running this 12v, 36Ah battery setup, I could run that 12v, 18A circuit for 2 hours instead of one because I doubled up on my Amp Hourage.

Hopefully you didnt already know that so I didnt just waste all this typing and I was actually helpful for once.

basically the more batteries you put in series, the more voltage you get. The more batteries you put in parallel, the more Ah you get
« Last Edit: March 11, 2008, 09:18:54 PM by HDL_CinC_Dragon »
United States Marine Corps
Infantry
Returns to society: 2014JAN11

Offline superchikuTopic starter

  • Supreme Robot
  • *****
  • Posts: 952
  • Helpful? 5
  • cooll
Re: algorithm for line tracer
« Reply #2 on: March 12, 2008, 03:40:03 AM »
oops i already knew abt that although i already resolved that one by using battery eliminator but i have got a new problem to rectify :(

the problems just keep on coming plzz can u say what is happening
i hope my bot would start working it has god a strange probelm in pwm ,

when it is tested with only the mcu in the breadboard , i get exactly same values of pwm but when used in the bot one is lower than the other i dont know why this is happening can u help
JAYDEEP ...

IT AND ROBOTICS ENGINEER

"IN THE END IT DOESNT EVEN MATTER"

Offline HDL_CinC_Dragon

  • Supreme Robot
  • *****
  • Posts: 1,261
  • Helpful? 5
Re: algorithm for line tracer
« Reply #3 on: March 12, 2008, 02:22:08 PM »
Whats changing? the frequency?
United States Marine Corps
Infantry
Returns to society: 2014JAN11

Offline superchikuTopic starter

  • Supreme Robot
  • *****
  • Posts: 952
  • Helpful? 5
  • cooll
Re: algorithm for line tracer
« Reply #4 on: March 12, 2008, 02:45:29 PM »
no no frequency is changing i have adjusted the pwm prescaler for the motors , just the behaviour changes
JAYDEEP ...

IT AND ROBOTICS ENGINEER

"IN THE END IT DOESNT EVEN MATTER"

 


Get Your Ad Here

data_list