Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Help creating a R/C radio multiplexer

Status
Not open for further replies.

DMassey

Newbie level 2
Joined
Jan 20, 2013
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,317
Hey everyone. I am Dominic, I am just getting into the hobby of electronics but I have a good background playing with electrons.

I was an AT in the Navy, and was really good at fixing the radar assemblies from the F14 and E2C both on the RF and digital side. My experience is mainly in repair not design. I can read schematics, flow charts ,tech sheets and what not, I'm good with a soldering iron as well. So now that I said a little about me and my skill level I have a project that I could use a little help with.

I am building a R/C boat that needs more analog functions than I have a radio for. I am using a Futaba 7CAP on 75mhz (don't worry my radio is safe for surface use) but it is set up for normal aircraft controls. This boat is a research and salvage vessel that will have a working "A" frame crane on the back, dual motors dual rudders, lights and possibly a bow thruster. That makes 6 channels that need analog control and 1 that will be happy with an on off switch.

My radio has 7 channels
1 analog non self centering (throttle)
1 analog self centering stick ( elevator)
2 analog self centering left right stick ( rudder and roll)
1 3 position switch
1 2 position switch
1 analog dial

My thoughts were this and this is where I am in new territory. Plug all channels input and output into a GPIO board, and control the actual outputs to the ESCs and servos based on the position of the 3 position switch. I am guessing that something like an Ardrino (sp sorry) or a raspberry pi could handle coordinating the "modes" and direct the inputs of the sticks to the proper servos/controllers.

My control scheme would be something like this

Mode 1, basic controls for navigation, throttle stick handles both ESCs, both rudders on a single stick as well.

Mode 2, complex controls for navigation, 2 throttle sticks, 2 rudder sticks controlling left and right rudders and ESCs independently and possibly a bow thruster on a mixer

Mode 3, crane operations. The non centering stick to be used for "A" frame position and another stick for winch control. Possibly also basic navigation for station keeping (maybe GPS could be used for automatic station keeping control but we'll get into that later)

Is this the type of forum that could assist me? I have a couple other electronics project ideas as well but this is first on my list of would like to get finished things. Thank you for taking the time to read this and any help would be great.

Dom
 

Hi Dominic,

I'm no RC expert, but it sounds like a feasible method, to make a 3-position switch control the analog channels.
However, are the analog channels normally fed to those 3-pin servos like in (say) model cars? If so, they rely on a PWM method to control
their position. If the PWM stops, then I'm guessing they rotate back to their default position, which may cause havoc ; )
In theory, you could 'measure' the PWM rate coming out of the analog channel, and replicate with a microcontroller (e.g. arduino,
although I've not used an arduino in the past), so that when the 3-position switch is changed, the microcontroller continues to
output a PWM at the same rate. I don't know how the 3-position functions, but I'm guessing it may be PWM too, but with just 3 positions (e.g.
center, left and right).
So, your design at a high level could look like this, where a microcontroller serves as an adapter to 'de-multiplex' the PWM
settings based on the 3-position switch settings, and convert to your scheme.
rc1.jpg
However, this may be a bit much to do as a complete project, it may be better to start with something simpler which could serve as a
module for your bigger scheme.
rc2.jpg
In this second diagram, you can see that there are just two inputs; the 3-position switch and one analog channel. The 3-position switch will
de-multiplex the single analog channel into three analog channels.
Your software needs to be able to time the inputs (wire them to either timer input capture or interrupt pins)in order to determine the
PWM setting - you may wish to Hi Dominic, I'm no RC expert, but it sounds like a feasible method, to make a 3-position switch control the analog channels. However, are the analog channels normally fed to those 3-pin servos like in (say) model cars? If so, they rely on a PWM method to control their position. If the PWM stops, then I'm guessing they rotate back to their default position, which may cause havoc ; ) In theory, you could 'measure' the PWM rate coming out of the analog channel, and replicate with a microcontroller (e.g. arduino, although I've not used an arduino in the past), so that when the 3-position switch is changed, the microcontroller continues to output a PWM at the same rate. You may wish to download this document **broken link removed** and download any associated code if it exists on the Atmel website, as an example implementation. You'd also need the ability to generate PWM, which could be done with a timer interrupt scheme (google for PWM control, people may have some implementations of this already).
Arduino may work, or use any generic microcontroller board (e.g. AVR or PIC) and C code. There is a learning curve, but hopefully it won't
take long. Keep it simple, and don't use the Raspberry Pi for this (it is power hungry, doesn't have enough real-time and interfacing capabilities
on-board, so you'd end up with a solution twice as large and many times more complex - therefore with an impact on reliability.
 
Last edited by a moderator:

Yes the servos are 3 pin.

+5 power
Ground and reference
Signal

The signals from the Tx do not have to be constant to all servos but if there is no signal then power should not be applied or the servos will chatter. Also with no signal and power the servos can be free wheeled easy but this should not be a problem unless there is a load on the "A" frame crane when not in a locked position. If I could create a neutral PWM signal to send the idle servos when no using the Tx with them it could save some possible trouble at the expense of more complex system.

I already own a Pi and considering that power consumption is not a huge issue with a boat of this type I think I will research development with that system first to save some cost. This boat will be carrying about 4 12v 6ah batts and a smaller 6v batt to run the lighting. I have found that with big hulls using ballast that can and needs to be removed makes transport much easier. Right now I am calculating about 40lbs of ballast needed to get the hull where I want it.

Dom
 

Sky_123's reply appears to describe things correctly.

If I could create a neutral PWM signal to send the idle servos when no using the Tx with them it could save some possible trouble at the expense of more complex system.

I have some experience with a radio controlled airplane. 4 channel system.

A servo's movement is controlled by pulses which can be anywhere from 1 to 2 milli-seconds long, typically at 50 frames a second.

A neutral signal suggests a center position. A 1.5 milli-second pulse. It will not necessarily need to be as frequent as 50x per second, although it's a good idea to repeat it frequently so as to overcome interference from known or unknown causes.

Your Pi will need to be fast enough to measure the lengths of seven incoming pulses (in rapid succession). Then it must send out the correct length of pulse to each servo, based on what mode is dictated by your 3-position switch.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top