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

Reading encoder with PWM


  • Please log in to reply
2 replies to this topic

#1 Bernie

Bernie

    Advanced Member

  • Members
  • PipPipPip
  • 40 posts

Posted 27 March 2014 - 02:50 PM

Does the Netduino have the facilities to read PWM? If so, can anyone point me to some documentation on how or an example?

 

Thanks,

Bernie

 



#2 jrlyman3

jrlyman3

    Advanced Member

  • Members
  • PipPipPip
  • 67 posts
  • LocationNorth St Paul. MN

Posted 28 March 2014 - 02:53 AM

Bernie,

 

The Netduino is not really fast enough to do this sort of thing in managed (C#) code.  And it's difficult to add unmanaged libraries and solve the problem that way.  In my opinion you have two choices:

 

  1. The following fourm talks about a library for interfacing to the DHT-11 device which uses pulse width encoding of its digital data.  http://forums.netdui...managed-driver/ it uses interrupts to detect the edge of each pulse and compute the pulse width from the timestamp that comes with each interrupt.
  2. Use an Arduino (there is probably code already out there) and interface it to the Netduino with rs-232, I2C, or SPI.

I'm working on the Arduino solution for interfacing some hardware to the Netduino right now.

 

John



#3 Bernie

Bernie

    Advanced Member

  • Members
  • PipPipPip
  • 40 posts

Posted 28 March 2014 - 04:12 AM

Thanks for the reply John. I suspected then Netduino wouldn't be fast enough. I was hoping there may be some direct to CPU method, maybe using the I2C interface. Right now we are doing proof of concept so the Netduino's threading ability makes the code much easier to develop, but the interface to hardware much more difficult, hahaha. The device is a US Digitial MA3 absolute shaft encoder that needs micro second timing of pulses. To a raw processor that's fine, but to managed code that's very very very small.

 

I'm working on a hardware solution with a timer, a counter, and a latch to maybe make a readable solution.

 

Thanks,

Bernie






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

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.