Electric Noise PIC problem


Closed Thread
Results 1 to 12 of 12
  1. #1

    Default Electric Noise PIC problem

    Three attachments, first is the schematic and the second is data from a logger box. The schematic is a simplified version. The data is sampled at 100hz, logger limited. The last attachment is a data sheet for an OPTO-MOS on the board

    I have a box that is triggered by wide open throttle. At wide open throttle a timer starts and turns on outputs based on user set times. I am having a problem, I think with the wide open throttle getting noise and making the PIC think it lost the wide open throttle signal and resetting the timers.

    The wide open throttle signal (16v) goes through a OPTO-MOS relay. The relay pulls down a pin on the PIC. The output when activated turns on another OPTO-MOS relay that turns on a P-Type mosfet. I have a DC/DC isolated power supply on the board and every input and output is optically isolated.

    There are four traces on the data.pdf. The green wire is the output of the OPTO-MOS connected to the wide open throttle . When the OPTO-MOS receives 16v, the green trace goes low. This activates the timing sequence. The first output is programmed to trigger at wide open throttle and the second output activates at 1.2 seconds. So the yellow trace is the output of the OPTO-MOS triggering the MOSFET. The red trace is the output of the first MOSFET. The blue trace is the output of the second MOSFET. You can see the blue line going high at 1.2 seconds.

    Keep in mind this data is being logged at only 100 hz. The data looks great until around 2.3 seconds. The red and blue trace go low. The red trace then goes high again and then flickers off twice before staying high. The entire time the 16v input is high. The last flicker is at 3.46 seconds and the second stage goes high at 4.66, right at the correct amount of delay from first stage activation.

    This system works great on a test bench. I do have an ignition system on my test bench to simulate the engine running. However with cylinder pressure from the engine, there is more noise in a race car.

    I know the PIC isn't resetting. There is about ten seconds after power up for the device to be ready to activate based on Wide Open Throttle.

    Somehow the PIC is losing the Wide Open Throttle signal and restarting the timers.

    Any suggestions?
    Attached Images Attached Images

  2. #2
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    Tobias , Where is the pullup reststor for the WOT input to the pic? The component you are using is indeed an opto but the output acts the same as an open collector transistor to ground. That is not a good design as the fets when shut off do not set a state to the pic input pin. Also have you checked the actual switch that sets the WOT state during the maximum engine output? Maybe the "vibration" is falsely triggering the pic.. Also, What is the purpose of R22?

    Dave Purola,
    N8NTA
    Last edited by Dave; - 1st June 2010 at 11:52. Reason: Another Question

  3. #3


    Did you find this post helpful? Yes | No

    Default New Schematic

    Dave
    Thanks for the reply. I was away from my PC for a few days. The first schematic was the new version of the board being built. I changed input pins just for the hell of it to see if I could isolate the problem. I screwed up and made the first example schematic a cross between the new and older problem version.
    The problem board schematic is attached. I had the WOT going into PortB.0 and On/Off on B1.

    I just don't understand what in the hell is going on. When On/Off is pulled low, it activates the code and there is start up routine of about ten seconds. When WOT is pulled low it starts the timers. The two circuits are pretty much identical (WOT and On/Off) Yet the WOT looks like it is losing a signal and restarting the timer routine.

    R22 and R25 (on the problem board/second attachment) are pull downs to help eliminate false triggering. I populated another board, the problem child one today and shipped it out to be tested on a car this weekend. I removed R22 and replaced it with a 10uf cap. I tested it out on the scope using a 16v input cycling at even 50 hz and it keep the WOT pin pulled low. So this weekends test should help me figure it out.
    Attached Images Attached Images
    Last edited by Tobias; - 4th June 2010 at 04:19.

  4. #4
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    947


    Did you find this post helpful? Yes | No

    Default

    Has the behaviour got anything to do with RB0/INT being used as an interrupt in your program? Maybe you can poll RB0 to confirm if this is what is causing the malfunction.

  5. #5


    Did you find this post helpful? Yes | No

    Default

    Good question, originally I was using it as an interrupt but then I changed it over to a Do While Loop that executes the timer function while WOT is Low. I thought maybe I wasn't doing something right on the interrupt side so I went to the Do WHile

  6. #6
    Join Date
    Nov 2008
    Posts
    96


    Did you find this post helpful? Yes | No

    Default

    Hi,
    Many many years ago I did the development for a GoKart (the racing kind) datalogger and instrument system, based on a HC11 In the R&D phase we spent more time in EMI suppression than in any other part of the design. We tried dozen of supression thechniques before we had a device that would run for more than half a lap once mounted on a Kart... Spark ignition environments are just EMI hell !

  7. #7


    Did you find this post helpful? Yes | No

    Default

    EMI is the bitch of it all. I have a MSD ignition on my bench with a coil and test plug. The ignition and the coil is just like in the race car. I can fire up the MSD and have the board right next to the coil and all is fine, in the car it fails. The problem I am running into is that the wiring on every car is unique too. Some guys aren't even running a ground wire to the battery...they rely on the chassis to carry the load. I do have hope in that there are other electronics like data acq boxes that do work.

  8. #8
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    947


    Did you find this post helpful? Yes | No

    Default

    I do not have too much of exposure to car electronics, but the one time I did work on a car was with the central locking. Rev the engine and all hell broke lose. The fix was to plant a simple half wave diode rectifier followed by a smoothing cap to supply my board followed by the normal regulator stuff. Along with this, there were some kind of coils fitted on the spark plugs that reduced the noise immensely.

    Maybe I was plain lucky that my board worked after those changes or maybe it can lead you onto something.

  9. #9
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    Tobias , Once again, Where are the pullups for the inputs? And what is the purpose of R22 and R25? The schematic looks the same as before...

    Dave Purola,
    N8NTA

  10. #10


    Did you find this post helpful? Yes | No

    Default

    Dave
    I am using the weak pull-ups on the first board/second posted schematic. Maybe you didn't see the second schematic

  11. #11
    Join Date
    Nov 2008
    Posts
    96


    Did you find this post helpful? Yes | No

    Default

    Are you actually sensing RPM from the spark source in your project (not sure if your posted project schematic is all of it or just some of it) ?
    If so I might be able to help suggest some things. If not, then I'd suggest you try initially powering the project from an independent battery source (dry cells etc) and see if your problems go away. If so it gives a clear indication of whether the source of EMI (if that's the issue) is coming in via the cars own power supply.
    Also be aware that any long sensor pickup lines in the car are potential receiving antennas for EMI, and use inline RF chokes before they get too close to the MCU.

  12. #12


    Did you find this post helpful? Yes | No

    Default

    Yes I am sensing RPM on this board. I do have all inputs and outputs optically isolated from the board and I am using a DC/DC converter. The last few days of thinking about this problem, I am wondering if the switch supplying the signal to the WOT is 'bouncing' It is pretty much a generic micro-switch under the throttle pedal. The main reason I am wondering, is that the On/Off input is the same voltage but through a toggle switch. I sent out a board yesterday to test with a 22uf cap on the WOT trace. Hopefully that will fix the problem.

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