Shop OBEX P1 Docs P2 Docs Learn Events
Servo Control Switching — Parallax Forums

Servo Control Switching

MicroJDMicroJD Posts: 3
edited 2009-02-10 15:22 in BASIC Stamp
I have an application where·I am switching control of RC servos between the Parallax servo controller (with the BS2) and an RC receiver.· I'm doing it with a simple relay that switches the signal wire of the servo between the two control sources.· Often, the servo controller has to be reset by pressing the reset button for it to start moving the servos (but not always).· Any ideas why this might be happening?· Is there a better way to switch control of the servos?· Any help would be appreciated.

Comments

  • Beau SchwabeBeau Schwabe Posts: 6,560
    edited 2009-02-03 21:41
    MicroJD,

    Is there a reverse biased diode on the relay coil to minimize any back EMF spikes that it could produce?
    Instead of a relay you might be able to use a 4066 (Quad Analog Switch/Quad Multiplexer) in it's place.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • MrBi11MrBi11 Posts: 117
    edited 2009-02-04 04:51
    could you pipe the output from the RC unit into the BASIC STAMP.. and let the BS pass the control frequency through when using RC control?

    Or control it with discrete logic and an amplifier circuit from the RC unit to convert to TTL levels.

    RC-StampControl-1.jpg


    generate your Micro controller signal on {ServoOut} pin or select the RC control with the {RC-Select} Pin.

    [noparse][[/noparse]Note: Do Not select {RC_Select} and a signal on {ServoOut} at the same time]

    [noparse][[/noparse]Sorry for naming pin on BS the same as the output of the circuit.]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Smile ... It increases your face value!
  • Beau SchwabeBeau Schwabe Posts: 6,560
    edited 2009-02-04 05:48
    MicroJD,

    Not sure what I was thinking in my previous post... I believe you can do exactly what you want with a single 74HC00 (Quad 2-input NAND gate)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
    1119 x 503 - 126K
  • MicroJDMicroJD Posts: 3
    edited 2009-02-04 07:20
    Thanks, you guys have given me some great ideas. I'm glad there are some smarter folks than me out there. I'm going to try the reverse biased diode on the coil first since it's the easiest thing to add. I had thought of using NAND gates and had it working on a breadboard but I wasn't sure if it would solve the servo controller reset issue since I'm not sure of the cause.

    Beau, your diagram looks like you are switching one control source between two servos. I'm actually switching one servo between two control sources.

    I'll update on my progress. I'm working on a relatively simple UAV project. I appreciate the help!
  • Beau SchwabeBeau Schwabe Posts: 6,560
    edited 2009-02-04 07:34
    MicroJD,

    Not a problem... just a slightly different configuration.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
    1149 x 629 - 144K
  • SRLMSRLM Posts: 5,045
    edited 2009-02-04 07:37
    What about something with a pair of transistors and three resistors? I made a schematic in paint (so it's a little rough), but the design should allow RC to control servos whenever the microcontroller is off or outputs a low on enable. When it outputs a high on enable, it turns off the RC line, allowing the microcontroller to output it's own servo pattern. I designed this for a UAV project so that should power to the uC fail or if it were to go haywire, then I could have a hardware based solution to saving the plane. It's currently unimplemented, and merely theory at the moment.

    servomicrocontrollertransistortest-full;init:.bmp

    Oh, the top left transistor is NPN, the lower right is PNP.

    Any comments?
  • MicroJDMicroJD Posts: 3
    edited 2009-02-10 05:33
    Well, I think all of these ideas would probably have worked but the simple reverse-biased diode did the trick. The issue must have been back EMF. If I rebuild the board, I'll probably go with a true solid state solution for better reliability.

    Much thanks!
  • Beau SchwabeBeau Schwabe Posts: 6,560
    edited 2009-02-10 15:22
    MicroJD,

    Cool! I'm glad that you got it working.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
Sign In or Register to comment.