|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| 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 : 20-02-2009 at 19:28. 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 | 17-07-2008 11:07 |
| change pwm range preserve input sensitivity | Superstitions | Programming | 6 | 11-02-2006 20:59 |
| PWM Signals | stevex | Programming | 1 | 28-10-2004 18:03 |
| IR signals inverted | Atheist | Electrical | 10 | 08-02-2004 16:27 |
| 2.5 is alive !!!! (input ! .. more input ! ) | Lloyd Burns | Programming | 2 | 14-01-2003 19:15 |