CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Noise problem

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
rnielsen



Joined: 23 Sep 2003
Posts: 852
Location: Utah

View user's profile Send private message

Noise problem
PostPosted: Tue Aug 17, 2004 3:43 pm     Reply with quote

Greetings!

I have a small problem and would like to pick your brains for a solution.

I have a PIC (18F452) that is controlling a Servo Drive. The PIC is also monitoring and controlling other devices. I am using the ADC to monitor pin RA1. There is no switching inputs so I'm not worried about settling times. The problem is that the Servo Drive is injecting a fair amount of noise into the circuit, causing the analog readings to bounce up and down quite a bit. I am using a single analog power supply for the whole thing. 24V going to the Drive and sensors and the PIC circuit using a DC/DC convertor. I need to get rid of the noise that is affecting the analog readings. I've contemplated using a seperate supply for the PIC/sensor circuits but I'm not sure if the Drive unit would still inject noise through the common grounds or chassis.

Does anybody have any experience/knowledge regarding problems like this?

Ronald
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Aug 17, 2004 4:21 pm     Reply with quote

Can you see the noise with an oscilloscope ?
What's the frequency, amplitude, and waveform shape of the noise ?
My first thought would be to put an RC filter on it. But the 18F452
data sheet says the maximum source impedance for the A/D pins
is only 2.5K ohms. So, that limits the RC filter quite a bit.
So it would be better to buffer the A/D signal with an single-supply
opamp, and then you could put a cap in parallel with the feedback
resistor and set the rolloff frequency to whatever you want.

Another thought is: Are you using the proper A/D clock for your
PIC crystal frequency ? The A/D clock divisor value can affect the
accuracy of the A/D and could be causing your symptoms if it's
incorrect.
cadegga
Guest







Re: Noise problem
PostPosted: Wed Aug 18, 2004 5:27 am     Reply with quote

Hi,

we had similar problems. Some considerations:

1) use shielded cables, try to shield the motor circuit as well
2) separate your analog inputs as far as possible from all other parts

and, most important,

3) trigger on the falling edge of the PWM you are using for motor control (e.g. use PWM output as digital input on one of the available external interrupt pins, i.e. the B port) before you start the A/D-conversion.


Best regards!
kender



Joined: 09 Aug 2004
Posts: 768
Location: Silicon Valley

View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger

PostPosted: Tue Aug 24, 2004 3:41 pm     Reply with quote

Ultimately (and obviously) you need to isolate your servo motor from the PIC with optos. You can still bring analog and digital signals from the isolated area to your PIC.

Nick
rnielsen



Joined: 23 Sep 2003
Posts: 852
Location: Utah

View user's profile Send private message

PostPosted: Wed Aug 25, 2004 8:20 am     Reply with quote

I got it fixed. I normally don't do much analog stuff so I forgot some of the basics. I installed a second power supply, one for the servo driver and one for the PIC circuit. The servo driver already has it's I/O isolated from it's power/driver circuit. I added a small capacitor across the resistor that I'm measuring (my analog device puts out a 4-20ma and I have a 250ohm resistor in series with it which gives me a 1-5V signal that I can measure) and then I added a nice ground plane over most of the board. The signal is now very stable. Guess I need to get out my Basics 101 book once in a while. Rolling Eyes

Ronald
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group