Load through contacts of relay affecting BS1 operation?!
brettm
Posts: 36
I am having problems with my BS1 which I first thought was a power supply problem and started this thread: http://forums.parallax.com/showthread.php?p=600677·· However I have discovered that with certain changes to the circuit it does work with this power source, so I must have a different problem.
I am using the BS1 to drive 2 relays and 3 LEDs (all through 2N4400 transistors with 10k resistors to the base)·and·the LEDs and relays work perfectly when I do not have a load going through the relay contacts.· However when I attach the solenoids that I wish to control to the relay contacts the BS1 no longer works properly and will freeze up after a short period of use.
Since the relay contacts aren't even connected to the circuit (only the relay coil), I don't understand why having a load through the contacts would affect the circuit and the BS1...?
(I'm using 12v relays but have also tried 5v relays fed from VDD rather than the 12v power source; same problems)
I am using the BS1 to drive 2 relays and 3 LEDs (all through 2N4400 transistors with 10k resistors to the base)·and·the LEDs and relays work perfectly when I do not have a load going through the relay contacts.· However when I attach the solenoids that I wish to control to the relay contacts the BS1 no longer works properly and will freeze up after a short period of use.
Since the relay contacts aren't even connected to the circuit (only the relay coil), I don't understand why having a load through the contacts would affect the circuit and the BS1...?
(I'm using 12v relays but have also tried 5v relays fed from VDD rather than the 12v power source; same problems)
Comments
If you're driving any relay or solenoid directly from a Stamp pin, you're really just looking for trouble, in the long run. Using a circuit such as that below will block the back EMF from the relay/solenoid, and provide a driver transistor to take the load of the coil:
http://www.hobbyprojects.com/the_diode/diode_protection_circuits.html
Hope that helps.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<!--StartFragment -->
That sounds like broad spectrum EMI from the contacts. How many amps are you switching?· It sounds like a lot.
You might have to find ways to quite the noise on the 12 volt circuit [noparse][[/noparse]like a low pass transient filter inline with the 12volts].· Also, you might take a look at how many ohms the coils are.· The collapse from actual use may be harsher than when there is no load.
You might make sure that there is no common ground between the 12volt and the 5volt.· I took a look at your other thread and it seems like you might do much better with Opto-isolation and have the BS avoid any ground the the automotive circuitry.· I know that raises the question of how to supply power to BS. But if the isolation does eliminate the problem, you can return to designing a supply that is fully filtered.
Automobiles are a very harsh electrical environment.· Lots of different kinds of noise and all contained within relatively short circuit distances.· For digital electronics it as difficult to not get their digits scrambled.· Just turning off the headlights or honking the horn can put everything out of whack as one minute there is a high demand and then there is none.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"If you want more fiber, eat the package.· Not enough?· Eat the manual."········
Post Edited (Kramer) : 8/15/2006 7:56:53 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
I know automobiles are a harsh electrical environment, but this last round of testing was done directly off the 12v battery with the vehicle turned off.· I would think that would be a very clean source of power...?· I have also tried making a low pass filter for the stamp using a resistor and capacitor and I've tried feeding the Stamp through a 7805 5v regulator.· Neither helped.· And regardless, the relays and LEDs work fine off this source when the relays aren't hooked up to the solenoids, so I can't see how that's a power supply problem.
·
how would I filter this spike?
You have a Stamp driving a transistor that is driving a relay that is driving a solenoid.
The Stamp needs the transistor or some other device to isolate it AND to help you magnify the power output. You may or may not need the relay in the middle.
Your end of the line device, the solenoid that is attached to the relay contacts is your culprit. Collapse of the solenoid causes a spike to surge back to the BS1 and lock up [noparse][[/noparse]if not eventually die].
Your best bet is to opto-isolate the BS1, independently supply power to it, AND to find a solid-state relay or power fet to eliminate the sparking from the solenoid shut down. I don't really know if the later solution is attainable. It depends on how much power is in that solenoid. Starter motor solenoids handle something like 100 amps. Light switching can be 20-30 amps. Look at the fuse box in the automobile, some go up to 50 amps.
As you might notice, the automotive people haven't gotten too far away from electro-mechanical devices because they need low voltage, high amperage. Lots of sparking and Lots of EMI.
The diode across the relay is needed, but it is just a small detail within the bigger picture.
Thing isolation, isolation, isolation in this instance.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"If you want more fiber, eat the package.· Not enough?· Eat the manual."········
I'm not very good at drawing circuit diagrams, but I'm attaching one I threw together.· I didn't show the relay contacts since I didn't think them important.· I'm simply running the same 12v source that feeds the Stamp, LEDs and relays to the common pin and the solenoid to the normally open pin.
Since the solenoids are causeing the problem, and are only linked to the BS1 by sharing power and ground, the interference must be coming through one of those, correct?· Can I use optocouplers to isolate the power and ground, or only to send signals?
it suggests that a simple diode with the solenoid would filter out these spikes. any input? I'll give it a try...
a simple diode across the solenoids (like I already had across the relays) and it works perfectly.· once again the Parallax forums come through,·I wish I would have found that other thread in a search earlier, and I'm kinda surprised I didn't think of a diode earlier.· With all the confusion this has put me through I was sure it was going to be a more complicated fix.
Thanks guys!·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
engineer, fireman, bowler, father, WoW addict [noparse];)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"If you want more fiber, eat the package.· Not enough?· Eat the manual."········