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.

perpetualKid

Member Since 15 Apr 2013
Offline Last Active May 11 2015 03:10 PM
-----

#57261 Is netduino has Mac address

Posted by perpetualKid on 01 April 2014 - 01:36 PM

I think you'd need a Netduino Plus or Netduino Plus 2. Both do have onboard Ethernet, and as such also will have a MAC address.

 

Looks like your supplier only sells Netduino and Netduino 2 (no Plus), and they do not have Ethernet, therefore no MAC address,




#49995 Netduino2 driving Boe-Bot

Posted by perpetualKid on 26 May 2013 - 06:39 PM

Just started to dive into the world of NetMF pretty recently, got hands on a Netduino last fall as part of a work related evaluation (I'm a "cloud coder" by day), but didn't spent so much time beyond the blinking LED and a little RTTL jukebox. However always thought how cool it'd be to have something roaming around based on some own code and test some ideas:)

 

So I've been in the market for a small buggy and decided for the Boe Bot Robotics Shield for Netduino from Parallax.

Well, originally this set was build for the Arduino, so it fits Netduino also. However the 4 separate Servo Headers are wired from D10 to D13, so didn't fit my Netduino at all. At the time I discovered this misalignment the N2 has just become available here as well, so I ordered this one, and happy with that so far.

Not only at least D10 and D11 are PWM enabled on the N2, but faster proc and more memory certainly becomes handy at some point, and overall seems more stable and reliable etc on PWM. Or maybe I just became better over time not to  drive the hard- and software at its limits...

 

Compared to the stock Bot kit I did quite some upgrade in particular adding sensors - Wheel Encoder Kit helps to keep track of wheel movement, the well know Ping))) Ultrasonic supports obstacle detection and distance mapping, and an Infrared Line Follower (yet to be mounted) will support line and edge detection, but I had to remove the Whiskers and basic IR detectors both due to space constraints in the front area and for the limited amount of I/O ports.

 

Hardware drivers are mostly handcrafted and optimized for the particular use case. There are enough sample for either Netduino and NetMF platform or from the Arduino and Parallax world so for most of the code it's just some translation or adoption to the specifics of the NetMF platform. 

Due to limitations in the hardware (sensor precision, timing), the somewhat limited .NetMF subset (compared to the full blown .NET framework), and some limitations in the Netduino SDK couple time I had to rethink my approaches and make some tradeoff or just deal with the consequences. E.g. both wheels are controlled independently thus there's always one wheel start spinning/accelerating before the other so you're deviating from course, and with the wheel encoders are 16pulses/r only which could be a 22.5degree deviation.

 

Anyway got around most issues and the guy is moving now - even so pretty precisely! This is even more exciting since there are no (well, very few) preprogrammed settings.

To get started the guy self-calibrates sensors and movements. Driving straight towards and away from a target gets him to calculate the ratio between wheel encoder pulses and Ultrasonic distance measurements, rotating a few times pulse by pulse and running some auto correlation (Pearson product-moment correlation coefficient, anyone?) on the recorded luminance and distances in the full circle gets the ratio for (wheel encoder) pulses and the turns and direction changes. Bit of a job running the analysis with limited resources (cpu/mem) but getting good results now, however missing some bytes permanent storage on the device to store calibration.

 

Once calibration is done the guy can now drive squares or circles as precisely possible within the limits of accuracy both of the hardware/sensors, e.g. ending at the same spot within a few mm displacement in the max. Obstacles are detected and avoided, and while moving towards an obstacle, distance data is used to decrease speed in advance before stopping in front of an obstacle.

 

Some pictures attached, the code is for sure less spaghetti than the hardware wiring, but shows also where the Netduino2 has its place :)

 

Future work - the hardware mounted currently is running as it should so I'm less engaged on the drivers, some bug fixing on demand or optimization. Next step is to mount the IR/Line Detection sensor and integrate in the code.

Since there is the "old" Netduino from start still spare, I've dreamed to mount it atop the current setup, and link the both of them using serial. That way I could offload some functionality like calibration on the fly and do the mapping of the surroundings, or the second board can drive a Wifi/BT module for wireless control and offload processing into the cloud :) I've made some initial tests interconnecting the siblings on UART but suspended that for the time being, right now rather focusing to improve the navigation and dead reckoning routines. Its fun watching him roaming around but there's for sure still a lot room for improvement!

 

Attached Files




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.