Bob Blick wrote: > > >sure yet). Will the protection diodes on the PIC I/O pins be adequate for > >coil suppression or do I need external diodes as with other relay types? > > If the PIC can deliver enough current to energize the relay, it can also > handle the turnoff current which, by the rules governing inductance, is the > same as the run current. Not necessarily so. The structures that sustain the flyback current are not necessarily the same as those that conduct the forward current, and, if sufficient current flows into the substrate, the whole chip can turn in to a thyristor! > > There is another issue you should look at, which is whether your power > supply voltage will be raised during turnoff. If you have a regulated power > supply, and the other loads are equal to or greater than the relay current, > then the regulator should track it no problem. > > Don't use pin RA4 without a protection diode, it is open-drain(it's also > inverted). > > As to your question of cross-coupling of signals between the coil and > contacts, I have no answer. Attach an earphone to the relay's switch > terminals and see if you can hear the power supply when the relay is engaged. > > On an unrelated note regarding unwanted signals, I was building a device > with, among other things, a PIC, keypad, LED backlit LCD, and a piezo > speaker. I noticed that on alternate keypresses the speaker would make a > continuous background noise until I pressed another key. I had it so each > time you pressed a key you got a beep out of the speaker, and the beep was > 255 togglings of the speaker pin. Every other keypress would leave the pin > in a "high" state, and the piezo speaker was essentially attached across the > power supply. The sound I was hearing was the small variation in the power > supply as the backlight dimming routine toggled the backlight power every > 100 microseconds, changing the load and upsetting the power supply ever so > slightly. I changed the beep routine to leave the speaker pin at 0 volts > upon exit. It's amazing how sensitive piezo speakers are at 5KHz, the ripple > wasn't more than 0.03 volts pk-pk. > > Cheers, Bob -- Paul Mathews, consulting engineer AEngineering Co. optoeng@whidbey.com non-contact sensing and optoelectronics specialists