Page 1 of 1

Flying car help

Posted: Wed Jul 11, 2012 6:11 pm
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.

Re: Flying car help

Posted: Wed Jul 11, 2012 6:31 pm
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.

Re: Flying car help

Posted: Wed Jul 11, 2012 6:54 pm
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!

Re: Flying car help

Posted: Wed Jul 11, 2012 7:59 pm
by PatrikE
It's easiest to create a mixtable for the Hybrid.

Re: Flying car help

Posted: Wed Jul 11, 2012 8:06 pm
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?

Re: Flying car help

Posted: Wed Jul 11, 2012 8:20 pm
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...

Re: Flying car help

Posted: Wed Jul 11, 2012 8:29 pm
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 :-)

Re: Flying car help

Posted: Wed Jul 11, 2012 9:02 pm
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

Re: Flying car help

Posted: Wed Jul 11, 2012 10:58 pm
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.

Re: Flying car help

Posted: Wed Jul 11, 2012 11:02 pm
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.

Re: Flying car help

Posted: Wed Jul 11, 2012 11:34 pm
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.

Re: Flying car help

Posted: Wed Jul 11, 2012 11:37 pm
by TS00
Thanks Patrik, much appreciated. I'll post an update tomorrow once I've tried this.

Re: Flying car help

Posted: Wed Jul 11, 2012 11:45 pm
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..;)

Re: Flying car help

Posted: Thu Jul 12, 2012 12:04 am
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.

Re: Flying car help

Posted: Thu Jul 12, 2012 12:05 am
by TS00
I forgot to ask, do I need to initialise servo[0] and motor[4], or are they just ready to drive?

Re: Flying car help

Posted: Thu Jul 12, 2012 12:23 am
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.. ;)

Re: Flying car help

Posted: Thu Jul 12, 2012 12:28 am
by TS00
Got it, thanks. Back with update tomorrow.

Flying Car Maiden Flight

Posted: Sun Jul 22, 2012 8:19 am
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.

Re: Flying car help

Posted: Sun Jul 22, 2012 4:13 pm
by chris ables
WOW! Cool ! Looks pretty touchy on flying controls ! I want a full size one i can ride in !

Re: Flying car help

Posted: Sun Jul 22, 2012 4:26 pm
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

Re: Flying car help

Posted: Sun Jul 22, 2012 5:18 pm
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 ;-)

Re: Flying car help

Posted: Sun Jul 22, 2012 5:43 pm
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-)

Re: Flying car help

Posted: Sun Jul 22, 2012 9:45 pm
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 :)

Re: Flying car help

Posted: Mon Jul 23, 2012 1:42 am
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!

Re: Flying car help

Posted: Sun Jul 29, 2012 9:32 pm
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

Re: Flying car help

Posted: Sat Apr 02, 2016 10:52 am
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

Re: Flying car help

Posted: Sun Apr 03, 2016 9:32 am
by LutzB
This is not the first one:
http://www.rcgroups.com/forums/showthread.php?t=2221060

This car even uses MultiWii!