View Single Post
Old 04-01-2014, 07:30 PM   #6390 (permalink)
MPaulHolmes
PaulH
 
MPaulHolmes's Avatar
 
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832

Michael's Electric Beetle - '71 Volkswagen Superbeetle 500000
Thanks: 1,362
Thanked 1,202 Times in 765 Posts
I used a random sequence generator based on atmospheric noise (so about as random as you can get) to spread the frequency from 6kHz to 10kHz. I found out that the dsPIC can change pwm frequency glitchlessly on the fly no problem, so I'm just going to do the spread spectrum switching. This will be the best of all worlds, except for when you want to put an oscilloscope on it. haha.
These are the maximum PWM duties:
RANDOM.ORG - Sequence Generator

EDIT: Oh crap, the averge period is 1/7.5kHz, since more time is spent on the low end. Now I've got to figure what some bounds should be such that 1/8KHz is the average period. Since I'm fixated on 8KHz. haha

EDIT AGAIN: OK, so max duties from 1600 up to 2400 give an exact average period of 1/8KHz. In terms of frequency, it's 10KHz down to 6666.666KHz.
__________________
kits and boards

Last edited by MPaulHolmes; 04-01-2014 at 08:10 PM..
  Reply With Quote