Shop OBEX P1 Docs P2 Docs Learn Events
Automotive Relays Killing GPS & Locking Up Cog — Parallax Forums

Automotive Relays Killing GPS & Locking Up Cog

SuperCricketSuperCricket Posts: 17
edited 2008-10-08 22:26 in Propeller 1
This is a pretty simple setup, Propeller DIP chip, Parallax GPS.

I have the GPS on its own 5v regulator with 1000 uF caps on the 12v side and the output side. The GPS has 2 feet of Cat5 network cable in which the power, ground, and signal wire runs through.

Every time a relay clicks off I get some sort of spike and it kills the GPS. I will get random data like 670 miles per hour, the date and time will turn into hexidecimal characters, etc. Sometimes after 10 seconds or so it will come back to life, and other times the cog will just die until I reboot the board.

So I read about voltage spikes from relays in automobile setups and learned about the diode across the control side of the relay. I pulled a relay and installed this 1000v diode and it fixed the problem for that single relay. In this case the fuel pump relay.

However, I can't tear into the dash and the entire car and ghetto wire diodes into the relays just so the GPS will work. There has to be a better way to fix this problem.

Another guy told me to apply a tiny capacitor as close to the GPS as possible, like a .001 uf. I tried this with no luck. He also suggested wrapping the signal wire close to the Propeller in an RF choke, so I picked up a magnet and did that. Nothing will fix this.

It's lame driving around seeing your speed and direction fine, then you hit the turn signal and everything goes to Smile.

Any ideas?

Post Edited (SuperCricket) : 10/4/2008 9:25:38 PM GMT

Comments

  • pmrobertpmrobert Posts: 669
    edited 2008-10-04 21:29
    Try placing a similar diode in the same orientation as you did at the relay at your GPS module.
  • LeonLeon Posts: 7,620
    edited 2008-10-04 22:11
    You could also try a TVS, like a 5V AVX TransGuard, across the GPS supply. I've found them very effective in nasty environments.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle

    Post Edited (Leon) : 10/4/2008 10:19:23 PM GMT
  • Dennis FerronDennis Ferron Posts: 480
    edited 2008-10-04 22:19
    You can save yourself a lot of frustration if you run your GPS and Prop off a 9V battery not connected to the car 12V system, and control your relay through an optoisolator.
  • RinksCustomsRinksCustoms Posts: 531
    edited 2008-10-05 00:41
    Your getting EM/RF Interference, if the CAT5 cable has an internal shield, ground that to the chassis (away from the relay ground). Next to cut back on RFI, start with a piece of double clad PCB about 25% bigger than the GPS board and ground it somewhere else local to the chassis of the car. High-end aftermarket DVD/NAV/Recievers for the car have a copper foil completly surrounding the circuit boards, if you need more noise suppression, try the addition of small pieces of double clad PCB at the front and back of the GPS (effectively making a U-shaped channel of PCB under the GPS). That will give good EMI/RFI protection to the GPS, your Prop may also require identical shielding from EMI/RFI radiations.

    To really knock the Smile out of RFI, add a ferrite bead on each cable that's longer than 6" (even power supplies).

    Add in the DC to DC supply mentioned below and you should have your bases covered.

    The ground wire suggested traveling all the way to the battery will work well since steel has a higher electrical resistance, but the wire should be silver plated, silver having the lowest resistance possible.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    E3 = Thought

    http://folding.stanford.edu/·- Donating some CPU/GPU downtime just might lead to a cure for cancer! My team stats.

    Post Edited (RinksCustoms) : 10/5/2008 4:02:19 AM GMT
  • whickerwhicker Posts: 749
    edited 2008-10-05 02:18
    Use an isolated DC to DC switch-mode supply if the 9V battery is not going to give enough life.
    Do not connect either side of the _output_ of this supply, like the negative lead, to the frame of the vehicle if at all possible.
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2008-10-05 03:05
    Can you post your schematic and setup? I have set up numerous gps's in a car environment with 0 problems. I use a 7805 and a heatsink. Make sure you are using a pcb with a ground plane and make sure you are grounding to a wire to the battery, not the frame.

    Mouser stocks TVS (6KA24) for the specific purpose of an automotive environment. Their clamp voltage is lower than the max voltage allowed at a good 7805 the way I recall.
  • RinksCustomsRinksCustoms Posts: 531
    edited 2008-10-05 03:55
    Also, those 1000uF capacitors probably arent helping with noise as much as you think they are in the power supply. Since this is a low power circuit, you can also implement a two wire toroid style choke cross-wired should all but eliminate a few mV of noise. Theory is : as the noise spike enters the toroid, it's nearly canceled out by it's counter EMF coming from the second winding that has been connected so that the current flows the other way. I have only confirmed this noise rejection with lower powered circuits like yours, and i'm sure the more current you throw at it, the more it'll choke voltage.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    E3 = Thought

    http://folding.stanford.edu/·- Donating some CPU/GPU downtime just might lead to a cure for cancer! My team stats.
  • SuperCricketSuperCricket Posts: 17
    edited 2008-10-05 04:51
    Thanks for all the ideas guys, I should have majored in electrical engineering instead of computer science, because I had never heard of a transient voltage diode until now. Just the regular Zener diodes.

    Rink I'm trying to grasp your torroid idea. The local electronics store has an entire isle of torroid cores so I can rig that up pretty easy, however I'm trying to figure out how I would design the circuit for this. For the 3 wire GPS, are you saying run the +5 and the ground through the torroid for this 2 wire choke? Or are you talking about in the serial signal wire for the GPS?

    Erik, if these few ideas brought up don't fix it I'll draw the entire board shematic up and see whats going on. However, it seems like you guys have figured out some noisy environment fixes. I'll post back with results.

    Post Edited (SuperCricket) : 10/5/2008 5:23:48 AM GMT
  • rjo_rjo_ Posts: 1,825
    edited 2008-10-05 16:11
    SuperCricket,

    At least you majored in computer science... at that age, I couldn't understand how computers would ever become useful... what with the punch cards, etc.


    What kind of relays? try a reed relay... you might not want to stay with it, but for diagnostic purposes they are great.

    Sounds like you are using two different voltage sources?

    Rich
  • grasshoppergrasshopper Posts: 438
    edited 2008-10-05 16:19
    If you can post your schematic I am sure we can help to much greater detail. I would suggest using a solid state relay or a mosfet. Take a look at these

    search.digikey.com/scripts/DkSearch/dksus.dll?Detail?name=PVT412-ND

    Be sure to pick one that can handle the power load.
  • RinksCustomsRinksCustoms Posts: 531
    edited 2008-10-05 17:19
    Here's an identical image to the coil i used. My coil had the enamel coated wire just touching each other, it was also a two pass design. Anyway the picture is good enough for illustrative purposes. Arrows show current direction, to achieve a high rate of rejection, one winding is purposely connected in reverse to the other. It's also very effective at rejecting any AC ripple. The big arrows show the two EMF fields countering one another. It's not the most efficient, but it's an economical and effective fix for your solution.

    As for the ferrite beads, here's·a typical·example...
    They also come in a split core clamp on design...

    All these can be found in the Mouser.com catalog.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    E3 = Thought

    http://folding.stanford.edu/·- Donating some CPU/GPU downtime just might lead to a cure for cancer! My team stats.
    300 x 165 - 11K
  • pemspems Posts: 70
    edited 2008-10-06 14:00
    here are some insightful docs i've dug up on analysis of automotive noise and ways of dealing with it:

    st's studies on types of noises in car's power
    http://us.st.com/stonline/books/pdf/docs/3583.pdf
    and techniques to filter
    http://us.st.com/stonline/books/pdf/docs/3584.pdf

    also see the schematic attached for a decent filtering circuit for an automotive power supply based on LDO and a bunch of filtering components. This circuit worked for thousands of car enthusiasts, so chances are will work for you

    @Rinks:
    this idea is brilliant! from what i read on EMF/transformers/inductors/etc, this way of winding/wiring should basically resist any kind of AC through it. This should theoretically work much better than regular inductor that only takes advantage of magnetic field inertia of the core.
    But does it really have to be a torroid? why can't the same thing be achieved on a regular cylindrical core? Do the two ends of the core absolutely need to be connected?

    also, perhaps one would need to put a cap across such windings, so the the power on/off jump wouldn't cause too high of a peak EMF, physically moving the windings apart from each other (probably not enough energy for this, i am just guessing, as i don't have too in-depth knowledge in this field)
    1549 x 1150 - 44K
  • RinksCustomsRinksCustoms Posts: 531
    edited 2008-10-06 16:59
    This design/use i thought up (in high school like 15yrs ago), was first simulated on Multisim (the first release) with a virtual transformer having windings of 1:1. But this isn't a theory, i prooved it worked, was relatively efficient, and cheap. It's a trade off of sensitivity·vs current·& voltage·thoroughput.

    ... stupid dotnet junk has no tables?! ... any IT's here of phpBB3? it's free!!!! ...Ugh, anyway,

    Simply put, more windings = greater sensitivity and ripple rejection at the expense of less V &/or I thoroughput.
    Less windings = less sensitivity & ripple rejection, but have more head room for V & I thoroughput.

    · The Torrodial prooves to be the most efficient design for this task. Obviously Wire ga., & no of turns will dictate how it will perform for a given current/voltage. Experimentation would need to be performed to find a "fast but ugly"·linear interpolation formula that would suit tuning a torroidal core for a given average·wattage. This is a counter EMF design, so it will naturally have only so much efficiency vs s/n ratio.

    Other transformer designs will work, but not as good. The windings ratio HAS to be as close to 1:1 as possible or it wont work. Also, unless you are turning your own on a lathe/drillpress, you won't be able to tune the transformer.

    Back EMF spikes aren't possible because the EMF is kept at a low level from the counter EMF produced. EMF(gause) = CounterEMF(gause).

    I would imagine that a cap across the torroid coil wouldn't do much, if anything it should amplify/pass the ripple/noise. To protect against a Back·EMF· spike you would place a higher powered diode across the coil in reverse bias, aka a catch diode. Which isn't needed in this design, Dampening is inherent.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    E3 = Thought

    http://folding.stanford.edu/·- Donating some CPU/GPU downtime just might lead to a cure for cancer! My team stats.

    Post Edited (RinksCustoms) : 10/6/2008 5:07:07 PM GMT
  • The MuleThe Mule Posts: 9
    edited 2008-10-08 13:35
    RH arm in cast--typing w/ left hand...
    I have had same problem. may not be relay--it's inductive kickback from fuel pump electric motor, transmission shift solenoids, A/C clutch, fuel injectors, etc. causing voltage spikes on the GROUND. Need scope to verify. Use 300 - 1000 uH wire wound inductors on PWR & GND wires to LM 7812, then LM 2937 to Prop w/ .001, .01, .1 & 100+ uF caps all over.
  • Beau SchwabeBeau Schwabe Posts: 6,545
    edited 2008-10-08 15:15
    SuperCricket,
    You could try something like this for noisy electrical environments... http://forums.parallax.com/attachment.php?attachmentid=39280

    Circuit description for above link:
    Going from left to right, the first diode and capacitor combination off of the INPUT terminal to the regulator form a first stage "diode/capacitor filter". The second diode connected to the regulators GND terminal shifts the Ground reference by 1 diode (.6V) in preparation for the third diode. The third diode connected to the regulators OUTPUT forms a second stage "diode/capacitor filter". Since the third diode creates a diode voltage drop of .6V it is necessary to compensate that with the use of the second diode to shift the voltage up by .6V so that the net output remains at 5V.

    This circuit has worked well for me in several circumstances.

    In addition to your design, if you can't place reverse biased diodes at the inductive source, place them·(two for each I/O) at all of your inputs.
               Diode       Diode
    +5V >--------|<----o----|<--------< GND
                       |
                       |
                      I/O 
    





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

    IC Layout Engineer
    Parallax, Inc.

    Post Edited (Beau Schwabe (Parallax)) : 10/8/2008 3:25:09 PM GMT
  • pemspems Posts: 70
    edited 2008-10-08 22:26
    Note: Beau's character drawn diagram above may display shifted on your browser because of different fonts (mine was)
    the IO is attached between the two diodes, and not to +5V freaked.gif

    Thanks for the ideas Beau, i didn't know about a diode on the LDO ground trick
Sign In or Register to comment.