Stray noise and input lines.....
ChrisP
Posts: 136
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
Chris
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ken
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
Just a note: Your NOS and SHIFT input circuits are different.· Are they supposed to be?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
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
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
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.
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
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.
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
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
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?
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
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
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.
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 .
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,
Günther
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.