Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Quad.Net Quadrocopter for .NETMF


  • Please log in to reply
119 replies to this topic

#81 zerov

zerov

    Member

  • Members
  • PipPip
  • 11 posts
  • LocationGermany

Posted 02 February 2011 - 09:47 PM

Complete IMU thing is is offloaded on a arduino based IMU. Sparkfun's 9 dof Razor. I have modified the Output to a binary protocol with checksum. Done in the ArduIMU.cs. It's compatible with the binary UBLOX GPS, future save. Just connect a UBLOX GPS to the IMU.

#82 zerov

zerov

    Member

  • Members
  • PipPip
  • 11 posts
  • LocationGermany

Posted 04 February 2011 - 02:07 PM

Are there any schematics how to connect the "Dataconcentrator"? I've taken a deeper look at your framework, it's a good piece of code. I've added some code to support my peripherals. I just need an arduino for the Dataconcentrator.

#83 Brandon G

Brandon G

    Advanced Member

  • Members
  • PipPipPip
  • 92 posts
  • LocationVancouver BC, Canada

Posted 04 February 2011 - 08:52 PM

Thanks Zerov, do you want commit authority on the source? I've looke at your stuff as well, i think there's alot we can do to help one another, like your circular byte collection code.

#84 Luke Cummings

Luke Cummings

    Advanced Member

  • Members
  • PipPipPip
  • 38 posts
  • LocationCalgary, AB

Posted 04 February 2011 - 08:55 PM

Are there any schematics how to connect the "Dataconcentrator"?
I've taken a deeper look at your framework, it's a good piece of code.

I've added some code to support my peripherals.
I just need an arduino for the Dataconcentrator.


Hey zerov,

I don't have any schematics (it's all just proto'd right now), but at a basic level you will just need to interface your arduino (or any other realtime mcu), and the netmf board over I2C. I used this logic level converter to get them talking: http://www.sparkfun.com/products/8745. It's not actually strictly necessary to use the level converter between the arduino and you netmf board as they are usually 5V tolerant, however since I put the gyro and accel on the same bus you will need the converter(they are 3v only). I will attempt to put together a diagram of how I have everything wired up this weekend.

-Luke
Cheap, Fast, Good... Pick two

#85 zerov

zerov

    Member

  • Members
  • PipPip
  • 11 posts
  • LocationGermany

Posted 04 February 2011 - 10:59 PM

I've connected the Arduino to my FEZ Domino using the I2C. Working... I see why you use the Arduino to get the radio data, but why the motors are connected there too? Haven't the Netduino and Domino/Panda native PWM pins? I wanted to use the PWM's on my FEZ. My IMU is connected via serial @56k to the FEZ, uses a binary protocol, needs no GC. Getting every ~20ms new data. Parsing lasts ~3ms. The data have to be parsed continuously, not only on demand. At least I don't know how to do this on demand. Maybe it would be more reliable / faster to parse the serial data on the Arduino and transmit it via the I2C. The IMU itself is a Ardiuno, but the I2C isn't exposed. http://www.sparkfun.com/products/9623 What do you think?

#86 Luke Cummings

Luke Cummings

    Advanced Member

  • Members
  • PipPipPip
  • 38 posts
  • LocationCalgary, AB

Posted 05 February 2011 - 12:56 PM

I see why you use the Arduino to get the radio data, but why the motors are connected there too? Haven't the Netduino and Domino/Panda native PWM pins? I wanted to use the PWM's on my FEZ.
...
What do you think?


Yeah you noticed that eh? I originally was going to use my arduino as the flight control board. It was just easier to relay motor command over I2C. I actually just finished rewiring the shield so that the pwm pins come from my fez panda directly. So you totally had the right idea there.

So now the razor. Ultimately creating code for interfacing with stuff like the razor is something we want to do, we're just not at that stage yet. Wasting 3ms on parsing the razor's ahrs code is really a waste though, and really from everything i've seen about multicopters so far 50Hz is not gonna be nearly fast enough. You could totally re-write the firmware to get spit out raw data across serial on a demand basis and if you need help i can provide it. My personal recommendation is to just ditch the razor imu for this instead http://www.sparkfun....products/10321.

As far as concetrating all this data on another arduino, I think that adds too much complexity. All I really want the arduino to be is a PPM to I2C converter for the radio. I think eventually I will swap out the teensy for something even smaller.

Cheers
Cheap, Fast, Good... Pick two

#87 zerov

zerov

    Member

  • Members
  • PipPip
  • 11 posts
  • LocationGermany

Posted 05 February 2011 - 06:59 PM

But if I take such a 9dof stick, I must make all the calculations on the .netmf device.
The Razor 9dof would do all this calculations:

Direction Cosine Matrix (DCM) based Attitude Heading Reference System (AHRS) with gyro drift correction based on accelerometer (gravity) vector and magnetometer (compass) vector.


I have binary messages over serial: [type:length in byte]

[DIYd:4][ID:1][roll:2[pitch:2][yaw:2][checksum:2] => 13byte

But how to request data on demand? just send a byte to the Razor and respond?

#88 Luke Cummings

Luke Cummings

    Advanced Member

  • Members
  • PipPipPip
  • 38 posts
  • LocationCalgary, AB

Posted 06 February 2011 - 06:36 AM

But if I take such a 9dof stick, I must make all the calculations on the .netmf device.
The Razor 9dof would do all this calculations:


I have binary messages over serial: [type:length in byte]

[DIYd:4][ID:1][roll:2[pitch:2][yaw:2][checksum:2] => 13byte

But how to request data on demand? just send a byte to the Razor and respond?



Yeah i would just setup a polling loop to check for an incoming message, then provided the data. and honestly you are providing the data so frequently I dont see any value in doing checksum calculations either.

The reason I don't want to be doing calculations on an external board is it reduces accessibility to the code. Principally we want to be able to plug and play hardware, with all control logic being done on the .netmf device. To be honest if your not gonna use the .netmf device to do your control logic then why use it at all. The additional arduino is for convenience, eventually I would like to move to native solution for handling the radio ppm stuff.
Cheap, Fast, Good... Pick two

#89 Luke Cummings

Luke Cummings

    Advanced Member

  • Members
  • PipPipPip
  • 38 posts
  • LocationCalgary, AB

Posted 06 February 2011 - 07:35 PM

Ok so I have a new issue I'm wondering if anybody has any ideas. Right now I have the netmf board being powered directly off a bec from one the escs. I recently rewired the shield so that the PWM signal now comes directly from the netmf board, instead of the external mcu I was am using to convert the radio PWM into I2C registers. This creates a new problem as netmf takes a couple of seconds to bootstrap and initialize the pwm outputs, and the escs require a 0% signal to bootup properly. I realize that I could solve this by powering the netmf board directly from the battery and power on the escs after the board is initialized, but I prefer to not add extra complexity for powering on the unit. So right now the solution is to power the netmf board on usb to let it bootstrap, then add battery power a couple seconds later to allow the escs to boot properly. Any ideas?
Cheap, Fast, Good... Pick two

#90 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 06 February 2011 - 07:41 PM

Any ideas?

A pull-down resistor on PWM output?

#91 Luke Cummings

Luke Cummings

    Advanced Member

  • Members
  • PipPipPip
  • 38 posts
  • LocationCalgary, AB

Posted 06 February 2011 - 08:09 PM

A pull-down resistor on PWM output?


I'm not sure what that would do. The issue is that for the escs to boot they want to see a 0% signal (1000 us pulse, or whatever they have been calibrated for).
Cheap, Fast, Good... Pick two

#92 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 06 February 2011 - 08:32 PM

I'm not sure what that would do. The issue is that for the escs to boot they want to see a 0% signal (1000 us pulse, or whatever they have been calibrated for).

A pull-down resistor pulls the output to ground - so, there will be 0% PWM output (logic low) during Netduino startup (when the pin is floating high). With the proper value (~2 kΩ was reported to be working fine), PWM output (logic high) will override the logic level set up by the pull-down resistor, so the ESC then gets the PWM waveform.

#93 Luke Cummings

Luke Cummings

    Advanced Member

  • Members
  • PipPipPip
  • 38 posts
  • LocationCalgary, AB

Posted 06 February 2011 - 09:35 PM

A pull-down resistor pulls the output to ground - so, there will be 0% PWM output (logic low) during Netduino startup (when the pin is floating high).


Your missing the point, 0% output is not logic low, 0% output is a pulse lasting 1000 microseconds every 20 milliseconds. Holding the pin low would not do anything.
Cheap, Fast, Good... Pick two

#94 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 06 February 2011 - 09:40 PM

Your missing the point, 0% output is not logic low, 0% output is a pulse lasting 1000 microseconds every 20 milliseconds. Holding the pin low would not do anything.

I see - sorry for my misunderstanding.

#95 Luke Cummings

Luke Cummings

    Advanced Member

  • Members
  • PipPipPip
  • 38 posts
  • LocationCalgary, AB

Posted 06 February 2011 - 11:53 PM

I see - sorry for my misunderstanding.


No problem I didn't mean to be rude in my response. Actually thinking about it though it might be worth a try. I wasn't thinking about the fact that the pins will float during startup, I'm gonna try this anyways it might actually be a solution. Given not what I was thinking of, but I will report back if this works.

Cheers
Cheap, Fast, Good... Pick two

#96 zerov

zerov

    Member

  • Members
  • PipPip
  • 11 posts
  • LocationGermany

Posted 07 February 2011 - 06:29 AM

I have the same, but my ESC's don't care about the short absence of the PWM. As soon as the PWM is alive the ESC's are initialising. But my FEZ Domino does not take a couple of seconds to boot.. Just about one second.

#97 Mark H

Mark H

    Advanced Member

  • Members
  • PipPipPip
  • 70 posts
  • LocationPerth, Western Australia

Posted 11 February 2011 - 03:31 AM

ESC's dont care if they dont have a signal when they turn on. They need to cater for there being no R/C signal when someone plugs in the plane first then realises their transmitter is off. Once they start getting PWM they will use that - and usually not the first packet either, they typically have hysteresis in them to require a stable time on the PWM. I wouldn't worry about the minuscule boot-up time. Just go with it. I regularly turn on my planes without the TX on (I know, I'm naughty).

#98 zerov

zerov

    Member

  • Members
  • PipPip
  • 11 posts
  • LocationGermany

Posted 11 February 2011 - 04:40 PM

Brandon mentioned in a other Post that you will move to gitHub, so?
I want to fork ^^ so it's easy to merge our codes =)

Edit: forked it :)

#99 iliak

iliak

    New Member

  • Members
  • Pip
  • 8 posts

Posted 16 February 2011 - 08:16 AM

Hi

Do you know DIYDrones ?

These are our Arduino-based open source autopilot projects:
* ArduPilot, a low-cost autopilot system for planes.
* ArduCopter, a fully-autonomous quadcopter and heli UAV system.

This can help you...

--
Iliak

#100 Falstaff

Falstaff

    New Member

  • Members
  • Pip
  • 8 posts
  • LocationBellevue, WA

Posted 18 February 2011 - 06:01 AM

Just stepping in here as a new Netduino user to say "Hi guys!" I love the idea of a Netduino quadcopter controller! I have a Draganflyer IV, but was never impressed with its stability. I always thought that with just throttle control it should maintain stable, level flight; but it doesn't come close. (I think newer versions are far more stable.) So I've long carried the thought in the back of my mind to take on the project of developing my own controller for it. Has anyone here ever considered gutting a Draganflyer as a platform for the Quad.Net Quadcopter controller? I may eventually endeavor to help this project where I can, once I decide where I really want to devote my time. I had been looking to resume developing a land-based Robomagellan-type rover, but your project piques my interest. I have a LOT of experience with .NET/C# (Windows PC) development and a fair amount with AVR- and XBee-based electronics control. So the Netduino seems to meld these interests quite nicely.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.