Flying car help

Post Reply
TS00
Posts: 64
Joined: Sun Jun 17, 2012 7:35 pm

Flying car help

Post by TS00 »

Hi all,

I'm building a hybrid car/quad, using a Crius multiwii. I need to be able to switch between car mode and flight mode, as I want to use the same Tx/Rx.

My initial idea was to use a relay to switch the throttle and aileron signal lines from the receiver, so that they either go to the multiwii board or to the car controller.

This is fine in principle, but when I tried it I discovered a problem. When the relay cuts off the throttle and aileron signals from the multiwii, the board goes a bit crazy. The GUI sensor traces went all over the place, and the sensor checkbox settings changed all by themselves.

Any ideas on what to do to get around this? I just need to be able to disconnect the throttle and aileron signal on an armed board, then reconnect them while the board is still running.

I'm going to try some pull down resistors next, but any ideas would be much appreciated.

Wayne
Posts: 86
Joined: Sun Jul 31, 2011 10:44 pm

Re: Flying car help

Post by Wayne »

I saw this over at RCG and it got me thinking.
Why not use servo Y’s on THRO and AIL and use one TX switch to Arm MW and another to relay power to the car ESC.

TS00
Posts: 64
Joined: Sun Jun 17, 2012 7:35 pm

Re: Flying car help

Post by TS00 »

Thanks Wayne, that may well work. Any idea how to define a switch to arm/disarm the multiwii?

I was thinking, maybe I'm not being very smart here. Rather than try to do this in hardware, maybe I should try to do it in the software.

What I'd need to do is use two of my spare motor outputs for the car (one for the servo, one for the ESC). Then use one of the AUX channels as a switch, so that when it's on, the board is disarmed and the two motor outputs have their values set by the throttle and aileron Tx inputs. When the switch is off, the board is armed and those outputs are set to 1500 and 1000 respectively.

Anyone sufficiently familiar with the multiwii code to help with this? I'm looking at it now, but I have a long way to go before figuring out how to do it.

Thanks!

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: Flying car help

Post by PatrikE »

It's easiest to create a mixtable for the Hybrid.

TS00
Posts: 64
Joined: Sun Jun 17, 2012 7:35 pm

Re: Flying car help

Post by TS00 »

Thank you for your response Patrik. Sadly I have no idea what a mixtable is - is that a set of definitions in multiwii? Any pointers?

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: Flying car help

Post by PatrikE »

You can find it in output file.
It's a mixer for servos and esc's.

You need to create a new with a combined Quad and maby you can use the gimbal code for the car.
It takes some thinking to manage it but its no magic...

TS00
Posts: 64
Joined: Sun Jun 17, 2012 7:35 pm

Re: Flying car help

Post by TS00 »

Thanks, I've been looking at it. I think I can do something with it. It's quite difficult to pick through the code and figure out the right variables to use.

I want to check if AUX2 is on - any idea what the variable is?

And to get the current throttle and aileron, do I use rcCommand[THROTTLE] or rcData[THROTTLE]?

Thanks :-)

TS00
Posts: 64
Joined: Sun Jun 17, 2012 7:35 pm

Re: Flying car help

Post by TS00 »

Does this look reasonable, in Output:

Code: Select all

#ifdef FLYCAR
    if (rcData[AUX2] > 1500)
    {
      motor[4] = rcCommand[THROTTLE]; //car esc
      servo[0] = rcData[ROLL]; //car servo
    }
    else
    {
      motor[4] = 1500; //car esc
      servo[0] = 1500; //car servo
    }
#endif

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: Flying car help

Post by PatrikE »

The throttle stick on a flight radio is not optimal for a car.
Maby use Pitch and roll to drive the car.

Then this can work.

Code: Select all

#ifdef FLYCAR
    if (rcData[THROTTLE] > 1200)
    {
     motor[4] = rcCommand[PITCH]; //car esc
      servo[0] = rcData[ROLL]; //car servo
    }
    else
    {
      motor[4] = 1500; //car esc
      servo[0] = 1500; //car servo
    }


Then you dont ned a switch to select mode.
The throttlestick will switch mode for you.

There's some more defines you need to add in the def.h to.

TS00
Posts: 64
Joined: Sun Jun 17, 2012 7:35 pm

Re: Flying car help

Post by TS00 »

I like the idea of using the throttle as the switch, that's really smart.

Do you know whether I should be using rcData[] or rcCommand[]? I can't figure out the difference between the two.

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: Flying car help

Post by PatrikE »

rcData is the data from TX.
rcCommand is processed by MWii.
Minthrottle Maxthrottle throttleEpo etc.....

In your case i think you can use any of them but i would use rcData() for the car.

TS00
Posts: 64
Joined: Sun Jun 17, 2012 7:35 pm

Re: Flying car help

Post by TS00 »

Thanks Patrik, much appreciated. I'll post an update tomorrow once I've tried this.

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: Flying car help

Post by PatrikE »

Add servo(1) to and it can be used as throttle servo on a methanol car.
Or to controll a pan servo for FPV Experience..;)

TS00
Posts: 64
Joined: Sun Jun 17, 2012 7:35 pm

Re: Flying car help

Post by TS00 »

It should be a fun little machine, it's a small 330 frame, with ~200W motors, carrying a 1/18th scale brushless offroader. All-up weight will be ~1.7kg, including a 5000mAh 3S.

TS00
Posts: 64
Joined: Sun Jun 17, 2012 7:35 pm

Re: Flying car help

Post by TS00 »

I forgot to ask, do I need to initialise servo[0] and motor[4], or are they just ready to drive?

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: Flying car help

Post by PatrikE »

In def.h
Create a new model.
in motor and servo numbers section

Code: Select all

#elif defined(FLYING_CAR)
  #define NUMBER_MOTOR     5  // Quad + one motor for the car
  #define PRI_SERVO_FROM   1   // use servo from 1 to 2
  #define PRI_SERVO_TO     2


And add

Code: Select all

 || defined(FLYING_CAR) 

Where #define SERVO
and dont forget to put a #define FLYING_CAR in config.

That's all folks.. ;)

TS00
Posts: 64
Joined: Sun Jun 17, 2012 7:35 pm

Re: Flying car help

Post by TS00 »

Got it, thanks. Back with update tomorrow.

TS00
Posts: 64
Joined: Sun Jun 17, 2012 7:35 pm

Flying Car Maiden Flight

Post by TS00 »

Finally got my 1/18th scale chassis from HK today, put it all together and flew for the first time. It flies like a very heavy, powerful brick.

https://vimeo.com/46156663


Specs:
330mm
8045 SF props
NTM 2826 1350kv
HK SS 18/20A ESC
Crius Multiwii AIO
5000mAh 3S Turnigy
1/18 scale brushless offroader chassis
http://www.hobbyking.com/hobbyking/s...dProduct=13450

AUW is 1380g, which is lower than I was expecting

Control: Single Tx/Rx, with custom multiwii code. When throttle is below 1200, it cuts out the flying controls, and cuts in the car ESC and servo (on the right hand stick, what would normally be pitch and roll). When throttle is above 1200, it cuts out the car ESC and servo (which are on A0 and A1), and goes back to normal flying. Thanks @PatrikE for help with this part.

chris ables
Posts: 317
Joined: Wed Feb 08, 2012 8:42 pm
Location: United states

Re: Flying car help

Post by chris ables »

WOW! Cool ! Looks pretty touchy on flying controls ! I want a full size one i can ride in !

Pyrofer
Posts: 180
Joined: Sat Apr 14, 2012 2:55 pm

Re: Flying car help

Post by Pyrofer »

Cool Car-copter.

You seem to have a major problem with your video though, I think you are suffering from VVS, please watch the following PSA
http://www.youtube.com/watch?v=Bt9zSfinwFA

TS00
Posts: 64
Joined: Sun Jun 17, 2012 7:35 pm

Re: Flying car help

Post by TS00 »

Pyrofer wrote:Cool Car-copter.

You seem to have a major problem with your video though, I think you are suffering from VVS, please watch the following PSA
http://www.youtube.com/watch?v=Bt9zSfinwFA


Heh, yeah, thanks. Thing is, my wife is kind enough to video my stupid exploits, and for that I'm very grateful. I'm not about to tell her how to hold her phone ;-)

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: Flying car help

Post by PatrikE »

chris ables wrote:WOW! Cool ! Looks pretty touchy on flying controls ! I want a full size one i can ride in !

Yeah!.
Built op a Humvee.... :twisted:

Advanced landingear anyway!... 8-)

TS00
Posts: 64
Joined: Sun Jun 17, 2012 7:35 pm

Re: Flying car help

Post by TS00 »

chris ables wrote:WOW! Cool ! Looks pretty touchy on flying controls ! I want a full size one i can ride in !


It takes some getting used to. Having such a small frame (330mm) at 1.4kg is far fom ideal, but I wanted as small a frame as possible to reduce wobble while driving. I'm getting used to it, slowly. The tyres and suspension at least cushion the landings :)

tovrin
Posts: 705
Joined: Tue Sep 20, 2011 4:08 pm

Re: Flying car help

Post by tovrin »

sweet action! are you going to eventually scale down the weight by removing as much of the car as you can?
I think it would be ultimate for have a quad with wheels in the booms!

TS00
Posts: 64
Joined: Sun Jun 17, 2012 7:35 pm

Re: Flying car help

Post by TS00 »

tovrin wrote:sweet action! are you going to eventually scale down the weight by removing as much of the car as you can?
I think it would be ultimate for have a quad with wheels in the booms!


The car chassis isn't that heavy, around 400g, which isn't bad when you consider it's 4 wheel drive and has a steering mechanism. Most of the weight is the 5000mAh 3S. It does fly with a 40C 2000mAh, but not for long.

Here's a new video showing the smooth transition from car to heli and back.

https://vimeo.com/46546886

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: Flying car help

Post by PatrikE »

Just as a fun note on this old thread...
After almost 4 years this exists as a product!..
Let's agree we are a bit innovative!
Not as cool as a Humvee Quad anyway!...

http://www.gearbest.com/rc-quadcopters/ ... ign=FB1511

LutzB
Posts: 67
Joined: Sun Feb 08, 2015 4:01 pm
Location: Germany

Re: Flying car help

Post by LutzB »

This is not the first one:
http://www.rcgroups.com/forums/showthread.php?t=2221060

This car even uses MultiWii!

Post Reply