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-April 23)


By content type

See this member's


Sort by                Order  

#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?



#9547 Runtime Native Code Interop

Posted by Brandon G on 14 February 2011 - 09:04 PM in General Discussion

Chris,
Thank you for this. I think this will help a great deal in the cases where near realtime is necessary. I know this requires alot of work to integrate and glad your team are doing it. I would really hope that the NETMF team will take you and GHI's lead as far as providing interops and push it into NETMF. I love managed code and will always write in it when i can, even when knowing i am sacrificing speed for elegance, but given my recent project DotCopter.NET there is no way it can all be done in managed. So in an appeal to the NETMF team, to avoid further fragmentation, they need to pull this into the framework for the cases where its a last resort.

Again, thank you for your efforts Chris.
Brandon



#8862 Reference NETMF libraries in .NET

Posted by Brandon G on 02 February 2011 - 05:34 AM in General Discussion

I think i ran into a brick wall here, which .NET 4.0 project in the sdk loads up assemblies based in NETMF 4.0? Here's the error i get, i dont necessarily want to emulate hardware i merely want to use some of its assemblies I will always get the error ECall methods must be packaged into a system module I have successfully run test before that called simple classes but the call i am making from a form app to netmf dll is using Spot.Hardware which I cant see how to load that in



#8779 Reference NETMF libraries in .NET

Posted by Brandon G on 31 January 2011 - 10:18 PM in General Discussion

if you could dig up when in front of computer cause thus far my search has revealed nothing



#8777 Reference NETMF libraries in .NET

Posted by Brandon G on 31 January 2011 - 10:13 PM in General Discussion

I actually have got Nunit to work on some simple tests but maybe thats because the classes were so simple



#8775 Reference NETMF libraries in .NET

Posted by Brandon G on 31 January 2011 - 09:53 PM in General Discussion

I have a windows app that i want to be able to call some of the methods of netmf assemblies, is this at all possible? is there a way for an emulator to take over to be able to load those objects



#10645 Quadcopter Early Flight

Posted by Brandon G on 07 March 2011 - 06:53 PM in Project Showcase

great job JBW, PM me when you get a chance



#8527 Quad.Net Quadrocopter for .NETMF

Posted by Brandon G on 27 January 2011 - 06:55 AM in Project Showcase

understand it now, we just compensated in code rather than on tx, that will allow any tx to connect and we should be able to calibrate for it



#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



#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;

        }
    }
}




#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



#8581 Quad.Net Quadrocopter for .NETMF

Posted by Brandon G on 27 January 2011 - 07:22 PM in Project Showcase

Whoa a month, i guess i need to stop procrastinating......

heres my ideas hardware wise, would like some opinions, you mentioned using a better BEC, so I have taken it off the list open for your suggestions, keeping in mind i am trying to be very modular is the reason for the component shield

Motor	6	 $6.00 	 $36.00 	http://www.hobbyking.com/hobbycity/store/uh_viewItem.asp?idProduct=5354&aff=104834
ESC	6	 $9.23 	 $55.38 	http://www.hobbyking.com/hobbycity/store/uh_viewItem.asp?idProduct=6458&Product_Name=Hobbyking_SS_Series_25-30A_ESC_%28card_programmable%29&aff=104834
Props	8	 $4.00 	 $32.00 	https://www.mikrocontroller.com/index.php?main_page=product_info&cPath=75&products_id=256&zenid=43fb24fa5fbee9bca99cea5ee6462e48
Battery	3	 $19.00 	 $57.00 	http://hobbycity.com/hobbyking/store/uh_viewItem.asp?idProduct=7634
Battery Charger	1	 $25.00 	 $25.00 	http://www.hobbyking.com/hobbyking/store/uh_viewitem.asp?idproduct=2055 
Frame	1	 $90.00 	 $90.00 	http://quadframe.com/html/quad002.html
RC Transmitter	1	 $60.00 	 $60.00 	http://hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=8992
ITG3200/ADXL345	1	 $65.00 	 $65.00 	http://www.sparkfun.com/products/10321
Component Shield	1	 $22.00 	 $22.00 	http://www.robotshop.ca/ghi-component-shield-v2.html
JST Sensor Cable	20	 $1.76 	 $35.20 	http://www.robotshop.ca/inex-jst3aa-sensor-cable.html



#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.



#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



#8535 Quad.Net Quadrocopter for .NETMF

Posted by Brandon G on 27 January 2011 - 08:10 AM in Project Showcase

Thanks Mark that makes sense, we need to just concentrate on throttle and throttle alone.
Chris thank you for the forum etiquette reminder. The posts were fast given we we had discovered the algo at the exact same time i replied and implemented it in code, i've attached our algo. i think you might be on to something as far as making it a scaling variable that can change as the flight conditions change.
using System;
namespace Quad.Net.Commons.Utilities
{
    public class Scale
    {
        private readonly double[] _coefficients;
        private readonly double _offset;

        public Scale(double offset, params double[] coefficients)
        {
            _coefficients = coefficients;
            _offset = offset;
        }

        public double Calculate(double value)
        {
            double output = 0;

            for (int i = 0; i < _coefficients.Length; i++)
            {
                output += Math.Pow(value + _offset, i) * _coefficients[_coefficients.Length - i - 1];
            }
            return output;
        }
    }
}
namespace Quad.Net.Tests
{
    [TestFixture]
    public class ScaleTests
    {
        [Test]
        public void TestQuadratics()
        {
            Scale scale = new Scale(-1500, 0.0000008, 0, 0, 0);
            Assert.AreEqual(scale.Calculate(1000),-100);
        }
    }
}



#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



#8598 Quad.Net Quadrocopter for .NETMF

Posted by Brandon G on 28 January 2011 - 04:06 AM in Project Showcase

lol, guess i responded too quickly, thank you for your suggestions



#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



#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!



#8522 Quad.Net Quadrocopter for .NETMF

Posted by Brandon G on 27 January 2011 - 06:42 AM in Project Showcase

well we're dealing with some hardware issues but have just put in an rx scale to tone it down, basically a parabola on the stick control



#8867 Quad.Net Quadrocopter for .NETMF

Posted by Brandon G on 02 February 2011 - 05:55 AM in Project Showcase

all of them have great reviews, i may be following your lead here. frame wise i am still uncertain i might be going full on here and get one of these guys http://www.maximus-r...fr/maxicopters/



#8524 Quad.Net Quadrocopter for .NETMF

Posted by Brandon G on 27 January 2011 - 06:47 AM in Project Showcase

we think its tx, everything else looks good in code now we just need to cool the rx down, chris take a look at the scale PID and RX, we're cleaning it up now



#8525 Quad.Net Quadrocopter for .NETMF

Posted by Brandon G on 27 January 2011 - 06:49 AM in Project Showcase

Chris, what do you mean by dual rates and expo on TX, we are trying to compensate for some odd things in tx right now, is there a concept we're missing



#16328 Quad.Net Quadrocopter for .NETMF

Posted by Brandon G on 04 August 2011 - 03:52 PM in Project Showcase

Hi guys, Long time, I have fallen into an abyss of work and have not been able to track back at all here. Last bit of progress was a generic plug and play driver system that is 90% finished. Luke and I touched base the other day and as my work schedule slows we will be back to contributing. Will post back here as soon as I can Brandon




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.