analog and pwm

BTCAD

Active Member
Hi Guys,
                I know it's realy simple for you but i need to know and understand.  I want to read a PWM signal from another device such as wc8, wc32 or picaxe etc.  I wish to use wc32 to read a signal using analog input pins.  
 
 
I've done a realy simple test today with pwm on the board to the analog input of the board.   But values bouncing back and forth.  Need I use a peak and hold circuitry to have a stable reading? I tried a lot of settings, duty 0 to 100 and hz 0 to 100 but nothing helps.
 
 
 
Can you help me with that?
 
If it's PWM, you probably want either an integrator, or a simple RC network to smooth it.
Pick your R/C values depending on the PWM frequency and the response time you need.
As a very rough starting point, I'd probably look at about a 1K resistor and a 1uF cap, which would have a timeconstant of about 1ms, and should be fine if you're using a PWM frequency of at least a couple of KHz.
 
@BTCAD,
 
What do you want to read PWM for?  Was that PWM generated by another WC32? 
You can read PWM frequency by WC8 frequency counter function.  Duty cycle you will need to use Ross' method to average the signal.
 
Back
Top