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

PWM SetPulse Parameters


  • Please log in to reply
5 replies to this topic

#1 Igor Kondrasovas

Igor Kondrasovas

    Advanced Member

  • Members
  • PipPipPip
  • 105 posts
  • LocationPorto, Portugal

Posted 11 January 2012 - 04:30 PM

Hi, I have read many different information, and do not have an osciloscope near.. so can anyone please help me clarify what is the unit of time expected in the period an pulse parameters of the PWM SetPulse method? Milliseconds? Microsendons? clock pulses? Thank you very much, Igor.

Igor Kondrasovas

www.inovativatec.com


#2 NeonMika / Markus VV.

NeonMika / Markus VV.

    Advanced Member

  • Members
  • PipPipPip
  • 209 posts
  • LocationUpper Austria

Posted 12 January 2012 - 05:20 PM

Hi,


I have read many different information, and do not have an osciloscope near.. so can anyone please help me clarify what is the unit of time expected in the period an pulse parameters of the PWM SetPulse method? Milliseconds? Microsendons? clock pulses?


AFAIK it is microseconds... I've read examples on servo driving where the servos needed a 20ms duration signal and to turn it to middle position it needed an "on-time" of 1,3 ms... it worked with the following command:
servoLen.SetPulse(20000, 1300);
Greets, Markus

NeonMika.Webserver
> Control your N+ and write webservice methods easyily
> Receive data from you N+ (in XML or JSON)
> Browse the SD on your N+ directly in the browser and d
own - and upload files

 

If you need help with NeonMika.Webserver, please just leave a note in the thread and/or contact me via Skype :)

 

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- Mistakes teach you important lessons. Every time you make one, you are one step closer to your goal. ----
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------


#3 Philip

Philip

    Member

  • Members
  • PipPip
  • 26 posts
  • LocationPreston, England

Posted 13 January 2012 - 08:19 PM

AFAIK it is microseconds... I've read examples on servo driving where the servos needed a 20ms duration signal and to turn it to middle position it needed an "on-time" of 1,3 ms... it worked with the following command:

servoLen.SetPulse(20000, 1300);
Greets, Markus


Yes this is correct - I did some measurement with a scope some time ago - results in my post at http://forums.netdui...ch__1#entry4323

Phil

#4 gbreder

gbreder

    Advanced Member

  • Members
  • PipPipPip
  • 53 posts
  • LocationGermany

Posted 14 January 2012 - 11:26 AM

AFAIK it is microseconds... I've read examples on servo driving where the servos needed a 20ms duration signal and to turn it to middle position it needed an "on-time" of 1,3 ms... it worked with the following command:

servoLen.SetPulse(20000, 1300);
Greets, Markus


Sorry if this reply is a little bit outside the scope of the question. But I've an addition to Markus VV. answer:
Some servo have a value of 1,3ms other have 1,5ms as middle position...

Regards
Guido

#5 CaptainIffy

CaptainIffy

    New Member

  • Members
  • Pip
  • 1 posts

Posted 07 March 2012 - 03:21 PM

SetPulse arguments seem to max out at 65535. After that the square wave flatlines. Is uint 16 bit on a Netduino or am I doing something silly? To be clear: I can't get setpulse() to generate output with a period greater than 66ms.

#6 Igor Kondrasovas

Igor Kondrasovas

    Advanced Member

  • Members
  • PipPipPip
  • 105 posts
  • LocationPorto, Portugal

Posted 20 July 2012 - 11:58 AM

SetPulse arguments seem to max out at 65535. After that the square wave flatlines. Is uint 16 bit on a Netduino or am I doing something silly? To be clear: I can't get setpulse() to generate output with a period greater than 66ms.


Hi Captainlffy,

Did you solve your problem? I was wondering about this and unfortunately this seems to be true. I believe the workaround should be using native code (C++).

Igor Kondrasovas

www.inovativatec.com





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.