|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
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! |
|
#2
|
|||
|
|||
|
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. Last edited by nathanww : 02-20-2009 at 07:28 PM. Reason: legality of parts |
|
#3
|
||||
|
||||
|
Re: Measuring PWM input signals
Its not the FIRST accelerometer -- its output is a PWM signal, not an analog voltage.
|
|
#4
|
||||
|
||||
|
Re: Measuring PWM input signals
Useful information in this thread: http://forums.usfirst.org/showthread.php?t=12086
|
|
#5
|
||||
|
||||
|
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 |
|
#6
|
||||
|
||||
|
Re: Measuring PWM input signals
An RC lowpass filter may do the trick.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Debouncing signals | king vash | Programming | 2 | 07-17-2008 11:07 AM |
| change pwm range preserve input sensitivity | Superstitions | Programming | 6 | 02-11-2006 08:59 PM |
| PWM Signals | stevex | Programming | 1 | 10-28-2004 06:03 PM |
| IR signals inverted | Atheist | Electrical | 10 | 02-08-2004 04:27 PM |
| 2.5 is alive !!!! (input ! .. more input ! ) | Lloyd Burns | Programming | 2 | 01-14-2003 07:15 PM |