Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   Measuring PWM input signals (http://www.chiefdelphi.com/forums/showthread.php?t=75040)

virtuald 02-20-2009 02:38 PM

Measuring PWM input signals
 
Is there a way to read PWM input signals? We never got our FIRST provided accelerometer, and the one from last year works rather crappily... so we're experimenting with other ones. One I found has a PWM output signal, but I can't figure out what I should use to measure the signal appropriately. I have a feeling its in the counter object, but I'm not quite sure..

Thanks!

nathanww 02-20-2009 07:27 PM

Re: Measuring PWM input signals
 
You'll probably want to use an AnalogChannel of Accelerometer object. The counter is for monitoring digital inputs and when analog inputs cross a certain threshold. Since an accelerometer outputs an analog voltage relative to how much acceleration it's detecting, this wouldn't be that useful.

Also, make sure your electronics are competition legal--I know for a fact that last year's sensors are not, since they're custom parts.

virtuald 02-20-2009 07:28 PM

Re: Measuring PWM input signals
 
Its not the FIRST accelerometer -- its output is a PWM signal, not an analog voltage.

virtuald 02-23-2009 12:57 PM

Re: Measuring PWM input signals
 
Useful information in this thread: http://forums.usfirst.org/showthread.php?t=12086

Nathan 02-24-2009 11:51 AM

Re: Measuring PWM input signals
 
You could try adding a capacitor on the PWM signal line to act as a low-pass filter, and then run it into an analog input.

Or you could run the PWM signal into a digital input and use change notification (interrupt on logic level change). I did this to decode a PPM signal on a PIC micro and it works great.

Nathan

Analog 03-03-2009 07:15 AM

Re: Measuring PWM input signals
 
An RC lowpass filter may do the trick.


All times are GMT -5. The time now is 10:20 AM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi