Author Topic: Hacking servo - resistor problems.  (Read 5166 times)

0 Members and 1 Guest are viewing this topic.

Offline izuaTopic starter

  • Supreme Robot
  • *****
  • Posts: 682
  • Helpful? 0
    • izua electronics
Hacking servo - resistor problems.
« on: February 21, 2008, 03:29:57 PM »
I'm hacking a HS-422S for continous rotation.
At first i tried glueing the the pot head but the glue sucked (local brand "picatura" - ie drop :P) and it ended up changing position after a few bumps. i took out the pot, and of course, i expected to use the pot's middle value as the 1.5 ms postion.
so i bought a few 4k, 1% tolerance resistors, hooked them up as a voltage divider and replaced the whole thing in the servo.

as i was hoping for worst, i get continous rotation on 1.5ms.
now, i know it won't be a problem, since i can find the other "current" point, where the servo will stop. it turns in both directions with a firmware i've written to bump between 1ms and 2ms, so i know it's there.

it's just annoying to know that something failed.
so, what are the chances that a servo will use some random point on the pot as the 1.5 ms center? i was hoping that 1/2 voltage is the center. please tell me that deviating from this is uncommon :P

edit: i found 1.275ms to be the center.
« Last Edit: February 21, 2008, 03:43:10 PM by izua »
Check out my homepage for in depth tutorials on microcontrollers and electronics.

Offline izuaTopic starter

  • Supreme Robot
  • *****
  • Posts: 682
  • Helpful? 0
    • izua electronics
Re: Hacking servo - resistor problems.
« Reply #1 on: February 21, 2008, 03:48:57 PM »
later edit: this is very weird. the motor keeps drifting its center.
i've done a piece of firmware to do, left, stop, right, stop, repeat.
it works great for a few minutes, but then the "stop" just keeps drifting, in either direction.

if i restart the controller (PIC) it works fine.

code looks like this
Code: [Select]
lup3:

For i = 0 To 100
RB5 = 1
WaitUs 1000
RB5 = 0
WaitMs 18
Next i

For i = 0 To 100
RB5 = 1
WaitUs 1275
RB5 = 0
WaitMs 18
Next i

For i = 0 To 100
RB5 = 1
WaitUs 2000
RB5 = 0
WaitMs 18
Next i

For i = 0 To 100
RB5 = 1
WaitUs 1275
RB5 = 0
WaitMs 18
Next i

Goto lup3
but i doubt it's the code.
resistors overheating?
Check out my homepage for in depth tutorials on microcontrollers and electronics.

Offline ed1380

  • Supreme Robot
  • *****
  • Posts: 1,478
  • Helpful? 3
Re: Hacking servo - resistor problems.
« Reply #2 on: February 21, 2008, 05:44:17 PM »
i believe 4k is too much. around 2k might be better.

http://www.instructables.com/id/EEK0CPF5SVEP2864QI/ says 2.2k
Problems making the $50 robot circuit board?
click here. http://www.societyofrobots.com/robotforum/index.php?topic=3292.msg25198#msg25198

Offline airman00

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,650
  • Helpful? 21
  • narobo.com
    • Narobo.com - Mechatronics and related
Re: Hacking servo - resistor problems.
« Reply #3 on: February 21, 2008, 05:51:43 PM »
i believe 4k is too much. around 2k might be better.

http://www.instructables.com/id/EEK0CPF5SVEP2864QI/ says 2.2k


I use 2.2K only  , ed1380 is probably right
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline izuaTopic starter

  • Supreme Robot
  • *****
  • Posts: 682
  • Helpful? 0
    • izua electronics
Re: Hacking servo - resistor problems.
« Reply #4 on: February 22, 2008, 06:36:08 AM »
but why would the logical center (stop)_ offset and after a few turns, the stop will actually be slow left/right?
how's that influenced by resistors?
Check out my homepage for in depth tutorials on microcontrollers and electronics.

Offline airman00

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,650
  • Helpful? 21
  • narobo.com
    • Narobo.com - Mechatronics and related
Re: Hacking servo - resistor problems.
« Reply #5 on: February 22, 2008, 08:09:34 AM »
the high resistance values is probably screwing with the internal circuit of hte servo
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline izuaTopic starter

  • Supreme Robot
  • *****
  • Posts: 682
  • Helpful? 0
    • izua electronics
Re: Hacking servo - resistor problems.
« Reply #6 on: February 22, 2008, 10:20:18 AM »
i've put 2.2k resistors on two servos (both the old hacked one, and another one).
they are still not center (center is close to the old 1.275 value). the problem is that, they have different centers.
(edit: if i hit close to the center, one is going one way, while the other, the reverse way)

am i doing something wrong, or is this supposed to be hard?
« Last Edit: February 22, 2008, 10:24:00 AM by izua »
Check out my homepage for in depth tutorials on microcontrollers and electronics.

Offline airman00

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,650
  • Helpful? 21
  • narobo.com
    • Narobo.com - Mechatronics and related
Re: Hacking servo - resistor problems.
« Reply #7 on: February 22, 2008, 10:24:11 AM »
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline izuaTopic starter

  • Supreme Robot
  • *****
  • Posts: 682
  • Helpful? 0
    • izua electronics
Re: Hacking servo - resistor problems.
« Reply #8 on: February 22, 2008, 10:29:15 AM »
I don't know, I've taken care with the gears and the electronics.
Just that i'm using common resistors (one i had around). They have a gold band. could this be?
Check out my homepage for in depth tutorials on microcontrollers and electronics.

Offline Ro-Bot-X

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,431
  • Helpful? 25
  • Store: RoBotXDesigns.ca
    • Ro-Bot-X Designs
Re: Hacking servo - resistor problems.
« Reply #9 on: February 22, 2008, 01:56:09 PM »
I had a similar problem when I used 2 resistors of 2k7. So I pulled them off and used a multiturn pot. I tuned it so the servo would stop for the 1.5 ms pulse. While you have the servos open, take the next step and modify them for a better response to variable speed. Check out this tutorial: http://www.seattlerobotics.org/encoder/200009/S3003C.html
Check out the uBotino robot controller!

Offline izuaTopic starter

  • Supreme Robot
  • *****
  • Posts: 682
  • Helpful? 0
    • izua electronics
Re: Hacking servo - resistor problems.
« Reply #10 on: February 23, 2008, 01:17:17 AM »
I've been advised before to go with a multiturn.
Well, I guess this settles it.

The original pot is 5K, but i'm not sure if i'll find a trimmer at that value.
What's the range where it should be fine?
Check out my homepage for in depth tutorials on microcontrollers and electronics.

Offline Ro-Bot-X

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,431
  • Helpful? 25
  • Store: RoBotXDesigns.ca
    • Ro-Bot-X Designs
Re: Hacking servo - resistor problems.
« Reply #11 on: February 23, 2008, 07:22:23 AM »
4.7k should be fine.
Check out the uBotino robot controller!

paulstreats

  • Guest
Re: Hacking servo - resistor problems.
« Reply #12 on: February 23, 2008, 07:32:08 AM »
The drift that you were talking about could be due to the clock on your pic. If youre using an internal clock, or an external r/c pair then these drift the clock speed slightly when they start getting warmish. If you are using a crystal or ceramic resonator then it isnt this.

Also solid state resistors do vary slightly in their resistance, and also can alter in temperature changes aswell, it depends what type of resistor that you have used.

The obvious way of finding the servos centering value on the pot is to set the pot so it centers the servo and then remove it and measure it in that state, you then get the correct value

Offline izuaTopic starter

  • Supreme Robot
  • *****
  • Posts: 682
  • Helpful? 0
    • izua electronics
Re: Hacking servo - resistor problems.
« Reply #13 on: February 23, 2008, 08:48:49 AM »
i doubt it, i never used internal oscilator or rc pairs. i did my best to ensure the signal is stable and clean.
i've put 5k trimmers on both servos. one is ok, but after some point, the 1.5 drifts away, at a 1.5 ms signal, the servo stars spinning slowly. if i remove power from the servo, the 1.5 ms center is fixed (1.5 = stop). if i just stop the signal (leaving the servo powered), and later resume again, 1.5 = stop.
but it drifts away pretty fast, in less than 10 seconds.

the other one simply ignores the center. i find it, then if i remove power and power it back on, the center is somwhere away.
« Last Edit: February 23, 2008, 08:49:28 AM by izua »
Check out my homepage for in depth tutorials on microcontrollers and electronics.

Offline izuaTopic starter

  • Supreme Robot
  • *****
  • Posts: 682
  • Helpful? 0
    • izua electronics
Re: Hacking servo - resistor problems.
« Reply #14 on: February 23, 2008, 08:53:27 AM »
one note: the pcb is very small, less than one square cm. one side has the chip (haven't found anything about it), the other resistors and capacitors (all smd)
the chip gets pretty hot after ~20 seconds of continous motor power.
since the servo behaved pretty much the same on the 4k precision resistors, i suspect heat is affecting the resistor that's generating the internal reference pulse.

i guess i have two options, either use an external resistor (non-smd type) or install a heatsink on the chip.
any suggestions?

edit: you can see it here.
i'm sending 120 signals of 1.5 ms and 4 signals of 1 ms (then the loop is repeated). From low-to-high to the next low-to-high (frequency i guess), there are 20 ms, for a total of 50hz.
« Last Edit: February 23, 2008, 10:09:24 AM by izua »
Check out my homepage for in depth tutorials on microcontrollers and electronics.

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: Hacking servo - resistor problems.
« Reply #15 on: February 23, 2008, 10:02:59 PM »
When you measure the pot, measure it while its NOT connected to anything else. Otherwise you are actually measuring the resistance of the entire servo control circuit . . .

And I agree with paulstreats' theory in that the timer is slightly shifting with temperature. This could cause the servo to never settle on a center point.

 


data_list