Author Topic: Servo motor interface  (Read 1344 times)

0 Members and 1 Guest are viewing this topic.

Offline akisTopic starter

  • Frequent Contributor
  • **
  • Posts: 981
  • Country: gb
Servo motor interface
« on: March 05, 2020, 09:25:35 pm »
Quick question, for a small project. There is a servo motor receiving input through a 3 pin connector. The motor seems to be able to turn 180 degrees. One wire must be ground, another must be 5V, and I am not sure about the third wire. Is it a linear voltage from 0 to 5 V ? I have only seen photos at this stage so cannot put my hands on it. It is a remote control like they use for model planes, a "receiver" unit with a lot of pins to connect to things like "flaps", "gear", "throttle" etc. The servo motor is connected to the receiver unit.
 

Offline FenTiger

  • Regular Contributor
  • *
  • Posts: 88
  • Country: gb
Re: Servo motor interface
« Reply #1 on: March 05, 2020, 09:44:48 pm »
 

Offline akisTopic starter

  • Frequent Contributor
  • **
  • Posts: 981
  • Country: gb
Re: Servo motor interface
« Reply #2 on: March 06, 2020, 09:50:11 am »
OK, thanks I will look at the Arduino's built in PWM pins, I know there are some pins at 900Hz and some at 470Hz. If it is a single pulse we need I presume we need to toggle the output pins manually? There is also a servo library I need to take a look at.
 

Offline FenTiger

  • Regular Contributor
  • *
  • Posts: 88
  • Country: gb
Re: Servo motor interface
« Reply #3 on: March 06, 2020, 09:57:03 am »
No, it's a repeating pulse train. I'd be surprised if you can't drive one from an Arduino PWM pin. Check the frequency, though - these servos want a repetition rate of about 50 Hz or so.
 

Offline beanflying

  • Super Contributor
  • ***
  • Posts: 7375
  • Country: au
  • Toys so very many Toys.
Re: Servo motor interface
« Reply #4 on: March 06, 2020, 10:21:19 am »
Without a picture or more info it is a bit hard? Sounds like you have a very typical model servo they are typically +- 60 degrees of travel from a nominal center point for a 1-2mS variable pulse with a center at 1.5mS. Depending on the servo you can drive them outside those limits and toward the 270-300 degree limit of the potentiometer that senses the position. However watch out for mechanical stops on the gear train lest you break something ;)

The Arduino library you want is here https://www.arduino.cc/en/reference/servo if you want a simple option or even a 555 timer can be made work if you like http://hades.mech.northwestern.edu/index.php/555_Servo_Circuit or https://www.instructables.com/id/Drive-Servos-with-a-555-timer-IC/
Coffee, Food, R/C and electronics nerd in no particular order. Also CNC wannabe, 3D printer and Laser Cutter Junkie and just don't mention my TEA addiction....
 

Offline akisTopic starter

  • Frequent Contributor
  • **
  • Posts: 981
  • Country: gb
Re: Servo motor interface
« Reply #5 on: March 06, 2020, 10:30:57 am »
It is a remote controlled "robot" project my son is doing at uni with a group... They have been given a ready made PCB consisting of a few power resistors and a servo to allow some sort of contact to wipe over the raw PCB copper tracks and provide voltage to the wheel's motor, reverse and forward, full speed and half speed. I find the idea of a servo motor being used as a wiper similar to the mechanical distributor in older cars, with crudely made contacts (wires, solder blobs, graphite brushes) wiping over the copper tracks and getting caught and worn over the gaps...

So I thought why not have a little arduino board that will connect to the RF receiver and intercept the 3 wires destined for the servo motor, I presume it only needs to use GND and Signal, no need for the 5V line, and then the arduino will read and interpret the requested position and based on that it will drive a couple of relays (or SSRs) to power the wheel's motor.
 

Offline beanflying

  • Super Contributor
  • ***
  • Posts: 7375
  • Country: au
  • Toys so very many Toys.
Re: Servo motor interface
« Reply #6 on: March 06, 2020, 10:44:11 am »
Yep way back in the dim dark past of R/C cars and even some of the very early electric aircraft I flew Servos to a Fat Potentiometer or a couple of resistors were used for crude speed control. Generally it will be a positive pulse relative to ground and the +5V is for driving the circuit and supplying power to the motor.

SSR? Generally most Robots will be DC powered so a FET/FETS are the normal options for speed control. One of the issues if you try a DIY you will run into is blowing the stuffing out of your fets on change of direction with back EMF so you want to allow some time or even look at braking to a halt or making sure you allow some time between.

Given the cost of buying one off the shelf https://hobbyking.com/en_us/quicrun-wp-1625-brushed.html?queryID=790fd5ecf79c28f26a51e727649399b6&objectID=62437&indexName=hbk_live_magento_en_us_products OR https://hobbyking.com/en_us/hobbyking-x-car-45a-brushed-car-esc.html I wouldn't spend my time or effort on it but if you do  :-+
« Last Edit: March 06, 2020, 10:46:27 am by beanflying »
Coffee, Food, R/C and electronics nerd in no particular order. Also CNC wannabe, 3D printer and Laser Cutter Junkie and just don't mention my TEA addiction....
 

Offline akisTopic starter

  • Frequent Contributor
  • **
  • Posts: 981
  • Country: gb
Re: Servo motor interface
« Reply #7 on: March 06, 2020, 11:40:25 am »
Thanks!

So in the photo

https://hobbyking.com/en_us/quicrun-wp-1625-brushed.html?queryID=790fd5ecf79c28f26a51e727649399b6&objectID=62437&indexName=hbk_live_magento_en_us_products&___store=en_us

Do I assume:

Red/Black is battery power to the motor
Blue/Yellow connects to the motor
White/Red/Black triad connects to RF receiver

Am I understanding this right?
 

Offline beanflying

  • Super Contributor
  • ***
  • Posts: 7375
  • Country: au
  • Toys so very many Toys.
Re: Servo motor interface
« Reply #8 on: March 06, 2020, 11:52:21 am »
The Manual https://cdn-global-hk.hobbyking.com/media/file/q/u/quicrun25a-116058.pdf

It is what is called a BEC (Battery Eliminator Circuit, historically a separate pack was used for the Servos and Receiver power)  type that is the receiver draws power from the main pack via a 5V regulator which is fed to it by the thin triple cable. The corresponding signal to control the ESC (Electronic Speed Control) will be the white one of those three back from the receiver. The main power wires are shown in the instructions.
Coffee, Food, R/C and electronics nerd in no particular order. Also CNC wannabe, 3D printer and Laser Cutter Junkie and just don't mention my TEA addiction....
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf