PIC18 Capture Module stops working

Status
Not open for further replies.

TAP550

New Member
All,

Hello and thanks for looking!

I have a problem I need some ideas on. I have a pic18f46k80 using a capture peripheral to measure the frequency of a hall effect switch coming from a motor. The signal is nice and clean on the scope and is measured perfectly with the capture module when the electric motor is off. (spinning the motor by hand or when the motor is coasting down).

My issue is that as soon as I give the motor power, the capture starts continuously detecting edges at a ridiculous rate. My normal signal is about 3hz to 300hz which I can detect perfectly using a signal generator to supply the signal. With the actual motor hooked up however the capture module only succeeds in capturing the edges with no power to the motor.

The hall sensor is an open collector type with a 5v pull up in the motor controller. (my module is not the motor controller I am just trying to intercept the speed of the motor with my module)

The odd thing is that there doesn't seem to be any noticeable increase in noise on the signal when the motor is on. Looking at it on the scope there doesn't seem to be anything different except that the capture peripheral starts freaking out and detecting edges at 7800hz.

Other info:
20Mhz external Clock
using TMR3 with prescale 8 for CCP3 and Fosc/4

So what things can I check to see where the issue is coming from?
My thoughts are
- is there a grounding problem that gets worse maybe?
- could try to optoisolate
- is there some EMI that I can't see? 48v 50a Brushless DC motor controller
- this signal is nice and clear with maybe 90mv of fuzz at the top ~4.6v. no spikes.

Thoughts!?
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…