Input Noise


Closed Thread
Results 1 to 14 of 14

Thread: Input Noise

Hybrid View

  1. #1
    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

  2. #2
    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 22:14.

  3. #3
    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

  4. #4
    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.

  5. #5
    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
    *********************

  6. #6
    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.

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


    Did you find this post helpful? Yes | No

    Default

    What would be the easiest way to build the circuit with a separate power supply for the optos yet still only have one PCB
    Just design your board with two separate power planes, and power supply
    input terminals.

    Separate DC power supply's input to two separate regulators on the same
    PCB.

    |..P.S. input A.............P.S. input B]
    |--[+-]------------------[+-]-----|
    |..PIC side........<..out.[]..input..<..| AC connections on outer edge
    |.....................<..out.[]..input..<..| optos in center of board close
    |..one PCB........<..out.[]..input..<..| to controller ins/outs

    TIPS:

    Keep AC traces (if any) as short as possible, and located on the far edge
    away from the controller side of the board.

    Make the bottom layer under the "controller side" a large ground plane with
    decoupling caps at all power connection points.

    Do not cross-over traces from one side to the other. Noise will couple from
    one PCB trace to another right through your PCB substrate.

    If you have any mechanical relays on either board, consider MOV's (metal
    oxide varistors) across the relay contacts to snub contact spark/discharge.

    I've done a number of boards like this without any glitches. All for large
    motors & heavy appliances being controlled or monitored by the PIC.

    Im my experience, I've noticed that all of the 18F series and most 16F "A"
    series are all more succeptible to noise than older non "A" series 16F parts.

    a mind of its own and randomy turns on relays, outputs serial data, resets itself etc
    That definitely sounds like a serious noise problem, but it may also be the
    input you're using. Does it throw a fit if you connect this same input to
    any other signal?

    Which input are you using?
    Regards,

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

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


    Did you find this post helpful? Yes | No

    Default

    I am using PORTB.0 for the encoder, i am using interrupts to capture the pulses.

    The relays do not control the motor directly but instead drive an AC Drive Inverter which creates the 3 Phase 330V AC required by the motor. The relays are the G5V-1 micro relays and are being driven by a ULN2003.
    Last edited by PJALM; - 28th February 2006 at 04:07.

Similar Threads

  1. Sony LanC Program
    By l_gaminde in forum Code Examples
    Replies: 2
    Last Post: - 25th September 2009, 19:51
  2. RB0 + Internal Pullup + Interrupt
    By Freman in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 10th August 2009, 12:11
  3. LED "capacitance" won't get lower
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 3rd May 2007, 21: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, 02:50
  5. Using LEDs as light sensors
    By skimask in forum Code Examples
    Replies: 3
    Last Post: - 30th December 2006, 23:19

Members who have read this thread : 0

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