Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: Jendker on October 11, 2015, 09:40:25 AM

Title: PWM switch - RC based autonomous boat
Post by: Jendker on October 11, 2015, 09:40:25 AM
I am building an autonomous boat. As a master steering system I wanted to use RC's radio, as a secondary I wanted to use Raspberry Pi. To choose the steering source I wanted to use one of the channels from the radio receiver - 1 would mean radio as a source, 0 - Raspberry Pi. To choose which system is in use I need electronic element to choose which PWM signal is forwarded. Is there already built electronic part to do such thing? I was thinking about preparing something by myself, with 2 AND gates and one XOR (as presented on the diagram below). The question is, if I indeed have to build it myself, will the gates be the good choice? I don't know if the PWM can be forwarded through a gate because of its high speed of changes (of the frequency)? I assume that it is relevant. Maybe there is a different, better solution?

I will be grateful for your help!
Title: Re: PWM switch - RC based autonomous boat
Post by: cyberjeff on October 11, 2015, 06:27:38 PM
I am building an autonomous boat. As a master steering system I wanted to use RC's radio, as a secondary I wanted to use Raspberry Pi. To choose the steering source I wanted to use one of the channels from the radio receiver - 1 would mean radio as a source, 0 - Raspberry Pi. To choose which system is in use I need electronic element to choose which PWM signal is forwarded. Is there already built electronic part to do such thing? I was thinking about preparing something by myself, with 2 AND gates and one XOR (as presented on the diagram below). The question is, if I indeed have to build it myself, will the gates be the good choice? I don't know if the PWM can be forwarded through a gate because of its high speed of changes (of the frequency)? I assume that it is relevant. Maybe there is a different, better solution?

I will be grateful for your help!

I didn't read the logic, which I assume it is right, but I don't see why this wouldn't work. I haven't used the outputs on the Pi, but I assume they are totem pole, and don't need a pull up resistor.

The servo pulse width is around 1.5 msec, a garden variety cmos 4011 is 60 nano seconds, so plenty  fast enough. If you just have a handful of servos this seems like a good way to go.