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.

Mark H's Content

There have been 70 items by Mark H (Search limited from 05-June 23)


By content type

See this member's


Sort by                Order  

#3264 Works in Droid docking station

Posted by Mark H on 30 September 2010 - 07:36 AM in General Discussion

The Droid/Milestone dock uses magnets to tell the device in it that it is in a dock (and what kind) so the usb connector is just a usb connector.



#9750 while(true)

Posted by Mark H on 18 February 2011 - 07:18 AM in General Discussion

It actually does delay other threads, try it :) Other threads will wait up to 5ms depending on their thread priority.



#9739 while(true)

Posted by Mark H on 18 February 2011 - 01:58 AM in General Discussion

while (true) is bad to use (Thread.Sleep is the correct way) because it is basically keeping the CPU doing something constantly. This makes it so that other threads may be delayed in getting access to processor time giving you a slow response and also doesn't let the chip go into a power saving mode.



#2864 What's feasible and what's not

Posted by Mark H on 25 September 2010 - 09:22 AM in General Discussion

Wikipedia can be a really great resource for understanding what different protocols mean, usually the articles are high level enough that most people with basic electronics knowledge can understand them and if you need more information you'd be able to go to google to look for specifics. 1 wire is just a protocol for systems to communicate, like i2c, CAN, SPI, TTL and RS232 among others are. 



#2840 What's feasible and what's not

Posted by Mark H on 25 September 2010 - 03:00 AM in General Discussion

Unfortunately, Netduino doesn't appear to support 1 Wire, so you'd want to look for an i2c, spi or analogue output temperature sensor. Something like a LM60 from National or a TMP36 from Analog are examples of analogue output sensors.



#2729 Wait...what's this?

Posted by Mark H on 24 September 2010 - 07:55 AM in Netduino Plus 2 (and Netduino Plus 1)

Very interesting, looking forward to seeing more information on this device!



#2836 Stay close to your computer (or come to MakerFaire)...

Posted by Mark H on 25 September 2010 - 01:36 AM in General Discussion

klotz,

A bit of both. But mostly a software limitation. If there's interest, we can start a community project to expand this to 4GB or beyond (for MicroSD cards that support SPI).

Chris


Any chance of going native on the uSD rather than using SPI so as to get the higher speed read/write?



#7884 Software reset

Posted by Mark H on 19 January 2011 - 02:56 AM in Netduino 2 (and Netduino 1)

There is a far easier way everyone has overlooked :) Use the watchdog service in Microsoft.SPOT.Hardware. http://msdn.microsof...y/ee436617.aspx Set a timeout of 1milisecond. Set Enabled property on the watchdog to true. Thread.Sleep for 100ms. Watchdog will reboot the device.



#7979 Software reset

Posted by Mark H on 20 January 2011 - 07:10 AM in Netduino 2 (and Netduino 1)

I've only used the watchdog on FEZ/GHI products. I assumed it was implemented on the NetDuino.

TimeSpan ts = new TimeSpan(0, 0, 0, 0, 1);

Will create a 1ms timespan faster (object creation time wise) than your call above.

Fred,
What you actually want is to use the watchdog how it's intended - rather than just arbitrarily rebooting your device - wait until it locks up and then reboot it. Simply create a timer that executes once ever 5 seconds or so which resets the watchdog timer, and set the watchdog to 5.5-6s. If it doesn't get reset - the watchdog "expires" and restarts the device.



#14268 Silverlight Client and Server for Netduino Plus

Posted by Mark H on 13 June 2011 - 07:30 AM in Project Showcase

Nevyn, it appears you've deleted the images from your server? Do you have them hosted elsewhere?



#14269 Servos and batteries

Posted by Mark H on 13 June 2011 - 07:32 AM in Netduino Mini

What sort of battery are you using? Can it supply enough current?



#8868 Quad.Net Quadrocopter for .NETMF

Posted by Mark H on 02 February 2011 - 06:38 AM in Project Showcase

If you want to spend that much money on a frame Brandon, why not get a Gaui? In my opinion, they look a lot more solid and are cheaper. The copters at the link you sent look like they are just a moulded stick design for 400-800euro. To start with, why not get a basic stick armed quad? If mine works out i can put up the design files for printing and then cutting the carbon.



#8519 Quad.Net Quadrocopter for .NETMF

Posted by Mark H on 27 January 2011 - 06:34 AM in Project Showcase

I think you need to tone your control loop adjustments or your stick inputs down. It looks like it's doing too much and can't correct fast enough.



#8596 Quad.Net Quadrocopter for .NETMF

Posted by Mark H on 28 January 2011 - 03:55 AM 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


Sorry for the double post - however my other post is so off topic it's not funny, and I worried you wouldn't read to this part.

I'd like to make a few suggestions to you - I've been flying for 15 years, and worked for several years in a hobby shop for fun as a second job. These are of course just suggestions.

For your charger, get one of these: http://www.hobbyking...=7028&aff=19701
This will give you far more options for charging batteries, which is safer - and more versatile. I bought one of these for my father-in-law-to-be for christmas. This will let you charge many different types of battery and also discharge/cycle batteries as well which can be very handy.


For your transmitter, if you don't need 9 channels get one of these: http://www.hobbyking...=9041&aff=19701 with http://www.hobbyking...idProduct=9043. This is the basic 6ch tx and usb cable. The USB cable is just a SiLabs VCP. The controller can then be programmed by software on a PC. The software is rather ugly and not very good, but it works and will save you a bunch of money.

I assume you're getting 2 motors as spares? Those are pretty crappy and you in my experience you may have a dud in the 6, so that's a good idea.

ESC's - I'd suggest http://www.hobbyking...=4312&aff=19701 - I don't trust any ESC's except Turnigy Plush/Sentry honestly. I've had a couple of planes go down in a ball of smoke (or fire) because an ESC failed and caught fire - or the PCB turned to ash from the heat. I have pictures somewhere at home heh. Your motors max draw is only 14.5A, so 30A esc's are just extra weight. A Turnigy 18A plush has Fairchild HEXFET's rated to about 22A.

Battery should be fine, that will allow you 20A/motor in a quad copter. If you're building a Hexcopter you'll need a bigger battery, or higher C rating.

Frame: That looks pretty darn tacky for $90 - i'd want a lot more for my $90 than that. I've seen similar to that for about $40. Chris Seto can probably point you at a couple of basic stick type ones for cheap, i know he did a lot of research into them a couple of months back. Personally, I'd go for something like: http://www.foxtechfp...rame-p-196.html - these are plywood which is easy to repair and it's built extremely strong - they'll take some pretty big crashes :)



#8531 Quad.Net Quadrocopter for .NETMF

Posted by Mark H on 27 January 2011 - 07:33 AM in Project Showcase

Have you flown an R/C plane or helicopter before? A common thing for beginner pilots is to give full stick corrections when only 1/10th of a stick movement is required, this leads to wild oscillating flight like you are seeing, the same as a control loop that is correcting too much at a time. Can you take off just by using throttle? If you can't, you have some trim issues which need to be corrected before anything else. You should be able to throttle up for takeoff, and hover with the flight computer keeping it still and level. Once you can do this, introduce small movements in one direction, then return to a hover. This is how beginner helicopter pilots are taught - as it saves the wild movements of going too far too fast. You may also want to consider the room you are using - make sure you don't have objects that will return the down draft to the quad creating turbulence or winds which can disturb the flight artificially.



#8865 Quad.Net Quadrocopter for .NETMF

Posted by Mark H on 02 February 2011 - 05:44 AM in Project Showcase

Ok well i purchased:

4x TURNIGY Sentry 25amp Speed Controller

4x Turnigy 2217 20turn 860kv 22A Outrunner

2x Woven Carbon Fiber Sheet 300x100 (2.0MM Thick)

2x Carbon Fiber Square Tube 750x10.5mm

to build a quadcopter from.

I only really need one CF sheet, however the second gives me spares lol.



#8543 Quad.Net Quadrocopter for .NETMF

Posted by Mark H on 27 January 2011 - 09:16 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);
        }
    }
}


Move your _coefficients.Length statement to it's own local variable, before you loop and then reference that. It's much faster in netMF than referencing the property.

Also, underscores are against most best practices for .Net :)



#9303 Quad.Net Quadrocopter for .NETMF

Posted by Mark H on 11 February 2011 - 03:31 AM in Project Showcase

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



#3265 Power Questions - i.e. Voltage

Posted by Mark H on 30 September 2010 - 07:38 AM in General Discussion

I've been using hobbyking for about 6 years. Their products are excellent, the service is exceptional, the price is second to none.



#3242 Power Questions - i.e. Voltage

Posted by Mark H on 30 September 2010 - 03:00 AM in General Discussion

How about something like this? $4.95 -1000mah 2S lipo (7.4v nominal) - should run the netduino for about 10hrs.

Or... $12.15 -2350mAh 2S - should run a netduino for more like 24hrs.




No need to spend crazy amounts of money when you have hobbyking to look to :)



#14412 Power Netduino (Linksys WRT-54Gl)

Posted by Mark H on 17 June 2011 - 04:00 AM in Netduino 2 (and Netduino 1)

There shouldn't be a problem, just keep an eye on the temperature of the power adapter. The netduino doesn't consume much power, however if it's already getting pretty warm running the router then you might not want to put more strain on it.



#14260 PCB design and manufacturing

Posted by Mark H on 13 June 2011 - 05:58 AM in General Discussion

I've not heard good things about them. They don't run flying probe checks and such on their boards such as PCBCart do, nor do they check sanity of the design. BatchPCB isn't much better but they are a lot cheaper. They don't do sanity checks on their boards either, and their boards are made with similarly poor tolerances/quality. As far as I'm concerned, PCBCart is the only option for getting PCB's made. They have flying probe checks, they will check your PCB to make sure you have a copper layer (saw one at a engineering get together the other day from BatchPCB that had no copper hahaha), run a probe test over it and manufacture to excellent quality standards.



#8603 OutOfMemoryException [UPDATE]

Posted by Mark H on 28 January 2011 - 04:54 AM in Netduino Plus 2 (and Netduino Plus 1)

Your stream buffers may be using too much memory - i've had this problem with not clearing the buffer from a serial port fast enough. Try calling .Flush() on your stream occasionally to force the data out - especially if you have just sent a large amount of data to it.



#14267 OK this is not Netduino, but it could be!

Posted by Mark H on 13 June 2011 - 07:26 AM in Project Showcase

It seems like a nice idea at first, but I have a feeling it would be considered a hazard/nuisance by most security and police, especially if it's able to go milling about in traffic or where people are walking. I realise they have someone watching over it, but in a busy pedestrian area it could easily fall victim to someone talking on their phone and not looking down, as well as generally being annoying saying "hello" if nobody donates lol.



#7553 NetDuino Quadrocopter

Posted by Mark H on 13 January 2011 - 02:23 AM in Netduino 2 (and Netduino 1)

As a .NET developer for around 10yrs now, I am happy to support Chris in saying that no form of .NET or any managed language can be use realtime. By real time we mean that you know exactly how long something takes to a clock cycle level - and it will always take that long, no matter what.

How do we know that .NET isn't designed to be real-time? The shortest amount of time you can hold execution up for without using IL is 1ms, and the sleep can be inaccurate by as much as 2-3 milliseconds - even on full .net on a 3ghz quad core. You have no single clock sleep, no nano or micro second wait. There is no guarantee that any given method call with execute at the same speed, at all times.




.NET has always been designed to be a fast to write, easy to use, quick to develop smart language. .NET is slow, it's not going to be as fast as C, never mind ASM optimised C. .NET takes care of all the hard stuff for you - memory, object life cycle, eventing, threading, error handling, etc. This is where it excels. It is not designed to run a time-critical system such as a flight computer.

The wallstreet application previously mentioned won't mind if a piece of code runs 1ms too slow. This sounds like a minuscule amount of time - only 1/1000th of a second. In the embedded world, this may as well be a minute. When a basic dsPIC processor is capable of handling 40 million operations a second, and cheap ARM chips capable of handling well in excess off 300 million operations per second it puts things in perspective. If it takes you 1000 operations to toggle a pin (which would require some really dodgey code!) you can still toggle that pin in 1/300,000th of a second. Toggling pins is easy, now imagine some mathemetics and reading analogue inputs, taking some serial data, i2c data, etc. Say this is 3000 operations. That code can execute 13,333.33 times per second on the basic dsPIC processor.It will always execute at this speed, every single time. It will always take 3000 operations, no other operations will occur other than what you've written. In .NET, the same code might execute 2000 times a second, or only 500... it's totally random, unpredictable, and uncontrollable - this is the issue.




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.