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.

Brandon G's Content

There have been 92 items by Brandon G (Search limited from 29-March 23)


By content type

See this member's


Sort by                Order  

#8237 Quad.Net Quadrocopter for .NETMF

Posted by Brandon G on 24 January 2011 - 03:04 AM in Project Showcase

I have updated and made a very quick implementation of the hardware you have, there may be a few bugs in there but not bad for 10 mins work, your startup project is Quad.Net.FlightController.Implementations.FeziQuad



#8234 Quad.Net Quadrocopter for .NETMF

Posted by Brandon G on 24 January 2011 - 02:14 AM in Project Showcase

Yes i pm'ed you the credentials, let me give you your own Harness for your implementation will call it Quad.Net.FeziQuad.Implementation, dont think it'll fly right off bat there's a few things that might still need to be done, you've used some fairly specific esc implemntations and mine use some assumptions that i dont know yet, but not much will PM once i've committed with changes. Chris at this point i'm not sure the hz range i've seen has varied between 250 and 1000 level i've seen is, once i get some hardware in i can be more specific, I'll defer to Chris and Luke on this one



#8226 Quad.Net Quadrocopter for .NETMF

Posted by Brandon G on 24 January 2011 - 01:01 AM in Project Showcase

Magoocas, I didnt realize that video was you!!!! With a little bit of work you could fly with the code i've updated and a little bit of messing around with the source. I would love to see it run!



#8224 Quad.Net Quadrocopter for .NETMF

Posted by Brandon G on 24 January 2011 - 12:41 AM in Project Showcase

well after checking out the feziQuad i took all their code and implemented it in my framework, main control loop, PID, obviously not testing with hardware and have no test coverage yet but its fairly slick if i do say so myself, it has his implementation of PID minus the windup, want to understand its implications first, i have not implemented his gyro, esc, or radio yet either. If we got in touch with Cummings, we could test this

If i get hardware and some skills with soddering i could be up and running right now, I cleaned up alot of his code as well

Magoocas, its in source control

Here's an entry point to give u an idea

using Quad.Net.Commons.Configuration;
using Quad.Net.ElectricSpeedController;
using Quad.Net.Framework.Implementations.SecretLabs.PulseWidthModulation;
using Quad.Net.Framework.PulseWidthModulation;
using Quad.Net.Hardware.ElectricSpeedController;
using Quad.Net.Hardware.Gyro;
using Quad.Net.Hardware.Implementations.ElectricSpeedController.Implementations;
using Quad.Net.Hardware.Implementations.Gyro;
using Quad.Net.Hardware.Implementations.Radio;
using Quad.Net.Hardware.Implementations.SecretLabs.Pin;
using Quad.Net.Hardware.Pin;
using Quad.Net.Hardware.Radio;
using SecretLabs.NETMF.Hardware.Netduino;

namespace Quad.Net.FlightController.Implementations.Netduino
{
    public class Program
    {
        public static void Main()
        {
            IConfiguration settings = GetStaticSettings();

            //Assumes one type of speed controller on quad
            ISpeedControllerSettings speedControllerSettings = new HobbyKingSs2530Settings();
            
            ICpuPin pinFrontESC = new CpuPin(Pins.GPIO_PIN_D9);
            IPWM pwmFront = new SecretLabsPWM(pinFrontESC);
            SpeedController electricSpeedControllerFront = new SpeedController(speedControllerSettings, pwmFront);

            ICpuPin pinRearESC = new CpuPin(Pins.GPIO_PIN_D8);
            IPWM pwmRear = new SecretLabsPWM(pinRearESC);
            SpeedController electricSpeedControllerRear = new SpeedController(speedControllerSettings, pwmRear);

            ICpuPin pinRightESC = new CpuPin(Pins.GPIO_PIN_D7);
            IPWM pwmRight = new SecretLabsPWM(pinRightESC);
            SpeedController electricSpeedControllerRight = new SpeedController(speedControllerSettings, pwmRight);

            ICpuPin pinLeftESC = new CpuPin(Pins.GPIO_PIN_D6);
            IPWM pwmLeft = new SecretLabsPWM(pinLeftESC);
            SpeedController electricSpeedControllerLeft = new SpeedController(speedControllerSettings, pwmLeft);


            Motors motors= new Motors(electricSpeedControllerFront,electricSpeedControllerRear,electricSpeedControllerRight,electricSpeedControllerLeft);
           

            AxesController axesController = new AxesController(settings);
            IGyro gyro = new DefaultGyro();
            IRadio radio = new DefaultRadio();
            ControllerLoopSettings loopSettings = new ControllerLoopSettings(settings);
            Controller controller = new Controller(motors, axesController, gyro, radio, loopSettings);
                      

        }

        private static IConfiguration GetStaticSettings()
        {
            InMemoryConfiguration config = new InMemoryConfiguration();
            config["PitchDerivativeGain"] = "-.5";
            config["PitchItegralGain"] = "0";
            config["PitchProportionalGain"] = "1.2";

            config["RollDerivativeGain"] = "-.5";
            config["RollItegralGain"] = "0";
            config["RollProportionalGain"] = "1.2";

            config["YawDerivativeGain"] = "0";
            config["YawItegralGain"] = "0";
            config["YawProportionalGain"] = "3";

            config["RadioLoopFrequency"] = "25";
            config["SensorLoopFrequency"] = "300";
            config["MotorLoopFrequency"] = "300";
            config["LoopUnit"] = "2";

            return config;

        }
    }
}




#8204 Quad.Net Quadrocopter for .NETMF

Posted by Brandon G on 23 January 2011 - 08:14 PM in Project Showcase

Chris, that is exactly what we are looking for, if it were possible to get a faster line to the handlers send in delegates of our own to those handlers and was wrapped in a nice library i think we'd be laughing with a fast enough hz to do anything that can be done in arduino, therein lies the bottleneck, like i said there are ways around GC. I did some more research on F# the other day and saw how people have fooled the compiler to use VB and have found a way to do it in F# but for purposes of simplicity within this project i've decided to use C# and when i get to optimizing (if need be) might switch out some of the loops for F3 for speed.
Magoocas,
I am impressed, i think we found our starting point and might want to involve Luke in what we are trying to do. if you've looked at source control you can see the implementational way in which im approaching.
We have
the Quad.Net solution with:
Framework (contains interfaces like IPWM)
Framwork.Implementations.SecretLabs (implementations like SecretLabs.NETMF.Hardware.PWM)
This allows for us to swap out framework specific implementations, ie using fez's custom framework
Hardware (contains generic interfaces for things like motors, gyros and escs)
Hardware.Implementations (implemntations of hardware like HobbyKings ss2530 ESC)
Hardware.Implementations.Secretlabs (implementations for things specific to netduino board, things like Pins)
Quad.Net.FlightController (main entry point but in the form of interfaces, requires an implemntation, like fez or netduino)
Quad.Net.FlightController.Netduino (specific implementation of netduino board and its settings)

Example of Netduino Implemntation with a speedcontroller
using System.Threading;
using Quad.Net.ElectricSpeedController;
using Quad.Net.Framework.Implementations.SecretLabs.PulseWidthModulation;
using Quad.Net.Framework.PulseWidthModulation;
using Quad.Net.Hardware.ElectricSpeedController;
using Quad.Net.Hardware.Implementations.ElectricSpeedController.Implementations;
using Quad.Net.Hardware.Implementations.SecretLabs.Pin;
using Quad.Net.Hardware.Pin;
using SecretLabs.NETMF.Hardware.Netduino;

namespace Quad.Net.FlightController.Implementations.Netduino
{
    public class Program
    {
        public static void Main()
        {
            ICpuPin pin = new CpuPin(Pins.GPIO_PIN_D9);
            ISpeedControllerSettings electricSpeedControllerSettings = new HobbyKingSs2530Settings(pin);
            IPWM pwm = new SecretLabsPWM(pin);
            Controller controller = new Controller(electricSpeedControllerSettings,pwm);

            for (int i = 0; i <= 100; i++)
            {
                controller.ElectricSpeedController.SetThrottle(i);
                Thread.Sleep(50);
            }
        }

    }
}
What i have tried to accomplish with this is a framework where any contributor can swap out hardware, gyros or microcontroller that supports netmf and specific implementations of framework, fez vs secretlabs

What i'm hoping will happen is a user can throw a new esc in, implement an ESC interface specific to that esc, and fly 5 minutes later, or a board or a gyro or eventually other sensors, if we keep this generic enough we could add features and hardware very quickly and segregate the project in a more agile framework than what is being done in other projects as well as allow for various combinations of hardware software with little or no effort. Everyone else code that i have veiwed ha been scary dependent on hardware or assumptions and thus why the project falls down



#8185 Quad.Net Quadrocopter for .NETMF

Posted by Brandon G on 23 January 2011 - 05:44 PM in Project Showcase

just looked at the source there for feziquad, is that the one that you have flying in that video????? the code is very simple and I like how its organized, I like alot of things in there. If thats the one thats flying i am impressed



#8184 Quad.Net Quadrocopter for .NETMF

Posted by Brandon G on 23 January 2011 - 05:18 PM in Project Showcase

I am not a DDD expert but i try to use their methodologies



#8181 Coding style discussion

Posted by Brandon G on 23 January 2011 - 05:12 PM in General Discussion

Yes Domain Driven Design, read eric evans and Jimmy Nillson, they changed everything



#8118 Quad.Net Quadrocopter for .NETMF

Posted by Brandon G on 22 January 2011 - 09:14 PM in Project Showcase

Magoocas, Fellow Canuck. The aeroquad software is pretty good. I've looked through a few of their classes and they've done agreat job with some of the avionics and physics concepts. A big part of what i am trying to accomplish in this project is a nice domain of those concepts, they seem to have mashed them together quite a bit, I come from DDD and want to apply that technique here. A port would be great and we can just try and organize it better. I have been inundated with my day job and my own $ making projects the last 2 weeks, but I'm about to order all my parts and start with the three gyro concept which will be just the stab part, not the full 9 degrees of freedom concepts. I will PM you for SVN repository



#8068 NetDuino Quadrocopter

Posted by Brandon G on 21 January 2011 - 05:45 PM in Netduino 2 (and Netduino 1)

a small test shows he's wrong, too bad was worth a try



#8066 NetDuino Quadrocopter

Posted by Brandon G on 21 January 2011 - 05:14 PM in Netduino 2 (and Netduino 1)

A guru buddy of mine suggested that F# would be perfect for the stab loop part of the program and saidi would be able to use F# as long as the calling assembly (entry point) was still in C#. So the C# program would call into and F# dll, since it all compiles to the same binaries it shouldnt be an issue. I would assume the same can be done with VB, listen to http://www.dotnetroc...spx?showNum=625 where they speak about VB



#7960 Quad.Net Quadrocopter for .NETMF

Posted by Brandon G on 19 January 2011 - 11:42 PM in Project Showcase

http://www.engadget....nType=wl-gadget



#7959 Quad.Net Quadrocopter for .NETMF

Posted by Brandon G on 19 January 2011 - 11:40 PM in Project Showcase

that video when posted on engadget is what got me really interested. there's some guys at MIT doing some cool stuff too. The one i found a lil crazy was the one that had the kinect hardware attached for object detection, which i think can be done alot simpler with less weight but still a neat concept



#7788 Fluent Interop 1.2

Posted by Brandon G on 17 January 2011 - 01:24 AM in Project Showcase

That is fantastic and may help for getting quicker results in my quad project



#7784 NetDuino Quadrocopter

Posted by Brandon G on 16 January 2011 - 11:51 PM in Netduino 2 (and Netduino 1)

http://forums.netdui...pter-for-netmf/



#7783 Quad.Net Quadrocopter for .NETMF

Posted by Brandon G on 16 January 2011 - 11:49 PM in Project Showcase

As posted on another forum page http://forums.netdui...o-quadrocopter/ I've started a new quadrocopter project. Its just a start and I'm sure will not be easy but I look forward to working with this community to get it moving. As well I am trying to make this hardware and implementation of framework agnostic. So potentially it could run on Netduino or other .netmf boards, but of course we'll be working towards the netduino application first and foremost, it will also be run with a plug and play config so we can add in support for different types of hardware / gyros / escs / acceleometer, magnetometer, altimeter etc. PM if interested and look at the source which as it stands right now is just structure of the project that i have set up in my head.



#7779 NetDuino Quadrocopter

Posted by Brandon G on 16 January 2011 - 09:44 PM in Netduino 2 (and Netduino 1)

Good call. BTW, the quantum is a constant and can be changed in code. We've never tried increasing it but it could be possible to increase it to, say, a few weeks/months. If everything is executing on a single thread and one is not using events or threading, this could be a valuable mod.

Chris



Chris where do i change this setting?



#7778 NetDuino Quadrocopter

Posted by Brandon G on 16 January 2011 - 09:42 PM in Netduino 2 (and Netduino 1)

Have started some source control on this, just taking some initial stabs at getting a nice generic framework put together for project. Separating hardware / frameworks from implementations as a trial of framework i put in chris setos old esc driver code with some modifications, havent tested it against any hardware nor put in test cases but wanted to assert the structure first then will deal with implementational details later starting pooint of code is Quad.Net.FlightController.Implementations.Netduino PM me for address, it should be a readonly right now, but as i get things solidified i would like to open it up to contributions, thoughts/criticisms always welcome



#7775 System.Configuration

Posted by Brandon G on 16 January 2011 - 08:39 PM in General Discussion

Is there an equivalent to Config in netMF?



#7773 Netduino ESC driver

Posted by Brandon G on 16 January 2011 - 07:24 PM in Netduino 2 (and Netduino 1)

thanks chris, do have a link to more upto date code, i assume frame width would be a config point



#7750 Netduino ESC driver

Posted by Brandon G on 16 January 2011 - 07:25 AM in Netduino 2 (and Netduino 1)

Chris, as i look through how to do this best you are turning out to be a great resource, thanks it really appreciated. the above code, just trying to get my head around the concepts and expose my newbie skill sets here. the SetPulse method of the pwm, what is the 20,000, trying to find docs on it but dont quite get it I will attach my changes/ assumptions afterwards



#7665 NetDuino Quadrocopter

Posted by Brandon G on 14 January 2011 - 05:43 PM in Netduino 2 (and Netduino 1)

gryo disassembly http://www.kkmultico...embly&Itemid=65 they are just using what they need



#7655 Microsoft.SPOT.Reflection.Serialize() / Deserialize() throws System.NotImplem...

Posted by Brandon G on 14 January 2011 - 04:41 PM in General Discussion

Not a problem, will be a couple weeks before i can start but look forward to it



#7654 NetDuino Quadrocopter

Posted by Brandon G on 14 January 2011 - 04:38 PM in Netduino 2 (and Netduino 1)

dones, thanks for the PID link. great point starting with just one plane might be easier as a proof of concept, I was thinking of doing some simple tests with the gryos before i considered flying at all. a simple 2 prop setup might be a good way to start. Jan I will look at them more deeply, my understanding was they using one gyro for each roll pitch yaw and that they were being sent back to the controller for pid changes, they had basically taken those things apart and done a straight sodder to their custom board, they were chosen because they were cheap and they had the best success with them. I have read sparkfuns gyro acceleromter guide and man is it thorough, my hope was to go with what was proven out there and follow their same steps. Sparkfun has some great ones with 3 axis in one that would be ideal for this application but are more expensive and a more of an unknown but if your above post is correct then may be the way i need to go



#7635 NetDuino Quadrocopter

Posted by Brandon G on 14 January 2011 - 04:34 AM in Netduino 2 (and Netduino 1)

and i always love the moon reference, its bloody amazing they did it at all. its funny but a quad is harder and requires more calcs




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.