Author Topic: $50 code and Hextronik servo's , robot is limping to the left...  (Read 4025 times)

0 Members and 1 Guest are viewing this topic.

Offline MrWizardTopic starter

  • Full Member
  • ***
  • Posts: 117
  • Helpful? 0
  • My cylon friend told me a killing joke......
Hi,

My Robot is doing fine , after some little problems with the light sensors it is working ok. Making it look more away from each other and little bit downwards.

Now comes the question:  I used an Atmega168-20 instead of the Atmega8. I modified the makefile, mcu and timerx8 etc like in the tutorial and given in this Forum.

As the robot is turned on, it runs like a circle to the left, circle is about 150cm wide. The left servo (looking from behind) is turning slower then  the right one.

Somebody has this problem also ?

I measured the Light sensors and the resistor difference is about 100 ohms between the left and the right sensor in the same lighted situation. Can this make a speed difference ?

Must compensate this in the code ? If so what is the best option ?


 

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: $50 code and Hextronik servo's , robot is limping to the left...
« Reply #1 on: April 04, 2009, 04:27:21 PM »
well im not really much of a programmer but you could try measuring the photoresistor resistance values in light and dark with a multimeter and if they are different change some values in the code.

or if the servos are at fault try editing some servo values for the left servo to see if you can make it turn slightly faster. but as i said im no programming expert.
Howdy

Offline Razor Concepts

  • Supreme Robot
  • *****
  • Posts: 1,856
  • Helpful? 53
    • RazorConcepts
Re: $50 code and Hextronik servo's , robot is limping to the left...
« Reply #2 on: April 04, 2009, 04:40:22 PM »
In the code you can make an auto-calibrate method that adjusts the values depending on the calibration at the beginning of the program.

Offline MrWizardTopic starter

  • Full Member
  • ***
  • Posts: 117
  • Helpful? 0
  • My cylon friend told me a killing joke......
Re: $50 code and Hextronik servo's , robot is limping to the left...
« Reply #3 on: April 05, 2009, 12:34:35 AM »
In the code you can make an auto-calibrate method that adjusts the values depending on the calibration at the beginning of the program.

Enlight me a little ..please


Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: $50 code and Hextronik servo's , robot is limping to the left...
« Reply #4 on: April 05, 2009, 01:13:23 AM »
i dont know much about it but it pretty much takes a sensor reading when you start the bot up and says 'this is what it is like when both are even' so even if one registers 1k in dark and the other 5k in dark it will even them out by setting a higher or lower value for them.
Howdy

Offline MrWizardTopic starter

  • Full Member
  • ***
  • Posts: 117
  • Helpful? 0
  • My cylon friend told me a killing joke......
Re: $50 code and Hextronik servo's , robot is limping to the left...
« Reply #5 on: April 05, 2009, 02:07:46 AM »
i dont know much about it but it pretty much takes a sensor reading when you start the bot up and says 'this is what it is like when both are even' so even if one registers 1k in dark and the other 5k in dark it will even them out by setting a higher or lower value for them.

Thanks for thinking with me.
I compensated the limping in the code by increasing the servo_right to 48 instead of 44 and he is going straight and smooth now.(Photovore file, then save rebuilt all & Program the Atmel)

But I am still interested in the auto-calibrate option ! Razor Concepts

Ok.

 8) Time to make the line following with IR..

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: $50 code and Hextronik servo's , robot is limping to the left...
« Reply #6 on: April 05, 2009, 02:14:27 AM »
why line following with ir? why not line follower and object avoider? but you dont need to use ir to make a line follower you can just bend the photo sensors down so they face the floor. and do we get any pics/vids for our help eh???
Howdy

Offline MrWizardTopic starter

  • Full Member
  • ***
  • Posts: 117
  • Helpful? 0
  • My cylon friend told me a killing joke......
Re: $50 code and Hextronik servo's , robot is limping to the left...
« Reply #7 on: April 05, 2009, 03:19:45 AM »
why line following with ir? why not line follower and object avoider? but you dont need to use ir to make a line follower you can just bend the photo sensors down so they face the floor. and do we get any pics/vids for our help eh???

Yes, you are correct about line-following with the light resistors, it does work also I have noticed some line following on my wooden floor. (See Pics).
I had to adjust the angle of the light resistors otherwise it became blinded by the light, I used fairly sensitive (big) light resistors. Down and away from each other for better detection.
Remember I use Lego for fast prototyping because my son have tons of Lego.


But I now just want to experiment with IR  to see dectection is better. Later I will probebly combine some sensors.

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: $50 code and Hextronik servo's , robot is limping to the left...
« Reply #8 on: April 05, 2009, 03:26:01 AM »
ahh yes, i must think about getting into lego sometime, i used to use it all the time to make working guns now it just sits there, like all 7kgs of it. too bad i dont have much technics tho.
Howdy

 


Get Your Ad Here