Society of Robots - Robot Forum

Software => Software => Topic started by: Becky on March 09, 2009, 12:26:16 PM

Title: Servo mod - gears won't set with hold_servo.hex
Post by: Becky on March 09, 2009, 12:26:16 PM
Me again with another easy question - there's a helpful point in it for anyone who makes me go from  :'( to  ;D

I have finished my circuit and I have made a connection with AVRStudio so ready to go... I have a servo plugged in and I upload the hold_servo.hex file to flash and... ...nothing happens.  Gears do not move.

What am I doing wrong?  :-\
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: superchiku on March 09, 2009, 12:28:35 PM
WAT??????????
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: Becky on March 09, 2009, 12:42:59 PM
Lol sorry I just read that back... I am trying to modify my servos and I have one plugged into my board.  Instructions say upload the hex file and the gears will move until the servo is at 0 or something like that... but nothing happens.  The files uploads correctly as there is no error... but why doesn't it work?
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: pomprocker on March 09, 2009, 12:58:10 PM
Did you take the servo apart yet?

Can you tell us where the servo is plugged in?
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: superchiku on March 09, 2009, 12:59:13 PM
cant understand..wat are u trying to do...? centre the servo or move the servo ...which mcu are u using...
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: pomprocker on March 09, 2009, 01:03:26 PM
She is trying to modify her servos for continuous rotation. I assume following the $50 robot tutorial.
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: superchiku on March 09, 2009, 01:03:59 PM
did u modify the servos right...which pin are u using.. ?  and she..hwo do u know...omg is she the 1st female here
?
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: Becky on March 09, 2009, 01:04:41 PM
Did you take the servo apart yet?

Can you tell us where the servo is plugged in?

Hello - yes I have it in the first set of three pins beneath the capacitor and regulator.  I have taken out the screw and removed the gears.
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: superchiku on March 09, 2009, 01:05:54 PM
lol tell the pin name...and number...
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: pomprocker on March 09, 2009, 01:06:11 PM
Which pin exactly?
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: Becky on March 09, 2009, 01:06:37 PM
cant understand..wat are u trying to do...? centre the servo or move the servo ...which mcu are u using...

Hell I have the ATmega168 variety - I am trying to centre them I believe
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: Becky on March 09, 2009, 01:08:24 PM
Which pin exactly?

Right OK... I am on the row that connects to pin 27 on microcontroller :)
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: superchiku on March 09, 2009, 01:08:41 PM
the .hex was for atmega8 dont know if it will work in atmega168...even if it does i reckon u used the wrong pin...
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: Becky on March 09, 2009, 01:09:36 PM
did u modify the servos right...which pin are u using.. ?  and she..hwo do u know...omg is she the 1st female here
?

lol I am sure there are loads of girls on here
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: Becky on March 09, 2009, 01:10:43 PM
the .hex was for atmega8 dont know if it will work in atmega168...even if it does i reckon u used the wrong pin...

Right :( OK then... so does anybody have a code for the 168?  Let me double check my pins...
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: Becky on March 09, 2009, 01:12:39 PM
http://www.societyofrobots.com/step_by_step_robot_step3C.shtml (http://www.societyofrobots.com/step_by_step_robot_step3C.shtml)
I am using the same pins as this bloke ^  ;)
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: superchiku on March 09, 2009, 01:13:27 PM
u used the wrong pin i guess u used one of the adc's pin...and may be the admin never used that one in hex
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: pomprocker on March 09, 2009, 01:14:21 PM
The code will work fine the pins are the same for mega8, 168, 328. You just have to make sure you're running it at 1MHz.
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: superchiku on March 09, 2009, 01:15:49 PM
check oter pins..and the link had the whole $50 tutorial...which pin am i supposed to read amon that
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: superchiku on March 09, 2009, 01:18:11 PM
i dont think she would have modded the mcu frequency....may be some other prob..
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: Becky on March 09, 2009, 01:22:06 PM
u used the wrong pin i guess u used one of the adc's pin...and may be the admin never used that one in hex

OK then... where do I plug it in to ?
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: superchiku on March 09, 2009, 01:22:40 PM
which pin did the admin mention in the tutorial??
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: superchiku on March 09, 2009, 01:26:00 PM
u laterlly inverted it...u shoul have connected eitherto pin 2 or pin 3 that is pd0 or pd1.... instead u connected it to the adc pin
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: Becky on March 09, 2009, 01:26:36 PM
The code will work fine the pins are the same for mega8, 168, 328. You just have to make sure you're running it at 1MHz.

Are you talking about the ISP frequency?  I have that set to 125.0 kHz ... is that wrong?
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: pomprocker on March 09, 2009, 01:27:17 PM
Yes the pins on the right of the divot are adc pins. The divot on the mcu should be closest to the battery connection side.
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: Becky on March 09, 2009, 01:29:38 PM
which pin did the admin mention in the tutorial??

From the tutorial:
So the first step would be to open up the servo.
1) First make sure the servohorn is removed from the output shaft. The servohorn attaches to the main output gear (the biggest gear), so removing it helps keep the gears from all falling out when you open the servo up. Also, use a microcontroller to command the servo to rotate to 0 degrees, the point between the maximum and minimum angle the servo can rotate to. You may also do this step by hand, although it might not be as exact.

Note, if you are making The $50 Robot (or at least using the ATmega8 microcontroller), download this .hex file and upload it to your ATmega8. You dont need to compile anything, as I already did that for you. This program will tell the microcontroller to send a signal at 1.5ms, the signal your servos need to hold at the zero position.


it goes on but there is no mention of where to plug it ... ...
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: pomprocker on March 09, 2009, 01:29:54 PM
No, not ISP frequency. I am talking about the speed at which your MCU is running. But like superchiku said, don't worry about it, as I doub't you have fiddled with it. ATmega168's run at 1MHz by default same as ATmega8's

The code will work fine the pins are the same for mega8, 168, 328. You just have to make sure you're running it at 1MHz.

Are you talking about the ISP frequency?  I have that set to 125.0 kHz ... is that wrong?

Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: Becky on March 09, 2009, 01:31:09 PM
No, not ISP frequency. I am talking about the speed at which your MCU is running. But like superchiku said, don't worry about it, as I doub't you have fiddled with it. ATmega168's run at 1MHz by default same as ATmega8's

The code will work fine the pins are the same for mega8, 168, 328. You just have to make sure you're running it at 1MHz.

Are you talking about the ISP frequency?  I have that set to 125.0 kHz ... is that wrong?


Riteo  8)
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: superchiku on March 09, 2009, 01:35:17 PM
check my answer... above u got ursolution there i guess..
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: Becky on March 09, 2009, 01:37:58 PM
Yes the pins on the right of the divot are adc pins. The divot on the mcu should be closest to the battery connection side.


I was having a mad moment then... I am plugged in to pin 2 RXD PD0
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: superchiku on March 09, 2009, 01:41:21 PM
check for both pd0 and pd1 they whoudl work

the admin mentions it in his tutorial,,

IRRELEVANT TO THE TOPIC...

may i kn ur age plzz :D
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: Becky on March 09, 2009, 01:45:06 PM
check for both pd0 and pd1 they whoudl work

the admin mentions it in his tutorial,,

IRRELEVANT TO THE TOPIC...

may i kn ur age plzz :D

If you're cheaky enough to ask... 22 and yourself?  :)

I tried PD0 and PD1 now and still nothing :(
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: chelmi on March 09, 2009, 01:51:28 PM
may i kn ur age plzz :D

worst pickup line ever :D
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: superchiku on March 09, 2009, 01:52:10 PM
connect the right wires to the pin...there is wire named signal.....one is +ve 6v and one is ground connect them in their righ tplaces...

IRRELEVANT TO THE TOPIC

iam 20... and single  ;) lol..
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: Becky on March 09, 2009, 01:57:52 PM
connect the right wires to the pin...there is wire named signal.....one is +ve 6v and one is ground connect them in their righ tplaces...

IRRELEVANT TO THE TOPIC

iam 20... and single  ;) lol..

I got the yellow wire on signal, the red (middle wire) on power and the black on ground


IRRELEVANT TO THE TOPIC
I am sorry to hear that ;)
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: Becky on March 09, 2009, 01:58:59 PM
may i kn ur age plzz :D

worst pickup line ever :D

LOL  ;D
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: superchiku on March 09, 2009, 02:01:16 PM
errr....connect the signal o the pin....power shld be 4.8-6v

IRRELEVANT TO THE TOPIC

being single at 20 is not sorry... :D ... comeon its not that bad..
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: Becky on March 09, 2009, 02:06:45 PM
I think that everything is connected the right way round... just to clarify - I have tried the servo (black wire to the outer edge) in PD0 and PD1... what is next step?  :)



IRRELEVANT TO THE TOPIC

I am sure that single at 20 is a concious decision, young man, having said that I have met a lot of single techies in the last few years :) 
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: superchiku on March 09, 2009, 02:10:56 PM
are u sure ur wiring is correct ...i mean ur mcu and all are getting power correctly ...or is ur servo getting power...

wat kinda servo are u using...did u modify it right... ????

IRRELEVANT TO THE TOPIC>>

sumtimes u feel lonely  :-[...techies got very few friends...anddont address "young man" etc etc etc ...makes me feel as if u are very old... :D
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: Becky on March 09, 2009, 02:18:14 PM
are u sure ur wiring is correct ...i mean ur mcu and all are getting power correctly ...or is ur servo getting power...

wat kinda servo are u using...did u modify it right... ????

IRRELEVANT TO THE TOPIC>>

sumtimes u feel lonely  :-[...techies got very few friends...anddont address "young man" etc etc etc ...makes me feel as if u are very old... :D

I got the Hitec HS-311 - no I haven't modified it right because I am following the instructions and it goes number 1 - open it up; number 2 - send this hex file to the mcu... and that's as far as I can get... I did check for power and it is all flowing smoothly.


IRRELEVANT TO THE TOPIC

Well I have friends... sometimes some people aren't worth having as friends but just as acquaintances.  Age is experience but experience is quality not quantity.
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: superchiku on March 09, 2009, 02:28:45 PM
if the servo is getting power....then i guess there is some fault in ur modding..........coz if there would have been any prob in theadin's code then other ppl would have noticed it by now...and also he has clearly mentioned use pind0 or pind1 and neither of them is working...so i guess the fault is in ur side ..why don u get umultimeter and check out the outputif the pin d0 and d1 ..if they are giving voltage...then ull be sure that the fault is in th servo..

IRRELEVANT TO THE TOPIC

righly said....but wth...this is life and it goes on...but be happy alwayz...HAKUNA MATATA
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: Becky on March 09, 2009, 02:33:43 PM
if the servo is getting power....then i guess there is some fault in ur modding..........coz if there would have been any prob in theadin's code then other ppl would have noticed it by now...and also he has clearly mentioned use pind0 or pind1 and neither of them is working...so i guess the fault is in ur side ..why don u get umultimeter and check out the outputif the pin d0 and d1 ..if they are giving voltage...then ull be sure that the fault is in th servo..

IRRELEVANT TO THE TOPIC

righly said....but wth...this is life and it goes on...but be happy alwayz...HAKUNA MATATA


OK so based on that... if I take out the screws of my next servo and plug it in that should work?  Anyone willing to place a bet?
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: superchiku on March 09, 2009, 02:36:22 PM
eeee..................................... u trying to center the servo...??? then u dont need to mod anything first center it by directly connecting it to the board then loading the hex file and running it... see the output power...connect to pd0 or pd1 and make sure that ur servo is not already CENTRED ...then there is no point in centering it again...it wont budge...test for ur other servo too with the same code...
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: Becky on March 09, 2009, 02:38:08 PM
Did u follow the ADMIN's tutorial properly..try to use an unmodified servo...in place of this one and see if it works...

By unmodified - you mean one that I haven't taken the screws and gears out of?  There isn't anything else I am missing?
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: superchiku on March 09, 2009, 02:43:23 PM
see the previous reply .... yes unmodified means that ur using the servo with factory settings...directly out of the pacakaging...not opening it up or cutting the gears...
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: Becky on March 09, 2009, 02:50:30 PM
see the previous reply .... yes unmodified means that ur using the servo with factory settings...directly out of the pacakaging...not opening it up or cutting the gears...

It says :

Getting isp parameter.. SD=0x06 .. OKOK
Reading FLASH input file.. OK
Setting mode and device parameters.. OK!
Entering programming mode.. OK!
Erasing device.. OK!
Programming FLASH ..      OK!
Reading FLASH ..      OK!
FLASH contents is equal to file.. OK
Leaving programming mode.. OK!

and nothing happens
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: Becky on March 09, 2009, 02:54:50 PM
And the multimeter reads 6.23V
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: superchiku on March 09, 2009, 03:28:50 PM
the pin output not the power for the servo...wat is the output from the pin .. ...
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: Becky on March 12, 2009, 11:04:53 AM
the pin output not the power for the servo...wat is the output from the pin .. ...
Hello just got this post - I am not great with multimeters - do you want me to put the black wire on ground and the red wire on the mcu pin connected to the servo?
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: superchiku on March 12, 2009, 11:44:15 AM
as i told u check the datasheet which one goes to whee...connect the wire which is intended as the signal wire to the mcu output pin
Title: Re: Servo mod - gears won't set with hold_servo.hex
Post by: dellagd on March 15, 2009, 03:14:00 PM
hi.
I made this post other but it seems I could posre my question here.
I am doing the servo modification tutorial and I am stuck here.


Quote
5) Next we need to center the servo. Do this by plugging it in to your controller and send the signal required for it to go to 0 degrees. You should probably see the gears rotating without stopping. Now rotate the pot head (no, not that type of pot head) so that the gears stop rotating. It will probably be very sensitive so take your time. It is very important for this to be perfect. Get some superglue and glue the pot head to make sure it remains in place.



when I send the zero command, all the servo does is twitch about 15 degrees, not rotate continuously.
It does the same thing when it is fully assembled.
is this a servo, program, or circuit board error?

(my guess is that when the microcontroller goes on(I am usein 4x1.5v batteries)it takes so much power that the batteries get drained and it only has enough thime to rotate 15 degrees)