Input Noise


Closed Thread
Results 1 to 14 of 14

Thread: Input Noise

Hybrid View

  1. #1
    Join Date
    Jan 2006
    Location
    Toronto
    Posts
    109

    Default Input Noise

    Hi, I am having a lot of trobbles with one of the inputs on a PIC18F4550. Everytime I connect an encoder from a AC motor the PIC seems to get a mind of its own and randomy turns on relays, outputs serial data, resets itself etc.. The encoder is currently connected to the PIC through an opto but shares the same power as the PIC. It has 3 wires (VDD, GND and OUTPUT) and requires 5v to operate. Because of this it is not truly isolated from the rest of the circuit.

    I have tried shileding the wire with a metal conduit but did not help. I also shielded the 3 phase cable from the AC Drive Unit to the AC Motor and it also did not help. I have also placed 0.01 uF caps between every incoming wire and GND but also did not help.

    It seems to only be this one sensor that is giving problems when the motor is engaged.

    Any suggestions would be greatly appreciated.

    Thanks.

  2. #2
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    It sounds to me like the PIC itself is not bypassed properly. Make certain that you have several .1uF caps very close to the chip across the supplies. Also make sure that you have some bulk capacitance ( > 100uF) close to the chip. You may need several.

    Two other things to watch for: The crystal needs to be very close to the PIC.
    The MCLR line needs to be short, and pulled to VCC with a 4.7K (or so) resistor.

    At least in my experience, some chips are more prone to noise problems than others. I have had issues with 18F452's but none with 18F8720's (in basically the same circuit) for example.
    Charles Linquist

  3. #3
    Join Date
    Jan 2006
    Location
    Toronto
    Posts
    109


    Did you find this post helpful? Yes | No

    Default

    Thanks Charles,

    I do have several .1uF caps throuout th PCB and I am also using a temperature compensated Crystal Oscillator which is as close as physically possibe to the PIC.

    The problem I am having seems to only be with the one sensor. If not connected then everything works as expected.

    I was suspecting that the AC Invertor or the AC motor were creating some EMI that caused problems with the sensor.

    I am using is a Geartooth Hall Effect sensor which is embeded in the gearbox on the output of the motor. It is very close to the motor itself. I don't know if this makes any differense or not.
    Last edited by PJALM; - 27th February 2006 at 21:14.

  4. #4
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    I would just provide a separate power source for my opto. It's pretty much
    useless for isolation with a common power source.

    If your AC motor is far away enough to not couple noise into your controller
    circuit, and you have the opto on its own "isolated" power, you shouldn't
    have any problems.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  5. #5
    Join Date
    Jan 2006
    Location
    Toronto
    Posts
    109


    Did you find this post helpful? Yes | No

    Default

    Thanks Bruce,

    What would be the easiest way to build the circuit with a separate power supply for the optos yet still only have one PCB. I guess I would have to also power the sensor using that same power source.

    The final PCB will be mounted in a metal enclosure with 2 ac power inputs. 1 is 16v AC for the main board and the other is 24v AC for an Optical beam sensor.

    The 16v AC is converted to DC through a full wave bridge rectifier and then regulated to 5v and 12v through 2 voltage regulators. The 5v is used for the PIC and all logice ICs, the 12v is for the relays and to power external RS485 devices.

    There is a total of 3 inputs to the PIC. The first is the Encoder from the gearbox, the second is the Optical beam sensor, and the last is a relay output from the AC Drive Invertor for fault detection.

  6. #6
    Join Date
    Aug 2005
    Posts
    42


    Did you find this post helpful? Yes | No

    Default

    I have also found the 18F4550 very sensitive on the pins when reading in simple high or lows, especially when using in motor applications.

    If I run the same the code on say a 18F452 or 16F877 then not a problem, bu t as said the 18F4550 is very sensitive along with a few other quirks.

    To get around this problem I doubled up of the sensing.

    In other words, if I was was watching for a pin to go high within the code I would sample it, give it a short pause of say 100 us and and re-sample before breaking off to my routine. This seems to of ironed out the interference picked up by this chip.

    Regards

    Sean.
    *********************
    http://www.cncdudez.co.uk
    *********************

  7. #7
    Join Date
    Jan 2006
    Location
    Toronto
    Posts
    109


    Did you find this post helpful? Yes | No

    Default

    Hi Sean,

    Did you have your PIC reset itself or do any unusual things?

    All my inputs are interrupt driven, maybe this is also a problem.

    I am going to try changing it to a PIC18F452 to see if it helps.

    Thanks.

Similar Threads

  1. Sony LanC Program
    By l_gaminde in forum Code Examples
    Replies: 2
    Last Post: - 25th September 2009, 18:51
  2. RB0 + Internal Pullup + Interrupt
    By Freman in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 10th August 2009, 11:11
  3. LED "capacitance" won't get lower
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 3rd May 2007, 20:31
  4. Timing input pulses and re-outputting them
    By jamie_s in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 28th February 2007, 01:50
  5. Using LEDs as light sensors
    By skimask in forum Code Examples
    Replies: 3
    Last Post: - 30th December 2006, 22:19

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts