SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By largowinch
#94369
Hi

Im working on a project with an rc-receiver and an arduino. In some instances, the arduino is generating signals to drive the servos, in others, the rc-receiver should take over. I was wondering if it is there is a component i coulld use, to switch betwen those 2 signal sources right before the servo (maybe a transistor??). This would spare me from having to deal with reading the receiver with arduino and passing the signals to the servos (would take up too much time). It should be possible to flip that switch with a input generated by the arduino

I'm a programer, so i don't have too much experience with electronic components.

thanks in advance!
By monstrum
#94378
Logic gates should do it. AND the output from the receiver with a control bit from the Arduino. Then OR the result with the PWM output from Arduino.
If you don't trust that your PWM output is going to remain at 0 when the receiver should be driving, you could also AND the PWM output with the inverted control bit (before the OR-gate).
By largowinch
#94382
Thanks for the quick answer. since i have 3 servos, i was thinking of using a 4066 bilateral switch to turn the input from the receiver on and off. Now i was wondering if there is a component that has the inverse function of the 4066, so i could open the circuit when applying +5v instead of closing it? or do i have to apply a NOT-gate before the 4066 in order to invert the operation?
By riden
#94386
You could use a hex inverter like a 4069 to invert the logic levels or if you are driving the 4066 from a microcontroller, simply invert the logic in software.
By largowinch
#94392
thank you all for your help!