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.

RuggedCircuits's Content

There have been 17 items by RuggedCircuits (Search limited from 29-March 23)


By content type

See this member's

Sort by                Order  

#1910 Compatible Shields and Accessories

Posted by RuggedCircuits on 08 September 2010 - 03:50 AM in Netduino 2 (and Netduino 1)

We've released a new shield, the Quick Shield, which is similar to the Screwshield but uses spring-clamp terminals that do not require any tools like screw terminals do. Fits very nicely on a Netduino, and we even have a picture!

Posted Image

Here is the product page



#1831 PWM Timer Access

Posted by RuggedCircuits on 06 September 2010 - 03:23 AM in General Discussion

Question... What do you suggest I do to protect the light sensor from the rgb light's awesome brightness? It isn't too bad but the less interference the better.


The plane of the RGB emitter is higher than that of the light sensor so any interference will probably be mostly due to reflection from whatever is above the shield. Try to keep reflective objects away, or if that doesn't work perhaps glue in some cardstock around the LED or light sensor.



#1828 PWM Timer Access

Posted by RuggedCircuits on 06 September 2010 - 02:58 AM in General Discussion

The SecretLabs.Hardware.PWM class gives you two methods: SetDutyCycle and SetPulse. If you create a PWM object using one of the Netduino PWM Pins, you can use SetDutyCycle to change the duty cycle from 0-100%.


OK, asking in a purely informational way, how would someone that just purchased a Netduino know this?

We are working on an "Introduction to Netduino" text... Should we make an online (HTML in addition to PDF) version as well?


Forget the text, start putting it online as you write it, print it off when it's done. Just 1 suggestion....



#1825 PWM Timer Access

Posted by RuggedCircuits on 06 September 2010 - 02:31 AM in General Discussion

Hmm, could you tell me more of what you're looking at?

Would a C# wrapper around the InterruptPort give you what you needed? Basically, the wrapper would just take readings from the InterruptPort's event handler and build them into an Array of timings...

Here's the RC6 decoder by community member Phil... What do you need in addition to the timestamps he's using?
http://forums.netdui...-decoder-class/

Chris


See, this is where knowing more about the .NET code would have made me look a lot smarter B) I didn't realize that interrupts came with timestamps. Phil's code that you referenced above should work perfectly well on a Gadget Shield and no wrapper is needed.

However, my guess is that interrupts come with timestamps because the event handler, after some latency, takes a snapshot of the system time (stabbing in the dark here but that sounds reasonable to me). That should work perfectly fine for decoding IR transmissions where sub-microsecond resolution is fine, but an InputCapture class with single-cycle resolution (what is used on the Arduino for IR decoding) would be useful for other applications like accurate frequency counting. Certain sensors (I'm thinking light-to-frequency sensors like the TAOS series) encode their sensed values in frequency thus accurate frequency measurement is important, at higher resolution than event timestamps. Not important for the Gadget Shield, but something to keep in mind maybe for future development B) The more of the underlying hardware features of the AT91SAM7X512 you can expose, the more applications will be enabled.



#1824 PWM Timer Access

Posted by RuggedCircuits on 06 September 2010 - 02:22 AM in General Discussion

Hmm, let me get more details on what you need here...

For the RGB LED, it looks like you're using digital pins 5, 6, and 10. The PWM on the Netduino drives all four of these--and then PWM feature to drive duty cycle is already in the firmware. What additional functionality do you need? The ability to change the frequency?


Where in the firmware? I looked for PWM code samples and didn't find any. Microsoft's .NET documentation site linked from your home page has no mention of PWM. Searching for PWM in your forums fails because search terms less than 4 characters are rejected. I looked in the source and all the PWM functions seemed to be stubs. I apologize but coming from the Arduino world the C#/.NET model is still very foreign. Please please PLEASE come up with something like this to help us Ardufolks out:

http://arduino.cc/en...erence/HomePage

And code samples wouldn't hurt either B) Not in the forums...on the web site.

As for the IR transmitter, the upcoming v4.1.1 release will allow you to set the low-level PWM frequency (based on a standard divisor of the 48MHz MCU clock speed) and then set custom intervals/periods for PWM square waves. Is this enough for what you need to do--or do you need something where you can submit a byte array and then have a sequence of pulses sent with different periods? A constant 38 KHz signal with 50% duty cycle will be easy with 4.1.1 -- but I want to see what else you might need here...

Chris


Well, the more functionality the better (the byte array thing would be cool!) but simply being able to generate 38 kHz 50% duty cycle pulses is enough. IR transmitters don't change state faster than a couple of hundreds of microseconds so low-level hardware support isn't necessary for state changes, just 38 kHz square wave generation. Looks like 4.1.1 will at least make IR detection/generation possible using interrupts instead of input capture (crossing my fingers...as I'm not sure what the resolution and/or latency of DateTime is compared to actually reading a hardware timer/counter).



#1819 PWM Timer Access

Posted by RuggedCircuits on 06 September 2010 - 02:03 AM in General Discussion

RuggedCircuits -- are you looking for capture of incoming signals or are you looking to do something low-level with the PWM itself? As far as incoming signals, one of the community members already built an infrared decoder (RC6 I believe) using the InterruptPort and the DateTime passed into its event handler.

Chris


That sounds like a reasonable option but better would be a class that implements an "InputCapture" functionality so that input edges are timestamped. That's the approach we use with our demonstration IR decoder software for the Arduino. I'm fairly sure the AT91SAM7X512 processor can have its timers configured for this type of capture mode.



#1818 PWM Timer Access

Posted by RuggedCircuits on 06 September 2010 - 02:01 AM in General Discussion

Hey RuggedCircuits,

It sounds like a driver issue, not a hardware issue here... Is that correct?


Correct. The hardware, as mentioned above, is compatible thanks to your intelligent assignment of function pins on the Netduino to be compatible with similar functions on the Arduino. There is nothing preventing someone from writing native code to use the hardware resources of the AT91SAM7X512 processor to take full advantage of the onboard sensors and actuators. Higher-level constructs like a PWM class, however, would greatly simplify tasks and isolate the programmer from the low-level hardware details of the timers and such.

We're expanding the PWM support in the upcoming v4.1.1 firmware (and will continue expanding it into the future). Right now, we're focused on enabling low-level configuration of the PWM clocks and such--but we'd also like to help support creating triangle waves and doing other advanced PWM logic from managed code in the future.


For the Gadget Shield, PWM would be used to modulate the colors of the RGB LED (low frequency, duty cycles varying from 0% to 100%) as well as generate 38 kHz waveforms for the IR transmitter LED (38 kHz frequency, obviously, at 50% duty cycle).

Hope that helps!



#1813 PWM Timer Access

Posted by RuggedCircuits on 06 September 2010 - 01:29 AM in General Discussion

In order to be civil and respectful I won't mention the ridiculous company that excluded these compatibility issues. So this is what they said to me...



So Chris I guess you should know this... is it going to be supported soon?


Hello, Ridiculous Company here :) I'll post the same thing I sent to you privately:

"I understand your frustration. However, it is not an issue of compatibility, it is one of software. We sell a hardware product. The demonstration software on our web site is just that, for demonstration. The hardware product is compatible with the Netduino as long as AREF is connected to 3.3V, which we clearly communicated to you prior to your purchase."

Our Gadget Shield is an Arduino shield that is hardware compatible with the Netduino. If one wants to use the analog inputs, then the AREF input must be connected to 3.3V, a service that we provided for you for free when you ordered your board.

The demonstration software that we provide on the web site is written in C/C++ for an Arduino environment. It does not port directly to a C#/.NET environment. This is not an issue of compatibility, but of porting code to a different development and hardware environment.

Do you really expect to get any Arduino shield and have its associated software immediately work with the Netduino?



#1436 Arduino to Netduino Help needed

Posted by RuggedCircuits on 27 August 2010 - 10:24 PM in Netduino 2 (and Netduino 1)

You need to step down the analog input voltage. Netduino's microcontroller can take inputs from 0V-3.3V.

Chris


The I/O pins on the AT91SAM7X512 are 5V-tolerant. There will not be any damage to the microcontroller from voltages up to 5V. Also, the analog voltage sources on the Gadget Shield have large series resistances thus will limit the current to safe values in all cases. No modifications to the board should be required.



#718 Problem with Analog Input

Posted by RuggedCircuits on 18 August 2010 - 03:58 AM in Netduino 2 (and Netduino 1)

The Netduino does not have a default analog voltage reference (AREF). This pin is floating and there is no internal voltage reference. Try connecting a wire from the 3.3V pin to the AREF pin and try again.



#257 Analog I/O

Posted by RuggedCircuits on 11 August 2010 - 07:08 PM in Netduino 2 (and Netduino 1)

If you're doing really high speed stuff with very tight timing, I'd recommend using C++ natively. Or perhaps writing C++ interrupt-driven code and compile it into the Netduino firmware. That way you'd get the raw speed of C++ behind the scenes but the elegance of native code for your logic operations.

Chris


So.....suppose one does want to write C++ native code. Can this be loaded into the Netduino using the existing tools or is a special bootloader needed? I don't suppose you can add this to your list of tutorials :)

Does "going native" preclude the use of the CLR-based development in the future?



#243 Can no longer deploy

Posted by RuggedCircuits on 11 August 2010 - 04:00 PM in Netduino 2 (and Netduino 1)

Hmm, it appears that having one AnalogInput in use is not a problem...but having the second one open at the same time doesn't work (probably causing a safety assertion). That's our bad. We'll put this back to engineering and get an update for you that will let you use multiple ADC channels at the same time. It may take a few days (but it's good timing as we were wanting a few small changes in the ADC code anyway).

In the meantime, can you try using just one of the AnalogInputs at a time and see if that works?

Chris


Using a single AnalogInput seems to work! Looking forward to using all 5 of my analog inputs real soon :)

What's the best way to follow the announcement of new firmware? Can this forum be set up for RSS feeds?

Thanks.



#222 Can no longer deploy

Posted by RuggedCircuits on 11 August 2010 - 03:22 AM in Netduino 2 (and Netduino 1)

You shouldn't get "locked out" of the debugger easily, so I'm not quite sure. If you can reproduce it, we can try to hunt down why it happened and fix it in future releases :)

Chris


Easy to reproduce unfortunately...just bricked it again. :angry:

The attached program works fine with "#if false" but bricks the board with "#if true" near the bottom. Looks like it might be PWM or analog reads giving it headaches.

Attached Files




#220 Can no longer deploy

Posted by RuggedCircuits on 11 August 2010 - 03:02 AM in Netduino 2 (and Netduino 1)

Brilliant! It looks like you've got a well-thought-out infrastructure. Any ideas on how to not lock out the debugger in the future?



#212 Can no longer deploy

Posted by RuggedCircuits on 10 August 2010 - 11:08 PM in Netduino 2 (and Netduino 1)

My Netduino (just arrived today!) worked for a while but now I can no longer deploy any applications to it. The white LED is on and Windows recognizes the Netduino as a USB device, so it looks like the processor is for the most part alive. The symptom is that in Visual Studio 2010 Express the status line says "Preparing to deploy assemblies to the device" but nothing ever happens. The little deploying icon at the bottom of the status bar animates continuously but no progress is ever made. This goes on for a few minutes until I press the reset button on the board and/or disconnect the board. Visual Studio doesn't like any of this and basically becomes unresponsive, but that's besides the point. I did try one hardware modification, wiring the 3.3V pin to the AREF pin. I'm pretty sure I didn't mess that up. Even when I undo that modification I still have a board that won't accept new programs. Anything I can do or am I the proud new owner of a brick?



#208 Libraries, Drivers and Shields

Posted by RuggedCircuits on 10 August 2010 - 09:49 PM in Netduino 2 (and Netduino 1)

Over one of the UARTs (D0/D1 or D2/D3) using an RS232 shield or TTL-to-RS232 converter cable? Or through the USB cable?

Chris


Over the USB cable would be ideal.



#205 Libraries, Drivers and Shields

Posted by RuggedCircuits on 10 August 2010 - 09:34 PM in Netduino 2 (and Netduino 1)

We have an AnalogInput (ADC) how-to video planned for next Monday. And then motor control, GPIOs, I2C/SPI accessories, etc. At that rate, hopefully we can get you up to speed on all the features by the end of September.


Any plans for serial communication with a terminal program on the PC? That's pretty important to me.




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.