- Netduino Forums
- → Brandon G's Content
Brandon G's Content
There have been 92 items by Brandon G (Search limited from 17-June 23)
#7775 System.Configuration
Posted by Brandon G on 16 January 2011 - 08:39 PM in General Discussion
#9547 Runtime Native Code Interop
Posted by Brandon G on 14 February 2011 - 09:04 PM in General Discussion
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
#8777 Reference NETMF libraries in .NET
Posted by Brandon G on 31 January 2011 - 10:13 PM in General Discussion
#8775 Reference NETMF libraries in .NET
Posted by Brandon G on 31 January 2011 - 09:53 PM in General Discussion
#8779 Reference NETMF libraries in .NET
Posted by Brandon G on 31 January 2011 - 10:18 PM in General Discussion
#10645 Quadcopter Early Flight
Posted by Brandon G on 07 March 2011 - 06:53 PM in Project Showcase
#8901 Quad.Net Quadrocopter for .NETMF
Posted by Brandon G on 02 February 2011 - 07:58 PM in Project Showcase
#7960 Quad.Net Quadrocopter for .NETMF
Posted by Brandon G on 19 January 2011 - 11:42 PM in Project Showcase
#8226 Quad.Net Quadrocopter for .NETMF
Posted by Brandon G on 24 January 2011 - 01:01 AM in Project Showcase
#8184 Quad.Net Quadrocopter for .NETMF
Posted by Brandon G on 23 January 2011 - 05:18 PM in Project Showcase
#8234 Quad.Net Quadrocopter for .NETMF
Posted by Brandon G on 24 January 2011 - 02:14 AM in Project Showcase
#8867 Quad.Net Quadrocopter for .NETMF
Posted by Brandon G on 02 February 2011 - 05:55 AM in Project Showcase
#8237 Quad.Net Quadrocopter for .NETMF
Posted by Brandon G on 24 January 2011 - 03:04 AM in Project Showcase
#8224 Quad.Net Quadrocopter for .NETMF
Posted by Brandon G on 24 January 2011 - 12:41 AM in Project Showcase
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
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
#8118 Quad.Net Quadrocopter for .NETMF
Posted by Brandon G on 22 January 2011 - 09:14 PM in Project Showcase
#8185 Quad.Net Quadrocopter for .NETMF
Posted by Brandon G on 23 January 2011 - 05:44 PM in Project Showcase
#7959 Quad.Net Quadrocopter for .NETMF
Posted by Brandon G on 19 January 2011 - 11:40 PM in Project Showcase
#8581 Quad.Net Quadrocopter for .NETMF
Posted by Brandon G on 27 January 2011 - 07:22 PM in Project Showcase
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
#8900 Quad.Net Quadrocopter for .NETMF
Posted by Brandon G on 02 February 2011 - 07:58 PM in Project Showcase
#8598 Quad.Net Quadrocopter for .NETMF
Posted by Brandon G on 28 January 2011 - 04:06 AM in Project Showcase
#8904 Quad.Net Quadrocopter for .NETMF
Posted by Brandon G on 02 February 2011 - 08:51 PM in Project Showcase
#8251 Quad.Net Quadrocopter for .NETMF
Posted by Brandon G on 24 January 2011 - 05:55 AM in Project Showcase
below is the simple data used by the reciever and gyro(s)
namespace Quad.Net.Avionics { public class AircraftPrincipalAxes { /// <summary> /// http://en.wikipedia.org/wiki/Aircraft_principal_axes /// </summary> private int _pitchAngle; private int _rollAngle; private int _yawAngle; public AircraftPrincipalAxes(int pitchAngle, int rollAngle, int yawAngle) { _pitchAngle = pitchAngle; _rollAngle = rollAngle; _yawAngle = yawAngle; } public int PitchAngle { get { return _pitchAngle; } } public int RollAngle { get { return _rollAngle; } } public int YawAngle { get { return _yawAngle; } } } } using Quad.Net.Avionics; namespace Quad.Net.Hardware.Radio { public interface IRadio { int Throttle { get; } AircraftPrincipalAxes GetAxes(); } } using Quad.Net.Avionics; namespace Quad.Net.Hardware.Gyro { public interface IGyro { AircraftPrincipalAxes GetReading(); } }
these classes would be tied to the events coming off those 6 or 8(gyro implementation specific) pieces of hardware and updating their values within the control loop
you beat me to it Chris, thanks.
As chris said there are a bunch of IMU's that cacn calculate speed, angle acceleration, but the simnplest is to start with a 3 axis gyro and then the aim is to get more complicated later, eventually implementing 5-9 degrees of freedom
#8253 Quad.Net Quadrocopter for .NETMF
Posted by Brandon G on 24 January 2011 - 06:19 AM in Project Showcase
- Netduino Forums
- → Brandon G's Content
- Privacy Policy