![]() |
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! |
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. |
Re: Measuring PWM input signals
Its not the FIRST accelerometer -- its output is a PWM signal, not an analog voltage.
|
Re: Measuring PWM input signals
Useful information in this thread: http://forums.usfirst.org/showthread.php?t=12086
|
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 |
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