Controlling a Servo Motor
#4
(07-13-2017, 01:14 PM)casmiguefl Wrote: <snip>

Any tutorials around on how to do it here?

No; however, I have placed several tutorials on the RPi forum website that do show how to use the RPi ( or any other SBC ) to control motors;  this includes steppers, and servos.  

pfeerick is correct, the best way to control a servo is with an MCU like the arduino or equivalent;  however, any SBC can be used.  You will want to start with servo theory and learn what it is that makes a servo motor travel a certain number of degrees ( on way or the other ).  It has less to do with the timing and more to do with the signal. 

Steppers are a horse of another color, and very easily controlled by any SBC including the RPi, PineA64, or Rock64.  I plan to put a stepper blog on the forum soon, so stay posted. 

Steppers are also less about timing and more about signal;  specifically the right four bits (in parallel) in the right sequence with the proper driver circuit.  The key to steppers is using a ULN2803A driver chip;  this circuit permits the driving of inductive loads in excess of 500ma without harming the gpio block of your SBC. Remember that inductive loads like relays, servos, and stepper motors can produce large back EMF that will quickly destroy your SBC;  always use an ULN2803A or equivalent to drive those loads.  The Gertboard comes with the gpio buffers and ULN2803 prewired ;  you can still find it a few places;  if not, you'll have to make the equivalent yourself;  not hard.
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )
  Reply


Messages In This Thread
Controlling a Servo Motor - by casmiguefl - 07-13-2017, 01:14 PM
RE: Controlling a Servo Motor - by Luke - 07-13-2017, 02:36 PM
RE: Controlling a Servo Motor - by pfeerick - 07-13-2017, 10:59 PM
RE: Controlling a Servo Motor - by MarkHaysHarris777 - 07-13-2017, 11:14 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Information Howto: Controlling Pine64 GPIO via the filesystem (sysfs) on linux pfeerick 4 11,753 01-24-2019, 03:36 AM
Last Post: Fifth
  Active Cooling 5v brushless fan with Motor Speed Controller soft PWM MarkHaysHarris777 14 21,908 06-26-2017, 03:16 PM
Last Post: ishwest
  Active Cooling soft PWM follow-on fan motor speed controller driver MarkHaysHarris777 3 6,650 09-02-2016, 11:46 PM
Last Post: MarkHaysHarris777

Forum Jump:


Users browsing this thread: 1 Guest(s)