Shop OBEX P1 Docs P2 Docs Learn Events
Stray noise and input lines..... — Parallax Forums

Stray noise and input lines.....

ChrisPChrisP Posts: 136
edited 2005-11-06 02:57 in General Discussion
After lurking for a while and finally making a few posts I feel a little more comfortable asking a question or three... I just recently started trying to use the SX chip in projects coming from the basic stamp. Currently on the board is a motorcycle control system for various functions, rider initiated just SX sequenced once initiated. Anyway the input in question is an active low input using the internal pullups to pull it high, there is a 5.1 volt zener diode reverse biased to ground and from there a 4.7k current limiter inline with the incoming wire. Ground signal comes in from wire, through 4.7k. Worked fantastic on the bench, once installed on a bike, (2004 Kawasaki ZX10) the output triggered continously. First thing I tried was a 2k pullup to 12V external to the board letting the zener pull it down. No luck still spontaneous actuation. After scratching my head a while wondering how anything external could still get past that I added a .1 mf cap to the input from the +5 supply and external to the 4.7k pullup. This seems to have solved the problem sitting in the garage and on a dyno. The whole point of this post is, I intend to send this thing down a drag strip with a very good friend piloting so I'm trying to be as careful as possible in development. Can anyone shed some light on why I needed a filter cap on an incoming active low line that was already pulled up and zenered out 9 ways to Sunday? Also, is there anything else I can expect as a common problem? The power supply for the SX is a L4940D2M5 with a .1mf cap, and a .1mf cap solder directly across the pins on the SX itself so I dont think I can get the filter cap any closer. The SX in question is an SX 18. This was chosen for the moment mainly for cost more than any other reason. Once I achieve something rock solid I plan on moving to a SMT version. All outputs are driven into FET's, irlz44's and irll2705s with 220 ohm protection resistors between the SX pins and the FET's. Sorry that there are no schematics with this but there arent any in existance. So far I've been working directly from CAD layout to putting parts down.

Chris

Comments

  • KenMKenM Posts: 657
    edited 2005-10-16 16:04
    expresspcb.com has a free schematic layout program that is very easy to learn. A schematic of your circuit would help to discern what the trouble might be.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Ken
  • ChrisPChrisP Posts: 136
    edited 2005-10-16 17:59
    Off to dinner and a quick test run, then express PCB it is. I'll post the schematic later tonight. Thanks
  • ChrisPChrisP Posts: 136
    edited 2005-10-30 20:25
    Well, it might be a week or so late but here's the basic schematic, forgot to put the .1 uf bypass cap in it and the 22 uf cap at the regulator where it feeds from. So far seems to be working great, just not sure why...
    1554 x 1198 - 105K
  • BeanBean Posts: 8,129
    edited 2005-10-30 21:04
    Chris,
    I don't see any flyback diodes on the solenoids or the relay ? They are really needed.
    Cars (and motorcycles) have unbelieveable amounts of noise on their batteries. Good (really good) filtering is required.

    Are you using SX/B ?

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "SX-Video·Module" Now available from Parallax for only $28.95

    http://www.parallax.com/detail.asp?product_id=30012
    Product web site: www.sxvm.com
    Available now... SX-Video OSD module $59.95 www.sxvm.com

    Life is NOT a box of chocolates.
    Life is a journey, and 99% of the time you get where your headed.



    Post Edited (Bean (Hitt Consulting)) : 10/30/2005 9:08:03 PM GMT
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-10-30 21:06
    This is late input, but I'll toss it out anyway: If you're concerned about noisy 12v inputs you could isolate them from the SX with an opto -- pretty clean and easy to do.· The other thing you should consider is fly-back diodes (e.g. 1N4001 - cathode to V+, anode to Vss)·across your solenoids.

    Just a note: Your NOS and SHIFT input circuits are different.· Are they supposed to be?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    732 x 402 - 27K
  • ChrisPChrisP Posts: 136
    edited 2005-10-30 22:49
    Bean, in answer to your question yes I'm using SX/B all the way on this so far. To say my programming skills are weak would give me too much credit and this is my first departure from the basic stamps. I went to the SX because of future projects that had been blue sky kind of things but the speed and cost of the SX makes possible. To both of you, well apparently I made a serious error in judgement I've been relying on the body diodes in the fets to capture·the kickback off of relays and solenoids. The relays in use actually do have kickback diodes, the solenoids to the best of my knowledge do not. Just knew there was a body diode in the fet soooooo. This schematic includes flybacks which will be installed in the existing system tomorrow night when the bike gets back here. Your totaly right about the electrical noise issues, its problably one of the nastiest places on the planet for EMF, 4 high energy ignition coils, multiple MCU's running at who knows what speeds etc.

    Jon, yes the two input circuits should be different as one is sourcing the other is sinking, they both have the 5.1 volt zener to ground just to protect in the event that power gets sent back up the sourcing input.· The extra .1uf cap and the 2k pullup to 5 volts on the shift input are the parts I had to add to keep it from triggering spontaneously whenever the bike was running. The 2k pullup was first and didnt improve the situation so the .1 uf cap was added in the hope of smoothing noise. That did the trick but removing the 2k pullup afterwards brought me back to the same random triggering so the schematic shows both. Difference from the schematic to the installed system, the 2k pullup is located outside the enclosure and is pulled up to system voltage +12 to +14.5 pulling up to the +5 supply is conjecture at this point. In practice there is a .uf glass cap soldered directly across the top of the SX from Vdd to Vss and the Vss and Vdd traces run parralell to each other coming in to the regulator, and from the regulator under the chip lengthwise to the supply pins. On a side note the inputs on the SX are set to schmidt trigger to avoid even more noise issues.

    The random triggering I still havent figured out, when I get time I'm going to pull the added filtering and put a scope on that input line out in the garage to see if I can track it down. My only theory on that one is that until you actually activate it you have roughly 3 feet of wire on the input running the length of the bike acting as an antenna for EMF (pulled to ground up on the handlebars). That doesnt explain why the 2k pullup didnt take care of it but for now its beyond me.

    Thank you both very much for your response and the information about the flybacks, information shared by everyone in these forums has went a long way toward making this a working project. Now I guess its time to go do some more research on what those little body diodes are really in there for.

    (Note there are backup safety systems that will not allow anything that is controlled by the SX to operate in case of massive hardware failure)



    Update: At this point the system has been on a 2004 Kawasaki ZX10 for almost 3 weeks total, and after extensive testing strapped down on a rear wheel dyno, last thursday·it was piloted down the track to consecutive 1/4 mile times of 9.02 back to back at 154.72 and 155.65 mph on a low power system setup. More testing throughout the winter and·with luck·a trip to FL and were hoping to be 8.60's in the high 160's

    Post Edited (ChrisP) : 10/30/2005 11:09:11 PM GMT
    1436 x 1025 - 86K
    432 x 324 - 30K
  • ChrisPChrisP Posts: 136
    edited 2005-10-30 23:11
    Jon, question I almost forgot to ask. If I have noise floating far enough to get past the schmidt triggers on the input lines wouldnt it come right through an opto isolator too?
  • PJMontyPJMonty Posts: 983
    edited 2005-10-31 02:56
    Chris,

    One key advantage to using an opto is that you now have a current based input instead of a voltage based one. With your previous input approach, noise can superimpose on top of the input voltage (depsite pull ups/downs, etc) and cause false triggering. With an opto, you are lighting up an LED using 10 or 20 ma of current. Any noise on the line will not cause the LED to light up (or turn off) spontaneously. It's not a panacea, but it's another step in taming the noise issue.

    Another plus to this will be putting the entire PCB in a grounded metal case to help provide some shielding.
      Thanks, PeterM
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2005-10-31 03:42
    Another filtering approach would be for the power supply going to the SX.
    Here is a diode-capacitor voltage regulator filter that can help if you have a
    noisy voltage supply line.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
    1103 x 611 - 39K
  • PJMontyPJMonty Posts: 983
    edited 2005-10-31 04:53
    Beau,

    At first I thought the power supply schematic had a problem since there was a diode following the 7805, which would drop the voltage. Then I noticed that you also had a diode between the ground lead of the 7805 and ground, which would bias the 7805 output up, thus compensating for the diode which follows the 7805. Is this the way this power supply or am I mis-reading it?
      Thanks, PeterM
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2005-10-31 05:12
    PeterM,

    Yes, you are reading the schematic correctly. The "first" diode from Vsupply in conjunction with the
    1000uF cap creates a typical Diode-Capacitor buffer. The "third" diode (Output of the regulator)
    forms a second Diode-Capacitor buffer with the 10uF. The "second" diode (Regulator Ground) is a
    bias diode as you mention to the "third" diode. The 100uF simply provides more stability between
    the main regulator output and ground.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2005-10-31 08:49
    Chris,

    like Jon and Peter suggested, I'm using opto isolators for inputs in "noisy" environments with additional filter caps in parallel to the opto's LEDs. On inputs with relatively low switch rates, I use 15µF Tantalum caps (plus pole connected to the anode).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    Günther
  • ChrisPChrisP Posts: 136
    edited 2005-10-31 10:03
    Another lesson learned, now it makes sense why an optoisolator would take care of a lot of transient noise issues in the input lines. After flipping through datasheets on digikey for the last half hour would anyone like to suggest a smd opto suitable for the application? Outputs to the SX and inputs suitable for operation in a variable voltage envirionment 11-15 volts. The thought never crossed my mind that it would be current based and low current transients would be soaked up trying to excite the emitter. Besides, after a little thought this also solves an option I'd like to add to the circuit of being able to select sinking or sourcing input lines, simply lead out from both legs of the input side of the opto.... This just gets better and better, thank everyone very much for all the help.

    Chris

    P.S. a dual channel smd opto would be prefferable for me.
    Would a MAX326 analog switch work for this?

    Post Edited (ChrisP) : 10/31/2005 12:29:14 PM GMT
  • ChrisPChrisP Posts: 136
    edited 2005-10-31 10:14
    Beau,

    I'm really trying to keep the component count down on this as much as possible but in the power supply area as well as every other area I have very little experience. So far the SX seems perfectly content but that doesnt mean its not sitting on the ragged edge for power supply noise. I did check the input power lines with a scope with the bike running on a dyno to max capacity and they looked pretty decent. In the past I had always attributed this to the battery acting as a giant noise filter or sink. Is that assumption valid or is there something I should be worried about in this area? This much I can tell you from experience, a typical modern motorcycle's charging system is dirty enough that without the battery to act as some type of filtering the bike wont run from the charging system alone if boosted to start from another power source. Looks like it may be time to gut some dead commercial motorcycle electronics to see what typical power supplys look like. Thanks for the schematic as noise is always my biggest enemy..... hmmm Along the current consumption issue and noise, maybe its silly but would having a simple power indicator led running right off the 7805 absorb transients like it does in an opto or am I assuming too much here?
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2005-10-31 14:12
    Chris,

    usually, I'm using CNY17-4 optos here, which are available in various packages. In my designs, I normally use 3.3kOhm input resistors for 24V input signals. To my experience, a CNY17-4 with 3.3 kOhm even switches when the input voltage is as low as 5V. For an 11-15 Volts system, you might consider using an input resistor of 2.2 or 1.5 kOhm with the output circuit as shown in Jon's example.

    Right now, I'm working on a motor controller for a concrete saw. The controller is connected to two PWM-controlled motors (each of them "eating" up to 15A @ 24V) via a cable that also contains leads for end-sensor switches and motor tacho pulses with all these signals switching between 0 and 24 Volts fed into an SX via opto isolators. You can imagine that due to the high pulsed motor currents, a lot of noise is induced into the sensor lines. Without capacitors in parallel to the opto's LEDs, I got false end-sensor readings and "pseudo" tacho pulses frequently. Since the caps were installed, I never again had a problem like this.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    G
  • ChrisPChrisP Posts: 136
    edited 2005-10-31 15:20
    Guenther,

    Thank you very much for the reply, I hate to be choosy but after an hour on digikey's site is there a quad pack version of this opto, or something comparable?


    Post Edited (ChrisP) : 11/1/2005 11:40:53 PM GMT
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2005-10-31 15:45
    Chris,

    I have had great results with the PS25xx and PS27xx series of Opto-Isolators....As with Guenther's observation, I to have experienced the PS
    opto's to saturate at very low voltage levels.

    Starting at page 1570 of the Digikey manual to about 1580 is where you would probably be of interest.
    http://dkc3.digikey.com/PDF/T053/1570.pdf·· (<--just increment the number here for the next page)

    I did not see any CNY17-4 other than on page 1574

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • ChrisPChrisP Posts: 136
    edited 2005-11-01 23:40
    Success!! Another project I've been working on was something to use at the shop, a general use 32 IO PLC board using an SX 48. Its envirionment was even worse than the bike, the IO lines are routed along with 220 3ph power and 300 Volt servo motor power lines. After grafting in a batch of PS2501-L4's with the appropriate current limiters and 15uf Tantalum caps per Guenthers post there was absolutely no false triggering. I also switched over the control in the motorcycle to the new input scheme and it works wonderfuly even when routing wires in intentionaly bad places like against the high energy ignition coils. This has been tremendously educational for me and quite possibly saved both projects from being postponed indefinately. Thank you all for the education in current based inputs, the schematics for them and the power supply filtering, the part numbers and most of all your patience. There is still quite a bit of testing to both projects, code to clean up, schematics to finish and new boards to complete but theyre on the home stretch now to land in the projects area as a finished project. Next up on the drawing board, re-inventing the shift light! It keeps me fascinated anyway [noparse]:)[/noparse]

    Chris
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2005-11-02 00:37
    Chris,

    I'm really glad to learn about your success!

    To be honest, a while ago, I had a look at a "vintage PLC board", and I noticed that all the input opto isolators had 15µF Tantalum caps in parallel. This gave me the "push" to try the same on my own boards. Seems as if this also works out fine for you. Too bad that I don't know who developed this "vintage PLC board" - I think (s)he deserves a couple of free drinks - at least smile.gif .

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    Günther
  • ChrisPChrisP Posts: 136
    edited 2005-11-06 02:57
    Guenther,
    Yes they do absolutely, the latest update on the bike control is that its working fantasticaly. The code is in desperate need of cleanup and I need to check a few things running on the dyno with a scope but in application so far its been very robust and working well. We got 5 passes in on the test bike today ranging from 8.95@162.7 mph, to 8.82@164 mph.... Looks like I need to check the schematic and move this thread over to the projects forum since its now working pretty well. Does anyone know what the land speed record for an SX chip is? <s> 8 anything was our goal, now were not trying to push for more time just to get to what the thing is capable of in its current trim and todays runs indicate it will go in the 8.70's possibly 8.60's but there is definately a 8.70 run in there somewhere if everything comes together for some of those near perfect passes. The surprising part is, this whole thing is a 2004 Kawasaki ZX10 with a power commander, full exhaust system, 6" bolt on swing arm extensions and a dry nitrous oxide system (much simpler no external fuel required just nitrous solenoid, tank, and fogger to disperse the nitrous oxide, and a bone stock engine never been taken apart.
Sign In or Register to comment.