Hot!PIC18F: Character LCD Noise and MOSFET switching

Page: 12 > Showing page 1 of 2
Author
TS9
Super Member
  • Total Posts : 595
  • Reward points : 0
  • Joined: 2010/05/07 10:52:22
  • Status: offline
2017/12/27 10:18:05 (permalink)
0

PIC18F: Character LCD Noise and MOSFET switching

Hello,


I am using PIC18F4431 and facing strange (may be usual ) problem
of LCD 16 x 2 Noise (Seen Garbage on LCD) while Two MOSFET used in Complementary Mode (Switching of PWM of 2KHz) for Controlling DC Voltage of 250V.
I am also using Optical Isolation between
MCU and MOSFET Driver.


Any Solution for that....

Thanks
/TS9
#1

37 Replies Related Threads

    Nikolay_Po
    Super Member
    • Total Posts : 1740
    • Reward points : 0
    • Joined: 2012/04/01 13:49:27
    • Location: Russia, Novorossiysk
    • Status: offline
    Re: PIC18F: Character LCD Noise and MOSFET switching 2017/12/27 10:53:51 (permalink)
    0
    Sure you have a conducted or radiated EMI. It is impossible to help without whole picture. The circuit diagram, PCB drawing and device assembly photos are needed.
    #2
    jack@kksound
    code tags!
    • Total Posts : 2895
    • Reward points : 0
    • Joined: 2014/05/14 10:03:19
    • Location: 0
    • Status: online
    Re: PIC18F: Character LCD Noise and MOSFET switching 2017/12/27 10:57:22 (permalink)
    0
    Check for open/unterminated inputs on the LCD. Check bypass caps, power supply ground routing.
    #3
    TS9
    Super Member
    • Total Posts : 595
    • Reward points : 0
    • Joined: 2010/05/07 10:52:22
    • Status: offline
    Re: PIC18F: Character LCD Noise and MOSFET switching 2017/12/27 11:47:20 (permalink)
    0
    Hi,

    Thanks Both of you...

    @Nikolay
    I have made circuit on General Purpose PCB. PCB not Designed Yet.
    Any Suggestions for PCB designing..
    @Jack
    I am using LCD 16 x 2 in 4-bit Mode and Pin 7 to 10 are unconnected
    Any Suggestions for PCB designing..

    Thanks
    #4
    jack@kksound
    code tags!
    • Total Posts : 2895
    • Reward points : 0
    • Joined: 2014/05/14 10:03:19
    • Location: 0
    • Status: online
    Re: PIC18F: Character LCD Noise and MOSFET switching 2017/12/27 11:52:36 (permalink)
    0
    TS9
    Hi,

    Thanks Both of you...

    @Nikolay
    I have made circuit on General Purpose PCB. PCB not Designed Yet.
    Any Suggestions for PCB designing..
    @Jack
    I am using LCD 16 x 2 in 4-bit Mode and Pin 7 to 10 are unconnected
    Any Suggestions for PCB designing..

    Thanks

    Suggestion: don't leave any inputs unconnected, ground the unused inputs.
    Question: What bypass caps are in place and where?
    Question: does the LCD share the ground wire/trace with the currents you are switching with the MOSFETs (bad idea if so)?
    #5
    TS9
    Super Member
    • Total Posts : 595
    • Reward points : 0
    • Joined: 2010/05/07 10:52:22
    • Status: offline
    Re: PIC18F: Character LCD Noise and MOSFET switching 2017/12/27 11:58:28 (permalink)
    0
    jack@kksound
    Suggestion: don't leave any inputs unconnected, ground the unused inputs.Question: What bypass caps are in place and where?Question: does the LCD share the ground wire/trace with the currents you are switching with the MOSFETs (bad idea if so)?


    1)Yes... I will change unconnected LCD pins to GND

    2)
    .1uF.. Near to MCU,Power Supplies, and LCD.

    3) No. LCD Ground from Different Bridge Rectifier and MOSFET Switching Ground from other Bridge Rectifier..

    Thanks for Suggestions..


    /TS9
    #6
    jack@kksound
    code tags!
    • Total Posts : 2895
    • Reward points : 0
    • Joined: 2014/05/14 10:03:19
    • Location: 0
    • Status: online
    Re: PIC18F: Character LCD Noise and MOSFET switching 2017/12/27 12:18:14 (permalink)
    0
    What type of loads are the mosfets switching? inductive?
    #7
    TS9
    Super Member
    • Total Posts : 595
    • Reward points : 0
    • Joined: 2010/05/07 10:52:22
    • Status: offline
    Re: PIC18F: Character LCD Noise and MOSFET switching 2017/12/27 12:27:11 (permalink)
    0
    Repeated
    post edited by TS9 - 2017/12/27 19:55:39
    #8
    TS9
    Super Member
    • Total Posts : 595
    • Reward points : 0
    • Joined: 2010/05/07 10:52:22
    • Status: offline
    Re: PIC18F: Character LCD Noise and MOSFET switching 2017/12/27 12:27:11 (permalink)
    0
    Repeated
    post edited by TS9 - 2017/12/27 19:56:05
    #9
    TS9
    Super Member
    • Total Posts : 595
    • Reward points : 0
    • Joined: 2010/05/07 10:52:22
    • Status: offline
    Re: PIC18F: Character LCD Noise and MOSFET switching 2017/12/27 12:27:11 (permalink)
    0
    No.. LIQUID chemicals (or Water) Chemical laboratory purposes.
    #10
    TS9
    Super Member
    • Total Posts : 595
    • Reward points : 0
    • Joined: 2010/05/07 10:52:22
    • Status: offline
    Re: PIC18F: Character LCD Noise and MOSFET switching 2017/12/28 09:39:55 (permalink)
    0
    Any Update?
    #11
    Gort2015
    Klaatu Barada Nikto
    • Total Posts : 2769
    • Reward points : 0
    • Joined: 2015/04/30 10:49:57
    • Location: 0
    • Status: online
    Re: PIC18F: Character LCD Noise and MOSFET switching 2017/12/28 10:04:51 (permalink)
    0
    Does the lcd work normally with just the lcd and mpu only?
     
    D0 - D3 does not need to be connected, it's only when the lcd is strobed that the lcd reads from the port.
     
    That will not fix the bug.
     
    post edited by Gort2015 - 2017/12/28 10:09:23

    MPLab X playing up, bug in your code? Nevermind, Star Trek:Discovery will be with us soon.
    https://www.youtube.com/watch?v=Iu1qa8N2ID0
    + ST:Continues, "What Ships are Made for", Q's back.
    #12
    TS9
    Super Member
    • Total Posts : 595
    • Reward points : 0
    • Joined: 2010/05/07 10:52:22
    • Status: offline
    Re: PIC18F: Character LCD Noise and MOSFET switching 2017/12/28 10:12:31 (permalink)
    0
    Yes.. LCD works fine Normally with MCU. I have seen garbage data on LCD only when switching MOSFET(s)...

    D0-D3 does not need to be connected? which pins? Gnd or something else. I am using LCD 16 x 2 in 4-bit Mode. I only have to write data, don't want to read any thing from LCD.

    Thanks
    #13
    Gort2015
    Klaatu Barada Nikto
    • Total Posts : 2769
    • Reward points : 0
    • Joined: 2015/04/30 10:49:57
    • Location: 0
    • Status: online
    Re: PIC18F: Character LCD Noise and MOSFET switching 2017/12/28 10:39:52 (permalink)
    0
    LCD databus pins D4 - D7 are the pins you use in 4bit mode.
    D0 - D3 not used in 4bit mode.
     
    Check the voltage on the pins going to the lcd or use a scope.
     
    I had a similar problem on a wireless receiver, a big cap on the wifi powerlines fixed that.
    post edited by Gort2015 - 2017/12/28 10:46:48

    MPLab X playing up, bug in your code? Nevermind, Star Trek:Discovery will be with us soon.
    https://www.youtube.com/watch?v=Iu1qa8N2ID0
    + ST:Continues, "What Ships are Made for", Q's back.
    #14
    TS9
    Super Member
    • Total Posts : 595
    • Reward points : 0
    • Joined: 2010/05/07 10:52:22
    • Status: offline
    Re: PIC18F: Character LCD Noise and MOSFET switching 2017/12/28 16:43:30 (permalink)
    0
    Thanks

    Wifi Power Lines have also MOSFET switching?

    Big Cap in power supply or near LCD.?
    #15
    PStechPaul
    Super Member
    • Total Posts : 2094
    • Reward points : 0
    • Joined: 2006/06/27 16:11:32
    • Location: Cockeysville, MD, USA
    • Status: offline
    Re: PIC18F: Character LCD Noise and MOSFET switching 2017/12/28 16:43:40 (permalink)
    0
    Although D0:D3 are not used in 4 bit mode, the display must read them as zeroes, so they should be connected to GND. It is best to handle switching transients at the source, perhaps with snubbers or gate resistors to take the sharp edge off the transitions. Inductors or ferrite beads are often more effective than capacitors in blocking RF. You can use a cheap AM radio tuned off-station as an EMI detector. Capacitors should be low ESR and low inductance. Ground planes and shielding may also be required.
     
    If the display is located away from the PIC it may help to twist the wires, and also use a shielded cable. USB cables are a good source of 4 wire shielded cable. Use one piece for D4:D7 and another for the control signals. The shield can supply the power for GND and VDD, or if youaren't using the R/W pin you can use one of the wires for VDD.

     
    #16
    Gort2015
    Klaatu Barada Nikto
    • Total Posts : 2769
    • Reward points : 0
    • Joined: 2015/04/30 10:49:57
    • Location: 0
    • Status: online
    Re: PIC18F: Character LCD Noise and MOSFET switching 2017/12/28 17:40:51 (permalink)
    -1 (1)
    Test the lcd lines with a multimeter to read the high and low voltages.
    What do you get on D4 - D7, RS and E?
     
    A cap. between + and gnd on the lcd. 100nf.
     
    Maybe the datarate to the lcd is too fast, run it extra slow to test it.
    Try a busy test using R/W.
     
     

    MPLab X playing up, bug in your code? Nevermind, Star Trek:Discovery will be with us soon.
    https://www.youtube.com/watch?v=Iu1qa8N2ID0
    + ST:Continues, "What Ships are Made for", Q's back.
    #17
    TS9
    Super Member
    • Total Posts : 595
    • Reward points : 0
    • Joined: 2010/05/07 10:52:22
    • Status: offline
    Re: PIC18F: Character LCD Noise and MOSFET switching 2017/12/28 18:19:42 (permalink)
    0
    @Paul
    I will definitely follow your suggestions.
    LCD is Not Near to MCU. LCD is quite far. 10Cm With FRC Cable.
    I will connect unused wired to GND.

    Should I connect LCD near to MCU and PWM Signals with 10 cm Wire for switching ??

    @Gort2015.
    As earlier I have checked with MCU..The Reset Pin of MCU is unstable while switching PWM and disturb LCD but Rest of the program like Voltage up-down program, LED work fine.

    Busy Test? Means Checking Busy Flag of LCD.

    /TS9
    #18
    Gort2015
    Klaatu Barada Nikto
    • Total Posts : 2769
    • Reward points : 0
    • Joined: 2015/04/30 10:49:57
    • Location: 0
    • Status: online
    Re: PIC18F: Character LCD Noise and MOSFET switching 2017/12/28 18:49:46 (permalink)
    0
    Yes.

    MPLab X playing up, bug in your code? Nevermind, Star Trek:Discovery will be with us soon.
    https://www.youtube.com/watch?v=Iu1qa8N2ID0
    + ST:Continues, "What Ships are Made for", Q's back.
    #19
    TS9
    Super Member
    • Total Posts : 595
    • Reward points : 0
    • Joined: 2010/05/07 10:52:22
    • Status: offline
    Re: PIC18F: Character LCD Noise and MOSFET switching 2017/12/29 11:02:44 (permalink)
    0
    @Paul
    Any Further Suggestions.?


    @Gort
    OK... I will then update..
    post edited by TS9 - 2017/12/29 11:03:55
    #20
    Page: 12 > Showing page 1 of 2
    Jump to:
    © 2018 APG vNext Commercial Version 4.5